diff --git a/.bazelrc b/.bazelrc index 679eeec77a32..8687f4406cb9 100644 --- a/.bazelrc +++ b/.bazelrc @@ -11,6 +11,8 @@ build --compilation_mode opt common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub build --repo_env=CC=clang --repo_env=CXX=clang++ +# Disable Android SDK auto-detection (we don't use it, and rules_android has Bazel 9 compatibility issues) +build --repo_env=ANDROID_HOME= # print test output, like sembuild does. # Set to `errors` if this is too verbose. @@ -34,7 +36,7 @@ common --@rules_dotnet//dotnet/settings:strict_deps=false common --@rules_rust//rust/toolchain/channel=nightly # Reduce this eventually to empty, once we've fixed all our usages of java, and https://github.com/bazel-contrib/rules_go/issues/4193 is fixed -common --incompatible_autoload_externally="+@rules_java,+@rules_shell" +common --incompatible_autoload_externally="+@rules_cc,+@rules_java,+@rules_shell" build --java_language_version=17 build --tool_java_language_version=17 diff --git a/.bazelversion b/.bazelversion index e7fdef7e2e63..f7ee06693c17 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -8.4.2 +9.0.0 diff --git a/MODULE.bazel b/MODULE.bazel index b24546d4a3c1..2b37719584cd 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -15,20 +15,22 @@ local_path_override( # see https://registry.bazel.build/ for a list of available packages bazel_dep(name = "platforms", version = "1.0.0") -bazel_dep(name = "rules_go", version = "0.56.1") +bazel_dep(name = "rules_cc", version = "0.2.16") +bazel_dep(name = "rules_go", version = "0.59.0") +bazel_dep(name = "rules_java", version = "9.0.3") bazel_dep(name = "rules_pkg", version = "1.0.1") -bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1") +bazel_dep(name = "rules_nodejs", version = "6.7.3") bazel_dep(name = "rules_python", version = "0.40.0") bazel_dep(name = "rules_shell", version = "0.5.0") bazel_dep(name = "bazel_skylib", version = "1.8.1") bazel_dep(name = "abseil-cpp", version = "20240116.1", repo_name = "absl") bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json") bazel_dep(name = "fmt", version = "12.1.0-codeql.1") -bazel_dep(name = "rules_kotlin", version = "2.2.0-codeql.1") -bazel_dep(name = "gazelle", version = "0.40.0") +bazel_dep(name = "rules_kotlin", version = "2.2.2-codeql.1") +bazel_dep(name = "gazelle", version = "0.47.0") bazel_dep(name = "rules_dotnet", version = "0.21.5-codeql.1") bazel_dep(name = "googletest", version = "1.14.0.bcr.1") -bazel_dep(name = "rules_rust", version = "0.66.0") +bazel_dep(name = "rules_rust", version = "0.68.1.codeql.1") bazel_dep(name = "zstd", version = "1.5.5.bcr.1") bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True) @@ -41,7 +43,7 @@ RUST_EDITION = "2024" # a nightly toolchain is required to enable experimental_use_cc_common_link, which we require internally # we prefer to run the same version as internally, even if experimental_use_cc_common_link is not really # required in this repo -RUST_VERSION = "nightly/2025-08-01" +RUST_VERSION = "nightly/2026-01-22" rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") rust.toolchain( @@ -53,26 +55,26 @@ rust.toolchain( ], # generated by buildutils-internal/scripts/fill-rust-sha256s.py (internal repo) sha256s = { - "2025-08-01/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz": "9bbeaf5d3fc7247d31463a9083aa251c995cc50662c8219e7a2254d76a72a9a4", - "2025-08-01/rustc-nightly-x86_64-apple-darwin.tar.xz": "c9ea539a8eff0d5d162701f99f9e1aabe14dd0dfb420d62362817a5d09219de7", - "2025-08-01/rustc-nightly-aarch64-apple-darwin.tar.xz": "ae83feebbc39cfd982e4ecc8297731fe79c185173aee138467b334c5404b3773", - "2025-08-01/rustc-nightly-x86_64-pc-windows-msvc.tar.xz": "9f170c30d802a349be60cf52ec46260802093cb1013ad667fc0d528b7b10152f", - "2025-08-01/clippy-nightly-x86_64-unknown-linux-gnu.tar.xz": "9ae5f3cd8f557c4f6df522597c69d14398cf604cfaed2b83e767c4b77a7eaaf6", - "2025-08-01/clippy-nightly-x86_64-apple-darwin.tar.xz": "983cb9ee0b6b968188e04ab2d33743d54764b2681ce565e1b3f2b9135c696a3e", - "2025-08-01/clippy-nightly-aarch64-apple-darwin.tar.xz": "ed2219dbc49d088225e1b7c5c4390fa295066e071fddaa2714018f6bb39ddbf0", - "2025-08-01/clippy-nightly-x86_64-pc-windows-msvc.tar.xz": "911f40ab5cbdd686f40e00965271fe47c4805513a308ed01f30eafb25b448a50", - "2025-08-01/cargo-nightly-x86_64-unknown-linux-gnu.tar.xz": "106463c284e48e4904c717471eeec2be5cc83a9d2cae8d6e948b52438cad2e69", - "2025-08-01/cargo-nightly-x86_64-apple-darwin.tar.xz": "6ad35c40efc41a8c531ea43235058347b6902d98a9693bf0aed7fc16d5590cef", - "2025-08-01/cargo-nightly-aarch64-apple-darwin.tar.xz": "dd28c365e9d298abc3154c797720ad36a0058f131265c9978b4c8e4e37012c8a", - "2025-08-01/cargo-nightly-x86_64-pc-windows-msvc.tar.xz": "7b431286e12d6b3834b038f078389a00cac73f351e8c3152b2504a3c06420b3b", - "2025-08-01/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz": "e342e305d7927cc288d386983b2bc253cfad3776b113386e903d0b302648ef47", - "2025-08-01/llvm-tools-nightly-x86_64-apple-darwin.tar.xz": "e44dd3506524d85c37b3a54bcc91d01378fd2c590b2db5c5974d12f05c1b84d1", - "2025-08-01/llvm-tools-nightly-aarch64-apple-darwin.tar.xz": "0c1b5f46dd81be4a9227b10283a0fcaa39c14fea7e81aea6fd6d9887ff6cdc41", - "2025-08-01/llvm-tools-nightly-x86_64-pc-windows-msvc.tar.xz": "423e5fd11406adccbc31b8456ceb7375ce055cdf45e90d2c3babeb2d7f58383f", - "2025-08-01/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz": "3c0ceb46a252647a1d4c7116d9ccae684fa5e42aaf3296419febd2c962c3b41d", - "2025-08-01/rust-std-nightly-x86_64-apple-darwin.tar.xz": "3be416003cab10f767390a753d1d16ae4d26c7421c03c98992cf1943e5b0efe8", - "2025-08-01/rust-std-nightly-aarch64-apple-darwin.tar.xz": "4046ac0ef951cb056b5028a399124f60999fa37792eab69d008d8d7965f389b4", - "2025-08-01/rust-std-nightly-x86_64-pc-windows-msvc.tar.xz": "191ed9d8603c3a4fe5a7bbbc2feb72049078dae2df3d3b7d5dedf3abbf823e6e", + "2026-01-22/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz": "88db619323cc1321630d124efa51ed02fabc5e020f08cfa0eda2c0ac1afbe69a", + "2026-01-22/rustc-nightly-x86_64-apple-darwin.tar.xz": "08484da3fa38db56f93629aeabdc0ae9ff8ed9704c0792d35259cbc849b3f54c", + "2026-01-22/rustc-nightly-aarch64-apple-darwin.tar.xz": "a39c0b21b7058e364ea1bd43144e42e4bf1efade036b2e82455f2afce194ee81", + "2026-01-22/rustc-nightly-x86_64-pc-windows-msvc.tar.xz": "d00248ee9850dbb6932b2578e32ff74fc7c429854c1aa071066ca31b65385a3b", + "2026-01-22/clippy-nightly-x86_64-unknown-linux-gnu.tar.xz": "70656a0ce994ffff16d5a35a7b170a0acd41e9bb54a589c96ed45bf97b094a4d", + "2026-01-22/clippy-nightly-x86_64-apple-darwin.tar.xz": "fe242519fa961522734733009705aec3c2d9a20cc57291f2aa614e5e6262c88f", + "2026-01-22/clippy-nightly-aarch64-apple-darwin.tar.xz": "38bb226363ec97c9722edf966cd58774a683e19fd2ff2a6030094445d51e06f9", + "2026-01-22/clippy-nightly-x86_64-pc-windows-msvc.tar.xz": "6da9b4470beea67abfebf046f141eee0d2a8db7c7a9e4e2294478734fd477228", + "2026-01-22/cargo-nightly-x86_64-unknown-linux-gnu.tar.xz": "99004e9d10c43a01499642f53bb3184d41137a95d65bfb217098840a9e79e892", + "2026-01-22/cargo-nightly-x86_64-apple-darwin.tar.xz": "6e021394cf8d8400ac6cfdfcef24e4d74f988e91eb8028b36de3a64ce3502990", + "2026-01-22/cargo-nightly-aarch64-apple-darwin.tar.xz": "4b2494cb69ab64132cddbc411a38ea9f1105e54d6f986e43168d54f79510c673", + "2026-01-22/cargo-nightly-x86_64-pc-windows-msvc.tar.xz": "c36613cf57407212d10d37b76e49a60ff42336e953cdff9e177283f530a83fc1", + "2026-01-22/llvm-tools-nightly-x86_64-unknown-linux-gnu.tar.xz": "0b123c5027dbd833aae6845ffe9bd07d309bf798746a7176aadaea68fbcbd05d", + "2026-01-22/llvm-tools-nightly-x86_64-apple-darwin.tar.xz": "a47864491ad5619158c950ab7570fb6e487d5117338585c27334d45824b406d8", + "2026-01-22/llvm-tools-nightly-aarch64-apple-darwin.tar.xz": "db9bc826d6e2e7e914505d50157682e516ceb90357e83d77abddc32c2d962f41", + "2026-01-22/llvm-tools-nightly-x86_64-pc-windows-msvc.tar.xz": "ffaa406932b2fe62e01dad61cf4ed34860a5d2a6f9306ca340d79e630d930039", + "2026-01-22/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz": "e9c0d5e06e18a4b509391b3088f29293e310cdc8ccc865be8fa3f09733326925", + "2026-01-22/rust-std-nightly-x86_64-apple-darwin.tar.xz": "25d75995cee679a4828ca9fe48c5a31a67c3b0846018440ef912e5a6208f53f6", + "2026-01-22/rust-std-nightly-aarch64-apple-darwin.tar.xz": "e4132bf3f2eed4684c86756a02315bcf481c23e675e3e25630fc604c9cb4594c", + "2026-01-22/rust-std-nightly-x86_64-pc-windows-msvc.tar.xz": "961bb535ef95ae8a5fa4e224cb94aff190f155c45a9bcf7a53e184b024aa41b1", }, versions = [RUST_VERSION], ) @@ -188,6 +190,15 @@ pip.parse( ) use_repo(pip, "codegen_deps") +python = use_extension("@rules_python//python/extensions:python.bzl", "python") +python.toolchain( + is_default = True, + python_version = "3.12", +) +use_repo(python, "python_3_12", "python_versions") + +register_toolchains("@python_versions//3.12:all") + swift_deps = use_extension("//swift/third_party:load.bzl", "swift_deps") # following list can be kept in sync with `bazel mod tidy` @@ -254,11 +265,11 @@ use_repo( ) go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") -go_sdk.download(version = "1.25.0") +go_sdk.download(version = "1.26.0") go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") go_deps.from_file(go_mod = "//go/extractor:go.mod") -use_repo(go_deps, "org_golang_x_mod", "org_golang_x_tools") +use_repo(go_deps, "com_github_stretchr_testify", "org_golang_x_mod", "org_golang_x_tools") ripunzip_archive = use_repo_rule("//misc/ripunzip:ripunzip.bzl", "ripunzip_archive") diff --git a/actions/ql/lib/CHANGELOG.md b/actions/ql/lib/CHANGELOG.md index d2e85ddb6a27..1b41f2f2f5e0 100644 --- a/actions/ql/lib/CHANGELOG.md +++ b/actions/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.28 + +No user-facing changes. + ## 0.4.27 ### Bug Fixes diff --git a/actions/ql/lib/change-notes/released/0.4.28.md b/actions/ql/lib/change-notes/released/0.4.28.md new file mode 100644 index 000000000000..af10bae2ab56 --- /dev/null +++ b/actions/ql/lib/change-notes/released/0.4.28.md @@ -0,0 +1,3 @@ +## 0.4.28 + +No user-facing changes. diff --git a/actions/ql/lib/codeql-pack.release.yml b/actions/ql/lib/codeql-pack.release.yml index 5e24b634389f..ff6beb81526d 100644 --- a/actions/ql/lib/codeql-pack.release.yml +++ b/actions/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.4.27 +lastReleaseVersion: 0.4.28 diff --git a/actions/ql/lib/qlpack.yml b/actions/ql/lib/qlpack.yml index aa29568caf7c..a9d5b7e61f63 100644 --- a/actions/ql/lib/qlpack.yml +++ b/actions/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-all -version: 0.4.27 +version: 0.4.29-dev library: true warnOnImplicitThis: true dependencies: diff --git a/actions/ql/src/CHANGELOG.md b/actions/ql/src/CHANGELOG.md index ebf6b7214c99..c92b28841fab 100644 --- a/actions/ql/src/CHANGELOG.md +++ b/actions/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.20 + +No user-facing changes. + ## 0.6.19 No user-facing changes. diff --git a/actions/ql/src/change-notes/released/0.6.20.md b/actions/ql/src/change-notes/released/0.6.20.md new file mode 100644 index 000000000000..35c1118ff451 --- /dev/null +++ b/actions/ql/src/change-notes/released/0.6.20.md @@ -0,0 +1,3 @@ +## 0.6.20 + +No user-facing changes. diff --git a/actions/ql/src/codeql-pack.release.yml b/actions/ql/src/codeql-pack.release.yml index 2baec50a823b..e30c5c64b1b5 100644 --- a/actions/ql/src/codeql-pack.release.yml +++ b/actions/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.6.19 +lastReleaseVersion: 0.6.20 diff --git a/actions/ql/src/qlpack.yml b/actions/ql/src/qlpack.yml index 7b9f281601a7..f4e731dc26da 100644 --- a/actions/ql/src/qlpack.yml +++ b/actions/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-queries -version: 0.6.19 +version: 0.6.21-dev library: false warnOnImplicitThis: true groups: [actions, queries] diff --git a/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/in_trap.ql b/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/in_trap.ql new file mode 100644 index 000000000000..5ea4f67776b4 --- /dev/null +++ b/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/in_trap.ql @@ -0,0 +1,21 @@ +class Element extends @element { + string toString() { none() } +} + +class Trap extends @trap { + string toString() { none() } +} + +class Tag extends @tag { + string toString() { none() } +} + +from Element e, Trap trap +where + in_trap_or_tag(e, trap) + or + exists(Tag tag | + in_trap_or_tag(e, tag) and + trap_uses_tag(trap, tag) + ) +select e, trap diff --git a/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/old.dbscheme b/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/old.dbscheme new file mode 100644 index 000000000000..770002bb0232 --- /dev/null +++ b/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/old.dbscheme @@ -0,0 +1,2545 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +/** + * Gives the TRAP filename that `trap` is associated with. + * For debugging only. + */ +trap_filename( + int trap: @trap, + string filename: string ref +); + +/** + * Gives the tag name for `tag`. + * For debugging only. + */ +tag_name( + int tag: @tag, + string name: string ref +); + +@trap_or_tag = @tag | @trap; + +/** + * Gives the name for the source file. + */ +source_file_name( + int sf: @source_file, + string name: string ref +); + +/** + * In `build-mode: none` overlay mode, indicates that `source_file` + * (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the + * TRAP file corresponding to `foo.c`, something it transitively + * includes, or a template instantiation it transitively uses. + */ +source_file_uses_trap( + int source_file: @source_file ref, + int trap_file: @trap ref +); + +/** + * In `build-mode: none` overlay mode, indicates that the TRAP file + * `trap_file` uses tag `tag`. + */ +trap_uses_tag( + int trap_file: @trap ref, + int tag: @tag ref +); + +/** + * Holds if there is a definition of `element` in TRAP file or tag `t`. + */ +in_trap_or_tag( + int element: @element ref, + int t: @trap_or_tag ref +); + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +// ... 40 _Decimal32 +// ... 41 _Decimal64 +// ... 42 _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +case @type_operator.kind of + 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +case @usertype.kind of + 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +| 394 = @isinvocable +| 395 = @isnothrowinvocable +| 396 = @isbitwisecloneable +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + | @isinvocable + | @isnothrowinvocable + | @isbitwisecloneable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +param_ref_to_this( + int expr: @param_ref ref +) + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 17 = @ppd_embed +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +embeds( + unique int id: @ppd_embed ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/semmlecode.dbscheme b/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/semmlecode.dbscheme new file mode 100644 index 000000000000..7e7c2f55670f --- /dev/null +++ b/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/semmlecode.dbscheme @@ -0,0 +1,2517 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +/** + * Gives the TRAP filename that `trap` is associated with. + * For debugging only. + */ +trap_filename( + int trap: @trap, + string filename: string ref +); + +/** + * In `build-mode: none` overlay mode, indicates that `source_file` + * (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the + * TRAP file corresponding to `foo.c`, something it transitively + * includes, or a template instantiation it transitively uses. + */ +source_file_uses_trap( + string source_file: string ref, + int trap_file: @trap ref +); + +/** + * Holds if there is a definition of `element` in TRAP file `trap_file`. + */ +in_trap( + int element: @element ref, + int trap_file: @trap ref +); + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +// ... 40 _Decimal32 +// ... 41 _Decimal64 +// ... 42 _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +case @type_operator.kind of + 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +case @usertype.kind of + 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +| 394 = @isinvocable +| 395 = @isnothrowinvocable +| 396 = @isbitwisecloneable +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + | @isinvocable + | @isnothrowinvocable + | @isbitwisecloneable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +param_ref_to_this( + int expr: @param_ref ref +) + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 17 = @ppd_embed +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +embeds( + unique int id: @ppd_embed ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/source_file_uses_trap.ql b/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/source_file_uses_trap.ql new file mode 100644 index 000000000000..7e91f4e0b86a --- /dev/null +++ b/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/source_file_uses_trap.ql @@ -0,0 +1,13 @@ +class SourceFile extends @source_file { + string toString() { none() } +} + +class Trap extends @trap { + string toString() { none() } +} + +from SourceFile source_file, string name, Trap trap +where + source_file_uses_trap(source_file, trap) and + source_file_name(source_file, name) +select name, trap diff --git a/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/upgrade.properties b/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/upgrade.properties new file mode 100644 index 000000000000..8b75a52f182a --- /dev/null +++ b/cpp/downgrades/770002bb02322e04fa25345838ce6e82af285a0b/upgrade.properties @@ -0,0 +1,8 @@ +description: Add source_file_name +compatibility: backwards +source_file_uses_trap.rel: run source_file_uses_trap.ql +source_file_name.rel: delete +tag_name.rel: delete +trap_uses_tag.rel: delete +in_trap.rel: run in_trap.ql +in_trap_or_tag.rel: delete diff --git a/cpp/downgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/old.dbscheme b/cpp/downgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/old.dbscheme new file mode 100644 index 000000000000..7e7c2f55670f --- /dev/null +++ b/cpp/downgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/old.dbscheme @@ -0,0 +1,2517 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +/** + * Gives the TRAP filename that `trap` is associated with. + * For debugging only. + */ +trap_filename( + int trap: @trap, + string filename: string ref +); + +/** + * In `build-mode: none` overlay mode, indicates that `source_file` + * (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the + * TRAP file corresponding to `foo.c`, something it transitively + * includes, or a template instantiation it transitively uses. + */ +source_file_uses_trap( + string source_file: string ref, + int trap_file: @trap ref +); + +/** + * Holds if there is a definition of `element` in TRAP file `trap_file`. + */ +in_trap( + int element: @element ref, + int trap_file: @trap ref +); + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +// ... 40 _Decimal32 +// ... 41 _Decimal64 +// ... 42 _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +case @type_operator.kind of + 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +case @usertype.kind of + 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +| 394 = @isinvocable +| 395 = @isnothrowinvocable +| 396 = @isbitwisecloneable +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + | @isinvocable + | @isnothrowinvocable + | @isbitwisecloneable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +param_ref_to_this( + int expr: @param_ref ref +) + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 17 = @ppd_embed +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +embeds( + unique int id: @ppd_embed ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/downgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/semmlecode.dbscheme b/cpp/downgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/semmlecode.dbscheme new file mode 100644 index 000000000000..9439176c1d13 --- /dev/null +++ b/cpp/downgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/semmlecode.dbscheme @@ -0,0 +1,2489 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +// ... 40 _Decimal32 +// ... 41 _Decimal64 +// ... 42 _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +case @type_operator.kind of + 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +case @usertype.kind of + 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +| 394 = @isinvocable +| 395 = @isnothrowinvocable +| 396 = @isbitwisecloneable +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + | @isinvocable + | @isnothrowinvocable + | @isbitwisecloneable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +param_ref_to_this( + int expr: @param_ref ref +) + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 17 = @ppd_embed +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +embeds( + unique int id: @ppd_embed ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/downgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/upgrade.properties b/cpp/downgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/upgrade.properties new file mode 100644 index 000000000000..2f526418ae81 --- /dev/null +++ b/cpp/downgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/upgrade.properties @@ -0,0 +1,5 @@ +description: Add trap_filename, source_file_uses_trap and in_trap relations +compatibility: full +trap_filename.rel: delete +source_file_uses_trap.rel: delete +in_trap.rel: delete diff --git a/cpp/ql/lib/CHANGELOG.md b/cpp/ql/lib/CHANGELOG.md index 6f256c9499b4..91f4b009b2be 100644 --- a/cpp/ql/lib/CHANGELOG.md +++ b/cpp/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.1.1 + +### Minor Analysis Improvements + +* Added remote flow source models for the `winhttp.h` windows header and the Azure SDK core library for C/C++. + ## 7.1.0 ### New Features diff --git a/cpp/ql/lib/change-notes/2026-02-06-UncheckedLeapYearAfterModification_Refactor.md b/cpp/ql/lib/change-notes/2026-02-06-UncheckedLeapYearAfterModification_Refactor.md new file mode 100644 index 000000000000..4a2cf3ef189d --- /dev/null +++ b/cpp/ql/lib/change-notes/2026-02-06-UncheckedLeapYearAfterModification_Refactor.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Refactored the "Year field changed using an arithmetic operation without checking for leap year" query (`cpp/leap-year/unchecked-after-arithmetic-year-modification`) to address large numbers of false positive results. \ No newline at end of file diff --git a/cpp/ql/lib/change-notes/2026-02-14-must-flow-fix.md b/cpp/ql/lib/change-notes/2026-02-14-must-flow-fix.md new file mode 100644 index 000000000000..fc838f51c068 --- /dev/null +++ b/cpp/ql/lib/change-notes/2026-02-14-must-flow-fix.md @@ -0,0 +1,4 @@ +--- +category: fix +--- +* The `allowInterproceduralFlow` predicate of must-flow data flow configurations now correctly handles direct recursion. diff --git a/cpp/ql/lib/change-notes/2026-02-14-must-flow.md b/cpp/ql/lib/change-notes/2026-02-14-must-flow.md new file mode 100644 index 000000000000..3d1afaa6344b --- /dev/null +++ b/cpp/ql/lib/change-notes/2026-02-14-must-flow.md @@ -0,0 +1,4 @@ +--- +category: breaking +--- +* `MustFlow`, the inter-procedural must-flow data flow analysis library, has been re-worked to use parameterized modules. Like in the case of data flow and taint tracking, instead of extending the `MustFlowConfiguration` class, the user should now implement a module with the `MustFlow::ConfigSig` signature, and instantiate the `MustFlow::Global` parameterized module with the implemented module. diff --git a/cpp/ql/lib/change-notes/2026-02-24-barrier-guards.md b/cpp/ql/lib/change-notes/2026-02-24-barrier-guards.md new file mode 100644 index 000000000000..8ebd788f9f8f --- /dev/null +++ b/cpp/ql/lib/change-notes/2026-02-24-barrier-guards.md @@ -0,0 +1,4 @@ +--- +category: breaking +--- +* CodeQL version 2.24.2 accidentially introduced a syntactical breaking change to `BarrierGuard<...>::getAnIndirectBarrierNode` and `InstructionBarrierGuard<...>::getAnIndirectBarrierNode`. These breaking changes have now been reverted so that the original code compiles again. \ No newline at end of file diff --git a/cpp/ql/lib/change-notes/released/7.1.1.md b/cpp/ql/lib/change-notes/released/7.1.1.md new file mode 100644 index 000000000000..16bba7ca5084 --- /dev/null +++ b/cpp/ql/lib/change-notes/released/7.1.1.md @@ -0,0 +1,5 @@ +## 7.1.1 + +### Minor Analysis Improvements + +* Added remote flow source models for the `winhttp.h` windows header and the Azure SDK core library for C/C++. diff --git a/cpp/ql/lib/codeql-pack.release.yml b/cpp/ql/lib/codeql-pack.release.yml index dcaaa76112a6..8e970df6cae3 100644 --- a/cpp/ql/lib/codeql-pack.release.yml +++ b/cpp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 7.1.0 +lastReleaseVersion: 7.1.1 diff --git a/cpp/ql/lib/ext/Windows.model.yml b/cpp/ql/lib/ext/Windows.model.yml index ccebfc9f3401..a2ec30d95bda 100644 --- a/cpp/ql/lib/ext/Windows.model.yml +++ b/cpp/ql/lib/ext/Windows.model.yml @@ -24,6 +24,13 @@ extensions: - ["", "", False, "MapViewOfFileNuma2", "", "", "ReturnValue[*]", "local", "manual"] # ntifs.h - ["", "", False, "NtReadFile", "", "", "Argument[*5]", "local", "manual"] + # winhttp.h + - ["", "", False, "WinHttpReadData", "", "", "Argument[*1]", "remote", "manual"] + - ["", "", False, "WinHttpReadDataEx", "", "", "Argument[*1]", "remote", "manual"] + - ["", "", False, "WinHttpQueryHeaders", "", "", "Argument[*3]", "remote", "manual"] + - ["", "", False, "WinHttpQueryHeadersEx", "", "", "Argument[*5]", "remote", "manual"] + - ["", "", False, "WinHttpQueryHeadersEx", "", "", "Argument[*6]", "remote", "manual"] + - ["", "", False, "WinHttpQueryHeadersEx", "", "", "Argument[**8]", "remote", "manual"] - addsTo: pack: codeql/cpp-all extensible: summaryModel @@ -46,4 +53,6 @@ extensions: - ["", "", False, "RtlMoveMemory", "", "", "Argument[*@1]", "Argument[*@0]", "value", "manual"] - ["", "", False, "RtlMoveVolatileMemory", "", "", "Argument[*@1]", "Argument[*@0]", "value", "manual"] # winternl.h - - ["", "", False, "RtlInitUnicodeString", "", "", "Argument[*1]", "Argument[*0].Field[*Buffer]", "value", "manual"] \ No newline at end of file + - ["", "", False, "RtlInitUnicodeString", "", "", "Argument[*1]", "Argument[*0].Field[*Buffer]", "value", "manual"] + # winhttp.h + - ["", "", False, "WinHttpCrackUrl", "", "", "Argument[*0]", "Argument[*3]", "taint", "manual"] \ No newline at end of file diff --git a/cpp/ql/lib/ext/azure.core.model.yml b/cpp/ql/lib/ext/azure.core.model.yml new file mode 100644 index 000000000000..7c5280b0f180 --- /dev/null +++ b/cpp/ql/lib/ext/azure.core.model.yml @@ -0,0 +1,41 @@ +extensions: + - addsTo: + pack: codeql/cpp-all + extensible: sourceModel + data: # namespace, type, subtypes, name, signature, ext, output, kind, provenance + - ["Azure::Core::Http", "RawResponse", True, "GetHeaders", "", "", "ReturnValue[*]", "remote", "manual"] + - ["Azure::Core::Http", "RawResponse", True, "GetBody", "", "", "ReturnValue[*]", "remote", "manual"] + - ["Azure::Core::Http", "RawResponse", True, "ExtractBodyStream", "", "", "ReturnValue[*]", "remote", "manual"] + - ["Azure::Core::Http", "Request", True, "GetHeaders", "", "", "ReturnValue", "remote", "manual"] + - ["Azure::Core::Http", "Request", True, "GetHeader", "", "", "ReturnValue", "remote", "manual"] + - ["Azure::Core::Http", "Request", True, "GetBodyStream", "", "", "ReturnValue[*]", "remote", "manual"] + + - addsTo: + pack: codeql/cpp-all + extensible: summaryModel + data: # namespace, type, subtypes, name, signature, ext, input, output, kind, provenance + - ["Azure::Core", "Url", True, "Url", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["Azure::Core", "Url", True, "SetScheme", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["Azure::Core", "Url", True, "SetHost", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["Azure::Core", "Url", True, "SetPort", "", "", "Argument[0]", "Argument[-1]", "taint", "manual"] + - ["Azure::Core", "Url", True, "SetPath", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["Azure::Core", "Url", True, "SetQueryParameters", "", "", "Argument[0]", "Argument[-1]", "taint", "manual"] + - ["Azure::Core", "Url", True, "AppendPath", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["Azure::Core", "Url", True, "AppendQueryParameter", "", "", "Argument[*1]", "Argument[-1]", "taint", "manual"] + - ["Azure::Core", "Url", True, "GetHost", "", "", "Argument[-1]", "ReturnValue[*]", "taint", "manual"] + - ["Azure::Core", "Url", True, "GetPath", "", "", "Argument[-1]", "ReturnValue[*]", "taint", "manual"] + - ["Azure::Core", "Url", True, "GetPort", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"] + - ["Azure::Core", "Url", True, "GetQueryParameters", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"] + - ["Azure::Core", "Url", True, "GetScheme", "", "", "Argument[-1]", "ReturnValue[*]", "taint", "manual"] + - ["Azure::Core", "Url", True, "GetRelativeUrl", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"] + - ["Azure::Core", "Url", True, "GetAbsoluteUrl", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"] + - ["Azure::Core", "Url", True, "Decode", "", "", "Argument[*0]", "ReturnValue", "taint", "manual"] + - ["Azure::Core", "Url", True, "Encode", "", "", "Argument[*0]", "ReturnValue", "taint", "manual"] + - ["Azure::Core::IO", "BodyStream", True, "Read", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["Azure::Core::IO", "BodyStream", True, "ReadToCount", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["Azure::Core::IO", "BodyStream", True, "ReadToEnd", "", "", "Argument[-1]", "ReturnValue.Element", "taint", "manual"] + - ["Azure", "Nullable", True, "Nullable", "", "", "Argument[0]", "Argument[-1]", "taint", "manual"] + - ["Azure", "Nullable", True, "operator=", "", "", "Argument[*0]", "Argument[-1]", "value", "manual"] + - ["Azure", "Nullable", True, "Value", "", "", "Argument[-1]", "ReturnValue[*]", "taint", "manual"] + - ["Azure", "Nullable", True, "operator->", "", "", "Argument[-1]", "ReturnValue[*]", "taint", "manual"] + - ["Azure", "Nullable", True, "operator*", "", "", "Argument[-1]", "ReturnValue[*]", "taint", "manual"] \ No newline at end of file diff --git a/cpp/ql/lib/qlpack.yml b/cpp/ql/lib/qlpack.yml index ac07194106ad..31ce003aadc6 100644 --- a/cpp/ql/lib/qlpack.yml +++ b/cpp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-all -version: 7.1.0 +version: 7.1.2-dev groups: cpp dbscheme: semmlecode.cpp.dbscheme extractor: cpp diff --git a/cpp/ql/lib/semmle/code/cpp/commons/DateTime.qll b/cpp/ql/lib/semmle/code/cpp/commons/DateTime.qll index c67bf7cf96e3..a40221610763 100644 --- a/cpp/ql/lib/semmle/code/cpp/commons/DateTime.qll +++ b/cpp/ql/lib/semmle/code/cpp/commons/DateTime.qll @@ -14,7 +14,9 @@ class PackedTimeType extends Type { } } -private predicate timeType(string typeName) { typeName = ["_SYSTEMTIME", "SYSTEMTIME", "tm"] } +private predicate timeType(string typeName) { + typeName = ["_SYSTEMTIME", "SYSTEMTIME", "tm", "TIME_FIELDS", "_TIME_FIELDS", "PTIME_FIELDS"] +} /** * A type that is used to represent times and dates in an 'unpacked' form, that is, @@ -95,3 +97,24 @@ class StructTmMonthFieldAccess extends MonthFieldAccess { class StructTmYearFieldAccess extends YearFieldAccess { StructTmYearFieldAccess() { this.getTarget().getName() = "tm_year" } } + +/** + * A `DayFieldAccess` for the `TIME_FIELDS` struct. + */ +class TimeFieldsDayFieldAccess extends DayFieldAccess { + TimeFieldsDayFieldAccess() { this.getTarget().getName() = "Day" } +} + +/** + * A `MonthFieldAccess` for the `TIME_FIELDS` struct. + */ +class TimeFieldsMonthFieldAccess extends MonthFieldAccess { + TimeFieldsMonthFieldAccess() { this.getTarget().getName() = "Month" } +} + +/** + * A `YearFieldAccess` for the `TIME_FIELDS` struct. + */ +class TimeFieldsYearFieldAccess extends YearFieldAccess { + TimeFieldsYearFieldAccess() { this.getTarget().getName() = "Year" } +} diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll index cf8f01e69442..1ffe2a41a6b0 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll @@ -555,6 +555,7 @@ private Locatable getSupportedFunctionTemplateArgument(Function templateFunction * Normalize the `n`'th parameter of `f` by replacing template names * with `func:N` (where `N` is the index of the template). */ +pragma[nomagic] private string getTypeNameWithoutFunctionTemplates(Function f, int n, int remaining) { exists(Function templateFunction | templateFunction = getFullyTemplatedFunction(f) and diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowSummaryImpl.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowSummaryImpl.qll index af3e25ba7344..cce1b80e7fcb 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowSummaryImpl.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowSummaryImpl.qll @@ -201,7 +201,7 @@ module SourceSinkInterpretationInput implements string toString() { result = this.asElement().toString() or - result = this.asNode().toString() + result = this.asNode().toStringImpl() or result = this.asCall().toString() } diff --git a/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll b/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll index 8035a09809af..3dea144bbf67 100644 --- a/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll +++ b/cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll @@ -34,6 +34,38 @@ private string getSingleLocationFilePath(@element e) { macroinvocations(e, _, loc, _) or preprocdirects(e, _, loc) + or + diagnostics(e, _, _, _, _, loc) + or + usings(e, _, loc, _) + or + static_asserts(e, _, _, loc, _) + or + derivations(e, _, _, _, loc) + or + frienddecls(e, _, _, loc) + or + comments(e, _, loc) + or + exprs(e, _, loc) + or + stmts(e, _, loc) + or + initialisers(e, _, _, loc) + or + attributes(e, _, _, _, loc) + or + attribute_args(e, _, _, _, loc) + or + namequalifiers(e, _, _, loc) + or + enumconstants(e, _, _, _, _, loc) + or + type_mentions(e, _, loc, _) + or + lambda_capture(e, _, _, _, _, _, loc) + or + concept_templates(e, _, loc) | result = getLocationFilePath(loc) ) @@ -64,17 +96,27 @@ private string getMultiLocationFilePath(@element e) { overlay[local] private predicate isBase() { not isOverlay() } +/** + * Holds if `path` was extracted in the overlay database. + */ +overlay[local] +private predicate overlayHasFile(string path) { + isOverlay() and + files(_, path) and + path != "" +} + /** * Discards an element from the base variant if: - * - It has a single location in a changed file, or - * - All of its locations are in changed files. + * - It has a single location in a file extracted in the overlay, or + * - All of its locations are in files extracted in the overlay. */ overlay[discard_entity] private predicate discardElement(@element e) { isBase() and ( - overlayChangedFiles(getSingleLocationFilePath(e)) + overlayHasFile(getSingleLocationFilePath(e)) or - forex(string path | path = getMultiLocationFilePath(e) | overlayChangedFiles(path)) + forex(string path | path = getMultiLocationFilePath(e) | overlayHasFile(path)) ) } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/MustFlow.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/MustFlow.qll index b085440f6bcd..2b61190fb71e 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/MustFlow.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/MustFlow.qll @@ -8,83 +8,145 @@ private import cpp private import semmle.code.cpp.ir.IR /** - * A configuration of a data flow analysis that performs must-flow analysis. This is different - * from `DataFlow.qll` which performs may-flow analysis (i.e., it finds paths where the source _may_ - * flow to the sink). - * - * Like in `DataFlow.qll`, each use of the `MustFlow.qll` library must define its own unique extension - * of this abstract class. To create a configuration, extend this class with a subclass whose - * characteristic predicate is a unique singleton string and override `isSource`, `isSink` (and - * `isAdditionalFlowStep` if additional steps are required). + * Provides an inter-procedural must-flow data flow analysis. */ -abstract class MustFlowConfiguration extends string { - bindingset[this] - MustFlowConfiguration() { any() } - - /** - * Holds if `source` is a relevant data flow source. - */ - abstract predicate isSource(Instruction source); - +module MustFlow { /** - * Holds if `sink` is a relevant data flow sink. + * An input configuration of a data flow analysis that performs must-flow analysis. This is different + * from `DataFlow.qll` which performs may-flow analysis (i.e., it finds paths where the source _may_ + * flow to the sink). */ - abstract predicate isSink(Operand sink); - - /** - * Holds if data flow through `instr` is prohibited. - */ - predicate isBarrier(Instruction instr) { none() } + signature module ConfigSig { + /** + * Holds if `source` is a relevant data flow source. + */ + predicate isSource(Instruction source); + + /** + * Holds if `sink` is a relevant data flow sink. + */ + predicate isSink(Operand sink); + + /** + * Holds if data flow through `instr` is prohibited. + */ + default predicate isBarrier(Instruction instr) { none() } + + /** + * Holds if the additional flow step from `node1` to `node2` must be taken + * into account in the analysis. + */ + default predicate isAdditionalFlowStep(Operand node1, Instruction node2) { none() } + + /** Holds if this configuration allows flow from arguments to parameters. */ + default predicate allowInterproceduralFlow() { any() } + } /** - * Holds if the additional flow step from `node1` to `node2` must be taken - * into account in the analysis. + * Constructs a global must-flow computation. */ - predicate isAdditionalFlowStep(Operand node1, Instruction node2) { none() } - - /** Holds if this configuration allows flow from arguments to parameters. */ - predicate allowInterproceduralFlow() { any() } + module Global { + import Config + + /** + * Holds if data must flow from `source` to `sink`. + * + * The corresponding paths are generated from the end-points and the graph + * included in the module `PathGraph`. + */ + predicate flowPath(PathNode source, PathSink sink) { + isSource(source.getInstruction()) and + source.getASuccessor*() = sink + } + + /** Holds if `node` flows from a source. */ + pragma[nomagic] + private predicate flowsFromSource(Instruction node) { + not isBarrier(node) and + ( + isSource(node) + or + exists(Instruction mid | + step(mid, node) and + flowsFromSource(mid) + ) + ) + } + + /** Holds if `node` flows to a sink. */ + pragma[nomagic] + private predicate flowsToSink(Instruction node) { + flowsFromSource(node) and + ( + isSink(node.getAUse()) + or + exists(Instruction mid | + step(node, mid) and + flowsToSink(mid) + ) + ) + } - /** - * Holds if data must flow from `source` to `sink` for this configuration. - * - * The corresponding paths are generated from the end-points and the graph - * included in the module `PathGraph`. - */ - final predicate hasFlowPath(MustFlowPathNode source, MustFlowPathSink sink) { - this.isSource(source.getInstruction()) and - source.getASuccessor*() = sink + /** Holds if `nodeFrom` flows to `nodeTo`. */ + private predicate step(Instruction nodeFrom, Instruction nodeTo) { + Cached::localStep(nodeFrom, nodeTo) + or + allowInterproceduralFlow() and + Cached::flowThroughCallable(nodeFrom, nodeTo) + or + isAdditionalFlowStep(nodeFrom.getAUse(), nodeTo) + } + + private newtype TLocalPathNode = + MkLocalPathNode(Instruction n) { + flowsToSink(n) and + ( + isSource(n) + or + exists(PathNode mid | step(mid.getInstruction(), n)) + ) + } + + /** A `Node` that is in a path from a source to a sink. */ + class PathNode extends TLocalPathNode { + Instruction n; + + PathNode() { this = MkLocalPathNode(n) } + + /** Gets the underlying node. */ + Instruction getInstruction() { result = n } + + /** Gets a textual representation of this node. */ + string toString() { result = n.getAst().toString() } + + /** Gets the location of this element. */ + Location getLocation() { result = n.getLocation() } + + /** Gets a successor node, if any. */ + PathNode getASuccessor() { step(this.getInstruction(), result.getInstruction()) } + } + + private class PathSink extends PathNode { + PathSink() { isSink(this.getInstruction().getAUse()) } + } + + /** + * Provides the query predicates needed to include a graph in a path-problem query. + */ + module PathGraph { + private predicate reach(PathNode n) { n instanceof PathSink or reach(n.getASuccessor()) } + + /** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */ + query predicate edges(PathNode a, PathNode b) { a.getASuccessor() = b and reach(b) } + + /** Holds if `n` is a node in the graph of data flow path explanations. */ + query predicate nodes(PathNode n, string key, string val) { + reach(n) and key = "semmle.label" and val = n.toString() + } + } } } -/** Holds if `node` flows from a source. */ -pragma[nomagic] -private predicate flowsFromSource(Instruction node, MustFlowConfiguration config) { - not config.isBarrier(node) and - ( - config.isSource(node) - or - exists(Instruction mid | - step(mid, node, config) and - flowsFromSource(mid, pragma[only_bind_into](config)) - ) - ) -} - -/** Holds if `node` flows to a sink. */ -pragma[nomagic] -private predicate flowsToSink(Instruction node, MustFlowConfiguration config) { - flowsFromSource(node, pragma[only_bind_into](config)) and - ( - config.isSink(node.getAUse()) - or - exists(Instruction mid | - step(node, mid, config) and - flowsToSink(mid, pragma[only_bind_into](config)) - ) - ) -} - cached private module Cached { /** Holds if `p` is the `n`'th parameter of the non-virtual function `f`. */ @@ -102,7 +164,7 @@ private module Cached { not f.isVirtual() and call.getPositionalArgument(n) = instr and f = call.getStaticCallTarget() and - getEnclosingNonVirtualFunctionInitializeParameter(init, f) and + isEnclosingNonVirtualFunctionInitializeParameter(init, f) and init.getParameter().getIndex() = pragma[only_bind_into](pragma[only_bind_out](n)) } @@ -111,7 +173,7 @@ private module Cached { * corresponding initialization instruction that receives the value of `instr` in `f`. */ pragma[noinline] - private predicate getPositionalArgumentInitParam( + private predicate isPositionalArgumentInitParam( CallInstruction call, Instruction instr, InitializeParameterInstruction init, Function f ) { exists(int n | @@ -126,18 +188,18 @@ private module Cached { * `instr` in `f`. */ pragma[noinline] - private predicate getThisArgumentInitParam( + private predicate isThisArgumentInitParam( CallInstruction call, Instruction instr, InitializeParameterInstruction init, Function f ) { not f.isVirtual() and call.getStaticCallTarget() = f and - getEnclosingNonVirtualFunctionInitializeParameter(init, f) and + isEnclosingNonVirtualFunctionInitializeParameter(init, f) and call.getThisArgument() = instr and init.getIRVariable() instanceof IRThisVariable } /** Holds if `f` is the enclosing non-virtual function of `init`. */ - private predicate getEnclosingNonVirtualFunctionInitializeParameter( + private predicate isEnclosingNonVirtualFunctionInitializeParameter( InitializeParameterInstruction init, Function f ) { not f.isVirtual() and @@ -145,7 +207,7 @@ private module Cached { } /** Holds if `f` is the enclosing non-virtual function of `init`. */ - private predicate getEnclosingNonVirtualFunctionInitializeIndirection( + private predicate isEnclosingNonVirtualFunctionInitializeIndirection( InitializeIndirectionInstruction init, Function f ) { not f.isVirtual() and @@ -153,15 +215,16 @@ private module Cached { } /** - * Holds if `instr` is an argument (or argument indirection) to a call, and - * `succ` is the corresponding initialization instruction in the call target. + * Holds if `argument` is an argument (or argument indirection) to a call, and + * `parameter` is the corresponding initialization instruction in the call target. */ - private predicate flowThroughCallable(Instruction argument, Instruction parameter) { + cached + predicate flowThroughCallable(Instruction argument, Instruction parameter) { // Flow from an argument to a parameter exists(CallInstruction call, InitializeParameterInstruction init | init = parameter | - getPositionalArgumentInitParam(call, argument, init, call.getStaticCallTarget()) + isPositionalArgumentInitParam(call, argument, init, call.getStaticCallTarget()) or - getThisArgumentInitParam(call, argument, init, call.getStaticCallTarget()) + isThisArgumentInitParam(call, argument, init, call.getStaticCallTarget()) ) or // Flow from argument indirection to parameter indirection @@ -170,7 +233,7 @@ private module Cached { | init = parameter and read.getPrimaryInstruction() = call and - getEnclosingNonVirtualFunctionInitializeIndirection(init, call.getStaticCallTarget()) + isEnclosingNonVirtualFunctionInitializeIndirection(init, call.getStaticCallTarget()) | exists(int n | read.getSideEffectOperand().getAnyDef() = argument and @@ -205,92 +268,10 @@ private module Cached { } cached - predicate step(Instruction nodeFrom, Instruction nodeTo) { + predicate localStep(Instruction nodeFrom, Instruction nodeTo) { exists(Operand mid | instructionToOperandStep(nodeFrom, mid) and operandToInstructionStep(mid, nodeTo) ) - or - flowThroughCallable(nodeFrom, nodeTo) - } -} - -/** - * Gets the enclosing callable of `n`. Unlike `n.getEnclosingCallable()`, this - * predicate ensures that joins go from `n` to the result instead of the other - * way around. - */ -pragma[inline] -private IRFunction getEnclosingCallable(Instruction n) { - pragma[only_bind_into](result) = pragma[only_bind_out](n).getEnclosingIRFunction() -} - -/** Holds if `nodeFrom` flows to `nodeTo`. */ -private predicate step(Instruction nodeFrom, Instruction nodeTo, MustFlowConfiguration config) { - exists(config) and - Cached::step(pragma[only_bind_into](nodeFrom), pragma[only_bind_into](nodeTo)) and - ( - config.allowInterproceduralFlow() - or - getEnclosingCallable(nodeFrom) = getEnclosingCallable(nodeTo) - ) - or - config.isAdditionalFlowStep(nodeFrom.getAUse(), nodeTo) -} - -private newtype TLocalPathNode = - MkLocalPathNode(Instruction n, MustFlowConfiguration config) { - flowsToSink(n, config) and - ( - config.isSource(n) - or - exists(MustFlowPathNode mid | step(mid.getInstruction(), n, config)) - ) - } - -/** A `Node` that is in a path from a source to a sink. */ -class MustFlowPathNode extends TLocalPathNode { - Instruction n; - - MustFlowPathNode() { this = MkLocalPathNode(n, _) } - - /** Gets the underlying node. */ - Instruction getInstruction() { result = n } - - /** Gets a textual representation of this node. */ - string toString() { result = n.getAst().toString() } - - /** Gets the location of this element. */ - Location getLocation() { result = n.getLocation() } - - /** Gets a successor node, if any. */ - MustFlowPathNode getASuccessor() { - step(this.getInstruction(), result.getInstruction(), this.getConfiguration()) - } - - /** Gets the associated configuration. */ - MustFlowConfiguration getConfiguration() { this = MkLocalPathNode(_, result) } -} - -private class MustFlowPathSink extends MustFlowPathNode { - MustFlowPathSink() { this.getConfiguration().isSink(this.getInstruction().getAUse()) } -} - -/** - * Provides the query predicates needed to include a graph in a path-problem query. - */ -module PathGraph { - private predicate reach(MustFlowPathNode n) { - n instanceof MustFlowPathSink or reach(n.getASuccessor()) - } - - /** Holds if `(a,b)` is an edge in the graph of data flow path explanations. */ - query predicate edges(MustFlowPathNode a, MustFlowPathNode b) { - a.getASuccessor() = b and reach(b) - } - - /** Holds if `n` is a node in the graph of data flow path explanations. */ - query predicate nodes(MustFlowPathNode n, string key, string val) { - reach(n) and key = "semmle.label" and val = n.toString() } } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowNodes.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowNodes.qll new file mode 100644 index 000000000000..fe954c640d1b --- /dev/null +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowNodes.qll @@ -0,0 +1,1823 @@ +private import cpp +private import semmle.code.cpp.ir.ValueNumbering +private import semmle.code.cpp.ir.IR +private import semmle.code.cpp.models.interfaces.DataFlow +private import semmle.code.cpp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +private import DataFlowPrivate +private import DataFlowUtil +private import ModelUtil +private import SsaImpl as SsaImpl +private import DataFlowImplCommon as DataFlowImplCommon +private import codeql.util.Unit +private import Node0ToString + +/** + * A canonical representation of a field. + * + * For performance reasons we want a unique `Content` that represents + * a given field across any template instantiation of a class. + * + * This is possible in _almost_ all cases, but there are cases where it is + * not possible to map between a field in the uninstantiated template to a + * field in the instantiated template. This happens in the case of local class + * definitions (because the local class is not the template that constructs + * the instantiation - it is the enclosing function). So this abstract class + * has two implementations: a non-local case (where we can represent a + * canonical field as the field declaration from an uninstantiated class + * template or a non-templated class), and a local case (where we simply use + * the field from the instantiated class). + */ +abstract class CanonicalField extends Field { + /** Gets a field represented by this canonical field. */ + abstract Field getAField(); + + /** + * Gets a class that declares a field represented by this canonical field. + */ + abstract Class getADeclaringType(); + + /** + * Gets a type that this canonical field may have. Note that this may + * not be a unique type. For example, consider this case: + * ``` + * template + * struct S { T x; }; + * + * S s1; + * S s2; + * ``` + * In this case the canonical field corresponding to `S::x` has two types: + * `int` and `char`. + */ + Type getAType() { result = this.getAField().getType() } + + Type getAnUnspecifiedType() { result = this.getAType().getUnspecifiedType() } +} + +private class NonLocalCanonicalField extends CanonicalField { + Class declaringType; + + NonLocalCanonicalField() { + declaringType = this.getDeclaringType() and + not declaringType.isFromTemplateInstantiation(_) and + not declaringType.isLocal() // handled in LocalCanonicalField + } + + override Field getAField() { + exists(Class c | result.getDeclaringType() = c | + // Either the declaring class of the field is a template instantiation + // that has been constructed from this canonical declaration + c.isConstructedFrom(declaringType) and + pragma[only_bind_out](result.getName()) = pragma[only_bind_out](this.getName()) + or + // or this canonical declaration is not a template. + not c.isConstructedFrom(_) and + result = this + ) + } + + override Class getADeclaringType() { + result = this.getDeclaringType() + or + result.isConstructedFrom(this.getDeclaringType()) + } +} + +private class LocalCanonicalField extends CanonicalField { + Class declaringType; + + LocalCanonicalField() { + declaringType = this.getDeclaringType() and + declaringType.isLocal() + } + + override Field getAField() { result = this } + + override Class getADeclaringType() { result = declaringType } +} + +/** + * A canonical representation of a `Union`. See `CanonicalField` for the explanation for + * why we need a canonical representation. + */ +abstract class CanonicalUnion extends Union { + /** Gets a union represented by this canonical union. */ + abstract Union getAUnion(); + + /** Gets a canonical field of this canonical union. */ + CanonicalField getACanonicalField() { result.getDeclaringType() = this } +} + +private class NonLocalCanonicalUnion extends CanonicalUnion { + NonLocalCanonicalUnion() { not this.isFromTemplateInstantiation(_) and not this.isLocal() } + + override Union getAUnion() { + result = this + or + result.isConstructedFrom(this) + } +} + +private class LocalCanonicalUnion extends CanonicalUnion { + LocalCanonicalUnion() { this.isLocal() } + + override Union getAUnion() { result = this } +} + +bindingset[f] +pragma[inline_late] +int getFieldSize(CanonicalField f) { result = max(f.getAType().getSize()) } + +/** + * Gets a field in the union `u` whose size + * is `bytes` number of bytes. + */ +private CanonicalField getAFieldWithSize(CanonicalUnion u, int bytes) { + result = u.getACanonicalField() and + bytes = getFieldSize(result) +} + +cached +private module Cached { + cached + newtype TContent = + TNonUnionContent(CanonicalField f, int indirectionIndex) { + // the indirection index for field content starts at 1 (because `TNonUnionContent` is thought of as + // the address of the field, `FieldAddress` in the IR). + indirectionIndex = [1 .. max(SsaImpl::getMaxIndirectionsForType(f.getAnUnspecifiedType()))] and + // Reads and writes of union fields are tracked using `UnionContent`. + not f.getDeclaringType() instanceof Union + } or + TUnionContent(CanonicalUnion u, int bytes, int indirectionIndex) { + exists(CanonicalField f | + f = u.getACanonicalField() and + bytes = getFieldSize(f) and + // We key `UnionContent` by the union instead of its fields since a write to one + // field can be read by any read of the union's fields. Again, the indirection index + // is 1-based (because 0 is considered the address). + indirectionIndex = + [1 .. max(SsaImpl::getMaxIndirectionsForType(getAFieldWithSize(u, bytes) + .getAnUnspecifiedType()) + )] + ) + } or + TElementContent(int indirectionIndex) { + indirectionIndex = [1 .. getMaxElementContentIndirectionIndex()] + } + + /** + * The IR dataflow graph consists of the following nodes: + * - `Node0`, which injects most instructions and operands directly into the + * dataflow graph. + * - `VariableNode`, which is used to model flow through global variables. + * - `PostUpdateNodeImpl`, which is used to model the state of an object after + * an update after a number of loads. + * - `SsaSynthNode`, which represents synthesized nodes as computed by the shared SSA + * library. + * - `RawIndirectOperand`, which represents the value of `operand` after + * loading the address a number of times. + * - `RawIndirectInstruction`, which represents the value of `instr` after + * loading the address a number of times. + */ + cached + newtype TIRDataFlowNode = + TNode0(Node0Impl node) { DataFlowImplCommon::forceCachingInSameStage() } or + TGlobalLikeVariableNode(GlobalLikeVariable var, int indirectionIndex) { + indirectionIndex = + [getMinIndirectionsForType(var.getUnspecifiedType()) .. SsaImpl::getMaxIndirectionsForType(var.getUnspecifiedType())] + } or + TPostUpdateNodeImpl(Operand operand, int indirectionIndex) { + isPostUpdateNodeImpl(operand, indirectionIndex) + } or + TSsaSynthNode(SsaImpl::SynthNode n) or + TSsaIteratorNode(IteratorFlow::IteratorFlowNode n) or + TRawIndirectOperand0(Node0Impl node, int indirectionIndex) { + SsaImpl::hasRawIndirectOperand(node.asOperand(), indirectionIndex) + } or + TRawIndirectInstruction0(Node0Impl node, int indirectionIndex) { + not exists(node.asOperand()) and + SsaImpl::hasRawIndirectInstruction(node.asInstruction(), indirectionIndex) + } or + TFinalParameterNode(Parameter p, int indirectionIndex) { + exists(SsaImpl::FinalParameterUse use | + use.getParameter() = p and + use.getIndirectionIndex() = indirectionIndex + ) + } or + TFinalGlobalValue(SsaImpl::GlobalUse globalUse) or + TInitialGlobalValue(SsaImpl::GlobalDef globalUse) or + TBodyLessParameterNodeImpl(Parameter p, int indirectionIndex) { + // Rule out parameters of catch blocks. + not exists(p.getCatchBlock()) and + // We subtract one because `getMaxIndirectionsForType` returns the maximum + // indirection for a glvalue of a given type, and this doesn't apply to + // parameters. + indirectionIndex = [0 .. SsaImpl::getMaxIndirectionsForType(p.getUnspecifiedType()) - 1] and + not any(InitializeParameterInstruction init).getParameter() = p + } or + TFlowSummaryNode(FlowSummaryImpl::Private::SummaryNode sn) +} + +import Cached + +/** + * An operand that is defined by a `FieldAddressInstruction`. + */ +class FieldAddress extends Operand { + FieldAddressInstruction fai; + + FieldAddress() { fai = this.getDef() and not SsaImpl::ignoreOperand(this) } + + /** Gets the field associated with this instruction. */ + Field getField() { result = fai.getField() } + + /** Gets the instruction whose result provides the address of the object containing the field. */ + Instruction getObjectAddress() { result = fai.getObjectAddress() } + + /** Gets the operand that provides the address of the object containing the field. */ + Operand getObjectAddressOperand() { result = fai.getObjectAddressOperand() } +} + +/** + * Holds if `opFrom` is an operand whose value flows to the result of `instrTo`. + * + * `isPointerArith` is `true` if `instrTo` is a `PointerArithmeticInstruction` and `opFrom` + * is the left operand. + * + * `additional` is `true` if the conversion is supplied by an implementation of the + * `Indirection` class. It is sometimes useful to exclude such conversions. + */ +predicate conversionFlow( + Operand opFrom, Instruction instrTo, boolean isPointerArith, boolean additional +) { + isPointerArith = false and + ( + additional = false and + ( + instrTo.(CopyValueInstruction).getSourceValueOperand() = opFrom + or + instrTo.(ConvertInstruction).getUnaryOperand() = opFrom + or + instrTo.(CheckedConvertOrNullInstruction).getUnaryOperand() = opFrom + or + instrTo.(InheritanceConversionInstruction).getUnaryOperand() = opFrom + or + exists(BuiltInInstruction builtIn | + builtIn = instrTo and + // __builtin_bit_cast + builtIn.getBuiltInOperation() instanceof BuiltInBitCast and + opFrom = builtIn.getAnOperand() + ) + ) + or + additional = true and + SsaImpl::isAdditionalConversionFlow(opFrom, instrTo) + ) + or + isPointerArith = true and + additional = false and + instrTo.(PointerArithmeticInstruction).getLeftOperand() = opFrom +} + +module Public { + import ExprNodes + + /** + * A node in a data flow graph. + * + * A node can be either an expression, a parameter, or an uninitialized local + * variable. Such nodes are created with `DataFlow::exprNode`, + * `DataFlow::parameterNode`, and `DataFlow::uninitializedNode` respectively. + */ + class Node extends TIRDataFlowNode { + /** + * INTERNAL: Do not use. + */ + DataFlowCallable getEnclosingCallable() { none() } // overridden in subclasses + + /** Gets the function to which this node belongs, if any. */ + Declaration getFunction() { none() } // overridden in subclasses + + /** Holds if this node represents a glvalue. */ + predicate isGLValue() { none() } + + /** + * Gets the type of this node. + * + * If `isGLValue()` holds, then the type of this node + * should be thought of as "pointer to `getType()`". + */ + Type getType() { none() } // overridden in subclasses + + /** Gets the instruction corresponding to this node, if any. */ + Instruction asInstruction() { result = this.(InstructionNode).getInstruction() } + + /** Gets the operands corresponding to this node, if any. */ + Operand asOperand() { result = this.(OperandNode).getOperand() } + + /** + * Gets the operand that is indirectly tracked by this node behind `index` + * number of indirections. + */ + Operand asIndirectOperand(int index) { hasOperandAndIndex(this, result, index) } + + /** + * Holds if this node is at index `i` in basic block `block`. + * + * Note: Phi nodes are considered to be at index `-1`. + */ + final predicate hasIndexInBlock(IRBlock block, int i) { + this.asInstruction() = block.getInstruction(i) + or + this.asOperand().getUse() = block.getInstruction(i) + or + exists(SsaImpl::SynthNode ssaNode | + this.(SsaSynthNode).getSynthNode() = ssaNode and + ssaNode.getBasicBlock() = block and + ssaNode.getIndex() = i + ) + or + this.(RawIndirectOperand).getOperand().getUse() = block.getInstruction(i) + or + this.(RawIndirectInstruction).getInstruction() = block.getInstruction(i) + or + this.(PostUpdateNode).getPreUpdateNode().hasIndexInBlock(block, i) + } + + /** Gets the basic block of this node, if any. */ + final IRBlock getBasicBlock() { this.hasIndexInBlock(result, _) } + + /** + * Gets the non-conversion expression corresponding to this node, if any. + * This predicate only has a result on nodes that represent the value of + * evaluating the expression. For data flowing _out of_ an expression, like + * when an argument is passed by reference, use `asDefiningArgument` instead + * of `asExpr`. + * + * If this node strictly (in the sense of `asConvertedExpr`) corresponds to + * a `Conversion`, then the result is the underlying non-`Conversion` base + * expression. + */ + Expr asExpr() { result = this.asExpr(_) } + + /** + * INTERNAL: Do not use. + */ + Expr asExpr(int n) { result = this.(ExprNode).getExpr(n) } + + /** + * INTERNAL: Do not use. + */ + Expr asIndirectExpr(int n, int index) { result = this.(IndirectExprNode).getExpr(n, index) } + + /** + * Gets the non-conversion expression that's indirectly tracked by this node + * under `index` number of indirections. + */ + Expr asIndirectExpr(int index) { result = this.asIndirectExpr(_, index) } + + /** + * Gets the non-conversion expression that's indirectly tracked by this node + * behind a number of indirections. + */ + Expr asIndirectExpr() { result = this.asIndirectExpr(_) } + + /** + * Gets the expression corresponding to this node, if any. The returned + * expression may be a `Conversion`. + */ + Expr asConvertedExpr() { result = this.asConvertedExpr(_) } + + /** + * Gets the expression corresponding to this node, if any. The returned + * expression may be a `Conversion`. + */ + Expr asConvertedExpr(int n) { result = this.(ExprNode).getConvertedExpr(n) } + + private Expr asIndirectConvertedExpr(int n, int index) { + result = this.(IndirectExprNode).getConvertedExpr(n, index) + } + + /** + * Gets the expression that's indirectly tracked by this node + * behind `index` number of indirections. + */ + Expr asIndirectConvertedExpr(int index) { result = this.asIndirectConvertedExpr(_, index) } + + /** + * Gets the expression that's indirectly tracked by this node behind a + * number of indirections. + */ + Expr asIndirectConvertedExpr() { result = this.asIndirectConvertedExpr(_) } + + /** + * Gets the argument that defines this `DefinitionByReferenceNode`, if any. + * This predicate should be used instead of `asExpr` when referring to the + * value of a reference argument _after_ the call has returned. For example, + * in `f(&x)`, this predicate will have `&x` as its result for the `Node` + * that represents the new value of `x`. + */ + Expr asDefiningArgument() { result = this.asDefiningArgument(_) } + + /** + * Gets the definition associated with this node, if any. + * + * For example, consider the following example + * ```cpp + * int x = 42; // 1 + * x = 34; // 2 + * ++x; // 3 + * x++; // 4 + * x += 1; // 5 + * int y = x += 2; // 6 + * ``` + * - For (1) the result is `42`. + * - For (2) the result is `x = 34`. + * - For (3) the result is `++x`. + * - For (4) the result is `x++`. + * - For (5) the result is `x += 1`. + * - For (6) there are two results: + * - For the definition generated by `x += 2` the result is `x += 2` + * - For the definition generated by `int y = ...` the result is + * also `x += 2`. + * + * For assignments, `node.asDefinition()` and `node.asExpr()` will both exist + * for the same dataflow node. However, for expression such as `x++` that + * both write to `x` and read the current value of `x`, `node.asDefinition()` + * will give the node corresponding to the value after the increment, and + * `node.asExpr()` will give the node corresponding to the value before the + * increment. For an example of this, consider the following: + * + * ```cpp + * sink(x++); + * ``` + * in the above program, there will not be flow from a node `n` such that + * `n.asDefinition() instanceof IncrementOperation` to the argument of `sink` + * since the value passed to `sink` is the value before to the increment. + * However, there will be dataflow from a node `n` such that + * `n.asExpr() instanceof IncrementOperation` since the result of evaluating + * the expression `x++` is passed to `sink`. + */ + Expr asDefinition() { result = this.asDefinition(_) } + + private predicate isCertainStore() { + exists(SsaImpl::Definition def | + SsaImpl::defToNode(this, def, _) and + def.isCertain() + ) + } + + /** + * Gets the definition associated with this node, if any. + * + * For example, consider the following example + * ```cpp + * int x = 42; // 1 + * x = 34; // 2 + * ++x; // 3 + * x++; // 4 + * x += 1; // 5 + * int y = x += 2; // 6 + * ``` + * - For (1) the result is `42`. + * - For (2) the result is `x = 34`. + * - For (3) the result is `++x`. + * - For (4) the result is `x++`. + * - For (5) the result is `x += 1`. + * - For (6) there are two results: + * - For the definition generated by `x += 2` the result is `x += 2` + * - For the definition generated by `int y = ...` the result is + * also `x += 2`. + * + * For assignments, `node.asDefinition(_)` and `node.asExpr()` will both exist + * for the same dataflow node. However, for expression such as `x++` that + * both write to `x` and read the current value of `x`, `node.asDefinition(_)` + * will give the node corresponding to the value after the increment, and + * `node.asExpr()` will give the node corresponding to the value before the + * increment. For an example of this, consider the following: + * + * ```cpp + * sink(x++); + * ``` + * in the above program, there will not be flow from a node `n` such that + * `n.asDefinition(_) instanceof IncrementOperation` to the argument of `sink` + * since the value passed to `sink` is the value before to the increment. + * However, there will be dataflow from a node `n` such that + * `n.asExpr() instanceof IncrementOperation` since the result of evaluating + * the expression `x++` is passed to `sink`. + * + * If `uncertain = false` then the definition is guaranteed to overwrite + * the entire buffer pointed to by the destination address of the definition. + * Otherwise, `uncertain = true`. + * + * For example, the write `int x; x = 42;` is guaranteed to overwrite all the + * bytes allocated to `x`, while the assignment `int p[10]; p[3] = 42;` has + * `uncertain = true` since the write will not overwrite the entire buffer + * pointed to by `p`. + */ + Expr asDefinition(boolean uncertain) { + exists(StoreInstruction store | + store = this.asInstruction() and + result = asDefinitionImpl(store) and + if this.isCertainStore() then uncertain = false else uncertain = true + ) + } + + /** + * Gets the definition associated with this node, if this node is a certain definition. + * + * See `Node.asDefinition/1` for a description of certain and uncertain definitions. + */ + Expr asCertainDefinition() { result = this.asDefinition(false) } + + /** + * Gets the definition associated with this node, if this node is an uncertain definition. + * + * See `Node.asDefinition/1` for a description of certain and uncertain definitions. + */ + Expr asUncertainDefinition() { result = this.asDefinition(true) } + + /** + * Gets the indirect definition at a given indirection corresponding to this + * node, if any. + * + * See the comments on `Node.asDefinition` for examples. + */ + Expr asIndirectDefinition(int indirectionIndex) { + exists(StoreInstruction store | + this.(IndirectInstruction).hasInstructionAndIndirectionIndex(store, indirectionIndex) and + result = asDefinitionImpl(store) + ) + } + + /** + * Gets the indirect definition at some indirection corresponding to this + * node, if any. + */ + Expr asIndirectDefinition() { result = this.asIndirectDefinition(_) } + + /** + * Gets the argument that defines this `DefinitionByReferenceNode`, if any. + * + * Unlike `Node::asDefiningArgument/0`, this predicate gets the node representing + * the value of the `index`'th indirection after leaving a function. For example, + * in: + * ```cpp + * void f(int**); + * ... + * int** x = ...; + * f(x); + * ``` + * The node `n` such that `n.asDefiningArgument(1)` is the argument `x` will + * contain the value of `*x` after `f` has returned, and the node `n` such that + * `n.asDefiningArgument(2)` is the argument `x` will contain the value of `**x` + * after the `f` has returned. + */ + Expr asDefiningArgument(int index) { + this.(DefinitionByReferenceNode).getIndirectionIndex() = index and + result = this.(DefinitionByReferenceNode).getArgument() + } + + /** + * Gets the the argument going into a function for a node that represents + * the indirect value of the argument after `index` loads. For example, in: + * ```cpp + * void f(int**); + * ... + * int** x = ...; + * f(x); + * ``` + * The node `n` such that `n.asIndirectArgument(1)` represents the value of + * `*x` going into `f`, and the node `n` such that `n.asIndirectArgument(2)` + * represents the value of `**x` going into `f`. + */ + Expr asIndirectArgument(int index) { + this.(SideEffectOperandNode).hasAddressOperandAndIndirectionIndex(_, index) and + result = this.(SideEffectOperandNode).getArgument() + } + + /** + * Gets the the argument going into a function for a node that represents + * the indirect value of the argument after any non-zero number of loads. + */ + Expr asIndirectArgument() { result = this.asIndirectArgument(_) } + + /** Gets the positional parameter corresponding to this node, if any. */ + Parameter asParameter() { + exists(int indirectionIndex | result = this.asParameter(indirectionIndex) | + if result.getUnspecifiedType() instanceof ReferenceType + then indirectionIndex = 1 + else indirectionIndex = 0 + ) + } + + /** + * Gets the uninitialized local variable corresponding to this node, if + * any. + */ + LocalVariable asUninitialized() { result = this.(UninitializedNode).getLocalVariable() } + + /** + * Gets the positional parameter corresponding to the node that represents + * the value of the parameter after `index` number of loads, if any. For + * example, in: + * ```cpp + * void f(int** x) { ... } + * ``` + * - The node `n` such that `n.asParameter(0)` is the parameter `x` represents + * the value of `x`. + * - The node `n` such that `n.asParameter(1)` is the parameter `x` represents + * the value of `*x`. + * - The node `n` such that `n.asParameter(2)` is the parameter `x` represents + * the value of `**x`. + */ + Parameter asParameter(int index) { + index = 0 and + result = this.(ExplicitParameterNode).getParameter() + or + this.(IndirectParameterNode).getIndirectionIndex() = index and + result = this.(IndirectParameterNode).getParameter() + } + + /** + * Holds if this node represents the `indirectionIndex`'th indirection of + * the value of an output parameter `p` just before reaching the end of a function. + */ + predicate isFinalValueOfParameter(Parameter p, int indirectionIndex) { + exists(FinalParameterNode n | n = this | + p = n.getParameter() and + indirectionIndex = n.getIndirectionIndex() + ) + } + + /** + * Holds if this node represents the value of an output parameter `p` + * just before reaching the end of a function. + */ + predicate isFinalValueOfParameter(Parameter p) { this.isFinalValueOfParameter(p, _) } + + /** + * Gets the variable corresponding to this node, if any. This can be used for + * modeling flow in and out of global variables. + */ + Variable asVariable() { + this = TGlobalLikeVariableNode(result, getMinIndirectionsForType(result.getUnspecifiedType())) + } + + /** + * Gets the `indirectionIndex`'th indirection of this node's underlying variable, if any. + * + * This can be used for modeling flow in and out of global variables. + */ + Variable asIndirectVariable(int indirectionIndex) { + indirectionIndex > getMinIndirectionsForType(result.getUnspecifiedType()) and + this = TGlobalLikeVariableNode(result, indirectionIndex) + } + + /** Gets an indirection of this node's underlying variable, if any. */ + Variable asIndirectVariable() { result = this.asIndirectVariable(_) } + + /** + * Gets the expression that is partially defined by this node, if any. + * + * Partial definitions are created for field stores (`x.y = taint();` is a partial + * definition of `x`), and for calls that may change the value of an object (so + * `x.set(taint())` is a partial definition of `x`, and `transfer(&x, taint())` is + * a partial definition of `&x`). + */ + Expr asPartialDefinition() { + exists(PartialDefinitionNode pdn | this = pdn | + pdn.getIndirectionIndex() > 0 and + result = pdn.getDefinedExpr() + ) + } + + /** + * Gets an upper bound on the type of this node. + */ + Type getTypeBound() { result = this.getType() } + + /** Gets the location of this element. */ + final Location getLocation() { result = getLocationCached(this) } + + /** INTERNAL: Do not use. */ + Location getLocationImpl() { + none() // overridden by subclasses + } + + /** Gets a textual representation of this element. */ + final string toString() { result = toStringCached(this) } + + /** INTERNAL: Do not use. */ + string toStringImpl() { + none() // overridden by subclasses + } + } + + /** + * An instruction, viewed as a node in a data flow graph. + */ + class InstructionNode extends Node0 { + override InstructionNode0 node; + Instruction instr; + + InstructionNode() { instr = node.getInstruction() } + + /** Gets the instruction corresponding to this node. */ + Instruction getInstruction() { result = instr } + } + + /** + * An operand, viewed as a node in a data flow graph. + */ + class OperandNode extends Node, Node0 { + override OperandNode0 node; + Operand op; + + OperandNode() { op = node.getOperand() } + + /** Gets the operand corresponding to this node. */ + Operand getOperand() { result = op } + } + + /** + * A node associated with an object after an operation that might have + * changed its state. + * + * This can be either the argument to a callable after the callable returns + * (which might have mutated the argument), or the qualifier of a field after + * an update to the field. + * + * Nodes corresponding to AST elements, for example `ExprNode`, usually refer + * to the value before the update with the exception of `ClassInstanceExpr`, + * which represents the value after the constructor has run. + */ + abstract class PostUpdateNode extends Node { + /** + * Gets the node before the state update. + */ + abstract Node getPreUpdateNode(); + + final override Type getType() { result = this.getPreUpdateNode().getType() } + } + + /** + * The value of an uninitialized local variable, viewed as a node in a data + * flow graph. + */ + class UninitializedNode extends Node { + LocalVariable v; + + UninitializedNode() { + exists(SsaImpl::Definition def, SsaImpl::SourceVariable sv | + def.getIndirectionIndex() = 0 and + def.getValue().asInstruction() instanceof UninitializedInstruction and + SsaImpl::defToNode(this, def, sv) and + v = sv.getBaseVariable().(SsaImpl::BaseIRVariable).getIRVariable().getAst() + ) + } + + /** Gets the uninitialized local variable corresponding to this node. */ + LocalVariable getLocalVariable() { result = v } + } + + /** + * The value of a parameter at function entry, viewed as a node in a data + * flow graph. This includes both explicit parameters such as `x` in `f(x)` + * and implicit parameters such as `this` in `x.f()`. + * + * To match a specific kind of parameter, consider using one of the subclasses + * `ExplicitParameterNode`, `ThisParameterNode`, or + * `ParameterIndirectionNode`. + */ + final class ParameterNode = AbstractParameterNode; + + /** An explicit positional parameter, including `this`, but not `...`. */ + final class DirectParameterNode = AbstractDirectParameterNode; + + final class ExplicitParameterNode = AbstractExplicitParameterNode; + + /** An implicit `this` parameter. */ + class ThisParameterInstructionNode extends AbstractExplicitParameterNode, + InstructionDirectParameterNode + { + ThisParameterInstructionNode() { instr.getIRVariable() instanceof IRThisVariable } + + override predicate isSourceParameterOf(Function f, ParameterPosition pos) { + pos.(DirectPosition).getArgumentIndex() = -1 and + instr.getEnclosingFunction() = f + } + + override string toStringImpl() { result = "this" } + } + + /** + * A node that represents the value of a variable after a function call that + * may have changed the variable because it's passed by reference. + * + * A typical example would be a call `f(&x)`. Firstly, there will be flow into + * `x` from previous definitions of `x`. Secondly, there will be a + * `DefinitionByReferenceNode` to represent the value of `x` after the call has + * returned. This node will have its `getArgument()` equal to `&x` and its + * `getVariableAccess()` equal to `x`. + */ + class DefinitionByReferenceNode extends IndirectArgumentOutNode { + DefinitionByReferenceNode() { this.getIndirectionIndex() > 0 } + + /** Gets the unconverted argument corresponding to this node. */ + Expr getArgument() { + result = this.getAddressOperand().getDef().getUnconvertedResultExpression() + } + + /** Gets the parameter through which this value is assigned. */ + Parameter getParameter() { + result = this.getCallInstruction().getStaticCallTarget().getParameter(this.getArgumentIndex()) + } + } + + /** + * A `Node` corresponding to a global (or `static` local) variable in the + * program, as opposed to the value of that variable at some particular point. + * This is used to model flow through global variables (and `static` local + * variables). + * + * There is no `VariableNode` for non-`static` local variables. + */ + class VariableNode extends Node, TGlobalLikeVariableNode { + Variable v; + int indirectionIndex; + + VariableNode() { this = TGlobalLikeVariableNode(v, indirectionIndex) } + + /** Gets the variable corresponding to this node. */ + Variable getVariable() { result = v } + + /** Gets the indirection index of this node. */ + int getIndirectionIndex() { result = indirectionIndex } + + override Declaration getFunction() { none() } + + override DataFlowCallable getEnclosingCallable() { + // When flow crosses from one _enclosing callable_ to another, the + // interprocedural data-flow library discards call contexts and inserts a + // node in the big-step relation used for human-readable path explanations. + // Therefore we want a distinct enclosing callable for each `VariableNode`, + // and that can be the `Variable` itself. + result.asSourceCallable() = v + } + + override Type getType() { result = getTypeImpl(v.getUnderlyingType(), indirectionIndex - 1) } + + final override Location getLocationImpl() { + // Certain variables (such as parameters) can have multiple locations. + // When there's a unique location we use that one, but if multiple locations + // exist we default to an unknown location. + result = unique( | | v.getLocation()) + or + not exists(unique( | | v.getLocation())) and + result instanceof UnknownLocation + } + + override string toStringImpl() { result = stars(this) + v.toString() } + } + + /** + * Gets the node corresponding to `instr`. + */ + InstructionNode instructionNode(Instruction instr) { result.getInstruction() = instr } + + /** + * Gets the node corresponding to `operand`. + */ + OperandNode operandNode(Operand operand) { result.getOperand() = operand } + + /** + * Gets the `Node` corresponding to the value of evaluating `e` or any of its + * conversions. There is no result if `e` is a `Conversion`. For data flowing + * _out of_ an expression, like when an argument is passed by reference, use + * `definitionByReferenceNodeFromArgument` instead. + */ + ExprNode exprNode(Expr e) { result.getExpr(_) = e } + + /** + * Gets the `Node` corresponding to the value of evaluating `e`. Here, `e` may + * be a `Conversion`. For data flowing _out of_ an expression, like when an + * argument is passed by reference, use + * `definitionByReferenceNodeFromArgument` instead. + */ + ExprNode convertedExprNode(Expr e) { result.getConvertedExpr(_) = e } + + /** + * Gets the `Node` corresponding to the value of `p` at function entry. + */ + ExplicitParameterNode parameterNode(Parameter p) { result.getParameter() = p } + + /** + * Gets the `Node` corresponding to a definition by reference of the variable + * that is passed as unconverted `argument` of a call. + */ + DefinitionByReferenceNode definitionByReferenceNodeFromArgument(Expr argument) { + result.getArgument() = argument + } + + /** Gets the `VariableNode` corresponding to the variable `v`. */ + VariableNode variableNode(Variable v) { + result.getVariable() = v and result.getIndirectionIndex() = 1 + } + + /** + * Gets the `Node` corresponding to the value of an uninitialized local + * variable `v`. + */ + Node uninitializedNode(LocalVariable v) { result.asUninitialized() = v } + + /** + * Holds if `indirectOperand` is the dataflow node that represents the + * indirection of `operand` with indirection index `indirectionIndex`. + */ + predicate hasOperandAndIndex( + IndirectOperand indirectOperand, Operand operand, int indirectionIndex + ) { + indirectOperand.hasOperandAndIndirectionIndex(operand, indirectionIndex) + } + + /** + * Holds if `indirectInstr` is the dataflow node that represents the + * indirection of `instr` with indirection index `indirectionIndex`. + */ + predicate hasInstructionAndIndex( + IndirectInstruction indirectInstr, Instruction instr, int indirectionIndex + ) { + indirectInstr.hasInstructionAndIndirectionIndex(instr, indirectionIndex) + } +} + +private import Public + +/** + * A node representing an indirection of a parameter. + */ +final class IndirectParameterNode = AbstractIndirectParameterNode; + +/** + * A class that lifts pre-SSA dataflow nodes to regular dataflow nodes. + */ +private class Node0 extends Node, TNode0 { + Node0Impl node; + + Node0() { this = TNode0(node) } + + override DataFlowCallable getEnclosingCallable() { + result.asSourceCallable() = node.getEnclosingCallable() + } + + override Declaration getFunction() { result = node.getFunction() } + + override Location getLocationImpl() { result = node.getLocation() } + + override string toStringImpl() { result = node.toStringImpl() } + + override Type getType() { result = node.getType() } + + override predicate isGLValue() { node.isGLValue() } +} + +class PostUpdateNodeImpl extends PartialDefinitionNode, TPostUpdateNodeImpl { + int indirectionIndex; + Operand operand; + + PostUpdateNodeImpl() { this = TPostUpdateNodeImpl(operand, indirectionIndex) } + + override Declaration getFunction() { result = operand.getUse().getEnclosingFunction() } + + override DataFlowCallable getEnclosingCallable() { + result = this.getPreUpdateNode().getEnclosingCallable() + } + + /** Gets the operand associated with this node. */ + Operand getOperand() { result = operand } + + /** Gets the indirection index associated with this node. */ + override int getIndirectionIndex() { result = indirectionIndex } + + override Location getLocationImpl() { result = operand.getLocation() } + + final override Node getPreUpdateNode() { + indirectionIndex > 0 and + hasOperandAndIndex(result, operand, indirectionIndex) + or + indirectionIndex = 0 and + result.asOperand() = operand + } + + final override Expr getDefinedExpr() { + result = operand.getDef().getUnconvertedResultExpression() + } +} + +/** + * The node representing the value of a field after it has been updated. + */ +class PostFieldUpdateNode extends PostUpdateNodeImpl { + FieldAddress fieldAddress; + + PostFieldUpdateNode() { operand = fieldAddress.getObjectAddressOperand() } + + FieldAddress getFieldAddress() { result = fieldAddress } + + Field getUpdatedField() { result = this.getFieldAddress().getField() } + + override string toStringImpl() { + result = this.getPreUpdateNode().toStringImpl() + " [post update]" + } +} + +/** + * The base class for nodes that perform "partial definitions". + * + * In contrast to a normal "definition", which provides a new value for + * something, a partial definition is an expression that may affect a + * value, but does not necessarily replace it entirely. For example: + * ``` + * x.y = 1; // a partial definition of the object `x`. + * x.y.z = 1; // a partial definition of the object `x.y` and `x`. + * x.setY(1); // a partial definition of the object `x`. + * setY(&x); // a partial definition of the object `x`. + * ``` + */ +abstract private class PartialDefinitionNode extends PostUpdateNode { + /** Gets the indirection index of this node. */ + abstract int getIndirectionIndex(); + + /** Gets the expression that is partially defined by this node. */ + abstract Expr getDefinedExpr(); +} + +/** + * A node representing the indirection of a value after it + * has been returned from a function. + */ +class IndirectArgumentOutNode extends PostUpdateNodeImpl { + override ArgumentOperand operand; + + /** + * Gets the index of the argument that is associated with this post- + * update node. + */ + int getArgumentIndex() { + exists(CallInstruction call | call.getArgumentOperand(result) = operand) + } + + /** + * Gets the `Operand` that represents the address of the value that is being + * updated. + */ + Operand getAddressOperand() { result = operand } + + /** + * Gets the `CallInstruction` that represents the call that updated the + * argument. + */ + CallInstruction getCallInstruction() { result.getAnArgumentOperand() = operand } + + /** + * Gets the `Function` that the call targets, if this is statically known. + */ + Function getStaticCallTarget() { result = this.getCallInstruction().getStaticCallTarget() } + + override string toStringImpl() { + exists(string prefix | if indirectionIndex > 0 then prefix = "" else prefix = "pointer to " | + // This string should be unique enough to be helpful but common enough to + // avoid storing too many different strings. + result = prefix + this.getStaticCallTarget().getName() + " output argument" + or + not exists(this.getStaticCallTarget()) and + result = prefix + "output argument" + ) + } +} + +/** + * Holds if `node` is an indirect operand with columns `(operand, indirectionIndex)`, and + * `operand` represents a use of the fully converted value of `call`. + */ +private predicate hasOperand(Node node, CallInstruction call, int indirectionIndex, Operand operand) { + operandForFullyConvertedCall(operand, call) and + hasOperandAndIndex(node, operand, indirectionIndex) +} + +/** + * Holds if `node` is an indirect instruction with columns `(instr, indirectionIndex)`, and + * `instr` represents a use of the fully converted value of `call`. + * + * Note that `hasOperand(node, _, _, _)` implies `not hasInstruction(node, _, _, _)`. + */ +private predicate hasInstruction( + Node node, CallInstruction call, int indirectionIndex, Instruction instr +) { + instructionForFullyConvertedCall(instr, call) and + hasInstructionAndIndex(node, instr, indirectionIndex) +} + +/** + * A node representing the indirect value of a function call (i.e., a value hidden + * behind a number of indirections). + */ +class IndirectReturnOutNode extends Node { + CallInstruction call; + int indirectionIndex; + + IndirectReturnOutNode() { + // Annoyingly, we need to pick the fully converted value as the output of the function to + // make flow through in the shared dataflow library work correctly. + hasOperand(this, call, indirectionIndex, _) + or + hasInstruction(this, call, indirectionIndex, _) + } + + CallInstruction getCallInstruction() { result = call } + + int getIndirectionIndex() { result = indirectionIndex } + + /** Gets the operand associated with this node, if any. */ + Operand getOperand() { hasOperand(this, call, indirectionIndex, result) } + + /** Gets the instruction associated with this node, if any. */ + Instruction getInstruction() { hasInstruction(this, call, indirectionIndex, result) } +} + +/** + * An `IndirectReturnOutNode` which is used as a destination of a store operation. + * When it's used for a store operation it's useful to have this be a `PostUpdateNode` for + * the shared dataflow library's flow-through mechanism to detect flow in cases such as: + * ```cpp + * struct MyInt { + * int i; + * int& getRef() { return i; } + * }; + * ... + * MyInt mi; + * mi.getRef() = source(); // this is detected as a store to `i` via flow-through. + * sink(mi.i); + * ``` + */ +private class PostIndirectReturnOutNode extends IndirectReturnOutNode, PostUpdateNode { + PostIndirectReturnOutNode() { + any(StoreInstruction store).getDestinationAddressOperand() = this.getOperand() + } + + override Node getPreUpdateNode() { result = this } +} + +/** + * A node that represents the indirect value of an operand in the IR + * after `index` number of loads. + */ +private class RawIndirectOperand0 extends Node, TRawIndirectOperand0 { + Node0Impl node; + int indirectionIndex; + + RawIndirectOperand0() { this = TRawIndirectOperand0(node, indirectionIndex) } + + /** Gets the underlying instruction. */ + Operand getOperand() { result = node.asOperand() } + + /** Gets the underlying indirection index. */ + int getIndirectionIndex() { result = indirectionIndex } + + override Declaration getFunction() { result = node.getFunction() } + + override DataFlowCallable getEnclosingCallable() { + result.asSourceCallable() = node.getEnclosingCallable() + } + + override predicate isGLValue() { this.getOperand().isGLValue() } + + override Type getType() { + exists(int sub, Type type, boolean isGLValue | + type = getOperandType(this.getOperand(), isGLValue) and + if isGLValue = true then sub = 1 else sub = 0 + | + result = getTypeImpl(type.getUnderlyingType(), indirectionIndex - sub) + ) + } + + final override Location getLocationImpl() { + if exists(this.getOperand().getLocation()) + then result = this.getOperand().getLocation() + else result instanceof UnknownLocation + } + + override string toStringImpl() { result = stars(this) + operandToString(this.getOperand()) } +} + +/** + * A node that represents the indirect value of an instruction in the IR + * after `index` number of loads. + */ +private class RawIndirectInstruction0 extends Node, TRawIndirectInstruction0 { + Node0Impl node; + int indirectionIndex; + + RawIndirectInstruction0() { this = TRawIndirectInstruction0(node, indirectionIndex) } + + /** Gets the underlying instruction. */ + Instruction getInstruction() { result = node.asInstruction() } + + /** Gets the underlying indirection index. */ + int getIndirectionIndex() { result = indirectionIndex } + + override Declaration getFunction() { result = node.getFunction() } + + override DataFlowCallable getEnclosingCallable() { + result.asSourceCallable() = node.getEnclosingCallable() + } + + override predicate isGLValue() { this.getInstruction().isGLValue() } + + override Type getType() { + exists(int sub, Type type, boolean isGLValue | + type = getInstructionType(this.getInstruction(), isGLValue) and + if isGLValue = true then sub = 1 else sub = 0 + | + result = getTypeImpl(type.getUnderlyingType(), indirectionIndex - sub) + ) + } + + final override Location getLocationImpl() { + if exists(this.getInstruction().getLocation()) + then result = this.getInstruction().getLocation() + else result instanceof UnknownLocation + } + + override string toStringImpl() { + result = stars(this) + instructionToString(this.getInstruction()) + } +} + +/** + * A node that represents the indirect value of an operand in the IR + * after a number of loads. + */ +class RawIndirectOperand extends Node { + int indirectionIndex; + Operand operand; + + RawIndirectOperand() { + exists(Node0Impl node | operand = node.asOperand() | + this = TRawIndirectOperand0(node, indirectionIndex) + or + this = TRawIndirectInstruction0(node, indirectionIndex) + ) + } + + /** Gets the operand associated with this node. */ + Operand getOperand() { result = operand } + + /** Gets the underlying indirection index. */ + int getIndirectionIndex() { result = indirectionIndex } +} + +/** + * A node that represents the indirect value of an instruction in the IR + * after a number of loads. + */ +class RawIndirectInstruction extends Node { + int indirectionIndex; + Instruction instr; + + RawIndirectInstruction() { + exists(Node0Impl node | instr = node.asInstruction() | + this = TRawIndirectOperand0(node, indirectionIndex) + or + this = TRawIndirectInstruction0(node, indirectionIndex) + ) + } + + /** Gets the instruction associated with this node. */ + Instruction getInstruction() { result = instr } + + /** Gets the underlying indirection index. */ + int getIndirectionIndex() { result = indirectionIndex } +} + +/** + * A synthesized SSA node produced by the shared SSA library, viewed as a node + * in a data flow graph. + */ +class SsaSynthNode extends Node, TSsaSynthNode { + SsaImpl::SynthNode node; + + SsaSynthNode() { this = TSsaSynthNode(node) } + + /** Gets the synthesized SSA node associated with this node. */ + SsaImpl::SynthNode getSynthNode() { result = node } + + override DataFlowCallable getEnclosingCallable() { + result.asSourceCallable() = this.getFunction() + } + + override Declaration getFunction() { result = node.getBasicBlock().getEnclosingFunction() } + + override Type getType() { result = node.getSourceVariable().getType() } + + override predicate isGLValue() { node.getSourceVariable().isGLValue() } + + final override Location getLocationImpl() { result = node.getLocation() } + + override string toStringImpl() { result = node.toString() } +} + +/** + * Dataflow nodes necessary for iterator flow + */ +class SsaIteratorNode extends Node, TSsaIteratorNode { + IteratorFlow::IteratorFlowNode node; + + SsaIteratorNode() { this = TSsaIteratorNode(node) } + + /** Gets the phi node associated with this node. */ + IteratorFlow::IteratorFlowNode getIteratorFlowNode() { result = node } + + override DataFlowCallable getEnclosingCallable() { + result.asSourceCallable() = this.getFunction() + } + + override Declaration getFunction() { result = node.getFunction() } + + override Type getType() { result = node.getType() } + + final override Location getLocationImpl() { result = node.getLocation() } + + override string toStringImpl() { result = node.toString() } +} + +/** + * A node representing a value after leaving a function. + */ +class SideEffectOperandNode extends Node instanceof IndirectOperand { + CallInstruction call; + int argumentIndex; + ArgumentOperand arg; + + SideEffectOperandNode() { + arg = call.getArgumentOperand(argumentIndex) and + IndirectOperand.super.hasOperandAndIndirectionIndex(arg, _) + } + + CallInstruction getCallInstruction() { result = call } + + /** Gets the underlying operand and the underlying indirection index. */ + predicate hasAddressOperandAndIndirectionIndex(Operand operand, int indirectionIndex) { + IndirectOperand.super.hasOperandAndIndirectionIndex(operand, indirectionIndex) + } + + int getArgumentIndex() { result = argumentIndex } + + override DataFlowCallable getEnclosingCallable() { + result.asSourceCallable() = this.getFunction() + } + + override Declaration getFunction() { result = call.getEnclosingFunction() } + + Expr getArgument() { result = call.getArgument(argumentIndex).getUnconvertedResultExpression() } +} + +/** + * A node representing the value of a global variable just before returning + * from a function body. + */ +class FinalGlobalValue extends Node, TFinalGlobalValue { + SsaImpl::GlobalUse globalUse; + + FinalGlobalValue() { this = TFinalGlobalValue(globalUse) } + + /** Gets the underlying SSA use. */ + SsaImpl::GlobalUse getGlobalUse() { result = globalUse } + + override DataFlowCallable getEnclosingCallable() { + result.asSourceCallable() = this.getFunction() + } + + override Declaration getFunction() { result = globalUse.getIRFunction().getFunction() } + + override Type getType() { + exists(int indirectionIndex | + indirectionIndex = globalUse.getIndirectionIndex() and + result = getTypeImpl(globalUse.getUnderlyingType(), indirectionIndex) + ) + } + + final override Location getLocationImpl() { result = globalUse.getLocation() } + + override string toStringImpl() { result = globalUse.toString() } +} + +/** + * A node representing the value of a global variable just after entering + * a function body. + */ +class InitialGlobalValue extends Node, TInitialGlobalValue { + SsaImpl::GlobalDef globalDef; + + InitialGlobalValue() { this = TInitialGlobalValue(globalDef) } + + /** Gets the underlying SSA definition. */ + SsaImpl::GlobalDef getGlobalDef() { result = globalDef } + + override DataFlowCallable getEnclosingCallable() { + result.asSourceCallable() = this.getFunction() + } + + override Declaration getFunction() { result = globalDef.getFunction() } + + final override predicate isGLValue() { globalDef.getIndirectionIndex() = 0 } + + override Type getType() { result = globalDef.getUnderlyingType() } + + final override Location getLocationImpl() { result = globalDef.getLocation() } + + override string toStringImpl() { result = globalDef.toString() } +} + +/** + * A node representing a parameter for a function with no body. + */ +class BodyLessParameterNodeImpl extends Node, TBodyLessParameterNodeImpl { + Parameter p; + int indirectionIndex; + + BodyLessParameterNodeImpl() { this = TBodyLessParameterNodeImpl(p, indirectionIndex) } + + override DataFlowCallable getEnclosingCallable() { + result.asSourceCallable() = this.getFunction() + } + + override Declaration getFunction() { result = p.getFunction() } + + /** Gets the indirection index of this node. */ + int getIndirectionIndex() { result = indirectionIndex } + + override Type getType() { + result = getTypeImpl(p.getUnderlyingType(), this.getIndirectionIndex()) + } + + final override Location getLocationImpl() { + result = unique( | | p.getLocation()) + or + count(p.getLocation()) != 1 and + result instanceof UnknownLocation + } + + final override string toStringImpl() { + exists(string prefix | prefix = stars(this) | result = prefix + p.toString()) + } +} + +/** + * A data-flow node used to model flow summaries. That is, a dataflow node + * that is synthesized to represent a parameter, return value, or other part + * of a models-as-data modeled function. + */ +class FlowSummaryNode extends Node, TFlowSummaryNode { + /** + * Gets the models-as-data `SummaryNode` associated with this dataflow + * `FlowSummaryNode`. + */ + FlowSummaryImpl::Private::SummaryNode getSummaryNode() { this = TFlowSummaryNode(result) } + + /** + * Gets the summarized callable that this node belongs to. + */ + FlowSummaryImpl::Public::SummarizedCallable getSummarizedCallable() { + result = this.getSummaryNode().getSummarizedCallable() + } + + /** + * Gets the enclosing callable. For a `FlowSummaryNode` this is always the + * summarized function this node is part of. + */ + override DataFlowCallable getEnclosingCallable() { + result.asSummarizedCallable() = this.getSummarizedCallable() + } + + override Location getLocationImpl() { result = this.getSummarizedCallable().getLocation() } + + override string toStringImpl() { result = this.getSummaryNode().toString() } +} + +/** + * A node representing the indirection of a value that is + * about to be returned from a function. + */ +class IndirectReturnNode extends Node { + IndirectReturnNode() { + this instanceof FinalParameterNode + or + this.(IndirectOperand) + .hasOperandAndIndirectionIndex(any(ReturnValueInstruction ret).getReturnAddressOperand(), _) + } + + override SourceCallable getEnclosingCallable() { result.asSourceCallable() = this.getFunction() } + + /** + * Holds if this node represents the value that is returned to the caller + * through a `return` statement. + */ + predicate isNormalReturn() { this instanceof IndirectOperand } + + /** + * Holds if this node represents the value that is returned to the caller + * by writing to the `argumentIndex`'th argument of the call. + */ + predicate isParameterReturn(int argumentIndex) { + this.(FinalParameterNode).getArgumentIndex() = argumentIndex + } + + /** Gets the indirection index of this indirect return node. */ + int getIndirectionIndex() { + result = this.(FinalParameterNode).getIndirectionIndex() + or + this.(IndirectOperand).hasOperandAndIndirectionIndex(_, result) + } +} + +/** + * A node representing the value of an output parameter + * just before reaching the end of a function. + */ +class FinalParameterNode extends Node, TFinalParameterNode { + Parameter p; + int indirectionIndex; + + FinalParameterNode() { this = TFinalParameterNode(p, indirectionIndex) } + + /** Gets the parameter associated with this final use. */ + Parameter getParameter() { result = p } + + /** Gets the underlying indirection index. */ + int getIndirectionIndex() { result = indirectionIndex } + + /** Gets the argument index associated with this final use. */ + final int getArgumentIndex() { result = p.getIndex() } + + override Declaration getFunction() { result = p.getFunction() } + + override DataFlowCallable getEnclosingCallable() { + result.asSourceCallable() = this.getFunction() + } + + override Type getType() { result = getTypeImpl(p.getUnderlyingType(), indirectionIndex) } + + final override Location getLocationImpl() { + // Parameters can have multiple locations. When there's a unique location we use + // that one, but if multiple locations exist we default to an unknown location. + result = unique( | | p.getLocation()) + or + not exists(unique( | | p.getLocation())) and + result instanceof UnknownLocation + } + + override string toStringImpl() { result = stars(this) + p.toString() } +} + +abstract private class AbstractParameterNode extends Node { + /** + * Holds if this node is the parameter of `f` at the specified position. The + * implicit `this` parameter is considered to have position `-1`, and + * pointer-indirection parameters are at further negative positions. + */ + predicate isSourceParameterOf(Function f, ParameterPosition pos) { none() } + + /** + * Holds if this node is the parameter of `sc` at the specified position. The + * implicit `this` parameter is considered to have position `-1`, and + * pointer-indirection parameters are at further negative positions. + */ + predicate isSummaryParameterOf( + FlowSummaryImpl::Public::SummarizedCallable sc, ParameterPosition pos + ) { + none() + } + + /** + * Holds if this node is the parameter of `c` at the specified position. The + * implicit `this` parameter is considered to have position `-1`, and + * pointer-indirection parameters are at further negative positions. + */ + final predicate isParameterOf(DataFlowCallable c, ParameterPosition pos) { + this.isSummaryParameterOf(c.asSummarizedCallable(), pos) + or + this.isSourceParameterOf(c.asSourceCallable(), pos) + } + + /** Gets the `Parameter` associated with this node, if it exists. */ + Parameter getParameter() { none() } // overridden by subclasses +} + +abstract private class AbstractIndirectParameterNode extends AbstractParameterNode { + /** Gets the indirection index of this parameter node. */ + abstract int getIndirectionIndex(); +} + +pragma[noinline] +private predicate indirectParameterNodeHasArgumentIndexAndIndex( + IndirectInstructionParameterNode node, int argumentIndex, int indirectionIndex +) { + node.hasInstructionAndIndirectionIndex(_, indirectionIndex) and + node.getArgumentIndex() = argumentIndex +} + +pragma[noinline] +private predicate indirectPositionHasArgumentIndexAndIndex( + IndirectionPosition pos, int argumentIndex, int indirectionIndex +) { + pos.getArgumentIndex() = argumentIndex and + pos.getIndirectionIndex() = indirectionIndex +} + +private class IndirectInstructionParameterNode extends AbstractIndirectParameterNode instanceof IndirectInstruction +{ + InitializeParameterInstruction init; + + IndirectInstructionParameterNode() { + IndirectInstruction.super.hasInstructionAndIndirectionIndex(init, _) + } + + int getArgumentIndex() { init.hasIndex(result) } + + override string toStringImpl() { + exists(string prefix | prefix = stars(this) | + result = prefix + this.getParameter().toString() + or + not exists(this.getParameter()) and + result = prefix + "this" + ) + } + + /** Gets the parameter whose indirection is initialized. */ + override Parameter getParameter() { result = init.getParameter() } + + override DataFlowCallable getEnclosingCallable() { + result.asSourceCallable() = this.getFunction() + } + + override Declaration getFunction() { result = init.getEnclosingFunction() } + + override predicate isSourceParameterOf(Function f, ParameterPosition pos) { + this.getFunction() = f and + exists(int argumentIndex, int indirectionIndex | + indirectPositionHasArgumentIndexAndIndex(pos, argumentIndex, indirectionIndex) and + indirectParameterNodeHasArgumentIndexAndIndex(this, argumentIndex, indirectionIndex) + ) + } + + /** Gets the underlying operand and the underlying indirection index. */ + predicate hasInstructionAndIndirectionIndex(Instruction instr, int index) { + IndirectInstruction.super.hasInstructionAndIndirectionIndex(instr, index) + } + + final override int getIndirectionIndex() { this.hasInstructionAndIndirectionIndex(init, result) } +} + +abstract private class AbstractDirectParameterNode extends AbstractParameterNode { } + +/** + * A non-indirect parameter node that is represented as an `Instruction`. + */ +abstract class InstructionDirectParameterNode extends InstructionNode, AbstractDirectParameterNode { + final override InitializeParameterInstruction instr; + + /** + * Gets the `IRVariable` that this parameter references. + */ + final IRVariable getIRVariable() { result = instr.getIRVariable() } +} + +abstract private class AbstractExplicitParameterNode extends AbstractDirectParameterNode { } + +/** An explicit positional parameter, not including `this` or `...`. */ +private class ExplicitParameterInstructionNode extends AbstractExplicitParameterNode, + InstructionDirectParameterNode +{ + ExplicitParameterInstructionNode() { exists(instr.getParameter()) } + + override predicate isSourceParameterOf(Function f, ParameterPosition pos) { + f.getParameter(pos.(DirectPosition).getArgumentIndex()) = instr.getParameter() + } + + override string toStringImpl() { result = instr.getParameter().toString() } + + override Parameter getParameter() { result = instr.getParameter() } +} + +/** + * A parameter node that is part of a summary. + */ +class SummaryParameterNode extends AbstractParameterNode, FlowSummaryNode { + SummaryParameterNode() { + FlowSummaryImpl::Private::summaryParameterNode(this.getSummaryNode(), _) + } + + private ParameterPosition getPosition() { + FlowSummaryImpl::Private::summaryParameterNode(this.getSummaryNode(), result) + } + + override predicate isSummaryParameterOf( + FlowSummaryImpl::Public::SummarizedCallable c, ParameterPosition p + ) { + c = this.getSummarizedCallable() and + p = this.getPosition() + } +} + +private class DirectBodyLessParameterNode extends AbstractExplicitParameterNode, + BodyLessParameterNodeImpl +{ + DirectBodyLessParameterNode() { indirectionIndex = 0 } + + override predicate isSourceParameterOf(Function f, ParameterPosition pos) { + this.getFunction() = f and + f.getParameter(pos.(DirectPosition).getArgumentIndex()) = p + } + + override Parameter getParameter() { result = p } +} + +private class IndirectBodyLessParameterNode extends AbstractIndirectParameterNode, + BodyLessParameterNodeImpl +{ + IndirectBodyLessParameterNode() { not this instanceof DirectBodyLessParameterNode } + + override predicate isSourceParameterOf(Function f, ParameterPosition pos) { + exists(int argumentPosition | + this.getFunction() = f and + f.getParameter(argumentPosition) = p and + indirectPositionHasArgumentIndexAndIndex(pos, argumentPosition, indirectionIndex) + ) + } + + override int getIndirectionIndex() { + result = BodyLessParameterNodeImpl.super.getIndirectionIndex() + } + + override Parameter getParameter() { result = p } +} + +/** + * A `PostUpdateNode` that is part of a flow summary. These are synthesized, + * for example, when a models-as-data summary models a write to a field since + * the write needs to target a `PostUpdateNode`. + */ +class SummaryPostUpdateNode extends FlowSummaryNode, PostUpdateNode { + SummaryPostUpdateNode() { + FlowSummaryImpl::Private::summaryPostUpdateNode(this.getSummaryNode(), _) + } + + override Node getPreUpdateNode() { + FlowSummaryImpl::Private::summaryPostUpdateNode(this.getSummaryNode(), + result.(FlowSummaryNode).getSummaryNode()) + } +} + +/** + * Returns `t`, but stripped of the outermost pointer, reference, etc. + * + * For example, `stripPointers(int*&)` is `int*` and `stripPointers(int*)` is `int`. + */ +private Type stripPointer(Type t) { + result = any(SsaImpl::Indirection ind | ind.getType() = t).getBaseType() + or + result = t.(PointerToMemberType).getBaseType() + or + result = t.(FunctionPointerIshType).getBaseType() +} + +/** + * Returns `t`, but stripped of the outer-most `indirectionIndex` number of indirections. + */ +private Type getTypeImpl0(Type t, int indirectionIndex) { + indirectionIndex = 0 and + result = t + or + indirectionIndex > 0 and + exists(Type stripped | + stripped = stripPointer(t.stripTopLevelSpecifiers()) and + stripped.getUnspecifiedType() != t.getUnspecifiedType() and + result = getTypeImpl0(stripped, indirectionIndex - 1) + ) +} + +/** + * Returns `t`, but stripped of the outer-most `indirectionIndex` number of indirections. + * + * If `indirectionIndex` cannot be stripped off `t`, an `UnknownType` is returned. + */ +bindingset[t, indirectionIndex] +pragma[inline_late] +Type getTypeImpl(Type t, int indirectionIndex) { + result = getTypeImpl0(t, indirectionIndex) + or + not exists(getTypeImpl0(t, indirectionIndex)) and + result instanceof UnknownType +} diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll index 88d7dd9faf19..6dd953b16ab5 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll @@ -1,5 +1,6 @@ private import cpp as Cpp private import DataFlowUtil +private import DataFlowNodes private import semmle.code.cpp.ir.IR private import DataFlowDispatch private import semmle.code.cpp.ir.internal.IRCppLanguage @@ -16,28 +17,42 @@ private import semmle.code.cpp.dataflow.ExternalFlow as External cached private module Cached { cached - module Nodes0 { - cached - newtype TIRDataFlowNode0 = - TInstructionNode0(Instruction i) { - not Ssa::ignoreInstruction(i) and - not exists(Operand op | - not Ssa::ignoreOperand(op) and i = Ssa::getIRRepresentationOfOperand(op) - ) and - // We exclude `void`-typed instructions because they cannot contain data. - // However, if the instruction is a glvalue, and their type is `void`, then the result - // type of the instruction is really `void*`, and thus we still want to have a dataflow - // node for it. - (not i.getResultType() instanceof VoidType or i.isGLValue()) - } or - TMultipleUseOperandNode0(Operand op) { - not Ssa::ignoreOperand(op) and not exists(Ssa::getIRRepresentationOfOperand(op)) - } or - TSingleUseOperandNode0(Operand op) { - not Ssa::ignoreOperand(op) and exists(Ssa::getIRRepresentationOfOperand(op)) - } + newtype TIRDataFlowNode0 = + TInstructionNode0(Instruction i) { + not Ssa::ignoreInstruction(i) and + not exists(Operand op | + not Ssa::ignoreOperand(op) and i = Ssa::getIRRepresentationOfOperand(op) + ) and + // We exclude `void`-typed instructions because they cannot contain data. + // However, if the instruction is a glvalue, and their type is `void`, then the result + // type of the instruction is really `void*`, and thus we still want to have a dataflow + // node for it. + (not i.getResultType() instanceof VoidType or i.isGLValue()) + } or + TMultipleUseOperandNode0(Operand op) { + not Ssa::ignoreOperand(op) and not exists(Ssa::getIRRepresentationOfOperand(op)) + } or + TSingleUseOperandNode0(Operand op) { + not Ssa::ignoreOperand(op) and exists(Ssa::getIRRepresentationOfOperand(op)) + } + + cached + string toStringCached(Node n) { + result = toExprString(n) + or + not exists(toExprString(n)) and + result = n.toStringImpl() } + cached + Location getLocationCached(Node n) { result = n.getLocationImpl() } + + cached + newtype TContentApprox = + TFieldApproxContent(string s) { fieldHasApproxName(_, s) } or + TUnionApproxContent(string s) { unionHasApproxName(_, s) } or + TElementApproxContent() + /** * Gets an additional term that is added to the `join` and `branch` computations to reflect * an additional forward or backwards branching factor that is not taken into account @@ -59,38 +74,174 @@ private module Cached { result = countNumberOfBranchesUsingParameter(switch, p) ) } -} -import Cached -private import Nodes0 + cached + newtype TDataFlowCallable = + TSourceCallable(Cpp::Declaration decl) or + TSummarizedCallable(FlowSummaryImpl::Public::SummarizedCallable c) -/** - * A module for calculating the number of stars (i.e., `*`s) needed for various - * dataflow node `toString` predicates. - */ -module NodeStars { - private int getNumberOfIndirections(Node n) { - result = n.(RawIndirectOperand).getIndirectionIndex() - or - result = n.(RawIndirectInstruction).getIndirectionIndex() - or - result = n.(VariableNode).getIndirectionIndex() + cached + newtype TDataFlowCall = + TNormalCall(CallInstruction call) or + TSummaryCall( + FlowSummaryImpl::Public::SummarizedCallable c, FlowSummaryImpl::Private::SummaryNode receiver + ) { + FlowSummaryImpl::Private::summaryCallbackRange(c, receiver) + } + + /** + * Holds if data can flow from `node1` to `node2` in a way that loses the + * calling context. For example, this would happen with flow through a + * global or static variable. + */ + cached + predicate jumpStep(Node n1, Node n2) { + exists(GlobalLikeVariable v | + exists(Ssa::GlobalUse globalUse | + v = globalUse.getVariable() and + n1.(FinalGlobalValue).getGlobalUse() = globalUse + | + globalUse.getIndirection() = getMinIndirectionForGlobalUse(globalUse) and + v = n2.asVariable() + or + v = n2.asIndirectVariable(globalUse.getIndirection()) + ) + or + exists(Ssa::GlobalDef globalDef | + v = globalDef.getVariable() and + n2.(InitialGlobalValue).getGlobalDef() = globalDef + | + globalDef.getIndirection() = getMinIndirectionForGlobalDef(globalDef) and + v = n1.asVariable() + or + v = n1.asIndirectVariable(globalDef.getIndirection()) + ) + ) or - result = n.(PostUpdateNodeImpl).getIndirectionIndex() + // models-as-data summarized flow + FlowSummaryImpl::Private::Steps::summaryJumpStep(n1.(FlowSummaryNode).getSummaryNode(), + n2.(FlowSummaryNode).getSummaryNode()) + } + + /** + * Holds if data can flow from `node1` to `node2` via an assignment to `f`. + * Thus, `node2` references an object with a field `f` that contains the + * value of `node1`. + * + * The boolean `certain` is true if the destination address does not involve + * any pointer arithmetic, and false otherwise. + */ + cached + predicate storeStepImpl(Node node1, Content c, Node node2, boolean certain) { + exists( + PostFieldUpdateNode postFieldUpdate, int indirectionIndex1, int numberOfLoads, + StoreInstruction store, FieldContent fc + | + postFieldUpdate = node2 and + fc = c and + nodeHasInstruction(node1, pragma[only_bind_into](store), + pragma[only_bind_into](indirectionIndex1)) and + postFieldUpdate.getIndirectionIndex() = 1 and + numberOfLoadsFromOperand(postFieldUpdate.getFieldAddress(), + store.getDestinationAddressOperand(), numberOfLoads, certain) and + fc.getAField() = postFieldUpdate.getUpdatedField() and + getIndirectionIndexLate(fc) = 1 + indirectionIndex1 + numberOfLoads + ) or - result = n.(FinalParameterNode).getIndirectionIndex() + // models-as-data summarized flow + FlowSummaryImpl::Private::Steps::summaryStoreStep(node1.(FlowSummaryNode).getSummaryNode(), c, + node2.(FlowSummaryNode).getSummaryNode()) and + certain = true + } + + /** + * Holds if data can flow from `node1` to `node2` via an assignment to `f`. + * Thus, `node2` references an object with a field `f` that contains the + * value of `node1`. + */ + cached + predicate storeStep(Node node1, ContentSet c, Node node2) { storeStepImpl(node1, c, node2, _) } + + /** + * Holds if data can flow from `node1` to `node2` via a read of `f`. + * Thus, `node1` references an object with a field `f` whose value ends up in + * `node2`. + */ + cached + predicate readStep(Node node1, ContentSet c, Node node2) { + exists( + FieldAddress fa1, Operand operand, int numberOfLoads, int indirectionIndex2, FieldContent fc + | + fc = c and + nodeHasOperand(node2, operand, indirectionIndex2) and + // The `1` here matches the `node2.getIndirectionIndex() = 1` conjunct + // in `storeStep`. + nodeHasOperand(node1, fa1.getObjectAddressOperand(), 1) and + numberOfLoadsFromOperand(fa1, operand, numberOfLoads, _) and + fc.getAField() = fa1.getField() and + getIndirectionIndexLate(fc) = indirectionIndex2 + numberOfLoads + ) or - result = n.(BodyLessParameterNodeImpl).getIndirectionIndex() + // models-as-data summarized flow + FlowSummaryImpl::Private::Steps::summaryReadStep(node1.(FlowSummaryNode).getSummaryNode(), c, + node2.(FlowSummaryNode).getSummaryNode()) } /** - * Gets the number of stars (i.e., `*`s) needed to produce the `toString` - * output for `n`. + * Holds if values stored inside content `c` are cleared at node `n`. */ - string stars(Node n) { result = repeatStars(getNumberOfIndirections(n)) } + cached + predicate clearsContent(Node n, ContentSet c) { + n = + any(PostUpdateNode pun, Content d | + d.impliesClearOf(c) and storeStepImpl(_, d, pun, true) + | + pun + ).getPreUpdateNode() and + ( + not exists(Operand op, Cpp::Operation p | + n.(IndirectOperand).hasOperandAndIndirectionIndex(op, _) and + ( + p instanceof Cpp::AssignPointerAddExpr or + p instanceof Cpp::AssignPointerSubExpr or + p instanceof Cpp::CrementOperation + ) + | + p.getAnOperand() = op.getUse().getAst() + ) + or + forex(PostUpdateNode pun, Content d | + pragma[only_bind_into](d).impliesClearOf(pragma[only_bind_into](c)) and + storeStepImpl(_, d, pun, true) and + pun.getPreUpdateNode() = n + | + c.(Content).getIndirectionIndex() = d.getIndirectionIndex() + ) + ) + } +} + +import Cached + +private int getNumberOfIndirections(Node n) { + result = n.(RawIndirectOperand).getIndirectionIndex() + or + result = n.(RawIndirectInstruction).getIndirectionIndex() + or + result = n.(VariableNode).getIndirectionIndex() + or + result = n.(PostUpdateNodeImpl).getIndirectionIndex() + or + result = n.(FinalParameterNode).getIndirectionIndex() + or + result = n.(BodyLessParameterNodeImpl).getIndirectionIndex() } -import NodeStars +/** + * Gets the number of stars (i.e., `*`s) needed to produce the `toString` + * output for `n`. + */ +string stars(Node n) { result = repeatStars(getNumberOfIndirections(n)) } /** * A cut-down `DataFlow::Node` class that does not depend on the output of SSA. @@ -828,85 +979,10 @@ private int getMinIndirectionForGlobalDef(Ssa::GlobalDef def) { result = getMinIndirectionsForType(def.getUnspecifiedType()) } -/** - * Holds if data can flow from `node1` to `node2` in a way that loses the - * calling context. For example, this would happen with flow through a - * global or static variable. - */ -predicate jumpStep(Node n1, Node n2) { - exists(GlobalLikeVariable v | - exists(Ssa::GlobalUse globalUse | - v = globalUse.getVariable() and - n1.(FinalGlobalValue).getGlobalUse() = globalUse - | - globalUse.getIndirection() = getMinIndirectionForGlobalUse(globalUse) and - v = n2.asVariable() - or - v = n2.asIndirectVariable(globalUse.getIndirection()) - ) - or - exists(Ssa::GlobalDef globalDef | - v = globalDef.getVariable() and - n2.(InitialGlobalValue).getGlobalDef() = globalDef - | - globalDef.getIndirection() = getMinIndirectionForGlobalDef(globalDef) and - v = n1.asVariable() - or - v = n1.asIndirectVariable(globalDef.getIndirection()) - ) - ) - or - // models-as-data summarized flow - FlowSummaryImpl::Private::Steps::summaryJumpStep(n1.(FlowSummaryNode).getSummaryNode(), - n2.(FlowSummaryNode).getSummaryNode()) -} - bindingset[c] pragma[inline_late] private int getIndirectionIndexLate(Content c) { result = c.getIndirectionIndex() } -/** - * Holds if data can flow from `node1` to `node2` via an assignment to `f`. - * Thus, `node2` references an object with a field `f` that contains the - * value of `node1`. - * - * The boolean `certain` is true if the destination address does not involve - * any pointer arithmetic, and false otherwise. This has to do with whether a - * store step can be used to clear a field (see `clearsContent`). - */ -predicate storeStepImpl(Node node1, Content c, Node node2, boolean certain) { - exists( - PostFieldUpdateNode postFieldUpdate, int indirectionIndex1, int numberOfLoads, - StoreInstruction store, FieldContent fc - | - postFieldUpdate = node2 and - fc = c and - nodeHasInstruction(node1, pragma[only_bind_into](store), - pragma[only_bind_into](indirectionIndex1)) and - postFieldUpdate.getIndirectionIndex() = 1 and - numberOfLoadsFromOperand(postFieldUpdate.getFieldAddress(), - store.getDestinationAddressOperand(), numberOfLoads, certain) and - fc.getAField() = postFieldUpdate.getUpdatedField() and - getIndirectionIndexLate(fc) = 1 + indirectionIndex1 + numberOfLoads - ) - or - // models-as-data summarized flow - FlowSummaryImpl::Private::Steps::summaryStoreStep(node1.(FlowSummaryNode).getSummaryNode(), c, - node2.(FlowSummaryNode).getSummaryNode()) and - certain = true -} - -/** - * Holds if data can flow from `node1` to `node2` via an assignment to `f`. - * Thus, `node2` references an object with a field `f` that contains the - * value of `node1`. - */ -predicate storeStep(Node node1, ContentSet c, Node node2) { storeStepImpl(node1, c, node2, _) } - -/** - * Holds if `operandFrom` flows to `operandTo` using a sequence of conversion-like - * operations and exactly `n` `LoadInstruction` operations. - */ private predicate numberOfLoadsFromOperandRec( Operand operandFrom, Operand operandTo, int ind, boolean certain ) { @@ -957,63 +1033,6 @@ predicate nodeHasInstruction(Node node, Instruction instr, int indirectionIndex) hasInstructionAndIndex(node, instr, indirectionIndex) } -/** - * Holds if data can flow from `node1` to `node2` via a read of `f`. - * Thus, `node1` references an object with a field `f` whose value ends up in - * `node2`. - */ -predicate readStep(Node node1, ContentSet c, Node node2) { - exists( - FieldAddress fa1, Operand operand, int numberOfLoads, int indirectionIndex2, FieldContent fc - | - fc = c and - nodeHasOperand(node2, operand, indirectionIndex2) and - // The `1` here matches the `node2.getIndirectionIndex() = 1` conjunct - // in `storeStep`. - nodeHasOperand(node1, fa1.getObjectAddressOperand(), 1) and - numberOfLoadsFromOperand(fa1, operand, numberOfLoads, _) and - fc.getAField() = fa1.getField() and - getIndirectionIndexLate(fc) = indirectionIndex2 + numberOfLoads - ) - or - // models-as-data summarized flow - FlowSummaryImpl::Private::Steps::summaryReadStep(node1.(FlowSummaryNode).getSummaryNode(), c, - node2.(FlowSummaryNode).getSummaryNode()) -} - -/** - * Holds if values stored inside content `c` are cleared at node `n`. - */ -predicate clearsContent(Node n, ContentSet c) { - n = - any(PostUpdateNode pun, Content d | d.impliesClearOf(c) and storeStepImpl(_, d, pun, true) | pun) - .getPreUpdateNode() and - ( - // The crement operations and pointer addition and subtraction self-assign. We do not - // want to clear the contents if it is indirectly pointed at by any of these operations, - // as part of the contents might still be accessible afterwards. If there is no such - // indirection clearing the contents is safe. - not exists(Operand op, Cpp::Operation p | - n.(IndirectOperand).hasOperandAndIndirectionIndex(op, _) and - ( - p instanceof Cpp::AssignPointerAddExpr or - p instanceof Cpp::AssignPointerSubExpr or - p instanceof Cpp::CrementOperation - ) - | - p.getAnOperand() = op.getUse().getAst() - ) - or - forex(PostUpdateNode pun, Content d | - pragma[only_bind_into](d).impliesClearOf(pragma[only_bind_into](c)) and - storeStepImpl(_, d, pun, true) and - pun.getPreUpdateNode() = n - | - c.(Content).getIndirectionIndex() = d.getIndirectionIndex() - ) - ) -} - /** * Holds if the value that is being tracked is expected to be stored inside content `c` * at node `n`. @@ -1046,11 +1065,6 @@ class CastNode extends Node { CastNode() { none() } // stub implementation } -cached -private newtype TDataFlowCallable = - TSourceCallable(Cpp::Declaration decl) or - TSummarizedCallable(FlowSummaryImpl::Public::SummarizedCallable c) - /** * A callable, which may be: * - a function (that may contain code) @@ -1134,15 +1148,6 @@ class DataFlowType extends TypeFinal { string toString() { result = "" } } -cached -private newtype TDataFlowCall = - TNormalCall(CallInstruction call) or - TSummaryCall( - FlowSummaryImpl::Public::SummarizedCallable c, FlowSummaryImpl::Private::SummaryNode receiver - ) { - FlowSummaryImpl::Private::summaryCallbackRange(c, receiver) - } - private predicate summarizedCallableIsManual(SummarizedCallable sc) { sc.asSummarizedCallable().hasManualModel() } @@ -1523,12 +1528,6 @@ private predicate fieldHasApproxName(Field f, string s) { private predicate unionHasApproxName(Cpp::Union u, string s) { s = u.getName().charAt(0) } -cached -private newtype TContentApprox = - TFieldApproxContent(string s) { fieldHasApproxName(_, s) } or - TUnionApproxContent(string s) { unionHasApproxName(_, s) } or - TElementApproxContent() - /** An approximated `Content`. */ class ContentApprox extends TContentApprox { string toString() { none() } // overridden in subclasses diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll index c66c76e60d78..d42d959f56ee 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll @@ -3,14 +3,12 @@ */ private import cpp -// The `ValueNumbering` library has to be imported right after `cpp` to ensure -// that the cached IR gets the same checksum here as it does in queries that use -// `ValueNumbering` without `DataFlow`. private import semmle.code.cpp.ir.ValueNumbering private import semmle.code.cpp.ir.IR private import semmle.code.cpp.controlflow.IRGuards private import semmle.code.cpp.models.interfaces.DataFlow private import semmle.code.cpp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +private import TaintTrackingUtil as TaintTrackingUtil private import DataFlowPrivate private import ModelUtil private import SsaImpl as SsaImpl @@ -18,1702 +16,8 @@ private import DataFlowImplCommon as DataFlowImplCommon private import codeql.util.Unit private import Node0ToString private import DataFlowDispatch as DataFlowDispatch -import ExprNodes - -/** - * The IR dataflow graph consists of the following nodes: - * - `Node0`, which injects most instructions and operands directly into the - * dataflow graph. - * - `VariableNode`, which is used to model flow through global variables. - * - `PostUpdateNodeImpl`, which is used to model the state of an object after - * an update after a number of loads. - * - `SsaSynthNode`, which represents synthesized nodes as computed by the shared SSA - * library. - * - `RawIndirectOperand`, which represents the value of `operand` after - * loading the address a number of times. - * - `RawIndirectInstruction`, which represents the value of `instr` after - * loading the address a number of times. - */ -cached -private newtype TIRDataFlowNode = - TNode0(Node0Impl node) { DataFlowImplCommon::forceCachingInSameStage() } or - TGlobalLikeVariableNode(GlobalLikeVariable var, int indirectionIndex) { - indirectionIndex = - [getMinIndirectionsForType(var.getUnspecifiedType()) .. SsaImpl::getMaxIndirectionsForType(var.getUnspecifiedType())] - } or - TPostUpdateNodeImpl(Operand operand, int indirectionIndex) { - isPostUpdateNodeImpl(operand, indirectionIndex) - } or - TSsaSynthNode(SsaImpl::SynthNode n) or - TSsaIteratorNode(IteratorFlow::IteratorFlowNode n) or - TRawIndirectOperand0(Node0Impl node, int indirectionIndex) { - SsaImpl::hasRawIndirectOperand(node.asOperand(), indirectionIndex) - } or - TRawIndirectInstruction0(Node0Impl node, int indirectionIndex) { - not exists(node.asOperand()) and - SsaImpl::hasRawIndirectInstruction(node.asInstruction(), indirectionIndex) - } or - TFinalParameterNode(Parameter p, int indirectionIndex) { - exists(SsaImpl::FinalParameterUse use | - use.getParameter() = p and - use.getIndirectionIndex() = indirectionIndex - ) - } or - TFinalGlobalValue(SsaImpl::GlobalUse globalUse) or - TInitialGlobalValue(SsaImpl::GlobalDef globalUse) or - TBodyLessParameterNodeImpl(Parameter p, int indirectionIndex) { - // Rule out parameters of catch blocks. - not exists(p.getCatchBlock()) and - // We subtract one because `getMaxIndirectionsForType` returns the maximum - // indirection for a glvalue of a given type, and this doesn't apply to - // parameters. - indirectionIndex = [0 .. SsaImpl::getMaxIndirectionsForType(p.getUnspecifiedType()) - 1] and - not any(InitializeParameterInstruction init).getParameter() = p - } or - TFlowSummaryNode(FlowSummaryImpl::Private::SummaryNode sn) - -/** - * An operand that is defined by a `FieldAddressInstruction`. - */ -class FieldAddress extends Operand { - FieldAddressInstruction fai; - - FieldAddress() { fai = this.getDef() and not SsaImpl::ignoreOperand(this) } - - /** Gets the field associated with this instruction. */ - Field getField() { result = fai.getField() } - - /** Gets the instruction whose result provides the address of the object containing the field. */ - Instruction getObjectAddress() { result = fai.getObjectAddress() } - - /** Gets the operand that provides the address of the object containing the field. */ - Operand getObjectAddressOperand() { result = fai.getObjectAddressOperand() } -} - -/** - * Holds if `opFrom` is an operand whose value flows to the result of `instrTo`. - * - * `isPointerArith` is `true` if `instrTo` is a `PointerArithmeticInstruction` and `opFrom` - * is the left operand. - * - * `additional` is `true` if the conversion is supplied by an implementation of the - * `Indirection` class. It is sometimes useful to exclude such conversions. - */ -predicate conversionFlow( - Operand opFrom, Instruction instrTo, boolean isPointerArith, boolean additional -) { - isPointerArith = false and - ( - additional = false and - ( - instrTo.(CopyValueInstruction).getSourceValueOperand() = opFrom - or - instrTo.(ConvertInstruction).getUnaryOperand() = opFrom - or - instrTo.(CheckedConvertOrNullInstruction).getUnaryOperand() = opFrom - or - instrTo.(InheritanceConversionInstruction).getUnaryOperand() = opFrom - or - exists(BuiltInInstruction builtIn | - builtIn = instrTo and - // __builtin_bit_cast - builtIn.getBuiltInOperation() instanceof BuiltInBitCast and - opFrom = builtIn.getAnOperand() - ) - ) - or - additional = true and - SsaImpl::isAdditionalConversionFlow(opFrom, instrTo) - ) - or - isPointerArith = true and - additional = false and - instrTo.(PointerArithmeticInstruction).getLeftOperand() = opFrom -} - -/** - * A node in a data flow graph. - * - * A node can be either an expression, a parameter, or an uninitialized local - * variable. Such nodes are created with `DataFlow::exprNode`, - * `DataFlow::parameterNode`, and `DataFlow::uninitializedNode` respectively. - */ -class Node extends TIRDataFlowNode { - /** - * INTERNAL: Do not use. - */ - DataFlowCallable getEnclosingCallable() { none() } // overridden in subclasses - - /** Gets the function to which this node belongs, if any. */ - Declaration getFunction() { none() } // overridden in subclasses - - /** Holds if this node represents a glvalue. */ - predicate isGLValue() { none() } - - /** - * Gets the type of this node. - * - * If `isGLValue()` holds, then the type of this node - * should be thought of as "pointer to `getType()`". - */ - Type getType() { none() } // overridden in subclasses - - /** Gets the instruction corresponding to this node, if any. */ - Instruction asInstruction() { result = this.(InstructionNode).getInstruction() } - - /** Gets the operands corresponding to this node, if any. */ - Operand asOperand() { result = this.(OperandNode).getOperand() } - - /** - * Gets the operand that is indirectly tracked by this node behind `index` - * number of indirections. - */ - Operand asIndirectOperand(int index) { hasOperandAndIndex(this, result, index) } - - /** - * Holds if this node is at index `i` in basic block `block`. - * - * Note: Phi nodes are considered to be at index `-1`. - */ - final predicate hasIndexInBlock(IRBlock block, int i) { - this.asInstruction() = block.getInstruction(i) - or - this.asOperand().getUse() = block.getInstruction(i) - or - exists(SsaImpl::SynthNode ssaNode | - this.(SsaSynthNode).getSynthNode() = ssaNode and - ssaNode.getBasicBlock() = block and - ssaNode.getIndex() = i - ) - or - this.(RawIndirectOperand).getOperand().getUse() = block.getInstruction(i) - or - this.(RawIndirectInstruction).getInstruction() = block.getInstruction(i) - or - this.(PostUpdateNode).getPreUpdateNode().hasIndexInBlock(block, i) - } - - /** Gets the basic block of this node, if any. */ - final IRBlock getBasicBlock() { this.hasIndexInBlock(result, _) } - - /** - * Gets the non-conversion expression corresponding to this node, if any. - * This predicate only has a result on nodes that represent the value of - * evaluating the expression. For data flowing _out of_ an expression, like - * when an argument is passed by reference, use `asDefiningArgument` instead - * of `asExpr`. - * - * If this node strictly (in the sense of `asConvertedExpr`) corresponds to - * a `Conversion`, then the result is the underlying non-`Conversion` base - * expression. - */ - Expr asExpr() { result = this.asExpr(_) } - - /** - * INTERNAL: Do not use. - */ - Expr asExpr(int n) { result = this.(ExprNode).getExpr(n) } - - /** - * INTERNAL: Do not use. - */ - Expr asIndirectExpr(int n, int index) { result = this.(IndirectExprNode).getExpr(n, index) } - - /** - * Gets the non-conversion expression that's indirectly tracked by this node - * under `index` number of indirections. - */ - Expr asIndirectExpr(int index) { result = this.asIndirectExpr(_, index) } - - /** - * Gets the non-conversion expression that's indirectly tracked by this node - * behind a number of indirections. - */ - Expr asIndirectExpr() { result = this.asIndirectExpr(_) } - - /** - * Gets the expression corresponding to this node, if any. The returned - * expression may be a `Conversion`. - */ - Expr asConvertedExpr() { result = this.asConvertedExpr(_) } - - /** - * Gets the expression corresponding to this node, if any. The returned - * expression may be a `Conversion`. - */ - Expr asConvertedExpr(int n) { result = this.(ExprNode).getConvertedExpr(n) } - - /** - * INTERNAL: Do not use. - */ - Expr asIndirectConvertedExpr(int n, int index) { - result = this.(IndirectExprNode).getConvertedExpr(n, index) - } - - /** - * Gets the expression that's indirectly tracked by this node - * behind `index` number of indirections. - */ - Expr asIndirectConvertedExpr(int index) { result = this.asIndirectConvertedExpr(_, index) } - - /** - * Gets the expression that's indirectly tracked by this node behind a - * number of indirections. - */ - Expr asIndirectConvertedExpr() { result = this.asIndirectConvertedExpr(_) } - - /** - * Gets the argument that defines this `DefinitionByReferenceNode`, if any. - * This predicate should be used instead of `asExpr` when referring to the - * value of a reference argument _after_ the call has returned. For example, - * in `f(&x)`, this predicate will have `&x` as its result for the `Node` - * that represents the new value of `x`. - */ - Expr asDefiningArgument() { result = this.asDefiningArgument(_) } - - /** - * Gets the definition associated with this node, if any. - * - * For example, consider the following example - * ```cpp - * int x = 42; // 1 - * x = 34; // 2 - * ++x; // 3 - * x++; // 4 - * x += 1; // 5 - * int y = x += 2; // 6 - * ``` - * - For (1) the result is `42`. - * - For (2) the result is `x = 34`. - * - For (3) the result is `++x`. - * - For (4) the result is `x++`. - * - For (5) the result is `x += 1`. - * - For (6) there are two results: - * - For the definition generated by `x += 2` the result is `x += 2` - * - For the definition generated by `int y = ...` the result is - * also `x += 2`. - * - * For assignments, `node.asDefinition()` and `node.asExpr()` will both exist - * for the same dataflow node. However, for expression such as `x++` that - * both write to `x` and read the current value of `x`, `node.asDefinition()` - * will give the node corresponding to the value after the increment, and - * `node.asExpr()` will give the node corresponding to the value before the - * increment. For an example of this, consider the following: - * - * ```cpp - * sink(x++); - * ``` - * in the above program, there will not be flow from a node `n` such that - * `n.asDefinition() instanceof IncrementOperation` to the argument of `sink` - * since the value passed to `sink` is the value before to the increment. - * However, there will be dataflow from a node `n` such that - * `n.asExpr() instanceof IncrementOperation` since the result of evaluating - * the expression `x++` is passed to `sink`. - */ - Expr asDefinition() { result = this.asDefinition(_) } - - private predicate isCertainStore() { - exists(SsaImpl::Definition def | - SsaImpl::defToNode(this, def, _) and - def.isCertain() - ) - } - - /** - * Gets the definition associated with this node, if any. - * - * For example, consider the following example - * ```cpp - * int x = 42; // 1 - * x = 34; // 2 - * ++x; // 3 - * x++; // 4 - * x += 1; // 5 - * int y = x += 2; // 6 - * ``` - * - For (1) the result is `42`. - * - For (2) the result is `x = 34`. - * - For (3) the result is `++x`. - * - For (4) the result is `x++`. - * - For (5) the result is `x += 1`. - * - For (6) there are two results: - * - For the definition generated by `x += 2` the result is `x += 2` - * - For the definition generated by `int y = ...` the result is - * also `x += 2`. - * - * For assignments, `node.asDefinition(_)` and `node.asExpr()` will both exist - * for the same dataflow node. However, for expression such as `x++` that - * both write to `x` and read the current value of `x`, `node.asDefinition(_)` - * will give the node corresponding to the value after the increment, and - * `node.asExpr()` will give the node corresponding to the value before the - * increment. For an example of this, consider the following: - * - * ```cpp - * sink(x++); - * ``` - * in the above program, there will not be flow from a node `n` such that - * `n.asDefinition(_) instanceof IncrementOperation` to the argument of `sink` - * since the value passed to `sink` is the value before to the increment. - * However, there will be dataflow from a node `n` such that - * `n.asExpr() instanceof IncrementOperation` since the result of evaluating - * the expression `x++` is passed to `sink`. - * - * If `uncertain = false` then the definition is guaranteed to overwrite - * the entire buffer pointed to by the destination address of the definition. - * Otherwise, `uncertain = true`. - * - * For example, the write `int x; x = 42;` is guaranteed to overwrite all the - * bytes allocated to `x`, while the assignment `int p[10]; p[3] = 42;` has - * `uncertain = true` since the write will not overwrite the entire buffer - * pointed to by `p`. - */ - Expr asDefinition(boolean uncertain) { - exists(StoreInstruction store | - store = this.asInstruction() and - result = asDefinitionImpl(store) and - if this.isCertainStore() then uncertain = false else uncertain = true - ) - } - - /** - * Gets the definition associated with this node, if this node is a certain definition. - * - * See `Node.asDefinition/1` for a description of certain and uncertain definitions. - */ - Expr asCertainDefinition() { result = this.asDefinition(false) } - - /** - * Gets the definition associated with this node, if this node is an uncertain definition. - * - * See `Node.asDefinition/1` for a description of certain and uncertain definitions. - */ - Expr asUncertainDefinition() { result = this.asDefinition(true) } - - /** - * Gets the indirect definition at a given indirection corresponding to this - * node, if any. - * - * See the comments on `Node.asDefinition` for examples. - */ - Expr asIndirectDefinition(int indirectionIndex) { - exists(StoreInstruction store | - this.(IndirectInstruction).hasInstructionAndIndirectionIndex(store, indirectionIndex) and - result = asDefinitionImpl(store) - ) - } - - /** - * Gets the indirect definition at some indirection corresponding to this - * node, if any. - */ - Expr asIndirectDefinition() { result = this.asIndirectDefinition(_) } - - /** - * Gets the argument that defines this `DefinitionByReferenceNode`, if any. - * - * Unlike `Node::asDefiningArgument/0`, this predicate gets the node representing - * the value of the `index`'th indirection after leaving a function. For example, - * in: - * ```cpp - * void f(int**); - * ... - * int** x = ...; - * f(x); - * ``` - * The node `n` such that `n.asDefiningArgument(1)` is the argument `x` will - * contain the value of `*x` after `f` has returned, and the node `n` such that - * `n.asDefiningArgument(2)` is the argument `x` will contain the value of `**x` - * after the `f` has returned. - */ - Expr asDefiningArgument(int index) { - this.(DefinitionByReferenceNode).getIndirectionIndex() = index and - result = this.(DefinitionByReferenceNode).getArgument() - } - - /** - * Gets the the argument going into a function for a node that represents - * the indirect value of the argument after `index` loads. For example, in: - * ```cpp - * void f(int**); - * ... - * int** x = ...; - * f(x); - * ``` - * The node `n` such that `n.asIndirectArgument(1)` represents the value of - * `*x` going into `f`, and the node `n` such that `n.asIndirectArgument(2)` - * represents the value of `**x` going into `f`. - */ - Expr asIndirectArgument(int index) { - this.(SideEffectOperandNode).hasAddressOperandAndIndirectionIndex(_, index) and - result = this.(SideEffectOperandNode).getArgument() - } - - /** - * Gets the the argument going into a function for a node that represents - * the indirect value of the argument after any non-zero number of loads. - */ - Expr asIndirectArgument() { result = this.asIndirectArgument(_) } - - /** Gets the positional parameter corresponding to this node, if any. */ - Parameter asParameter() { - exists(int indirectionIndex | result = this.asParameter(indirectionIndex) | - if result.getUnspecifiedType() instanceof ReferenceType - then indirectionIndex = 1 - else indirectionIndex = 0 - ) - } - - /** - * Gets the uninitialized local variable corresponding to this node, if - * any. - */ - LocalVariable asUninitialized() { result = this.(UninitializedNode).getLocalVariable() } - - /** - * Gets the positional parameter corresponding to the node that represents - * the value of the parameter after `index` number of loads, if any. For - * example, in: - * ```cpp - * void f(int** x) { ... } - * ``` - * - The node `n` such that `n.asParameter(0)` is the parameter `x` represents - * the value of `x`. - * - The node `n` such that `n.asParameter(1)` is the parameter `x` represents - * the value of `*x`. - * - The node `n` such that `n.asParameter(2)` is the parameter `x` represents - * the value of `**x`. - */ - Parameter asParameter(int index) { - index = 0 and - result = this.(ExplicitParameterNode).getParameter() - or - this.(IndirectParameterNode).getIndirectionIndex() = index and - result = this.(IndirectParameterNode).getParameter() - } - - /** - * Holds if this node represents the `indirectionIndex`'th indirection of - * the value of an output parameter `p` just before reaching the end of a function. - */ - predicate isFinalValueOfParameter(Parameter p, int indirectionIndex) { - exists(FinalParameterNode n | n = this | - p = n.getParameter() and - indirectionIndex = n.getIndirectionIndex() - ) - } - - /** - * Holds if this node represents the value of an output parameter `p` - * just before reaching the end of a function. - */ - predicate isFinalValueOfParameter(Parameter p) { this.isFinalValueOfParameter(p, _) } - - /** - * Gets the variable corresponding to this node, if any. This can be used for - * modeling flow in and out of global variables. - */ - Variable asVariable() { - this = TGlobalLikeVariableNode(result, getMinIndirectionsForType(result.getUnspecifiedType())) - } - - /** - * Gets the `indirectionIndex`'th indirection of this node's underlying variable, if any. - * - * This can be used for modeling flow in and out of global variables. - */ - Variable asIndirectVariable(int indirectionIndex) { - indirectionIndex > getMinIndirectionsForType(result.getUnspecifiedType()) and - this = TGlobalLikeVariableNode(result, indirectionIndex) - } - - /** Gets an indirection of this node's underlying variable, if any. */ - Variable asIndirectVariable() { result = this.asIndirectVariable(_) } - - /** - * Gets the expression that is partially defined by this node, if any. - * - * Partial definitions are created for field stores (`x.y = taint();` is a partial - * definition of `x`), and for calls that may change the value of an object (so - * `x.set(taint())` is a partial definition of `x`, and `transfer(&x, taint())` is - * a partial definition of `&x`). - */ - Expr asPartialDefinition() { - exists(PartialDefinitionNode pdn | this = pdn | - pdn.getIndirectionIndex() > 0 and - result = pdn.getDefinedExpr() - ) - } - - /** - * Gets an upper bound on the type of this node. - */ - Type getTypeBound() { result = this.getType() } - - /** Gets the location of this element. */ - cached - final Location getLocation() { result = this.getLocationImpl() } - - /** INTERNAL: Do not use. */ - Location getLocationImpl() { - none() // overridden by subclasses - } - - /** Gets a textual representation of this element. */ - cached - final string toString() { - result = toExprString(this) - or - not exists(toExprString(this)) and - result = this.toStringImpl() - } - - /** INTERNAL: Do not use. */ - string toStringImpl() { - none() // overridden by subclasses - } -} - -/** - * A class that lifts pre-SSA dataflow nodes to regular dataflow nodes. - */ -private class Node0 extends Node, TNode0 { - Node0Impl node; - - Node0() { this = TNode0(node) } - - override DataFlowCallable getEnclosingCallable() { - result.asSourceCallable() = node.getEnclosingCallable() - } - - override Declaration getFunction() { result = node.getFunction() } - - override Location getLocationImpl() { result = node.getLocation() } - - override string toStringImpl() { result = node.toString() } - - override Type getType() { result = node.getType() } - - override predicate isGLValue() { node.isGLValue() } -} - -/** - * An instruction, viewed as a node in a data flow graph. - */ -class InstructionNode extends Node0 { - override InstructionNode0 node; - Instruction instr; - - InstructionNode() { instr = node.getInstruction() } - - /** Gets the instruction corresponding to this node. */ - Instruction getInstruction() { result = instr } -} - -/** - * An operand, viewed as a node in a data flow graph. - */ -class OperandNode extends Node, Node0 { - override OperandNode0 node; - Operand op; - - OperandNode() { op = node.getOperand() } - - /** Gets the operand corresponding to this node. */ - Operand getOperand() { result = op } -} - -/** - * INTERNAL: Do not use. - * - * Returns `t`, but stripped of the outermost pointer, reference, etc. - * - * For example, `stripPointers(int*&)` is `int*` and `stripPointers(int*)` is `int`. - */ -Type stripPointer(Type t) { - result = any(SsaImpl::Indirection ind | ind.getType() = t).getBaseType() - or - result = t.(PointerToMemberType).getBaseType() - or - result = t.(FunctionPointerIshType).getBaseType() -} - -/** - * INTERNAL: Do not use. - */ -class PostUpdateNodeImpl extends PartialDefinitionNode, TPostUpdateNodeImpl { - int indirectionIndex; - Operand operand; - - PostUpdateNodeImpl() { this = TPostUpdateNodeImpl(operand, indirectionIndex) } - - override Declaration getFunction() { result = operand.getUse().getEnclosingFunction() } - - override DataFlowCallable getEnclosingCallable() { - result = this.getPreUpdateNode().getEnclosingCallable() - } - - /** Gets the operand associated with this node. */ - Operand getOperand() { result = operand } - - /** Gets the indirection index associated with this node. */ - override int getIndirectionIndex() { result = indirectionIndex } - - override Location getLocationImpl() { result = operand.getLocation() } - - final override Node getPreUpdateNode() { - indirectionIndex > 0 and - hasOperandAndIndex(result, operand, indirectionIndex) - or - indirectionIndex = 0 and - result.asOperand() = operand - } - - final override Expr getDefinedExpr() { - result = operand.getDef().getUnconvertedResultExpression() - } -} - -/** - * INTERNAL: do not use. - * - * The node representing the value of a field after it has been updated. - */ -class PostFieldUpdateNode extends PostUpdateNodeImpl { - FieldAddress fieldAddress; - - PostFieldUpdateNode() { operand = fieldAddress.getObjectAddressOperand() } - - FieldAddress getFieldAddress() { result = fieldAddress } - - Field getUpdatedField() { result = this.getFieldAddress().getField() } - - override string toStringImpl() { result = this.getPreUpdateNode() + " [post update]" } -} - -/** - * INTERNAL: do not use. - * - * A synthesized SSA node produced by the shared SSA library, viewed as a node - * in a data flow graph. - */ -class SsaSynthNode extends Node, TSsaSynthNode { - SsaImpl::SynthNode node; - - SsaSynthNode() { this = TSsaSynthNode(node) } - - /** Gets the synthesized SSA node associated with this node. */ - SsaImpl::SynthNode getSynthNode() { result = node } - - override DataFlowCallable getEnclosingCallable() { - result.asSourceCallable() = this.getFunction() - } - - override Declaration getFunction() { result = node.getBasicBlock().getEnclosingFunction() } - - override Type getType() { result = node.getSourceVariable().getType() } - - override predicate isGLValue() { node.getSourceVariable().isGLValue() } - - final override Location getLocationImpl() { result = node.getLocation() } - - override string toStringImpl() { result = node.toString() } -} - -/** - * INTERNAL: do not use. - * - * Dataflow nodes necessary for iterator flow - */ -class SsaIteratorNode extends Node, TSsaIteratorNode { - IteratorFlow::IteratorFlowNode node; - - SsaIteratorNode() { this = TSsaIteratorNode(node) } - - /** Gets the phi node associated with this node. */ - IteratorFlow::IteratorFlowNode getIteratorFlowNode() { result = node } - - override DataFlowCallable getEnclosingCallable() { - result.asSourceCallable() = this.getFunction() - } - - override Declaration getFunction() { result = node.getFunction() } - - override Type getType() { result = node.getType() } - - final override Location getLocationImpl() { result = node.getLocation() } - - override string toStringImpl() { result = node.toString() } -} - -/** - * INTERNAL: do not use. - * - * A node representing a value after leaving a function. - */ -class SideEffectOperandNode extends Node instanceof IndirectOperand { - CallInstruction call; - int argumentIndex; - ArgumentOperand arg; - - SideEffectOperandNode() { - arg = call.getArgumentOperand(argumentIndex) and - IndirectOperand.super.hasOperandAndIndirectionIndex(arg, _) - } - - CallInstruction getCallInstruction() { result = call } - - /** Gets the underlying operand and the underlying indirection index. */ - predicate hasAddressOperandAndIndirectionIndex(Operand operand, int indirectionIndex) { - IndirectOperand.super.hasOperandAndIndirectionIndex(operand, indirectionIndex) - } - - int getArgumentIndex() { result = argumentIndex } - - override DataFlowCallable getEnclosingCallable() { - result.asSourceCallable() = this.getFunction() - } - - override Declaration getFunction() { result = call.getEnclosingFunction() } - - Expr getArgument() { result = call.getArgument(argumentIndex).getUnconvertedResultExpression() } -} - -/** - * INTERNAL: do not use. - * - * A node representing the value of a global variable just before returning - * from a function body. - */ -class FinalGlobalValue extends Node, TFinalGlobalValue { - SsaImpl::GlobalUse globalUse; - - FinalGlobalValue() { this = TFinalGlobalValue(globalUse) } - - /** Gets the underlying SSA use. */ - SsaImpl::GlobalUse getGlobalUse() { result = globalUse } - - override DataFlowCallable getEnclosingCallable() { - result.asSourceCallable() = this.getFunction() - } - - override Declaration getFunction() { result = globalUse.getIRFunction().getFunction() } - - override Type getType() { - exists(int indirectionIndex | - indirectionIndex = globalUse.getIndirectionIndex() and - result = getTypeImpl(globalUse.getUnderlyingType(), indirectionIndex) - ) - } - - final override Location getLocationImpl() { result = globalUse.getLocation() } - - override string toStringImpl() { result = globalUse.toString() } -} - -/** - * INTERNAL: do not use. - * - * A node representing the value of a global variable just after entering - * a function body. - */ -class InitialGlobalValue extends Node, TInitialGlobalValue { - SsaImpl::GlobalDef globalDef; - - InitialGlobalValue() { this = TInitialGlobalValue(globalDef) } - - /** Gets the underlying SSA definition. */ - SsaImpl::GlobalDef getGlobalDef() { result = globalDef } - - override DataFlowCallable getEnclosingCallable() { - result.asSourceCallable() = this.getFunction() - } - - override Declaration getFunction() { result = globalDef.getFunction() } - - final override predicate isGLValue() { globalDef.getIndirectionIndex() = 0 } - - override Type getType() { result = globalDef.getUnderlyingType() } - - final override Location getLocationImpl() { result = globalDef.getLocation() } - - override string toStringImpl() { result = globalDef.toString() } -} - -/** - * INTERNAL: do not use. - * - * A node representing a parameter for a function with no body. - */ -class BodyLessParameterNodeImpl extends Node, TBodyLessParameterNodeImpl { - Parameter p; - int indirectionIndex; - - BodyLessParameterNodeImpl() { this = TBodyLessParameterNodeImpl(p, indirectionIndex) } - - override DataFlowCallable getEnclosingCallable() { - result.asSourceCallable() = this.getFunction() - } - - override Declaration getFunction() { result = p.getFunction() } - - /** Gets the indirection index of this node. */ - int getIndirectionIndex() { result = indirectionIndex } - - override Type getType() { - result = getTypeImpl(p.getUnderlyingType(), this.getIndirectionIndex()) - } - - final override Location getLocationImpl() { - result = unique( | | p.getLocation()) - or - count(p.getLocation()) != 1 and - result instanceof UnknownLocation - } - - final override string toStringImpl() { - exists(string prefix | prefix = stars(this) | result = prefix + p.toString()) - } -} - -/** - * A data-flow node used to model flow summaries. That is, a dataflow node - * that is synthesized to represent a parameter, return value, or other part - * of a models-as-data modeled function. - */ -class FlowSummaryNode extends Node, TFlowSummaryNode { - /** - * Gets the models-as-data `SummaryNode` associated with this dataflow - * `FlowSummaryNode`. - */ - FlowSummaryImpl::Private::SummaryNode getSummaryNode() { this = TFlowSummaryNode(result) } - - /** - * Gets the summarized callable that this node belongs to. - */ - FlowSummaryImpl::Public::SummarizedCallable getSummarizedCallable() { - result = this.getSummaryNode().getSummarizedCallable() - } - - /** - * Gets the enclosing callable. For a `FlowSummaryNode` this is always the - * summarized function this node is part of. - */ - override DataFlowCallable getEnclosingCallable() { - result.asSummarizedCallable() = this.getSummarizedCallable() - } - - override Location getLocationImpl() { result = this.getSummarizedCallable().getLocation() } - - override string toStringImpl() { result = this.getSummaryNode().toString() } -} - -/** - * INTERNAL: do not use. - * - * A node representing the indirection of a value that is - * about to be returned from a function. - */ -class IndirectReturnNode extends Node { - IndirectReturnNode() { - this instanceof FinalParameterNode - or - this.(IndirectOperand) - .hasOperandAndIndirectionIndex(any(ReturnValueInstruction ret).getReturnAddressOperand(), _) - } - - override SourceCallable getEnclosingCallable() { result.asSourceCallable() = this.getFunction() } - - /** - * Holds if this node represents the value that is returned to the caller - * through a `return` statement. - */ - predicate isNormalReturn() { this instanceof IndirectOperand } - - /** - * Holds if this node represents the value that is returned to the caller - * by writing to the `argumentIndex`'th argument of the call. - */ - predicate isParameterReturn(int argumentIndex) { - this.(FinalParameterNode).getArgumentIndex() = argumentIndex - } - - /** Gets the indirection index of this indirect return node. */ - int getIndirectionIndex() { - result = this.(FinalParameterNode).getIndirectionIndex() - or - this.(IndirectOperand).hasOperandAndIndirectionIndex(_, result) - } -} - -/** - * INTERNAL: do not use. - * - * A node representing the indirection of a value after it - * has been returned from a function. - */ -class IndirectArgumentOutNode extends PostUpdateNodeImpl { - override ArgumentOperand operand; - - int getArgumentIndex() { - exists(CallInstruction call | call.getArgumentOperand(result) = operand) - } - - Operand getAddressOperand() { result = operand } - - CallInstruction getCallInstruction() { result.getAnArgumentOperand() = operand } - - /** - * Gets the `Function` that the call targets, if this is statically known. - */ - Function getStaticCallTarget() { result = this.getCallInstruction().getStaticCallTarget() } - - override string toStringImpl() { - exists(string prefix | if indirectionIndex > 0 then prefix = "" else prefix = "pointer to " | - // This string should be unique enough to be helpful but common enough to - // avoid storing too many different strings. - result = prefix + this.getStaticCallTarget().getName() + " output argument" - or - not exists(this.getStaticCallTarget()) and - result = prefix + "output argument" - ) - } -} - -/** - * Holds if `node` is an indirect operand with columns `(operand, indirectionIndex)`, and - * `operand` represents a use of the fully converted value of `call`. - */ -private predicate hasOperand(Node node, CallInstruction call, int indirectionIndex, Operand operand) { - operandForFullyConvertedCall(operand, call) and - hasOperandAndIndex(node, operand, indirectionIndex) -} - -/** - * Holds if `node` is an indirect instruction with columns `(instr, indirectionIndex)`, and - * `instr` represents a use of the fully converted value of `call`. - * - * Note that `hasOperand(node, _, _, _)` implies `not hasInstruction(node, _, _, _)`. - */ -private predicate hasInstruction( - Node node, CallInstruction call, int indirectionIndex, Instruction instr -) { - instructionForFullyConvertedCall(instr, call) and - hasInstructionAndIndex(node, instr, indirectionIndex) -} - -/** - * INTERNAL: do not use. - * - * A node representing the indirect value of a function call (i.e., a value hidden - * behind a number of indirections). - */ -class IndirectReturnOutNode extends Node { - CallInstruction call; - int indirectionIndex; - - IndirectReturnOutNode() { - // Annoyingly, we need to pick the fully converted value as the output of the function to - // make flow through in the shared dataflow library work correctly. - hasOperand(this, call, indirectionIndex, _) - or - hasInstruction(this, call, indirectionIndex, _) - } - - CallInstruction getCallInstruction() { result = call } - - int getIndirectionIndex() { result = indirectionIndex } - - /** Gets the operand associated with this node, if any. */ - Operand getOperand() { hasOperand(this, call, indirectionIndex, result) } - - /** Gets the instruction associated with this node, if any. */ - Instruction getInstruction() { hasInstruction(this, call, indirectionIndex, result) } -} - -/** - * An `IndirectReturnOutNode` which is used as a destination of a store operation. - * When it's used for a store operation it's useful to have this be a `PostUpdateNode` for - * the shared dataflow library's flow-through mechanism to detect flow in cases such as: - * ```cpp - * struct MyInt { - * int i; - * int& getRef() { return i; } - * }; - * ... - * MyInt mi; - * mi.getRef() = source(); // this is detected as a store to `i` via flow-through. - * sink(mi.i); - * ``` - */ -private class PostIndirectReturnOutNode extends IndirectReturnOutNode, PostUpdateNode { - PostIndirectReturnOutNode() { - any(StoreInstruction store).getDestinationAddressOperand() = this.getOperand() - } - - override Node getPreUpdateNode() { result = this } -} - -/** - * INTERNAL: Do not use. - * - * Returns `t`, but stripped of the outer-most `indirectionIndex` number of indirections. - */ -private Type getTypeImpl0(Type t, int indirectionIndex) { - indirectionIndex = 0 and - result = t - or - indirectionIndex > 0 and - exists(Type stripped | - stripped = stripPointer(t.stripTopLevelSpecifiers()) and - // We need to avoid the case where `stripPointer(t) = t` (which can happen - // on iterators that specify a `value_type` that is the iterator itself). - // Such a type would create an infinite loop otherwise. For these cases we - // simply don't produce a result for `getTypeImpl`. - // To be on the safe side, we check whether the _unspecified_ type has - // changed since this also prevents an infinite loop when `stripped` and - // `t` only differ by const'ness or volatile'ness. - stripped.getUnspecifiedType() != t.getUnspecifiedType() and - result = getTypeImpl0(stripped, indirectionIndex - 1) - ) -} - -/** - * INTERNAL: Do not use. - * - * Returns `t`, but stripped of the outer-most `indirectionIndex` number of indirections. - * - * If `indirectionIndex` cannot be stripped off `t`, an `UnknownType` is returned. - */ -bindingset[t, indirectionIndex] -pragma[inline_late] -Type getTypeImpl(Type t, int indirectionIndex) { - result = getTypeImpl0(t, indirectionIndex) - or - // If we cannot produce the right type we return an error type. - // This can sometimes happen when we don't know the real - // type of a void pointer. - not exists(getTypeImpl0(t, indirectionIndex)) and - result instanceof UnknownType -} - -private module RawIndirectNodes { - /** - * INTERNAL: Do not use. - * - * A node that represents the indirect value of an operand in the IR - * after `index` number of loads. - */ - private class RawIndirectOperand0 extends Node, TRawIndirectOperand0 { - Node0Impl node; - int indirectionIndex; - - RawIndirectOperand0() { this = TRawIndirectOperand0(node, indirectionIndex) } - - /** Gets the underlying instruction. */ - Operand getOperand() { result = node.asOperand() } - - /** Gets the underlying indirection index. */ - int getIndirectionIndex() { result = indirectionIndex } - - override Declaration getFunction() { result = node.getFunction() } - - override DataFlowCallable getEnclosingCallable() { - result.asSourceCallable() = node.getEnclosingCallable() - } - - override predicate isGLValue() { this.getOperand().isGLValue() } - - override Type getType() { - exists(int sub, Type type, boolean isGLValue | - type = getOperandType(this.getOperand(), isGLValue) and - if isGLValue = true then sub = 1 else sub = 0 - | - result = getTypeImpl(type.getUnderlyingType(), indirectionIndex - sub) - ) - } - - final override Location getLocationImpl() { - if exists(this.getOperand().getLocation()) - then result = this.getOperand().getLocation() - else result instanceof UnknownLocation - } - - override string toStringImpl() { - result = stars(this) + operandNode(this.getOperand()).toStringImpl() - } - } - - /** - * INTERNAL: Do not use. - * - * A node that represents the indirect value of an instruction in the IR - * after `index` number of loads. - */ - private class RawIndirectInstruction0 extends Node, TRawIndirectInstruction0 { - Node0Impl node; - int indirectionIndex; - - RawIndirectInstruction0() { this = TRawIndirectInstruction0(node, indirectionIndex) } - - /** Gets the underlying instruction. */ - Instruction getInstruction() { result = node.asInstruction() } - - /** Gets the underlying indirection index. */ - int getIndirectionIndex() { result = indirectionIndex } - - override Declaration getFunction() { result = node.getFunction() } - - override DataFlowCallable getEnclosingCallable() { - result.asSourceCallable() = node.getEnclosingCallable() - } - - override predicate isGLValue() { this.getInstruction().isGLValue() } - - override Type getType() { - exists(int sub, Type type, boolean isGLValue | - type = getInstructionType(this.getInstruction(), isGLValue) and - if isGLValue = true then sub = 1 else sub = 0 - | - result = getTypeImpl(type.getUnderlyingType(), indirectionIndex - sub) - ) - } - - final override Location getLocationImpl() { - if exists(this.getInstruction().getLocation()) - then result = this.getInstruction().getLocation() - else result instanceof UnknownLocation - } - - override string toStringImpl() { - result = stars(this) + instructionNode(this.getInstruction()).toStringImpl() - } - } - - /** - * INTERNAL: Do not use. - * - * A node that represents the indirect value of an operand in the IR - * after a number of loads. - */ - class RawIndirectOperand extends Node { - int indirectionIndex; - Operand operand; - - RawIndirectOperand() { - exists(Node0Impl node | operand = node.asOperand() | - this = TRawIndirectOperand0(node, indirectionIndex) - or - this = TRawIndirectInstruction0(node, indirectionIndex) - ) - } - - /** Gets the operand associated with this node. */ - Operand getOperand() { result = operand } - - /** Gets the underlying indirection index. */ - int getIndirectionIndex() { result = indirectionIndex } - } - - /** - * INTERNAL: Do not use. - * - * A node that represents the indirect value of an instruction in the IR - * after a number of loads. - */ - class RawIndirectInstruction extends Node { - int indirectionIndex; - Instruction instr; - - RawIndirectInstruction() { - exists(Node0Impl node | instr = node.asInstruction() | - this = TRawIndirectOperand0(node, indirectionIndex) - or - this = TRawIndirectInstruction0(node, indirectionIndex) - ) - } - - /** Gets the instruction associated with this node. */ - Instruction getInstruction() { result = instr } - - /** Gets the underlying indirection index. */ - int getIndirectionIndex() { result = indirectionIndex } - } -} - -import RawIndirectNodes - -/** - * INTERNAL: do not use. - * - * A node representing the value of an output parameter - * just before reaching the end of a function. - */ -class FinalParameterNode extends Node, TFinalParameterNode { - Parameter p; - int indirectionIndex; - - FinalParameterNode() { this = TFinalParameterNode(p, indirectionIndex) } - - /** Gets the parameter associated with this final use. */ - Parameter getParameter() { result = p } - - /** Gets the underlying indirection index. */ - int getIndirectionIndex() { result = indirectionIndex } - - /** Gets the argument index associated with this final use. */ - final int getArgumentIndex() { result = p.getIndex() } - - override Declaration getFunction() { result = p.getFunction() } - - override DataFlowCallable getEnclosingCallable() { - result.asSourceCallable() = this.getFunction() - } - - override Type getType() { result = getTypeImpl(p.getUnderlyingType(), indirectionIndex) } - - final override Location getLocationImpl() { - // Parameters can have multiple locations. When there's a unique location we use - // that one, but if multiple locations exist we default to an unknown location. - result = unique( | | p.getLocation()) - or - not exists(unique( | | p.getLocation())) and - result instanceof UnknownLocation - } - - override string toStringImpl() { result = stars(this) + p.toString() } -} - -/** - * The value of an uninitialized local variable, viewed as a node in a data - * flow graph. - */ -class UninitializedNode extends Node { - LocalVariable v; - - UninitializedNode() { - exists(SsaImpl::Definition def, SsaImpl::SourceVariable sv | - def.getIndirectionIndex() = 0 and - def.getValue().asInstruction() instanceof UninitializedInstruction and - SsaImpl::defToNode(this, def, sv) and - v = sv.getBaseVariable().(SsaImpl::BaseIRVariable).getIRVariable().getAst() - ) - } - - /** Gets the uninitialized local variable corresponding to this node. */ - LocalVariable getLocalVariable() { result = v } -} - -abstract private class AbstractParameterNode extends Node { - /** - * Holds if this node is the parameter of `f` at the specified position. The - * implicit `this` parameter is considered to have position `-1`, and - * pointer-indirection parameters are at further negative positions. - */ - predicate isSourceParameterOf(Function f, ParameterPosition pos) { none() } - - /** - * Holds if this node is the parameter of `sc` at the specified position. The - * implicit `this` parameter is considered to have position `-1`, and - * pointer-indirection parameters are at further negative positions. - */ - predicate isSummaryParameterOf( - FlowSummaryImpl::Public::SummarizedCallable sc, ParameterPosition pos - ) { - none() - } - - /** - * Holds if this node is the parameter of `c` at the specified position. The - * implicit `this` parameter is considered to have position `-1`, and - * pointer-indirection parameters are at further negative positions. - */ - final predicate isParameterOf(DataFlowCallable c, ParameterPosition pos) { - this.isSummaryParameterOf(c.asSummarizedCallable(), pos) - or - this.isSourceParameterOf(c.asSourceCallable(), pos) - } - - /** Gets the `Parameter` associated with this node, if it exists. */ - Parameter getParameter() { none() } // overridden by subclasses -} - -abstract private class AbstractIndirectParameterNode extends AbstractParameterNode { - /** Gets the indirection index of this parameter node. */ - abstract int getIndirectionIndex(); -} - -/** - * INTERNAL: do not use. - * - * A node representing an indirection of a parameter. - */ -final class IndirectParameterNode = AbstractIndirectParameterNode; - -pragma[noinline] -private predicate indirectParameterNodeHasArgumentIndexAndIndex( - IndirectInstructionParameterNode node, int argumentIndex, int indirectionIndex -) { - node.hasInstructionAndIndirectionIndex(_, indirectionIndex) and - node.getArgumentIndex() = argumentIndex -} - -pragma[noinline] -private predicate indirectPositionHasArgumentIndexAndIndex( - IndirectionPosition pos, int argumentIndex, int indirectionIndex -) { - pos.getArgumentIndex() = argumentIndex and - pos.getIndirectionIndex() = indirectionIndex -} - -private class IndirectInstructionParameterNode extends AbstractIndirectParameterNode instanceof IndirectInstruction -{ - InitializeParameterInstruction init; - - IndirectInstructionParameterNode() { - IndirectInstruction.super.hasInstructionAndIndirectionIndex(init, _) - } - - int getArgumentIndex() { init.hasIndex(result) } - - override string toStringImpl() { - exists(string prefix | prefix = stars(this) | - result = prefix + this.getParameter().toString() - or - not exists(this.getParameter()) and - result = prefix + "this" - ) - } - - /** Gets the parameter whose indirection is initialized. */ - override Parameter getParameter() { result = init.getParameter() } - - override DataFlowCallable getEnclosingCallable() { - result.asSourceCallable() = this.getFunction() - } - - override Declaration getFunction() { result = init.getEnclosingFunction() } - - override predicate isSourceParameterOf(Function f, ParameterPosition pos) { - this.getFunction() = f and - exists(int argumentIndex, int indirectionIndex | - indirectPositionHasArgumentIndexAndIndex(pos, argumentIndex, indirectionIndex) and - indirectParameterNodeHasArgumentIndexAndIndex(this, argumentIndex, indirectionIndex) - ) - } - - /** Gets the underlying operand and the underlying indirection index. */ - predicate hasInstructionAndIndirectionIndex(Instruction instr, int index) { - IndirectInstruction.super.hasInstructionAndIndirectionIndex(instr, index) - } - - final override int getIndirectionIndex() { this.hasInstructionAndIndirectionIndex(init, result) } -} - -/** - * The value of a parameter at function entry, viewed as a node in a data - * flow graph. This includes both explicit parameters such as `x` in `f(x)` - * and implicit parameters such as `this` in `x.f()`. - * - * To match a specific kind of parameter, consider using one of the subclasses - * `ExplicitParameterNode`, `ThisParameterNode`, or - * `ParameterIndirectionNode`. - */ -final class ParameterNode = AbstractParameterNode; - -abstract private class AbstractDirectParameterNode extends AbstractParameterNode { } - -/** An explicit positional parameter, including `this`, but not `...`. */ -final class DirectParameterNode = AbstractDirectParameterNode; - -/** - * INTERNAL: Do not use. - * - * A non-indirect parameter node that is represented as an `Instruction`. - */ -abstract class InstructionDirectParameterNode extends InstructionNode, AbstractDirectParameterNode { - final override InitializeParameterInstruction instr; - - /** - * INTERNAL: Do not use. - * - * Gets the `IRVariable` that this parameter references. - */ - final IRVariable getIRVariable() { result = instr.getIRVariable() } -} - -abstract private class AbstractExplicitParameterNode extends AbstractDirectParameterNode { } - -final class ExplicitParameterNode = AbstractExplicitParameterNode; - -/** An explicit positional parameter, not including `this` or `...`. */ -private class ExplicitParameterInstructionNode extends AbstractExplicitParameterNode, - InstructionDirectParameterNode -{ - ExplicitParameterInstructionNode() { exists(instr.getParameter()) } - - override predicate isSourceParameterOf(Function f, ParameterPosition pos) { - f.getParameter(pos.(DirectPosition).getArgumentIndex()) = instr.getParameter() - } - - override string toStringImpl() { result = instr.getParameter().toString() } - - override Parameter getParameter() { result = instr.getParameter() } -} - -/** An implicit `this` parameter. */ -class ThisParameterInstructionNode extends AbstractExplicitParameterNode, - InstructionDirectParameterNode -{ - ThisParameterInstructionNode() { instr.getIRVariable() instanceof IRThisVariable } - - override predicate isSourceParameterOf(Function f, ParameterPosition pos) { - pos.(DirectPosition).getArgumentIndex() = -1 and - instr.getEnclosingFunction() = f - } - - override string toStringImpl() { result = "this" } -} - -/** - * A parameter node that is part of a summary. - */ -class SummaryParameterNode extends AbstractParameterNode, FlowSummaryNode { - SummaryParameterNode() { - FlowSummaryImpl::Private::summaryParameterNode(this.getSummaryNode(), _) - } - - private ParameterPosition getPosition() { - FlowSummaryImpl::Private::summaryParameterNode(this.getSummaryNode(), result) - } - - override predicate isSummaryParameterOf( - FlowSummaryImpl::Public::SummarizedCallable c, ParameterPosition p - ) { - c = this.getSummarizedCallable() and - p = this.getPosition() - } -} - -private class DirectBodyLessParameterNode extends AbstractExplicitParameterNode, - BodyLessParameterNodeImpl -{ - DirectBodyLessParameterNode() { indirectionIndex = 0 } - - override predicate isSourceParameterOf(Function f, ParameterPosition pos) { - this.getFunction() = f and - f.getParameter(pos.(DirectPosition).getArgumentIndex()) = p - } - - override Parameter getParameter() { result = p } -} - -private class IndirectBodyLessParameterNode extends AbstractIndirectParameterNode, - BodyLessParameterNodeImpl -{ - IndirectBodyLessParameterNode() { not this instanceof DirectBodyLessParameterNode } - - override predicate isSourceParameterOf(Function f, ParameterPosition pos) { - exists(int argumentPosition | - this.getFunction() = f and - f.getParameter(argumentPosition) = p and - indirectPositionHasArgumentIndexAndIndex(pos, argumentPosition, indirectionIndex) - ) - } - - override int getIndirectionIndex() { - result = BodyLessParameterNodeImpl.super.getIndirectionIndex() - } - - override Parameter getParameter() { result = p } -} - -/** - * A node associated with an object after an operation that might have - * changed its state. - * - * This can be either the argument to a callable after the callable returns - * (which might have mutated the argument), or the qualifier of a field after - * an update to the field. - * - * Nodes corresponding to AST elements, for example `ExprNode`, usually refer - * to the value before the update with the exception of `ClassInstanceExpr`, - * which represents the value after the constructor has run. - */ -abstract class PostUpdateNode extends Node { - /** - * Gets the node before the state update. - */ - abstract Node getPreUpdateNode(); - - final override Type getType() { result = this.getPreUpdateNode().getType() } -} - -/** - * The base class for nodes that perform "partial definitions". - * - * In contrast to a normal "definition", which provides a new value for - * something, a partial definition is an expression that may affect a - * value, but does not necessarily replace it entirely. For example: - * ``` - * x.y = 1; // a partial definition of the object `x`. - * x.y.z = 1; // a partial definition of the object `x.y` and `x`. - * x.setY(1); // a partial definition of the object `x`. - * setY(&x); // a partial definition of the object `x`. - * ``` - */ -abstract private class PartialDefinitionNode extends PostUpdateNode { - /** Gets the indirection index of this node. */ - abstract int getIndirectionIndex(); - - /** Gets the expression that is partially defined by this node. */ - abstract Expr getDefinedExpr(); -} - -/** - * A `PostUpdateNode` that is part of a flow summary. These are synthesized, - * for example, when a models-as-data summary models a write to a field since - * the write needs to target a `PostUpdateNode`. - */ -class SummaryPostUpdateNode extends FlowSummaryNode, PostUpdateNode { - SummaryPostUpdateNode() { - FlowSummaryImpl::Private::summaryPostUpdateNode(this.getSummaryNode(), _) - } - - override Node getPreUpdateNode() { - FlowSummaryImpl::Private::summaryPostUpdateNode(this.getSummaryNode(), - result.(FlowSummaryNode).getSummaryNode()) - } -} - -/** - * A node that represents the value of a variable after a function call that - * may have changed the variable because it's passed by reference. - * - * A typical example would be a call `f(&x)`. Firstly, there will be flow into - * `x` from previous definitions of `x`. Secondly, there will be a - * `DefinitionByReferenceNode` to represent the value of `x` after the call has - * returned. This node will have its `getArgument()` equal to `&x` and its - * `getVariableAccess()` equal to `x`. - */ -class DefinitionByReferenceNode extends IndirectArgumentOutNode { - DefinitionByReferenceNode() { this.getIndirectionIndex() > 0 } - - /** Gets the unconverted argument corresponding to this node. */ - Expr getArgument() { result = this.getAddressOperand().getDef().getUnconvertedResultExpression() } - - /** Gets the parameter through which this value is assigned. */ - Parameter getParameter() { - result = this.getCallInstruction().getStaticCallTarget().getParameter(this.getArgumentIndex()) - } -} - -/** - * A `Node` corresponding to a global (or `static` local) variable in the - * program, as opposed to the value of that variable at some particular point. - * This is used to model flow through global variables (and `static` local - * variables). - * - * There is no `VariableNode` for non-`static` local variables. - */ -class VariableNode extends Node, TGlobalLikeVariableNode { - Variable v; - int indirectionIndex; - - VariableNode() { this = TGlobalLikeVariableNode(v, indirectionIndex) } - - /** Gets the variable corresponding to this node. */ - Variable getVariable() { result = v } - - /** Gets the indirection index of this node. */ - int getIndirectionIndex() { result = indirectionIndex } - - override Declaration getFunction() { none() } - - override DataFlowCallable getEnclosingCallable() { - // When flow crosses from one _enclosing callable_ to another, the - // interprocedural data-flow library discards call contexts and inserts a - // node in the big-step relation used for human-readable path explanations. - // Therefore we want a distinct enclosing callable for each `VariableNode`, - // and that can be the `Variable` itself. - result.asSourceCallable() = v - } - - override Type getType() { result = getTypeImpl(v.getUnderlyingType(), indirectionIndex - 1) } - - final override Location getLocationImpl() { - // Certain variables (such as parameters) can have multiple locations. - // When there's a unique location we use that one, but if multiple locations - // exist we default to an unknown location. - result = unique( | | v.getLocation()) - or - not exists(unique( | | v.getLocation())) and - result instanceof UnknownLocation - } - - override string toStringImpl() { result = stars(this) + v.toString() } -} - -/** - * Gets the node corresponding to `instr`. - */ -InstructionNode instructionNode(Instruction instr) { result.getInstruction() = instr } - -/** - * Gets the node corresponding to `operand`. - */ -OperandNode operandNode(Operand operand) { result.getOperand() = operand } - -/** - * Gets the `Node` corresponding to the value of evaluating `e` or any of its - * conversions. There is no result if `e` is a `Conversion`. For data flowing - * _out of_ an expression, like when an argument is passed by reference, use - * `definitionByReferenceNodeFromArgument` instead. - */ -ExprNode exprNode(Expr e) { result.getExpr(_) = e } - -/** - * Gets the `Node` corresponding to the value of evaluating `e`. Here, `e` may - * be a `Conversion`. For data flowing _out of_ an expression, like when an - * argument is passed by reference, use - * `definitionByReferenceNodeFromArgument` instead. - */ -ExprNode convertedExprNode(Expr e) { result.getConvertedExpr(_) = e } - -/** - * Gets the `Node` corresponding to the value of `p` at function entry. - */ -ExplicitParameterNode parameterNode(Parameter p) { result.getParameter() = p } - -/** - * Gets the `Node` corresponding to a definition by reference of the variable - * that is passed as unconverted `argument` of a call. - */ -DefinitionByReferenceNode definitionByReferenceNodeFromArgument(Expr argument) { - result.getArgument() = argument -} - -/** Gets the `VariableNode` corresponding to the variable `v`. */ -VariableNode variableNode(Variable v) { - result.getVariable() = v and result.getIndirectionIndex() = 1 -} - -/** - * DEPRECATED: See UninitializedNode. - * - * Gets the `Node` corresponding to the value of an uninitialized local - * variable `v`. - */ -Node uninitializedNode(LocalVariable v) { none() } - -predicate hasOperandAndIndex(IndirectOperand indirectOperand, Operand operand, int indirectionIndex) { - indirectOperand.hasOperandAndIndirectionIndex(operand, indirectionIndex) -} - -predicate hasInstructionAndIndex( - IndirectInstruction indirectInstr, Instruction instr, int indirectionIndex -) { - indirectInstr.hasInstructionAndIndirectionIndex(instr, indirectionIndex) -} +private import DataFlowNodes +import DataFlowNodes::Public cached private module Cached { @@ -1726,9 +30,7 @@ private module Cached { SsaImpl::ssaFlow(n, succ) and bb1 = n.getBasicBlock() and bb2 = succ.getBasicBlock() and - bb1 != bb2 and - bb2.dominates(bb1) and - bb1.getASuccessor+() = bb2 + bb2.strictlyDominates(bb1) ) } @@ -1820,6 +122,7 @@ private module Cached { cached predicate simpleLocalFlowStep(Node nodeFrom, Node nodeTo, string model) { ( + TaintTrackingUtil::forceCachingInSameStage() and // Def-use/Use-use flow SsaImpl::ssaFlow(nodeFrom, nodeTo) or @@ -1921,35 +224,7 @@ private module Cached { ) ) } -} - -import Cached - -/** - * Holds if data flows from `source` to `sink` in zero or more local - * (intra-procedural) steps. - */ -pragma[inline] -predicate localFlow(Node source, Node sink) { localFlowStep*(source, sink) } - -/** - * Holds if data can flow from `i1` to `i2` in zero or more - * local (intra-procedural) steps. - */ -pragma[inline] -predicate localInstructionFlow(Instruction e1, Instruction e2) { - localFlow(instructionNode(e1), instructionNode(e2)) -} -/** - * INTERNAL: Do not use. - * - * Ideally this module would be private, but the `asExprInternal` predicate is - * needed in `DefaultTaintTrackingImpl`. Once `DefaultTaintTrackingImpl` is gone - * we can make this module private. - */ -cached -module ExprFlowCached { /** * Holds if `n` is an indirect operand of a `PointerArithmeticInstruction`, and * `e` is the result of loading from the `PointerArithmeticInstruction`. @@ -1999,8 +274,7 @@ module ExprFlowCached { * `x[i]` steps to the expression `x[i - 1]` without traversing the * entire chain. */ - cached - Expr asExprInternal(Node n) { + private Expr asExprInternal(Node n) { isIndirectBaseOfArrayAccess(n, result) or not isIndirectBaseOfArrayAccess(n, _) and @@ -2062,7 +336,23 @@ module ExprFlowCached { predicate localExprFlowStep(Expr e1, Expr e2) { localExprFlowStepImpl(_, e1, _, e2) } } -import ExprFlowCached +import Cached + +/** + * Holds if data flows from `source` to `sink` in zero or more local + * (intra-procedural) steps. + */ +pragma[inline] +predicate localFlow(Node source, Node sink) { localFlowStep*(source, sink) } + +/** + * Holds if data can flow from `i1` to `i2` in zero or more + * local (intra-procedural) steps. + */ +pragma[inline] +predicate localInstructionFlow(Instruction e1, Instruction e2) { + localFlow(instructionNode(e1), instructionNode(e2)) +} /** * Holds if data can flow from `e1` to `e2` in one or more @@ -2082,158 +372,6 @@ predicate localExprFlow(Expr e1, Expr e2) { localExprFlowPlus(e1, e2) } -/** - * A canonical representation of a field. - * - * For performance reasons we want a unique `Content` that represents - * a given field across any template instantiation of a class. - * - * This is possible in _almost_ all cases, but there are cases where it is - * not possible to map between a field in the uninstantiated template to a - * field in the instantiated template. This happens in the case of local class - * definitions (because the local class is not the template that constructs - * the instantiation - it is the enclosing function). So this abstract class - * has two implementations: a non-local case (where we can represent a - * canonical field as the field declaration from an uninstantiated class - * template or a non-templated class), and a local case (where we simply use - * the field from the instantiated class). - */ -abstract private class CanonicalField extends Field { - /** Gets a field represented by this canonical field. */ - abstract Field getAField(); - - /** - * Gets a class that declares a field represented by this canonical field. - */ - abstract Class getADeclaringType(); - - /** - * Gets a type that this canonical field may have. Note that this may - * not be a unique type. For example, consider this case: - * ``` - * template - * struct S { T x; }; - * - * S s1; - * S s2; - * ``` - * In this case the canonical field corresponding to `S::x` has two types: - * `int` and `char`. - */ - Type getAType() { result = this.getAField().getType() } - - Type getAnUnspecifiedType() { result = this.getAType().getUnspecifiedType() } -} - -private class NonLocalCanonicalField extends CanonicalField { - Class declaringType; - - NonLocalCanonicalField() { - declaringType = this.getDeclaringType() and - not declaringType.isFromTemplateInstantiation(_) and - not declaringType.isLocal() // handled in LocalCanonicalField - } - - override Field getAField() { - exists(Class c | result.getDeclaringType() = c | - // Either the declaring class of the field is a template instantiation - // that has been constructed from this canonical declaration - c.isConstructedFrom(declaringType) and - pragma[only_bind_out](result.getName()) = pragma[only_bind_out](this.getName()) - or - // or this canonical declaration is not a template. - not c.isConstructedFrom(_) and - result = this - ) - } - - override Class getADeclaringType() { - result = this.getDeclaringType() - or - result.isConstructedFrom(this.getDeclaringType()) - } -} - -private class LocalCanonicalField extends CanonicalField { - Class declaringType; - - LocalCanonicalField() { - declaringType = this.getDeclaringType() and - declaringType.isLocal() - } - - override Field getAField() { result = this } - - override Class getADeclaringType() { result = declaringType } -} - -/** - * A canonical representation of a `Union`. See `CanonicalField` for the explanation for - * why we need a canonical representation. - */ -abstract private class CanonicalUnion extends Union { - /** Gets a union represented by this canonical union. */ - abstract Union getAUnion(); - - /** Gets a canonical field of this canonical union. */ - CanonicalField getACanonicalField() { result.getDeclaringType() = this } -} - -private class NonLocalCanonicalUnion extends CanonicalUnion { - NonLocalCanonicalUnion() { not this.isFromTemplateInstantiation(_) and not this.isLocal() } - - override Union getAUnion() { - result = this - or - result.isConstructedFrom(this) - } -} - -private class LocalCanonicalUnion extends CanonicalUnion { - LocalCanonicalUnion() { this.isLocal() } - - override Union getAUnion() { result = this } -} - -bindingset[f] -pragma[inline_late] -private int getFieldSize(CanonicalField f) { result = max(f.getAType().getSize()) } - -/** - * Gets a field in the union `u` whose size - * is `bytes` number of bytes. - */ -private CanonicalField getAFieldWithSize(CanonicalUnion u, int bytes) { - result = u.getACanonicalField() and - bytes = getFieldSize(result) -} - -cached -private newtype TContent = - TNonUnionContent(CanonicalField f, int indirectionIndex) { - // the indirection index for field content starts at 1 (because `TNonUnionContent` is thought of as - // the address of the field, `FieldAddress` in the IR). - indirectionIndex = [1 .. max(SsaImpl::getMaxIndirectionsForType(f.getAnUnspecifiedType()))] and - // Reads and writes of union fields are tracked using `UnionContent`. - not f.getDeclaringType() instanceof Union - } or - TUnionContent(CanonicalUnion u, int bytes, int indirectionIndex) { - exists(CanonicalField f | - f = u.getACanonicalField() and - bytes = getFieldSize(f) and - // We key `UnionContent` by the union instead of its fields since a write to one - // field can be read by any read of the union's fields. Again, the indirection index - // is 1-based (because 0 is considered the address). - indirectionIndex = - [1 .. max(SsaImpl::getMaxIndirectionsForType(getAFieldWithSize(u, bytes) - .getAnUnspecifiedType()) - )] - ) - } or - TElementContent(int indirectionIndex) { - indirectionIndex = [1 .. getMaxElementContentIndirectionIndex()] - } - /** * A description of the way data may be stored inside an object. Examples * include instance fields, the contents of a collection object, or the contents @@ -2643,7 +781,54 @@ module BarrierGuard { exists(unit) } - import ParameterizedBarrierGuard + private module P = ParameterizedBarrierGuard; + + predicate getABarrierNode = P::getABarrierNode/0; + + /** + * Gets an indirect expression node with indirection index `indirectionIndex` that is + * safely guarded by the given guard check. + * + * For example, given the following code: + * ```cpp + * int* p; + * // ... + * *p = source(); + * if(is_safe_pointer(p)) { + * sink(*p); + * } + * ``` + * and the following barrier guard check: + * ```ql + * predicate myGuardChecks(IRGuardCondition g, Expr e, boolean branch) { + * exists(Call call | + * g.getUnconvertedResultExpression() = call and + * call.getTarget().hasName("is_safe_pointer") and + * e = call.getAnArgument() and + * branch = true + * ) + * } + * ``` + * implementing `isBarrier` as: + * ```ql + * predicate isBarrier(DataFlow::Node barrier) { + * barrier = DataFlow::BarrierGuard::getAnIndirectBarrierNode(1) + * } + * ``` + * will block flow from `x = source()` to `sink(x)`. + * + * NOTE: If a non-indirect expression is tracked, use `getABarrierNode` instead. + */ + Node getAnIndirectBarrierNode(int indirectionIndex) { + result = P::getAnIndirectBarrierNode(indirectionIndex, _) + } + + /** + * Gets an indirect expression node that is safely guarded by the given guard check. + * + * See `getAnIndirectBarrierNode/1` for examples. + */ + Node getAnIndirectBarrierNode() { result = getAnIndirectBarrierNode(_) } } private module InstrWithParam { @@ -2754,7 +939,20 @@ module InstructionBarrierGuard + private module P = ParameterizedInstructionBarrierGuard; + + predicate getABarrierNode = P::getABarrierNode/0; + + /** + * Gets an indirect node with indirection index `indirectionIndex` that is + * safely guarded by the given guard check. + */ + Node getAnIndirectBarrierNode(int indirectionIndex) { + result = P::getAnIndirectBarrierNode(indirectionIndex, _) + } + + /** Gets an indirect node that is safely guarded by the given guard check. */ + Node getAnIndirectBarrierNode() { result = getAnIndirectBarrierNode(_) } } /** diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ExprNodes.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ExprNodes.qll index 6d69dd11e80b..927d2ea90288 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ExprNodes.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ExprNodes.qll @@ -6,8 +6,8 @@ private import cpp private import semmle.code.cpp.ir.IR private import DataFlowUtil private import DataFlowPrivate -private import semmle.code.cpp.ir.implementation.raw.internal.TranslatedExpr -private import semmle.code.cpp.ir.implementation.raw.internal.InstructionTag +private import DataFlowNodes +private import semmle.code.cpp.ir.implementation.raw.internal.IRConstruction as IRConstruction cached private module Cached { @@ -73,17 +73,9 @@ private module Cached { // a result for `getConvertedResultExpression`. We remap this here so that // this `ConvertInstruction` maps to the result of the expression that // represents the extent. - exists(TranslatedNonConstantAllocationSize tas | - result = tas.getExtent().getExpr() and - instr = tas.getInstruction(AllocationExtentConvertTag()) - ) + result = IRConstruction::Raw::getAllocationExtentConvertExpr(instr) or - // There's no instruction that returns `ParenthesisExpr`, but some queries - // expect this - exists(TranslatedTransparentConversion ttc | - result = ttc.getExpr().(ParenthesisExpr) and - instr = ttc.getResult() - ) + result = IRConstruction::Raw::getTransparentConversionParenthesisExpr(instr) or // Certain expressions generate `CopyValueInstruction`s only when they // are needed. Examples of this include crement operations and compound @@ -112,10 +104,10 @@ private module Cached { // needed, and in that case the only value that will propagate forward in // the program is the value that's been updated. So in those cases we just // use the result of `node.asDefinition()` as the result of `node.asExpr()`. - exists(TranslatedCoreExpr tco | - tco.getInstruction(_) = instr and - tco.producesExprResult() and - result = asDefinitionImpl0(instr) + exists(StoreInstruction store | + store = instr and + IRConstruction::Raw::instructionProducesExprResult(store) and + result = asDefinitionImpl0(store) ) or // IR construction breaks an array aggregate literal `{1, 2, 3}` into a @@ -145,18 +137,9 @@ private module Cached { // For an expression such as `i += 2` we pretend that the generated // `StoreInstruction` contains the result of the expression even though // this isn't totally aligned with the C/C++ standard. - exists(TranslatedAssignOperation tao | - store = tao.getInstruction(AssignmentStoreTag()) and - result = tao.getExpr() - ) + result = IRConstruction::Raw::getAssignOperationStoreExpr(store) or - // Similarly for `i++` and `++i` we pretend that the generated - // `StoreInstruction` contains the result of the expression even though - // this isn't totally aligned with the C/C++ standard. - exists(TranslatedCrementOperation tco | - store = tco.getInstruction(CrementStoreTag()) and - result = tco.getExpr() - ) + result = IRConstruction::Raw::getCrementOperationStoreExpr(store) } /** @@ -166,11 +149,7 @@ private module Cached { */ private predicate excludeAsDefinitionResult(StoreInstruction store) { // Exclude the store to the temporary generated by a ternary expression. - exists(TranslatedConditionalExpr tce | - store = tce.getInstruction(ConditionValueFalseStoreTag()) - or - store = tce.getInstruction(ConditionValueTrueStoreTag()) - ) + IRConstruction::Raw::isConditionalExprTempStore(store) } /** diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ModelUtil.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ModelUtil.qll index f880bee1c1c4..5fd7bb4567b9 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ModelUtil.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ModelUtil.qll @@ -6,6 +6,7 @@ private import semmle.code.cpp.ir.IR private import semmle.code.cpp.models.interfaces.FunctionInputsAndOutputs private import DataFlowUtil +private import DataFlowNodes private import DataFlowPrivate private import SsaImpl as Ssa diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintIRFieldFlowSteps.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintIRFieldFlowSteps.qll index c0976f8c3e99..93d4ddfda680 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintIRFieldFlowSteps.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintIRFieldFlowSteps.qll @@ -6,6 +6,7 @@ private import cpp private import semmle.code.cpp.ir.IR private import semmle.code.cpp.ir.dataflow.internal.DataFlowUtil private import semmle.code.cpp.ir.dataflow.internal.DataFlowPrivate +private import semmle.code.cpp.ir.dataflow.internal.DataFlowNodes private import PrintIRUtilities /** A property provider for local IR dataflow store steps. */ diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintIRLocalFlow.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintIRLocalFlow.qll index e310db319319..2c741e244d13 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintIRLocalFlow.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintIRLocalFlow.qll @@ -2,6 +2,7 @@ private import cpp private import semmle.code.cpp.ir.IR private import semmle.code.cpp.ir.dataflow.internal.DataFlowUtil private import semmle.code.cpp.ir.dataflow.internal.DataFlowPrivate +private import semmle.code.cpp.ir.dataflow.internal.DataFlowNodes private import SsaImpl as Ssa private import PrintIRUtilities diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintIRUtilities.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintIRUtilities.qll index 5dfe53c946bf..2e092851b3be 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintIRUtilities.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/PrintIRUtilities.qll @@ -6,6 +6,7 @@ private import cpp private import semmle.code.cpp.ir.IR private import semmle.code.cpp.ir.dataflow.internal.DataFlowUtil private import semmle.code.cpp.ir.dataflow.internal.DataFlowPrivate +private import semmle.code.cpp.ir.dataflow.internal.DataFlowNodes private Instruction getInstruction(Node n, string stars) { result = [n.asInstruction(), n.(RawIndirectInstruction).getInstruction()] and diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll index 80b440fff221..f1bdd6b8c520 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll @@ -10,8 +10,9 @@ private import semmle.code.cpp.models.interfaces.PartialFlow as PartialFlow private import semmle.code.cpp.models.interfaces.FunctionInputsAndOutputs as FIO private import semmle.code.cpp.ir.internal.IRCppLanguage private import semmle.code.cpp.ir.dataflow.internal.ModelUtil -private import semmle.code.cpp.ir.implementation.raw.internal.TranslatedInitialization +private import semmle.code.cpp.ir.implementation.raw.internal.IRConstruction as IRConstruction private import DataFlowPrivate +private import DataFlowNodes import SsaImplCommon private module SourceVariables { @@ -438,10 +439,7 @@ private predicate sourceVariableHasBaseAndIndex(SourceVariable v, BaseSourceVari * initialize `v`. */ private Instruction getInitializationTargetAddress(IRVariable v) { - exists(TranslatedVariableInitialization init | - init.getIRVariable() = v and - result = init.getTargetAddress() - ) + result = IRConstruction::Raw::getInitializationTargetAddress(v) } /** An initial definition of an SSA variable address. */ diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImplCommon.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImplCommon.qll index 10ebfdb5be0d..45a6755356b5 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImplCommon.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImplCommon.qll @@ -4,47 +4,12 @@ import semmle.code.cpp.ir.internal.IRCppLanguage private import semmle.code.cpp.ir.implementation.raw.internal.SideEffects as SideEffects private import DataFlowImplCommon as DataFlowImplCommon private import DataFlowUtil +private import DataFlowNodes private import semmle.code.cpp.models.interfaces.PointerWrapper private import DataFlowPrivate private import TypeFlow private import semmle.code.cpp.ir.ValueNumbering -/** - * Holds if `operand` is an operand that is not used by the dataflow library. - * Ignored operands are not recognized as uses by SSA, and they don't have a - * corresponding `(Indirect)OperandNode`. - */ -predicate ignoreOperand(Operand operand) { - operand = any(Instruction instr | ignoreInstruction(instr)).getAnOperand() or - operand = any(Instruction instr | ignoreInstruction(instr)).getAUse() or - operand instanceof MemoryOperand -} - -/** - * Holds if `instr` is an instruction that is not used by the dataflow library. - * Ignored instructions are not recognized as reads/writes by SSA, and they - * don't have a corresponding `(Indirect)InstructionNode`. - */ -predicate ignoreInstruction(Instruction instr) { - DataFlowImplCommon::forceCachingInSameStage() and - ( - instr instanceof CallSideEffectInstruction or - instr instanceof CallReadSideEffectInstruction or - instr instanceof ExitFunctionInstruction or - instr instanceof EnterFunctionInstruction or - instr instanceof WriteSideEffectInstruction or - instr instanceof PhiInstruction or - instr instanceof ReadSideEffectInstruction or - instr instanceof ChiInstruction or - instr instanceof InitializeIndirectionInstruction or - instr instanceof AliasedDefinitionInstruction or - instr instanceof AliasedUseInstruction or - instr instanceof InitializeNonLocalInstruction or - instr instanceof ReturnIndirectionInstruction or - instr instanceof UninitializedGroupInstruction - ) -} - /** * Gets the C++ type of `this` in the member function `f`. * The result is a glvalue if `isGLValue` is true, and @@ -55,26 +20,6 @@ private CppType getThisType(Cpp::MemberFunction f, boolean isGLValue) { result.hasType(f.getTypeOfThis(), isGLValue) } -/** - * Gets the C++ type of the instruction `i`. - * - * This is equivalent to `i.getResultLanguageType()` with the exception - * of instructions that directly references a `this` IRVariable. In this - * case, `i.getResultLanguageType()` gives an unknown type, whereas the - * predicate gives the expected type (i.e., a potentially cv-qualified - * type `A*` where `A` is the declaring type of the member function that - * contains `i`). - */ -cached -CppType getResultLanguageType(Instruction i) { - if i.(VariableAddressInstruction).getIRVariable() instanceof IRThisVariable - then - if i.isGLValue() - then result = getThisType(i.getEnclosingFunction(), true) - else result = getThisType(i.getEnclosingFunction(), false) - else result = i.getResultLanguageType() -} - /** * Gets the C++ type of the operand `operand`. * This is equivalent to the type of the operand's defining instruction. @@ -347,10 +292,6 @@ predicate isWrite(Node0Impl value, Operand address, boolean certain) { ) } -predicate isAdditionalConversionFlow(Operand opFrom, Instruction instrTo) { - any(Indirection ind).isAdditionalConversionFlow(opFrom, instrTo) -} - newtype TBaseSourceVariable = // Each IR variable gets its own source variable TBaseIRVariable(IRVariable var) or @@ -572,6 +513,69 @@ private class BaseCallInstruction extends BaseSourceVariableInstruction, CallIns cached private module Cached { + /** + * Holds if `operand` is an operand that is not used by the dataflow library. + * Ignored operands are not recognized as uses by SSA, and they don't have a + * corresponding `(Indirect)OperandNode`. + */ + cached + predicate ignoreOperand(Operand operand) { + operand = any(Instruction instr | ignoreInstruction(instr)).getAnOperand() or + operand = any(Instruction instr | ignoreInstruction(instr)).getAUse() or + operand instanceof MemoryOperand + } + + /** + * Holds if `instr` is an instruction that is not used by the dataflow library. + * Ignored instructions are not recognized as reads/writes by SSA, and they + * don't have a corresponding `(Indirect)InstructionNode`. + */ + cached + predicate ignoreInstruction(Instruction instr) { + DataFlowImplCommon::forceCachingInSameStage() and + ( + instr instanceof CallSideEffectInstruction or + instr instanceof CallReadSideEffectInstruction or + instr instanceof ExitFunctionInstruction or + instr instanceof EnterFunctionInstruction or + instr instanceof WriteSideEffectInstruction or + instr instanceof PhiInstruction or + instr instanceof ReadSideEffectInstruction or + instr instanceof ChiInstruction or + instr instanceof InitializeIndirectionInstruction or + instr instanceof AliasedDefinitionInstruction or + instr instanceof AliasedUseInstruction or + instr instanceof InitializeNonLocalInstruction or + instr instanceof ReturnIndirectionInstruction or + instr instanceof UninitializedGroupInstruction + ) + } + + cached + predicate isAdditionalConversionFlow(Operand opFrom, Instruction instrTo) { + any(Indirection ind).isAdditionalConversionFlow(opFrom, instrTo) + } + + /** + * Gets the C++ type of the instruction `i`. + * + * This is equivalent to `i.getResultLanguageType()` with the exception + * of instructions that directly references a `this` IRVariable. In this + * case, `i.getResultLanguageType()` gives an unknown type, whereas the + * predicate gives the expected type (i.e., a potentially cv-qualified + * type `A*` where `A` is the declaring type of the member function that + * contains `i`). + */ + cached + CppType getResultLanguageType(Instruction i) { + if i.(VariableAddressInstruction).getIRVariable() instanceof IRThisVariable + then + if i.isGLValue() + then result = getThisType(i.getEnclosingFunction(), true) + else result = getThisType(i.getEnclosingFunction(), false) + else result = i.getResultLanguageType() + } + /** Holds if `op` is the only use of its defining instruction, and that op is used in a conversation */ private predicate isConversion(Operand op) { exists(Instruction def, Operand use | diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/TaintTrackingUtil.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/TaintTrackingUtil.qll index f190569330f5..3e85489b126f 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/TaintTrackingUtil.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/TaintTrackingUtil.qll @@ -5,65 +5,82 @@ private import semmle.code.cpp.models.interfaces.DataFlow private import semmle.code.cpp.models.interfaces.SideEffect private import DataFlowUtil private import DataFlowPrivate +private import DataFlowNodes private import SsaImpl as Ssa private import semmle.code.cpp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl private import semmle.code.cpp.ir.dataflow.FlowSteps -/** - * Holds if taint propagates from `nodeFrom` to `nodeTo` in exactly one local - * (intra-procedural) step. This relation is only used for local taint flow - * (for example `TaintTracking::localTaint(source, sink)`) so it may contain - * special cases that should only apply to local taint flow. - */ -predicate localTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { - // dataflow step - DataFlow::localFlowStep(nodeFrom, nodeTo) - or - // taint flow step - localAdditionalTaintStep(nodeFrom, nodeTo, _) - or - // models-as-data summarized flow for local data flow (i.e. special case for flow - // through calls to modeled functions, without relying on global dataflow to join - // the dots). - FlowSummaryImpl::Private::Steps::summaryThroughStepTaint(nodeFrom, nodeTo, _) -} - -/** - * Holds if taint can flow in one local step from `nodeFrom` to `nodeTo` excluding - * local data flow steps. That is, `nodeFrom` and `nodeTo` are likely to represent - * different objects. - */ cached -predicate localAdditionalTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo, string model) { - operandToInstructionTaintStep(nodeFrom.asOperand(), nodeTo.asInstruction()) and - model = "" - or - modeledTaintStep(nodeFrom, nodeTo, model) - or - // Flow from (the indirection of) an operand of a pointer arithmetic instruction to the - // indirection of the pointer arithmetic instruction. This provides flow from `source` - // in `x[source]` to the result of the associated load instruction. - exists(PointerArithmeticInstruction pai, int indirectionIndex | - nodeHasOperand(nodeFrom, pai.getAnOperand(), pragma[only_bind_into](indirectionIndex)) and - hasInstructionAndIndex(nodeTo, pai, indirectionIndex + 1) - ) and - model = "" - or - any(Ssa::Indirection ind).isAdditionalTaintStep(nodeFrom, nodeTo) and - model = "" - or - // models-as-data summarized flow - FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom.(FlowSummaryNode).getSummaryNode(), - nodeTo.(FlowSummaryNode).getSummaryNode(), false, model) - or - // object->field conflation for content that is a `TaintInheritingContent`. - exists(DataFlow::ContentSet f | - readStep(nodeFrom, f, nodeTo) and - f.getAReadContent() instanceof TaintInheritingContent - ) and - model = "" +private module Cached { + private import DataFlowImplCommon as DataFlowImplCommon + + /** + * This predicate exists to collapse the `cached` predicates in this module with the + * `cached` predicates in other C/C++ dataflow files, which is then collapsed + * with the `cached` predicates in `DataFlowImplCommon.qll`. + */ + cached + predicate forceCachingInSameStage() { DataFlowImplCommon::forceCachingInSameStage() } + + /** + * Holds if taint propagates from `nodeFrom` to `nodeTo` in exactly one local + * (intra-procedural) step. This relation is only used for local taint flow + * (for example `TaintTracking::localTaint(source, sink)`) so it may contain + * special cases that should only apply to local taint flow. + */ + cached + predicate localTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { + // dataflow step + DataFlow::localFlowStep(nodeFrom, nodeTo) + or + // taint flow step + localAdditionalTaintStep(nodeFrom, nodeTo, _) + or + // models-as-data summarized flow for local data flow (i.e. special case for flow + // through calls to modeled functions, without relying on global dataflow to join + // the dots). + FlowSummaryImpl::Private::Steps::summaryThroughStepTaint(nodeFrom, nodeTo, _) + } + + /** + * Holds if taint can flow in one local step from `nodeFrom` to `nodeTo` excluding + * local data flow steps. That is, `nodeFrom` and `nodeTo` are likely to represent + * different objects. + */ + cached + predicate localAdditionalTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo, string model) { + operandToInstructionTaintStep(nodeFrom.asOperand(), nodeTo.asInstruction()) and + model = "" + or + modeledTaintStep(nodeFrom, nodeTo, model) + or + // Flow from (the indirection of) an operand of a pointer arithmetic instruction to the + // indirection of the pointer arithmetic instruction. This provides flow from `source` + // in `x[source]` to the result of the associated load instruction. + exists(PointerArithmeticInstruction pai, int indirectionIndex | + nodeHasOperand(nodeFrom, pai.getAnOperand(), pragma[only_bind_into](indirectionIndex)) and + hasInstructionAndIndex(nodeTo, pai, indirectionIndex + 1) + ) and + model = "" + or + any(Ssa::Indirection ind).isAdditionalTaintStep(nodeFrom, nodeTo) and + model = "" + or + // models-as-data summarized flow + FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom.(FlowSummaryNode).getSummaryNode(), + nodeTo.(FlowSummaryNode).getSummaryNode(), false, model) + or + // object->field conflation for content that is a `TaintInheritingContent`. + exists(DataFlow::ContentSet f | + readStep(nodeFrom, f, nodeTo) and + f.getAReadContent() instanceof TaintInheritingContent + ) and + model = "" + } } +import Cached + /** * Holds if taint propagates from `nodeFrom` to `nodeTo` in exactly one local * (intra-procedural) step. @@ -196,7 +213,7 @@ predicate modeledTaintStep(DataFlow::Node nodeIn, DataFlow::Node nodeOut, string // Taint flow from a pointer argument to an output, when the model specifies flow from the deref // to that output, but the deref is not modeled in the IR for the caller. exists( - CallInstruction call, DataFlow::SideEffectOperandNode indirectArgument, Function func, + CallInstruction call, SideEffectOperandNode indirectArgument, Function func, FunctionInput modelIn, FunctionOutput modelOut | indirectArgument = callInput(call, modelIn) and diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll index 594e37b668d6..9e9a47a5b4f1 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll @@ -15,6 +15,7 @@ private import TranslatedCall private import TranslatedStmt private import TranslatedFunction private import TranslatedGlobalVar +private import TranslatedInitialization TranslatedElement getInstructionTranslatedElement(Instruction instruction) { instruction = TRawInstruction(result, _) @@ -194,6 +195,89 @@ module Raw { Expr getInstructionUnconvertedResultExpression(Instruction instruction) { result = getInstructionConvertedResultExpression(instruction).getUnconverted() } + + /** + * Gets the expression associated with the instruction `instr` that computes + * the `Convert` instruction on the extent expression of an allocation. + */ + cached + Expr getAllocationExtentConvertExpr(Instruction instr) { + exists(TranslatedNonConstantAllocationSize tas | + instr = tas.getInstruction(AllocationExtentConvertTag()) and + result = tas.getExtent().getExpr() + ) + } + + /** + * Gets the `ParenthesisExpr` associated with a transparent conversion + * instruction, if any. + */ + cached + ParenthesisExpr getTransparentConversionParenthesisExpr(Instruction instr) { + exists(TranslatedTransparentConversion ttc | + result = ttc.getExpr() and + instr = ttc.getResult() + ) + } + + /** + * Holds if `instr` belongs to a `TranslatedCoreExpr` that produces an + * expression result. This indicates that the instruction represents a + * definition whose result should be mapped back to the expression. + */ + cached + predicate instructionProducesExprResult(Instruction instr) { + exists(TranslatedCoreExpr tco | + tco.getInstruction(_) = instr and + tco.producesExprResult() + ) + } + + /** + * Gets the expression associated with a `StoreInstruction` generated + * by an `TranslatedAssignOperation`. + */ + cached + Expr getAssignOperationStoreExpr(StoreInstruction store) { + exists(TranslatedAssignOperation tao | + store = tao.getInstruction(AssignmentStoreTag()) and + result = tao.getExpr() + ) + } + + /** + * Gets the expression associated with a `StoreInstruction` generated + * by an `TranslatedCrementOperation`. + */ + cached + Expr getCrementOperationStoreExpr(StoreInstruction store) { + exists(TranslatedCrementOperation tco | + store = tco.getInstruction(CrementStoreTag()) and + result = tco.getExpr() + ) + } + + /** + * Holds if `store` is a `StoreInstruction` that defines the temporary + * `IRVariable` generated as part of the translation of a ternary expression. + */ + cached + predicate isConditionalExprTempStore(StoreInstruction store) { + exists(TranslatedConditionalExpr tce | + store = tce.getInstruction(ConditionValueFalseStoreTag()) + or + store = tce.getInstruction(ConditionValueTrueStoreTag()) + ) + } + + /** Gets the instruction that computes the address used to initialize `v`. */ + cached + Instruction getInitializationTargetAddress(IRVariable v) { + exists(TranslatedVariableInitialization init | + init.getIRVariable() = v and + result = init.getTargetAddress() + ) + } } class TStageInstruction = TRawInstruction or TRawUnreachedInstruction; diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll index 83f19062b907..7dfebc56fe18 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll @@ -390,7 +390,7 @@ class TranslatedDeclStmt extends TranslatedStmt { override TranslatedElement getLastChild() { result = this.getChild(this.getChildCount() - 1) } - private int getChildCount() { result = count(this.getDeclarationEntry(_)) } + private int getChildCount() { result = count(int i | exists(this.getDeclarationEntry(i))) } IRDeclarationEntry getIRDeclarationEntry(int index) { result.hasIndex(index) and diff --git a/cpp/ql/lib/semmle/code/cpp/models/Models.qll b/cpp/ql/lib/semmle/code/cpp/models/Models.qll index 83bda3e2a44e..09f0a0df9668 100644 --- a/cpp/ql/lib/semmle/code/cpp/models/Models.qll +++ b/cpp/ql/lib/semmle/code/cpp/models/Models.qll @@ -57,3 +57,4 @@ private import implementations.CAtlFile private import implementations.CAtlFileMapping private import implementations.CAtlTemporaryFile private import implementations.CRegKey +private import implementations.WinHttp diff --git a/cpp/ql/lib/semmle/code/cpp/models/implementations/WinHttp.qll b/cpp/ql/lib/semmle/code/cpp/models/implementations/WinHttp.qll new file mode 100644 index 000000000000..fb28e6ebe451 --- /dev/null +++ b/cpp/ql/lib/semmle/code/cpp/models/implementations/WinHttp.qll @@ -0,0 +1,50 @@ +private import cpp +private import semmle.code.cpp.ir.dataflow.FlowSteps +private import semmle.code.cpp.dataflow.new.DataFlow + +/** The `WINHTTP_HEADER_NAME` class from `winhttp.h`. */ +class WinHttpHeaderName extends Class { + WinHttpHeaderName() { this.hasGlobalName("_WINHTTP_HEADER_NAME") } +} + +/** The `WINHTTP_EXTENDED_HEADER` class from `winhttp.h`. */ +class WinHttpExtendedHeader extends Class { + WinHttpExtendedHeader() { this.hasGlobalName("_WINHTTP_EXTENDED_HEADER") } +} + +private class WinHttpHeaderNameInheritingContent extends TaintInheritingContent, + DataFlow::FieldContent +{ + WinHttpHeaderNameInheritingContent() { + this.getIndirectionIndex() = 2 and + ( + this.getAField().getDeclaringType() instanceof WinHttpHeaderName + or + // The extended header looks like: + // struct WINHTTP_EXTENDED_HEADER { + // union { [...] }; + // union { [...] }; + // }; + // So the first declaring type is the anonymous unions, and the declaring + // type of those anonymous unions is the `WINHTTP_EXTENDED_HEADER` struct. + this.getAField().getDeclaringType().getDeclaringType() instanceof WinHttpExtendedHeader + ) + } +} + +/** The `URL_COMPONENTS` class from `winhttp.h`. */ +class WinHttpUrlComponents extends Class { + WinHttpUrlComponents() { this.hasGlobalName("_WINHTTP_URL_COMPONENTS") } +} + +private class WinHttpUrlComponentsInheritingContent extends TaintInheritingContent, + DataFlow::FieldContent +{ + WinHttpUrlComponentsInheritingContent() { + exists(Field f | f = this.getField() and f.getDeclaringType() instanceof WinHttpUrlComponents | + if f.getType().getUnspecifiedType() instanceof PointerType + then this.getIndirectionIndex() = 2 + else this.getIndirectionIndex() = 1 + ) + } +} diff --git a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll index 2423a3a71a0a..03dbc56dc99c 100644 --- a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll +++ b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll @@ -404,7 +404,7 @@ predicate cmpWithLinearBound( * For example, if `t` is a signed 32-bit type then holds if `lb` is * `-2^31` and `ub` is `2^31 - 1`. */ -private predicate typeBounds(ArithmeticType t, float lb, float ub) { +private predicate typeBounds0(ArithmeticType t, float lb, float ub) { exists(IntegralType integralType, float limit | integralType = t and limit = 2.pow(8 * integralType.getSize()) | @@ -423,6 +423,42 @@ private predicate typeBounds(ArithmeticType t, float lb, float ub) { t instanceof FloatingPointType and lb = -(1.0 / 0.0) and ub = 1.0 / 0.0 } +/** + * Gets the underlying type for an enumeration `e`. + * + * If the enumeration does not have an explicit type we approximate it using + * the following rules: + * - The result type is always `signed`, and + * - if the largest value fits in an `int` the result is `int`. Otherwise, the + * result is `long`. + */ +private IntegralType getUnderlyingTypeForEnum(Enum e) { + result = e.getExplicitUnderlyingType() + or + not e.hasExplicitUnderlyingType() and + result.isSigned() and + exists(IntType intType | + if max(e.getAnEnumConstant().getValue().toFloat()) >= 2.pow(8 * intType.getSize() - 1) + then result instanceof LongType + else result = intType + ) +} + +/** + * Holds if `lb` and `ub` are the lower and upper bounds of the unspecified + * type `t`. + * + * For example, if `t` is a signed 32-bit type then holds if `lb` is + * `-2^31` and `ub` is `2^31 - 1`. + * + * Unlike `typeBounds0`, this predicate also handles `Enum` types. + */ +private predicate typeBounds(Type t, float lb, float ub) { + typeBounds0(t, lb, ub) + or + typeBounds0(getUnderlyingTypeForEnum(t), lb, ub) +} + private Type stripReference(Type t) { if t instanceof ReferenceType then result = t.(ReferenceType).getBaseType() else result = t } diff --git a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll index c3c3c2dd3e7e..86753abc5b79 100644 --- a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll +++ b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll @@ -512,8 +512,8 @@ private module BoundsEstimate { */ float getBoundsLimit() { // This limit is arbitrary, but low enough that it prevents timeouts on - // specific observed customer databases (and the in the tests). - result = 2.0.pow(40) + // specific observed customer databases (and in the tests). + result = 2.0.pow(29) } /** Gets the maximum number of bounds possible for `t` when widening is used. */ @@ -552,34 +552,47 @@ private module BoundsEstimate { private float nrOfBoundsPhiGuard(RangeSsaDefinition def, StackVariable v) { // If we have // - // if (x < c) { e1 } - // e2 + // if (x < c) { e1 } else { e2 } + // e3 // - // then `e2` is both a guard phi node (guarded by `x < c`) and a normal - // phi node (control is merged after the `if` statement). + // then `{ e1 }` and `{ e2 }` are both guard phi nodes guarded by `x < c`. + // The range analysis propagates bounds on `x` into both branches, filtered + // by the condition. In this case all lower bounds flow to `{ e1 }` and only + // lower bounds that are smaller than `c` flow to `{ e2 }`. // - // Assume `x` has `n` bounds. Then `n` bounds are propagated to the guard - // phi node `{ e1 }` and, since `{ e1 }` is input to `e2` as a normal phi - // node, `n` bounds are propagated to `e2`. If we also propagate the `n` - // bounds to `e2` as a guard phi node, then we square the number of - // bounds. + // The largest number of bounds possible for `e3` is the number of bounds on `x` plus + // one. This happens when all bounds flow from `x` to `e1` to `e3` and the + // bound `c` can flow to `e2` to `e3`. // - // However in practice `x < c` is going to cut down the number of bounds: - // The tracked bounds can't flow to both branches as that would require - // them to simultaneously be greater and smaller than `c`. To approximate - // this better, the contribution from a guard phi node that is also a - // normal phi node is 1. - exists(def.getAPhiInput(v)) and - isGuardPhiWithBound(def, v, _) and - result = 1 - or - not exists(def.getAPhiInput(v)) and - // If there's different `access`es, then they refer to the same variable - // with the same lower bounds. Hence adding these guards make no sense (the - // implementation will take the union, but they'll be removed by - // deduplication). Hence we use `max` as an approximation. - result = - max(VariableAccess access | isGuardPhiWithBound(def, v, access) | nrOfBoundsExpr(access)) + // We want to optimize our bounds estimate for `e3`, as that is the estimate + // that can continue propagating forward. We don't know how the existing + // bounds will be split between the different branches. That depends on + // whether the range analysis is tracking lower bounds or upper bounds, and + // on the meaning of the condition. + // + // As a heuristic we divide the number of bounds on `x` by 2 to "average" + // the effect of the condition and add 1 to account for the bound from the + // condition itself. This will approximate estimates inside the branches, + // but will give a good estimate after the branches are merged. + // + // This also handles cases such as this one + // + // if (x < c) { e1 } + // e3 + // + // where `e3` is both a guard phi node (guarded by `x < c`) and a normal + // phi node (control is merged after the `if` statement). Here half of the + // bounds flow into the branch and then to `e3` as a normal phi node and the + // "other" half flow from the condition to `e3` as a guard phi node. + exists(float varBounds | + // If there's different `access`es, then they refer to the same + // variable with the same lower bounds. Hence adding these guards makes no + // sense (the implementation will take the union, but they'll be removed by + // deduplication). Hence we use `max` as an approximation. + varBounds = + max(VariableAccess access | isGuardPhiWithBound(def, v, access) | nrOfBoundsExpr(access)) and + result = (varBounds + 1) / 2 + ) or def.isPhiNode(v) and not isGuardPhiWithBound(def, v, _) and @@ -2180,6 +2193,16 @@ module SimpleRangeAnalysisInternal { /** Gets the estimate of the number of bounds for `e`. */ float estimateNrOfBounds(Expr e) { result = BoundsEstimate::nrOfBoundsExpr(e) } + + /** Counts the numbers of lower bounds that are computed internally for `e`. */ + float countNrOfLowerBounds(Expr e) { + result = strictcount(float lb | lb = getLowerBoundsImpl(e) | lb) + } + + /** Counts the numbers of upper bounds that are computed internally for `e`. */ + float countNrOfUpperBounds(Expr e) { + result = strictcount(float ub | ub = getUpperBoundsImpl(e) | ub) + } } /** Provides predicates for debugging the simple range analysis library. */ @@ -2208,7 +2231,7 @@ private module Debug { */ predicate countGetLowerBoundsImpl(Expr e, int n) { e = getRelevantLocatable() and - n = strictcount(float lb | lb = getLowerBoundsImpl(e) | lb) + n = SimpleRangeAnalysisInternal::countNrOfLowerBounds(e) } float debugNrOfBounds(Expr e) { diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme index 9439176c1d13..770002bb0232 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme @@ -236,6 +236,62 @@ extractor_version( string frontend_version: string ref ) +/** + * Gives the TRAP filename that `trap` is associated with. + * For debugging only. + */ +trap_filename( + int trap: @trap, + string filename: string ref +); + +/** + * Gives the tag name for `tag`. + * For debugging only. + */ +tag_name( + int tag: @tag, + string name: string ref +); + +@trap_or_tag = @tag | @trap; + +/** + * Gives the name for the source file. + */ +source_file_name( + int sf: @source_file, + string name: string ref +); + +/** + * In `build-mode: none` overlay mode, indicates that `source_file` + * (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the + * TRAP file corresponding to `foo.c`, something it transitively + * includes, or a template instantiation it transitively uses. + */ +source_file_uses_trap( + int source_file: @source_file ref, + int trap_file: @trap ref +); + +/** + * In `build-mode: none` overlay mode, indicates that the TRAP file + * `trap_file` uses tag `tag`. + */ +trap_uses_tag( + int trap_file: @trap ref, + int tag: @tag ref +); + +/** + * Holds if there is a definition of `element` in TRAP file or tag `t`. + */ +in_trap_or_tag( + int element: @element ref, + int t: @trap_or_tag ref +); + pch_uses( int pch: @pch ref, int compilation: @compilation ref, diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats index ee25206a25d1..ab81be3fa7cc 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats @@ -21,16 +21,28 @@ 357 - @location_default - 46837407 + @trap + 1 + + + @tag + 1 + + + @source_file + 1 @pch 248 + + @location_default + 46837435 + @macro_expansion - 40306104 + 40309769 @other_macro_reference @@ -38,7 +50,7 @@ @normal_function - 2734629 + 2734631 @unknown_function @@ -46,7 +58,7 @@ @constructor - 694334 + 694343 @destructor @@ -70,23 +82,23 @@ @fun_decl - 4193289 + 4193416 @var_decl - 9367854 + 9367984 @type_decl - 1629527 + 1629528 @namespace_decl - 407977 + 408755 @using_declaration - 266844 + 266845 @using_directive @@ -98,27 +110,27 @@ @static_assert - 172749 + 172739 @parameter - 7011797 + 7011801 @membervariable - 1500528 + 1502766 @globalvariable - 492566 + 492567 @localvariable - 724695 + 724688 @enumconstant - 347955 + 348040 @errortype @@ -354,11 +366,11 @@ @pointer - 451498 + 451499 @type_with_specifiers - 691559 + 691560 @array @@ -366,7 +378,7 @@ @routineptr - 679848 + 679857 @reference @@ -474,11 +486,11 @@ @remove_reference - 5706 + 5705 @struct - 976596 + 976600 @union @@ -486,15 +498,15 @@ @enum - 41554 + 41605 @template_parameter - 864417 + 864421 @alias - 1755743 + 1755750 @unknown_usertype @@ -530,11 +542,11 @@ @mangledname - 6349607 + 6349611 @type_mention - 5911106 + 5913261 @concept_template @@ -542,7 +554,7 @@ @routinetype - 600578 + 600586 @ptrtomember @@ -562,7 +574,7 @@ @declspec - 330310 + 330396 @msattribute @@ -574,11 +586,11 @@ @attribute_arg_token - 16584 + 16585 @attribute_arg_constant_expr - 71584 + 71626 @attribute_arg_expr @@ -598,15 +610,15 @@ @derivation - 473788 + 473794 @frienddecl - 767816 + 767534 @comment - 11208571 + 11208578 @namespace @@ -618,15 +630,15 @@ @namequalifier - 3042586 + 3042471 @value - 13541557 + 13541565 @initialiser - 2244826 + 2245206 @address_of @@ -634,15 +646,15 @@ @indirect - 402173 + 402174 @array_to_pointer - 1953950 + 1953951 @parexpr - 4915709 + 4915712 @arithnegexpr @@ -654,7 +666,7 @@ @complementexpr - 38187 + 38188 @notexpr @@ -662,7 +674,7 @@ @postincrexpr - 84578 + 84573 @postdecrexpr @@ -678,11 +690,11 @@ @conditionalexpr - 897971 + 897972 @addexpr - 580446 + 580447 @subexpr @@ -694,7 +706,7 @@ @divexpr - 52392 + 52388 @remexpr @@ -706,7 +718,7 @@ @psubexpr - 68022 + 68017 @pdiffexpr @@ -722,7 +734,7 @@ @andexpr - 483234 + 483235 @orexpr @@ -730,11 +742,11 @@ @xorexpr - 73958 + 73953 @eqexpr - 643439 + 643440 @neexpr @@ -750,7 +762,7 @@ @geexpr - 81365 + 81360 @leexpr @@ -758,7 +770,7 @@ @assignexpr - 1281279 + 1281280 @assignaddexpr @@ -814,11 +826,11 @@ @orlogicalexpr - 1103651 + 1103652 @commaexpr - 167880 + 167881 @subscriptexpr @@ -826,11 +838,11 @@ @callexpr - 238857 + 238860 @vastartexpr - 4964 + 4963 @vaargexpr @@ -846,7 +858,7 @@ @varaccess - 8255498 + 8255503 @runtime_sizeof @@ -854,7 +866,7 @@ @runtime_alignof - 49551 + 49552 @expr_stmt @@ -862,11 +874,11 @@ @routineexpr - 5726204 + 5725988 @type_operand - 1405527 + 1405528 @offsetofexpr @@ -878,7 +890,7 @@ @literal - 7985020 + 7991777 @aggregateliteral @@ -886,23 +898,23 @@ @c_style_cast - 6027719 + 6027720 @temp_init - 980662 + 980525 @errorexpr - 45185 + 45186 @reference_to - 1880186 + 1880002 @ref_indirect - 2094072 + 2094099 @vacuous_destructor_call @@ -910,7 +922,7 @@ @assume - 4138 + 4137 @conjugation @@ -962,7 +974,7 @@ @thisaccess - 1553672 + 1553582 @new_expr @@ -974,11 +986,11 @@ @throw_expr - 23840 + 23817 @condition_decl - 407684 + 407669 @braced_init_list @@ -986,7 +998,7 @@ @type_id - 47588 + 47589 @sizeof_pack @@ -1078,7 +1090,7 @@ @uuidof - 26691 + 26787 @delete_array_expr @@ -1094,7 +1106,7 @@ @ctordirectinit - 112100 + 112102 @ctorvirtualinit @@ -1110,7 +1122,7 @@ @dtordirectdestruct - 39194 + 39195 @dtorvirtualdestruct @@ -1126,7 +1138,7 @@ @reinterpret_cast - 39964 + 39962 @const_cast @@ -1138,11 +1150,11 @@ @lambdaexpr - 18998 + 18997 @param_ref - 162180 + 162057 @noopexpr @@ -1246,7 +1258,7 @@ @noexceptexpr - 28138 + 28017 @builtinshufflevector @@ -1418,7 +1430,7 @@ @reuseexpr - 844478 + 844446 @istriviallycopyassignable @@ -1518,7 +1530,7 @@ @requires_expr - 16453 + 16452 @nested_requirement @@ -1530,7 +1542,7 @@ @concept_id - 90160 + 90157 @isinvocable @@ -1546,15 +1558,15 @@ @lambdacapture - 31866 + 31864 @stmt_expr - 2031827 + 2031829 @stmt_if - 990318 + 990319 @stmt_while @@ -1562,7 +1574,7 @@ @stmt_goto - 157264 + 157265 @stmt_label @@ -1570,11 +1582,11 @@ @stmt_return - 1238149 + 1238112 @stmt_block - 1724481 + 1724482 @stmt_end_test_while @@ -1586,11 +1598,11 @@ @stmt_switch_case - 833624 + 833592 @stmt_switch - 410623 + 410607 @stmt_asm @@ -1598,11 +1610,11 @@ @stmt_decl - 770029 + 769985 @stmt_empty - 428127 + 428111 @stmt_continue @@ -1610,11 +1622,11 @@ @stmt_break - 137506 + 137498 @stmt_try_block - 26372 + 26379 @stmt_microsoft_try @@ -1638,7 +1650,7 @@ @stmt_handler - 43218 + 43224 @stmt_constexpr_if @@ -1670,7 +1682,7 @@ @ppd_ifndef - 160444 + 160487 @ppd_elif @@ -1686,15 +1698,15 @@ @ppd_plain_include - 317263 + 317265 @ppd_define - 2743340 + 2743342 @ppd_undef - 100180 + 100181 @ppd_pragma @@ -1816,7 +1828,7 @@ compilation_args - 1008080 + 1008084 id @@ -2192,7 +2204,7 @@ 2 3 - 8688 + 8689 3 @@ -2207,7 +2219,7 @@ compilation_expanded_args - 1008080 + 1008084 id @@ -2583,7 +2595,7 @@ 2 3 - 8688 + 8689 3 @@ -2646,11 +2658,11 @@ compilation_compiling_files - 15739 + 15738 id - 2723 + 2722 num @@ -2658,7 +2670,7 @@ file - 13669 + 13668 @@ -2846,7 +2858,7 @@ 1 2 - 12308 + 12307 2 @@ -2872,7 +2884,7 @@ 1 2 - 12526 + 12525 2 @@ -2892,11 +2904,11 @@ compilation_time - 62957 + 62953 id - 2723 + 2722 num @@ -2908,7 +2920,7 @@ seconds - 18516 + 16990 @@ -2973,7 +2985,7 @@ 4 5 - 2723 + 2722 @@ -2989,22 +3001,22 @@ 3 4 - 980 + 381 4 5 - 381 + 980 5 - 7 - 163 + 9 + 217 - 8 + 9 10 - 217 + 163 10 @@ -3017,24 +3029,19 @@ 217 - 16 - 18 - 108 - - - 18 - 19 + 17 + 20 217 20 - 54 + 26 217 - 133 - 134 - 54 + 44 + 132 + 163 @@ -3102,47 +3109,47 @@ 3 4 - 1797 + 871 4 5 - 599 + 1579 5 6 - 217 + 163 6 7 - 544 + 326 7 8 - 217 + 435 8 9 - 326 + 163 9 - 18 + 11 381 - 22 - 49 + 11 + 30 381 - 94 + 40 95 - 54 + 217 @@ -3190,21 +3197,16 @@ 4 5 - 54 - - - 5 - 6 - 54 + 108 - 187 - 188 + 177 + 178 54 - 197 - 198 + 183 + 184 54 @@ -3221,22 +3223,22 @@ 1 2 - 12362 + 10020 2 3 - 3757 + 3975 3 4 - 1688 + 1906 4 - 39 - 708 + 47 + 1089 @@ -3252,27 +3254,27 @@ 1 2 - 11273 + 9639 2 3 - 4302 + 3757 3 4 - 1470 + 1579 4 - 44 - 1416 + 5 + 1143 - 63 - 64 - 54 + 5 + 72 + 871 @@ -3288,12 +3290,12 @@ 1 2 - 15630 + 13941 2 3 - 2886 + 3049 @@ -3577,7 +3579,7 @@ cpu_seconds - 9656 + 9593 elapsed_seconds @@ -3627,17 +3629,17 @@ 1 2 - 8394 + 8289 2 3 - 809 + 967 3 - 32 - 452 + 33 + 336 @@ -3653,12 +3655,12 @@ 1 2 - 9046 + 9004 2 3 - 610 + 589 @@ -3674,17 +3676,12 @@ 1 2 - 42 + 31 2 3 - 10 - - - 3 - 4 - 10 + 31 5 @@ -3699,51 +3696,51 @@ 10 11 - 10 + 21 - 11 - 12 - 21 + 13 + 14 + 10 - 15 - 16 + 14 + 15 10 - 20 - 21 + 16 + 17 10 - 31 - 32 + 32 + 33 10 - 61 - 62 + 69 + 70 10 - 172 - 173 + 182 + 183 10 - 231 - 232 + 216 + 217 10 - 286 - 287 + 288 + 289 10 - 321 - 322 + 319 + 320 10 @@ -3760,17 +3757,12 @@ 1 2 - 42 + 31 2 3 - 10 - - - 3 - 4 - 10 + 31 5 @@ -3782,49 +3774,54 @@ 8 21 + + 9 + 10 + 10 + 10 11 10 - 11 - 12 - 21 + 13 + 14 + 10 - 15 - 16 + 14 + 15 10 - 20 - 21 + 16 + 17 10 - 31 - 32 + 32 + 33 10 - 61 - 62 + 67 + 68 10 - 165 - 166 + 163 + 164 10 - 168 - 169 + 170 + 171 10 - 216 - 217 + 206 + 207 10 @@ -4067,11 +4064,11 @@ locations_default - 46837407 + 46837435 id - 46837407 + 46837435 file @@ -4079,7 +4076,7 @@ beginLine - 7483207 + 7483212 beginColumn @@ -4087,7 +4084,7 @@ endLine - 7484203 + 7484208 endColumn @@ -4105,7 +4102,7 @@ 1 2 - 46837407 + 46837435 @@ -4121,7 +4118,7 @@ 1 2 - 46837407 + 46837435 @@ -4137,7 +4134,7 @@ 1 2 - 46837407 + 46837435 @@ -4153,7 +4150,7 @@ 1 2 - 46837407 + 46837435 @@ -4169,7 +4166,7 @@ 1 2 - 46837407 + 46837435 @@ -4570,12 +4567,12 @@ 1 2 - 4945829 + 4945832 2 3 - 778673 + 778674 3 @@ -4590,7 +4587,7 @@ 12 96 - 561386 + 561387 96 @@ -4611,12 +4608,12 @@ 1 2 - 5008053 + 5008056 2 3 - 1216856 + 1216857 3 @@ -4647,12 +4644,12 @@ 1 2 - 5629548 + 5629552 2 3 - 483108 + 483109 3 @@ -4662,7 +4659,7 @@ 7 25 - 564995 + 564996 25 @@ -4683,12 +4680,12 @@ 1 2 - 7018144 + 7018148 2 85 - 465063 + 465064 @@ -4704,7 +4701,7 @@ 1 2 - 5014275 + 5014278 2 @@ -5125,17 +5122,17 @@ 1 2 - 4943589 + 4943591 2 3 - 782033 + 782034 3 4 - 541972 + 541973 4 @@ -5166,17 +5163,17 @@ 1 2 - 5005066 + 5005069 2 3 - 1220465 + 1220466 3 6 - 631077 + 631078 6 @@ -5202,7 +5199,7 @@ 1 2 - 7035318 + 7035322 2 @@ -5223,7 +5220,7 @@ 1 2 - 5628179 + 5628183 2 @@ -5238,12 +5235,12 @@ 7 25 - 568355 + 568356 25 89 - 224504 + 224505 @@ -5259,7 +5256,7 @@ 1 2 - 5012782 + 5012785 2 @@ -5279,7 +5276,7 @@ 12 72 - 561635 + 561636 72 @@ -5778,11 +5775,11 @@ numlines - 805927 + 805928 element_id - 804807 + 804808 num_lines @@ -5808,7 +5805,7 @@ 1 2 - 803687 + 803688 2 @@ -5829,7 +5826,7 @@ 1 2 - 803687 + 803688 2 @@ -6872,6 +6869,294 @@ + + trap_filename + 1 + + + trap + 1 + + + filename + 1 + + + + + trap + filename + + + 12 + + + 1 + 2 + 1 + + + + + + + filename + trap + + + 12 + + + 1 + 2 + 1 + + + + + + + + + tag_name + 1 + + + tag + 1 + + + name + 1 + + + + + tag + name + + + 12 + + + 1 + 2 + 1 + + + + + + + name + tag + + + 12 + + + 1 + 2 + 1 + + + + + + + + + source_file_name + 1 + + + sf + 1 + + + name + 1 + + + + + sf + name + + + 12 + + + 1 + 2 + 1 + + + + + + + name + sf + + + 12 + + + 1 + 2 + 1 + + + + + + + + + source_file_uses_trap + 1 + + + source_file + 1 + + + trap_file + 1 + + + + + source_file + trap_file + + + 12 + + + 1 + 2 + 1 + + + + + + + trap_file + source_file + + + 12 + + + 1 + 2 + 1 + + + + + + + + + trap_uses_tag + 1 + + + trap_file + 1 + + + tag + 1 + + + + + trap_file + tag + + + 12 + + + 1 + 2 + 1 + + + + + + + tag + trap_file + + + 12 + + + 1 + 2 + 1 + + + + + + + + + in_trap_or_tag + 1 + + + element + 1 + + + t + 1 + + + + + element + t + + + 12 + + + 1 + 2 + 1 + + + + + + + t + element + + + 12 + + + 1 + 2 + 1 + + + + + + + pch_uses 4121 @@ -7256,7 +7541,7 @@ fileannotations - 4183401 + 4183417 id @@ -7272,7 +7557,7 @@ value - 39352 + 39353 @@ -7847,15 +8132,15 @@ inmacroexpansion - 150011348 + 150011437 id - 24673488 + 24673503 inv - 3705719 + 3705721 @@ -7869,32 +8154,32 @@ 1 3 - 2209721 + 2209722 3 5 - 1475128 + 1475129 5 6 - 1620534 + 1620535 6 7 - 6583216 + 6583220 7 8 - 8719889 + 8719894 8 9 - 3557411 + 3557413 9 @@ -7920,12 +8205,12 @@ 2 3 - 743308 + 743309 3 4 - 481561 + 481562 4 @@ -7950,12 +8235,12 @@ 10 11 - 444695 + 444696 11 337 - 307829 + 307830 339 @@ -7975,15 +8260,15 @@ affectedbymacroexpansion - 48740809 + 48740838 id - 7045460 + 7045464 inv - 3803509 + 3803511 @@ -7997,7 +8282,7 @@ 1 2 - 3847103 + 3847105 2 @@ -8017,7 +8302,7 @@ 5 12 - 535214 + 535215 12 @@ -8048,7 +8333,7 @@ 4 7 - 316639 + 316640 7 @@ -8058,7 +8343,7 @@ 9 12 - 342973 + 342974 12 @@ -8093,7 +8378,7 @@ 18 20 - 344290 + 344291 20 @@ -8113,19 +8398,19 @@ macroinvocations - 40387470 + 40391183 id - 40387470 + 40391183 macro_id - 182555 + 182706 location - 5925539 + 5926766 kind @@ -8143,7 +8428,7 @@ 1 2 - 40387470 + 40391183 @@ -8159,7 +8444,7 @@ 1 2 - 40387470 + 40391183 @@ -8175,7 +8460,7 @@ 1 2 - 40387470 + 40391183 @@ -8191,17 +8476,17 @@ 1 2 - 61105 + 61156 2 3 - 27666 + 27664 3 4 - 17972 + 18080 4 @@ -8211,27 +8496,27 @@ 5 7 - 13833 + 13832 7 13 - 14704 + 14703 13 33 - 13724 + 13723 33 182 - 13724 + 13723 - 185 - 72208 - 9803 + 186 + 72214 + 9802 @@ -8247,42 +8532,42 @@ 1 2 - 77607 + 77765 2 3 - 30661 + 30659 3 4 - 14377 + 14376 4 5 - 10293 + 10292 5 8 - 14051 + 14050 8 18 - 14214 + 14213 18 90 - 13778 + 13723 90 - 12205 - 7570 + 12207 + 7624 @@ -8298,7 +8583,7 @@ 1 2 - 178035 + 178186 2 @@ -8319,17 +8604,17 @@ 1 2 - 5261596 + 5262706 2 4 - 429484 + 429618 4 - 72208 - 234457 + 72214 + 234441 @@ -8345,12 +8630,12 @@ 1 2 - 5903373 + 5904602 2 37 - 22165 + 22164 @@ -8366,7 +8651,7 @@ 1 2 - 5925539 + 5926766 @@ -8380,13 +8665,13 @@ 12 - 1494 - 1495 + 1495 + 1496 54 - 740082 - 740083 + 740200 + 740201 54 @@ -8406,8 +8691,8 @@ 54 - 3146 - 3147 + 3149 + 3150 54 @@ -8422,13 +8707,13 @@ 12 - 1076 - 1077 + 1077 + 1078 54 - 107726 - 107727 + 107755 + 107756 54 @@ -8439,15 +8724,15 @@ macroparent - 33684436 + 33686920 id - 33684436 + 33686920 parent_id - 15941258 + 15942726 @@ -8461,7 +8746,7 @@ 1 2 - 33684436 + 33686920 @@ -8477,7 +8762,7 @@ 1 2 - 7815086 + 7816185 2 @@ -8487,17 +8772,17 @@ 3 4 - 4707394 + 4707507 4 5 - 1296895 + 1297133 5 205 - 526045 + 526063 @@ -8507,15 +8792,15 @@ macrolocationbind - 6022277 + 6023015 id - 4208236 + 4209042 location - 2272393 + 2272308 @@ -8529,22 +8814,22 @@ 1 2 - 3284816 + 3285657 2 3 - 489028 + 489010 3 4 - 8602 + 8601 4 5 - 412639 + 412624 5 @@ -8565,12 +8850,12 @@ 1 2 - 1332220 + 1332170 2 3 - 481413 + 481395 3 @@ -8580,12 +8865,12 @@ 4 5 - 426926 + 426910 5 522 - 24047 + 24046 @@ -8595,11 +8880,11 @@ macro_argument_unexpanded - 82169662 + 82169670 invocation - 26182114 + 26181901 argument_index @@ -8607,7 +8892,7 @@ text - 341868 + 341869 @@ -8621,22 +8906,22 @@ 1 2 - 9643579 + 9643301 2 3 - 9733520 + 9733558 3 4 - 4982515 + 4982534 4 67 - 1822499 + 1822507 @@ -8652,22 +8937,22 @@ 1 2 - 9825469 + 9825192 2 3 - 9751034 + 9751073 3 4 - 4826449 + 4826468 4 67 - 1779160 + 1779167 @@ -8692,7 +8977,7 @@ 646904 - 2488947 + 2488917 31 @@ -8755,7 +9040,7 @@ 5 6 - 39089 + 39090 6 @@ -8801,7 +9086,7 @@ 1 2 - 242187 + 242188 2 @@ -8821,11 +9106,11 @@ macro_argument_expanded - 82169662 + 82169670 invocation - 26182114 + 26181901 argument_index @@ -8833,7 +9118,7 @@ text - 207052 + 207053 @@ -8847,22 +9132,22 @@ 1 2 - 9643579 + 9643301 2 3 - 9733520 + 9733558 3 4 - 4982515 + 4982534 4 67 - 1822499 + 1822507 @@ -8878,22 +9163,22 @@ 1 2 - 12591345 + 12591079 2 3 - 8396151 + 8396184 3 4 - 4208269 + 4208285 4 9 - 986347 + 986351 @@ -8918,7 +9203,7 @@ 646904 - 2488947 + 2488917 31 @@ -9010,7 +9295,7 @@ 251 - 1169678 + 1169648 9467 @@ -9032,7 +9317,7 @@ 2 3 - 88551 + 88552 3 @@ -9047,15 +9332,15 @@ functions - 4043204 + 4043207 id - 4043204 + 4043207 name - 1689262 + 1689263 kind @@ -9073,7 +9358,7 @@ 1 2 - 4043204 + 4043207 @@ -9089,7 +9374,7 @@ 1 2 - 4043204 + 4043207 @@ -9105,7 +9390,7 @@ 1 2 - 1441361 + 1441362 2 @@ -9131,7 +9416,7 @@ 1 2 - 1686400 + 1686401 2 @@ -9249,15 +9534,15 @@ function_entry_point - 1134648 + 1134663 id - 1130925 + 1130940 entry_point - 1134648 + 1134663 @@ -9271,7 +9556,7 @@ 1 2 - 1127744 + 1127758 2 @@ -9292,7 +9577,7 @@ 1 2 - 1134648 + 1134663 @@ -9302,15 +9587,15 @@ function_return_type - 4060503 + 4060505 id - 4043204 + 4043207 return_type - 617761 + 617762 @@ -9324,7 +9609,7 @@ 1 2 - 4025906 + 4025908 2 @@ -9645,44 +9930,44 @@ purefunctions - 131546 + 131903 id - 131546 + 131903 function_deleted - 87800 + 87797 id - 87800 + 87797 function_defaulted - 51526 + 51524 id - 51526 + 51524 function_prototyped - 4041711 + 4041713 id - 4041711 + 4041713 @@ -9840,15 +10125,15 @@ fun_decls - 4199263 + 4199390 id - 4193289 + 4193416 function - 4018688 + 4018690 type_id @@ -9856,11 +10141,11 @@ name - 1687769 + 1687770 location - 2806436 + 2806438 @@ -9874,7 +10159,7 @@ 1 2 - 4193289 + 4193416 @@ -9890,7 +10175,7 @@ 1 2 - 4187316 + 4187442 2 @@ -9911,7 +10196,7 @@ 1 2 - 4193289 + 4193416 @@ -9927,7 +10212,7 @@ 1 2 - 4193289 + 4193416 @@ -9943,12 +10228,12 @@ 1 2 - 3858647 + 3858525 2 5 - 160040 + 160165 @@ -9964,7 +10249,7 @@ 1 2 - 4000394 + 4000396 2 @@ -9985,7 +10270,7 @@ 1 2 - 4018688 + 4018690 @@ -10001,7 +10286,7 @@ 1 2 - 3878435 + 3878437 2 @@ -10022,7 +10307,7 @@ 1 2 - 294444 + 294445 2 @@ -10032,7 +10317,7 @@ 3 5 - 48285 + 48286 5 @@ -10041,7 +10326,7 @@ 364 - 10295 + 10294 1244 @@ -10058,7 +10343,7 @@ 1 2 - 304400 + 304401 2 @@ -10094,7 +10379,7 @@ 1 2 - 490326 + 490327 2 @@ -10156,7 +10441,7 @@ 1 2 - 1328362 + 1328363 2 @@ -10170,7 +10455,7 @@ 11 - 3167 + 3169 36463 @@ -10187,7 +10472,7 @@ 1 2 - 1440863 + 1440864 2 @@ -10213,7 +10498,7 @@ 1 2 - 1598166 + 1598167 2 @@ -10234,7 +10519,7 @@ 1 2 - 1363954 + 1363955 2 @@ -10260,7 +10545,7 @@ 1 2 - 2413303 + 2413305 2 @@ -10286,7 +10571,7 @@ 1 2 - 2431971 + 2431972 2 @@ -10312,7 +10597,7 @@ 1 2 - 2692317 + 2692318 2 @@ -10333,7 +10618,7 @@ 1 2 - 2767359 + 2767361 2 @@ -10348,11 +10633,11 @@ fun_def - 1418836 + 1418837 id - 1418836 + 1418837 @@ -10381,11 +10666,11 @@ fun_decl_specifiers - 4269576 + 4269578 id - 1744269 + 1744270 name @@ -10413,7 +10698,7 @@ 3 4 - 1097510 + 1097511 4 @@ -10615,26 +10900,26 @@ fun_decl_empty_throws - 420764 + 421590 fun_decl - 420764 + 421590 fun_decl_noexcept - 140904 + 140906 fun_decl - 140904 + 140906 constant - 140464 + 140466 @@ -10648,7 +10933,7 @@ 1 2 - 140904 + 140906 @@ -10664,7 +10949,7 @@ 1 2 - 140024 + 140026 2 @@ -10679,11 +10964,11 @@ fun_decl_empty_noexcept - 1160854 + 1160855 fun_decl - 1160854 + 1160855 @@ -10788,11 +11073,11 @@ fun_requires - 29023 + 29022 id - 10082 + 10081 kind @@ -10800,7 +11085,7 @@ constraint - 28787 + 28786 @@ -10918,7 +11203,7 @@ 1 2 - 28551 + 28550 2 @@ -10939,7 +11224,7 @@ 1 2 - 28787 + 28786 @@ -10949,11 +11234,11 @@ param_decl_bind - 7294544 + 7294672 id - 7294544 + 7294672 index @@ -10961,7 +11246,7 @@ fun_decl - 3523881 + 3524008 @@ -10975,7 +11260,7 @@ 1 2 - 7294544 + 7294672 @@ -10991,7 +11276,7 @@ 1 2 - 7294544 + 7294672 @@ -11030,8 +11315,8 @@ 622 - 28316 - 28317 + 28317 + 28318 124 @@ -11071,8 +11356,8 @@ 622 - 28316 - 28317 + 28317 + 28318 124 @@ -11089,7 +11374,7 @@ 1 2 - 1505701 + 1505826 2 @@ -11125,7 +11410,7 @@ 1 2 - 1505701 + 1505826 2 @@ -11155,27 +11440,27 @@ var_decls - 9374326 + 9374456 id - 9367854 + 9367984 variable - 9027363 + 9027369 type_id - 1452935 + 1452936 name - 850480 + 850481 location - 6259506 + 6259510 @@ -11189,7 +11474,7 @@ 1 2 - 9367854 + 9367984 @@ -11205,7 +11490,7 @@ 1 2 - 9361383 + 9361513 2 @@ -11226,7 +11511,7 @@ 1 2 - 9367854 + 9367984 @@ -11242,7 +11527,7 @@ 1 2 - 9367854 + 9367984 @@ -11258,12 +11543,12 @@ 1 2 - 8704295 + 8704176 2 5 - 323068 + 323192 @@ -11279,7 +11564,7 @@ 1 2 - 8974348 + 8974354 2 @@ -11300,7 +11585,7 @@ 1 2 - 8922205 + 8922210 2 @@ -11321,7 +11606,7 @@ 1 2 - 8783071 + 8783076 2 @@ -11378,7 +11663,7 @@ 1 2 - 868525 + 868526 2 @@ -11505,7 +11790,7 @@ 25 - 27136 + 27137 31236 @@ -11630,7 +11915,7 @@ 1 2 - 5758601 + 5758605 2 @@ -11639,7 +11924,7 @@ 20 - 2940 + 2941 30116 @@ -11656,7 +11941,7 @@ 1 2 - 5839244 + 5839247 2 @@ -11677,7 +11962,7 @@ 1 2 - 5961701 + 5961705 2 @@ -11698,7 +11983,7 @@ 1 2 - 6247186 + 6247189 2 @@ -11713,11 +11998,11 @@ var_def - 3763195 + 3763198 id - 3763195 + 3763198 @@ -11735,11 +12020,11 @@ var_decl_specifiers - 488708 + 488709 id - 488708 + 488709 name @@ -11757,7 +12042,7 @@ 1 2 - 488708 + 488709 @@ -11867,19 +12152,19 @@ type_decls - 1629527 + 1629528 id - 1629527 + 1629528 type_id - 1610611 + 1610612 location - 1543658 + 1543659 @@ -11893,7 +12178,7 @@ 1 2 - 1629527 + 1629528 @@ -11909,7 +12194,7 @@ 1 2 - 1629527 + 1629528 @@ -11925,7 +12210,7 @@ 1 2 - 1594308 + 1594309 2 @@ -11946,7 +12231,7 @@ 1 2 - 1594433 + 1594434 2 @@ -11967,7 +12252,7 @@ 1 2 - 1521630 + 1521631 2 @@ -11988,7 +12273,7 @@ 1 2 - 1521755 + 1521756 2 @@ -12014,18 +12299,18 @@ type_decl_top - 675760 + 676476 type_decl - 675760 + 676476 type_requires - 7658 + 7657 id @@ -12083,7 +12368,7 @@ 1 2 - 7615 + 7614 2 @@ -12098,11 +12383,11 @@ namespace_decls - 407977 + 408755 id - 407977 + 408755 namespace_id @@ -12110,11 +12395,11 @@ location - 407977 + 408755 bodylocation - 407977 + 408755 @@ -12128,7 +12413,7 @@ 1 2 - 407977 + 408755 @@ -12144,7 +12429,7 @@ 1 2 - 407977 + 408755 @@ -12160,7 +12445,7 @@ 1 2 - 407977 + 408755 @@ -12220,12 +12505,12 @@ 263 - 1509 + 1517 145 - 1882 - 12507 + 1890 + 12533 40 @@ -12286,12 +12571,12 @@ 263 - 1509 + 1517 145 - 1882 - 12507 + 1890 + 12533 40 @@ -12352,12 +12637,12 @@ 263 - 1509 + 1517 145 - 1882 - 12507 + 1890 + 12533 40 @@ -12374,7 +12659,7 @@ 1 2 - 407977 + 408755 @@ -12390,7 +12675,7 @@ 1 2 - 407977 + 408755 @@ -12406,7 +12691,7 @@ 1 2 - 407977 + 408755 @@ -12422,7 +12707,7 @@ 1 2 - 407977 + 408755 @@ -12438,7 +12723,7 @@ 1 2 - 407977 + 408755 @@ -12454,7 +12739,7 @@ 1 2 - 407977 + 408755 @@ -12464,11 +12749,11 @@ usings - 270978 + 270979 id - 270978 + 270979 element_id @@ -12494,7 +12779,7 @@ 1 2 - 270978 + 270979 @@ -12510,7 +12795,7 @@ 1 2 - 270978 + 270979 @@ -12526,7 +12811,7 @@ 1 2 - 270978 + 270979 @@ -12745,7 +13030,7 @@ using_container - 577796 + 577799 parent @@ -12753,7 +13038,7 @@ child - 270978 + 270979 @@ -12848,23 +13133,23 @@ static_asserts - 172749 + 172739 id - 172749 + 172739 condition - 172749 + 172739 message - 38652 + 38650 location - 22585 + 22584 enclosing @@ -12882,7 +13167,7 @@ 1 2 - 172749 + 172739 @@ -12898,7 +13183,7 @@ 1 2 - 172749 + 172739 @@ -12914,7 +13199,7 @@ 1 2 - 172749 + 172739 @@ -12930,7 +13215,7 @@ 1 2 - 172749 + 172739 @@ -12946,7 +13231,7 @@ 1 2 - 172749 + 172739 @@ -12962,7 +13247,7 @@ 1 2 - 172749 + 172739 @@ -12978,7 +13263,7 @@ 1 2 - 172749 + 172739 @@ -12994,7 +13279,7 @@ 1 2 - 172749 + 172739 @@ -13010,7 +13295,7 @@ 1 2 - 28416 + 28414 2 @@ -13051,7 +13336,7 @@ 1 2 - 28416 + 28414 2 @@ -13092,7 +13377,7 @@ 1 2 - 35818 + 35816 2 @@ -13113,7 +13398,7 @@ 1 2 - 30222 + 30220 2 @@ -13123,12 +13408,12 @@ 3 4 - 3385 + 3384 4 12 - 1903 + 1902 12 @@ -13154,7 +13439,7 @@ 2 3 - 3717 + 3716 3 @@ -13169,7 +13454,7 @@ 5 6 - 4721 + 4720 6 @@ -13179,7 +13464,7 @@ 14 15 - 2640 + 2639 16 @@ -13189,7 +13474,7 @@ 17 18 - 4381 + 4380 19 @@ -13215,7 +13500,7 @@ 2 3 - 3717 + 3716 3 @@ -13230,7 +13515,7 @@ 5 6 - 4721 + 4720 6 @@ -13240,7 +13525,7 @@ 14 15 - 2640 + 2639 16 @@ -13250,7 +13535,7 @@ 17 18 - 4381 + 4380 19 @@ -13271,7 +13556,7 @@ 1 2 - 6940 + 6939 2 @@ -13281,7 +13566,7 @@ 3 4 - 7758 + 7757 4 @@ -13302,7 +13587,7 @@ 1 2 - 5053 + 5052 2 @@ -13327,7 +13612,7 @@ 13 14 - 2640 + 2639 16 @@ -13348,7 +13633,7 @@ 1 2 - 5709 + 5708 2 @@ -13379,7 +13664,7 @@ 1 2 - 5709 + 5708 2 @@ -13410,7 +13695,7 @@ 1 2 - 5863 + 5862 2 @@ -13456,15 +13741,15 @@ params - 7052243 + 7052247 id - 7011797 + 7011801 function - 3400304 + 3400306 index @@ -13472,7 +13757,7 @@ type_id - 1217354 + 1217355 @@ -13486,7 +13771,7 @@ 1 2 - 7011797 + 7011801 @@ -13502,7 +13787,7 @@ 1 2 - 7011797 + 7011801 @@ -13518,7 +13803,7 @@ 1 2 - 6971351 + 6971355 2 @@ -13539,7 +13824,7 @@ 1 2 - 1470855 + 1470856 2 @@ -13559,7 +13844,7 @@ 5 65 - 145977 + 145978 @@ -13575,7 +13860,7 @@ 1 2 - 1470855 + 1470856 2 @@ -13595,7 +13880,7 @@ 5 65 - 145977 + 145978 @@ -13611,12 +13896,12 @@ 1 2 - 1778616 + 1778617 2 3 - 1029312 + 1029313 3 @@ -13765,7 +14050,7 @@ 1 2 - 735614 + 735615 2 @@ -13801,7 +14086,7 @@ 1 2 - 817501 + 817502 2 @@ -13857,15 +14142,15 @@ overrides - 159153 + 159143 new - 150382 + 150374 old - 17799 + 17798 @@ -13879,12 +14164,12 @@ 1 2 - 141620 + 141612 2 4 - 8762 + 8761 @@ -13900,7 +14185,7 @@ 1 2 - 9685 + 9684 2 @@ -13935,19 +14220,19 @@ membervariables - 1502978 + 1505217 id - 1500528 + 1502766 type_id - 457641 + 457991 name - 642756 + 644237 @@ -13961,7 +14246,7 @@ 1 2 - 1498186 + 1500425 2 @@ -13982,7 +14267,7 @@ 1 2 - 1500528 + 1502766 @@ -13998,22 +14283,22 @@ 1 2 - 339459 + 339817 2 3 - 72597 + 72592 3 10 - 35454 + 35397 10 4445 - 10129 + 10183 @@ -14029,17 +14314,17 @@ 1 2 - 357050 + 357407 2 3 - 64754 + 64750 3 57 - 34365 + 34362 60 @@ -14060,22 +14345,22 @@ 1 2 - 422023 + 423356 2 3 - 122484 + 122584 3 5 - 58056 + 58106 5 664 - 40192 + 40189 @@ -14091,17 +14376,17 @@ 1 2 - 525010 + 526390 2 3 - 73196 + 73300 3 668 - 44549 + 44546 @@ -14111,11 +14396,11 @@ globalvariables - 492566 + 492567 id - 492566 + 492567 type_id @@ -14137,7 +14422,7 @@ 1 2 - 492566 + 492567 @@ -14153,7 +14438,7 @@ 1 2 - 492566 + 492567 @@ -14297,19 +14582,19 @@ localvariables - 724695 + 724688 id - 724695 + 724688 type_id - 53298 + 53301 name - 101409 + 101408 @@ -14323,7 +14608,7 @@ 1 2 - 724695 + 724688 @@ -14339,7 +14624,7 @@ 1 2 - 724695 + 724688 @@ -14355,7 +14640,7 @@ 1 2 - 28789 + 28793 2 @@ -14401,7 +14686,7 @@ 1 2 - 38248 + 38252 2 @@ -14432,7 +14717,7 @@ 1 2 - 62402 + 62401 2 @@ -14473,7 +14758,7 @@ 1 2 - 84399 + 84398 2 @@ -14566,15 +14851,15 @@ orphaned_variables - 44034 + 44035 var - 44034 + 44035 function - 40785 + 40786 @@ -14588,7 +14873,7 @@ 1 2 - 44034 + 44035 @@ -14619,19 +14904,19 @@ enumconstants - 347955 + 348040 id - 347955 + 348040 parent - 41554 + 41605 index - 13942 + 13941 type_id @@ -14639,11 +14924,11 @@ name - 347574 + 347659 location - 320561 + 320648 @@ -14657,7 +14942,7 @@ 1 2 - 347955 + 348040 @@ -14673,7 +14958,7 @@ 1 2 - 347955 + 348040 @@ -14689,7 +14974,7 @@ 1 2 - 347955 + 348040 @@ -14705,7 +14990,7 @@ 1 2 - 347955 + 348040 @@ -14721,7 +15006,7 @@ 1 2 - 347955 + 348040 @@ -14742,7 +15027,7 @@ 2 3 - 5772 + 5826 3 @@ -14752,7 +15037,7 @@ 4 5 - 5555 + 5554 5 @@ -14777,7 +15062,7 @@ 10 15 - 3431 + 3430 15 @@ -14787,7 +15072,7 @@ 33 257 - 1307 + 1306 @@ -14808,7 +15093,7 @@ 2 3 - 5772 + 5826 3 @@ -14818,7 +15103,7 @@ 4 5 - 5555 + 5554 5 @@ -14843,7 +15128,7 @@ 10 15 - 3431 + 3430 15 @@ -14853,7 +15138,7 @@ 33 257 - 1307 + 1306 @@ -14869,7 +15154,7 @@ 1 2 - 41554 + 41605 @@ -14890,7 +15175,7 @@ 2 3 - 5772 + 5826 3 @@ -14900,7 +15185,7 @@ 4 5 - 5555 + 5554 5 @@ -14925,7 +15210,7 @@ 10 15 - 3431 + 3430 15 @@ -14935,7 +15220,7 @@ 33 257 - 1307 + 1306 @@ -14951,17 +15236,17 @@ 1 2 - 2124 + 2123 2 3 - 5990 + 6044 3 4 - 8768 + 8767 4 @@ -15056,7 +15341,7 @@ 64 - 764 + 765 980 @@ -15112,7 +15397,7 @@ 64 - 764 + 765 980 @@ -15129,7 +15414,7 @@ 1 2 - 13942 + 13941 @@ -15184,7 +15469,7 @@ 64 - 761 + 762 980 @@ -15240,7 +15525,7 @@ 64 - 764 + 765 980 @@ -15255,8 +15540,8 @@ 12 - 6389 - 6390 + 6391 + 6392 54 @@ -15271,8 +15556,8 @@ 12 - 763 - 764 + 764 + 765 54 @@ -15303,8 +15588,8 @@ 12 - 6382 - 6383 + 6384 + 6385 54 @@ -15319,8 +15604,8 @@ 12 - 5886 - 5887 + 5888 + 5889 54 @@ -15337,7 +15622,7 @@ 1 2 - 347193 + 347278 2 @@ -15358,7 +15643,7 @@ 1 2 - 347193 + 347278 2 @@ -15379,7 +15664,7 @@ 1 2 - 347574 + 347659 @@ -15395,7 +15680,7 @@ 1 2 - 347574 + 347659 @@ -15411,7 +15696,7 @@ 1 2 - 347193 + 347278 2 @@ -15432,7 +15717,7 @@ 1 2 - 319526 + 319613 2 @@ -15453,7 +15738,7 @@ 1 2 - 320561 + 320648 @@ -15469,7 +15754,7 @@ 1 2 - 319526 + 319613 2 @@ -15490,7 +15775,7 @@ 1 2 - 320561 + 320648 @@ -15506,7 +15791,7 @@ 1 2 - 319526 + 319613 2 @@ -16213,15 +16498,15 @@ derivedtypes - 3023723 + 3023725 id - 3023723 + 3023725 name - 1457166 + 1457167 kind @@ -16229,7 +16514,7 @@ type_id - 1942142 + 1942143 @@ -16243,7 +16528,7 @@ 1 2 - 3023723 + 3023725 @@ -16259,7 +16544,7 @@ 1 2 - 3023723 + 3023725 @@ -16275,7 +16560,7 @@ 1 2 - 3023723 + 3023725 @@ -16291,7 +16576,7 @@ 1 2 - 1340931 + 1340932 2 @@ -16317,7 +16602,7 @@ 1 2 - 1457166 + 1457167 @@ -16513,7 +16798,7 @@ 1 2 - 1315917 + 1315918 2 @@ -16544,7 +16829,7 @@ 1 2 - 1316290 + 1316291 2 @@ -16554,7 +16839,7 @@ 3 4 - 123203 + 123204 4 @@ -16569,11 +16854,11 @@ pointerishsize - 2242062 + 2242064 id - 2242062 + 2242064 size @@ -16595,7 +16880,7 @@ 1 2 - 2242062 + 2242064 @@ -16611,7 +16896,7 @@ 1 2 - 2242062 + 2242064 @@ -17134,15 +17419,15 @@ typedefbase - 1755743 + 1755750 id - 1755743 + 1755750 type_id - 834216 + 834219 @@ -17156,7 +17441,7 @@ 1 2 - 1755743 + 1755750 @@ -17172,7 +17457,7 @@ 1 2 - 659332 + 659334 2 @@ -17197,7 +17482,7 @@ decltypes - 814570 + 814571 id @@ -17205,7 +17490,7 @@ expr - 814570 + 814571 kind @@ -17335,7 +17620,7 @@ 1 2 - 814570 + 814571 @@ -17351,7 +17636,7 @@ 1 2 - 814570 + 814571 @@ -17367,7 +17652,7 @@ 1 2 - 814570 + 814571 @@ -17383,7 +17668,7 @@ 1 2 - 814570 + 814571 @@ -17645,11 +17930,11 @@ type_operators - 7937 + 7936 id - 7937 + 7936 arg_type @@ -17661,7 +17946,7 @@ base_type - 5234 + 5233 @@ -17675,7 +17960,7 @@ 1 2 - 7937 + 7936 @@ -17691,7 +17976,7 @@ 1 2 - 7937 + 7936 @@ -17707,7 +17992,7 @@ 1 2 - 7937 + 7936 @@ -17961,15 +18246,15 @@ usertypes - 4137505 + 4137521 id - 4137505 + 4137521 name - 915352 + 915335 kind @@ -17987,7 +18272,7 @@ 1 2 - 4137505 + 4137521 @@ -18003,7 +18288,7 @@ 1 2 - 4137505 + 4137521 @@ -18019,17 +18304,17 @@ 1 2 - 652073 + 652055 2 3 - 158105 + 158085 3 8 - 70321 + 70343 8 @@ -18050,7 +18335,7 @@ 1 2 - 863818 + 863800 2 @@ -18190,8 +18475,8 @@ 10 - 12189 - 12190 + 12187 + 12188 10 @@ -18207,11 +18492,11 @@ usertypesize - 1359595 + 1359600 id - 1359595 + 1359600 size @@ -18233,7 +18518,7 @@ 1 2 - 1359595 + 1359600 @@ -18249,7 +18534,7 @@ 1 2 - 1359595 + 1359600 @@ -18454,15 +18739,15 @@ usertype_uuid - 47795 + 47930 id - 47795 + 47930 uuid - 47252 + 47387 @@ -18476,7 +18761,7 @@ 1 2 - 47795 + 47930 @@ -18492,7 +18777,7 @@ 1 2 - 46710 + 46845 2 @@ -18507,11 +18792,11 @@ usertype_alias_kind - 1755743 + 1755750 id - 1755743 + 1755750 alias_kind @@ -18529,7 +18814,7 @@ 1 2 - 1755743 + 1755750 @@ -18560,18 +18845,18 @@ nontype_template_parameters - 761283 + 761293 id - 761283 + 761293 type_template_type_constraint - 27071 + 27070 id @@ -18579,7 +18864,7 @@ constraint - 25934 + 25933 @@ -18629,7 +18914,7 @@ 1 2 - 24797 + 24796 2 @@ -18644,15 +18929,15 @@ mangled_name - 7910439 + 7910444 id - 7910439 + 7910444 mangled_name - 6349607 + 6349611 is_complete @@ -18670,7 +18955,7 @@ 1 2 - 7910439 + 7910444 @@ -18686,7 +18971,7 @@ 1 2 - 7910439 + 7910444 @@ -18702,7 +18987,7 @@ 1 2 - 6016209 + 6016213 2 @@ -18723,7 +19008,7 @@ 1 2 - 6349607 + 6349611 @@ -18775,55 +19060,55 @@ is_pod_class - 590966 + 590973 id - 590966 + 590973 is_standard_layout_class - 1120532 + 1120536 id - 1120532 + 1120536 is_complete - 1341502 + 1341507 id - 1341502 + 1341507 is_class_template - 231183 + 231184 id - 231183 + 231184 class_instantiation - 1122152 + 1122188 to - 1119154 + 1119158 from @@ -18841,12 +19126,12 @@ 1 2 - 1117061 + 1117033 2 8 - 2093 + 2124 @@ -18892,17 +19177,17 @@ 10 17 - 5901 + 5890 17 - 52 - 5396 + 51 + 5364 - 52 + 51 4223 - 3513 + 3555 @@ -18912,11 +19197,11 @@ class_template_argument - 2887353 + 2887364 type_id - 1362193 + 1362199 index @@ -18924,7 +19209,7 @@ arg_type - 818753 + 818756 @@ -18938,17 +19223,17 @@ 1 2 - 577723 + 577725 2 3 - 408634 + 408636 3 4 - 249939 + 249940 4 @@ -18974,17 +19259,17 @@ 1 2 - 606156 + 606159 2 3 - 422573 + 422574 3 4 - 250770 + 250771 4 @@ -19097,17 +19382,17 @@ 1 2 - 511556 + 511558 2 3 - 166889 + 166890 3 5 - 74918 + 74919 5 @@ -19133,7 +19418,7 @@ 1 2 - 720870 + 720873 2 @@ -19153,11 +19438,11 @@ class_template_argument_value - 506789 + 506795 type_id - 204502 + 204505 index @@ -19165,7 +19450,7 @@ arg_value - 506653 + 506660 @@ -19179,7 +19464,7 @@ 1 2 - 154815 + 154817 2 @@ -19205,7 +19490,7 @@ 1 2 - 146996 + 146998 2 @@ -19348,7 +19633,7 @@ 1 2 - 506518 + 506524 2 @@ -19369,7 +19654,7 @@ 1 2 - 506653 + 506660 @@ -19432,19 +19717,19 @@ type_mentions - 5911106 + 5913261 id - 5911106 + 5913261 type_id - 277863 + 278007 location - 5854793 + 5856951 kind @@ -19462,7 +19747,7 @@ 1 2 - 5911106 + 5913261 @@ -19478,7 +19763,7 @@ 1 2 - 5911106 + 5913261 @@ -19494,7 +19779,7 @@ 1 2 - 5911106 + 5913261 @@ -19510,42 +19795,42 @@ 1 2 - 137297 + 137451 2 3 - 31206 + 31204 3 4 - 11654 + 11653 4 5 - 14976 + 14975 5 7 - 19932 + 19931 7 12 - 21839 + 21783 12 28 - 21022 + 21020 28 8941 - 19932 + 19986 @@ -19561,42 +19846,42 @@ 1 2 - 137297 + 137451 2 3 - 31206 + 31204 3 4 - 11654 + 11653 4 5 - 14976 + 14975 5 7 - 19932 + 19931 7 12 - 21839 + 21783 12 28 - 21022 + 21020 28 8941 - 19932 + 19986 @@ -19612,7 +19897,7 @@ 1 2 - 277863 + 278007 @@ -19628,12 +19913,12 @@ 1 2 - 5809100 + 5811261 2 4 - 45693 + 45690 @@ -19649,12 +19934,12 @@ 1 2 - 5809100 + 5811261 2 4 - 45693 + 45690 @@ -19670,7 +19955,7 @@ 1 2 - 5854793 + 5856951 @@ -19684,8 +19969,8 @@ 12 - 108537 - 108538 + 108584 + 108585 54 @@ -19700,8 +19985,8 @@ 12 - 5102 - 5103 + 5105 + 5106 54 @@ -19716,8 +20001,8 @@ 12 - 107503 - 107504 + 107550 + 107551 54 @@ -19728,26 +20013,26 @@ is_function_template - 1328113 + 1328114 id - 1328113 + 1328114 function_instantiation - 967580 + 967592 to - 967580 + 967592 from - 181520 + 181523 @@ -19761,7 +20046,7 @@ 1 2 - 967580 + 967592 @@ -19777,12 +20062,12 @@ 1 2 - 109833 + 109834 2 3 - 42545 + 42546 3 @@ -19807,11 +20092,11 @@ function_template_argument - 2468689 + 2468721 function_id - 1443873 + 1443892 index @@ -19819,7 +20104,7 @@ arg_type - 296058 + 296062 @@ -19833,22 +20118,22 @@ 1 2 - 777936 + 777946 2 3 - 410494 + 410500 3 4 - 170689 + 170691 4 15 - 84752 + 84753 @@ -19864,22 +20149,22 @@ 1 2 - 796958 + 796968 2 3 - 408599 + 408604 3 4 - 168523 + 168525 4 9 - 69792 + 69793 @@ -20017,7 +20302,7 @@ 1 2 - 173634 + 173636 2 @@ -20042,7 +20327,7 @@ 11 76 - 23218 + 23219 79 @@ -20063,12 +20348,12 @@ 1 2 - 255137 + 255140 2 3 - 31917 + 31918 3 @@ -20083,11 +20368,11 @@ function_template_argument_value - 449825 + 449830 function_id - 195499 + 195502 index @@ -20095,7 +20380,7 @@ arg_value - 447151 + 447156 @@ -20109,7 +20394,7 @@ 1 2 - 150415 + 150417 2 @@ -20135,7 +20420,7 @@ 1 2 - 143544 + 143546 2 @@ -20288,7 +20573,7 @@ 1 2 - 444477 + 444482 2 @@ -20309,7 +20594,7 @@ 1 2 - 447151 + 447156 @@ -20330,11 +20615,11 @@ variable_instantiation - 427355 + 427356 to - 427355 + 427356 from @@ -20352,7 +20637,7 @@ 1 2 - 427355 + 427356 @@ -20449,7 +20734,7 @@ 2 3 - 189534 + 189535 3 @@ -20480,7 +20765,7 @@ 2 3 - 179827 + 179828 3 @@ -21366,11 +21651,11 @@ concept_instantiation - 90160 + 90157 to - 90160 + 90157 from @@ -21388,7 +21673,7 @@ 1 2 - 90160 + 90157 @@ -21484,22 +21769,22 @@ is_type_constraint - 36789 + 36787 concept_id - 36789 + 36787 concept_template_argument - 112705 + 112701 concept_id - 76152 + 76149 index @@ -21507,7 +21792,7 @@ arg_type - 21365 + 21364 @@ -21521,12 +21806,12 @@ 1 2 - 46335 + 46333 2 3 - 24604 + 24603 3 @@ -21547,12 +21832,12 @@ 1 2 - 49938 + 49937 2 3 - 22309 + 22308 3 @@ -21655,7 +21940,7 @@ 1 2 - 10361 + 10360 2 @@ -21706,7 +21991,7 @@ 1 2 - 17976 + 17975 2 @@ -21857,15 +22142,15 @@ routinetypes - 600578 + 600586 id - 600578 + 600586 return_type - 282012 + 282015 @@ -21879,7 +22164,7 @@ 1 2 - 600578 + 600586 @@ -21895,12 +22180,12 @@ 1 2 - 232561 + 232564 2 3 - 34997 + 34998 3 @@ -21915,11 +22200,11 @@ routinetypeargs - 1178605 + 1178524 routine - 416032 + 416004 index @@ -21927,7 +22212,7 @@ type_id - 112082 + 112074 @@ -21941,32 +22226,32 @@ 1 2 - 82945 + 82939 2 3 - 126078 + 126070 3 4 - 107888 + 107881 4 5 - 49287 + 49284 5 7 - 33167 + 33164 7 19 - 16665 + 16664 @@ -21982,27 +22267,27 @@ 1 2 - 88935 + 88929 2 3 - 138713 + 138704 3 4 - 114641 + 114633 4 5 - 40737 + 40734 5 10 - 32894 + 32892 10 @@ -22200,32 +22485,32 @@ 1 2 - 33276 + 33273 2 3 - 15576 + 15574 3 4 - 13288 + 13287 4 5 - 9803 + 9802 5 6 - 6372 + 6371 6 8 - 9476 + 9475 8 @@ -22235,7 +22520,7 @@ 13 26 - 8659 + 8658 26 @@ -22256,22 +22541,22 @@ 1 2 - 79405 + 79399 2 3 - 17536 + 17535 3 5 - 9476 + 9475 5 17 - 5664 + 5663 @@ -22598,11 +22883,11 @@ funspecifiers - 9694656 + 9694786 func_id - 4002634 + 4002636 spec_id @@ -22620,17 +22905,17 @@ 1 2 - 1526110 + 1526111 2 3 - 506256 + 506132 3 4 - 1033917 + 1034042 4 @@ -22744,8 +23029,8 @@ 124 - 22777 - 22778 + 22778 + 22779 124 @@ -22756,11 +23041,11 @@ varspecifiers - 3078853 + 3078855 var_id - 2314865 + 2314866 spec_id @@ -22778,7 +23063,7 @@ 1 2 - 1654292 + 1654293 2 @@ -23424,7 +23709,7 @@ 1 2 - 641033 + 641034 2 @@ -23998,11 +24283,11 @@ attribute_arg_value - 16584 + 16585 arg - 16584 + 16585 value @@ -24020,7 +24305,7 @@ 1 2 - 16584 + 16585 @@ -24154,15 +24439,15 @@ attribute_arg_constant - 71584 + 71626 arg - 71584 + 71626 constant - 71584 + 71626 @@ -24176,7 +24461,7 @@ 1 2 - 71584 + 71626 @@ -24192,7 +24477,7 @@ 1 2 - 71584 + 71626 @@ -24374,7 +24659,7 @@ spec_id - 615272 + 615273 @@ -24613,15 +24898,15 @@ unspecifiedtype - 7228462 + 7228466 type_id - 7228462 + 7228466 unspecified_type_id - 3955717 + 3955719 @@ -24635,7 +24920,7 @@ 1 2 - 7228462 + 7228466 @@ -24651,12 +24936,12 @@ 1 2 - 2475279 + 2475280 2 3 - 1114435 + 1114436 3 @@ -24676,11 +24961,11 @@ member - 4182338 + 4182340 parent - 541972 + 541973 index @@ -24688,7 +24973,7 @@ child - 4177733 + 4177735 @@ -24737,7 +25022,7 @@ 9 13 - 41067 + 41068 13 @@ -24773,7 +25058,7 @@ 2 3 - 83255 + 83256 3 @@ -24966,7 +25251,7 @@ 1 2 - 4177733 + 4177735 @@ -24982,7 +25267,7 @@ 1 2 - 4173128 + 4173131 2 @@ -24997,11 +25282,11 @@ enclosingfunction - 114976 + 114977 child - 114976 + 114977 parent @@ -25019,7 +25304,7 @@ 1 2 - 114976 + 114977 @@ -25035,7 +25320,7 @@ 1 2 - 37469 + 37470 2 @@ -25060,15 +25345,15 @@ derivations - 473788 + 473794 derivation - 473788 + 473794 sub - 452194 + 452200 index @@ -25076,11 +25361,11 @@ super - 234017 + 234020 location - 35166 + 35167 @@ -25094,7 +25379,7 @@ 1 2 - 473788 + 473794 @@ -25110,7 +25395,7 @@ 1 2 - 473788 + 473794 @@ -25126,7 +25411,7 @@ 1 2 - 473788 + 473794 @@ -25142,7 +25427,7 @@ 1 2 - 473788 + 473794 @@ -25158,7 +25443,7 @@ 1 2 - 435778 + 435784 2 @@ -25179,7 +25464,7 @@ 1 2 - 435778 + 435784 2 @@ -25200,7 +25485,7 @@ 1 2 - 435778 + 435784 2 @@ -25221,7 +25506,7 @@ 1 2 - 435778 + 435784 2 @@ -25381,12 +25666,12 @@ 1 2 - 224269 + 224272 2 1655 - 9747 + 9748 @@ -25402,12 +25687,12 @@ 1 2 - 224269 + 224272 2 1655 - 9747 + 9748 @@ -25423,7 +25708,7 @@ 1 2 - 233577 + 233580 2 @@ -25444,12 +25729,12 @@ 1 2 - 228703 + 228706 2 81 - 5313 + 5314 @@ -25465,7 +25750,7 @@ 1 2 - 26332 + 26333 2 @@ -25501,7 +25786,7 @@ 1 2 - 26332 + 26333 2 @@ -25537,7 +25822,7 @@ 1 2 - 35166 + 35167 @@ -25553,7 +25838,7 @@ 1 2 - 28532 + 28533 2 @@ -25578,11 +25863,11 @@ derspecifiers - 475548 + 475554 der_id - 473348 + 473354 spec_id @@ -25600,7 +25885,7 @@ 1 2 - 471148 + 471154 2 @@ -25646,11 +25931,11 @@ direct_base_offsets - 447049 + 447055 der_id - 447049 + 447055 offset @@ -25668,7 +25953,7 @@ 1 2 - 447049 + 447055 @@ -25865,23 +26150,23 @@ frienddecls - 767816 + 767534 id - 767816 + 767534 type_id - 54358 + 54340 decl_id - 100626 + 100695 location - 6058 + 6056 @@ -25895,7 +26180,7 @@ 1 2 - 767816 + 767534 @@ -25911,7 +26196,7 @@ 1 2 - 767816 + 767534 @@ -25927,7 +26212,7 @@ 1 2 - 767816 + 767534 @@ -25943,37 +26228,37 @@ 1 2 - 5584 + 5582 2 3 - 24978 + 25004 3 8 - 4806 + 4770 8 17 - 4738 + 4737 17 27 - 4467 + 4466 27 45 - 4298 + 4297 45 81 - 4738 + 4737 102 @@ -25994,37 +26279,37 @@ 1 2 - 5584 + 5582 2 3 - 24978 + 25004 3 8 - 4806 + 4770 8 17 - 4738 + 4737 17 27 - 4467 + 4466 27 45 - 4298 + 4297 45 81 - 4738 + 4737 102 @@ -26045,7 +26330,7 @@ 1 2 - 53004 + 52987 2 @@ -26066,32 +26351,32 @@ 1 2 - 67287 + 67502 2 3 - 8258 + 8120 3 9 - 9206 + 9203 9 24 - 7615 + 7613 24 - 127 - 7547 + 136 + 7646 - 135 + 136 191 - 710 + 609 @@ -26107,32 +26392,32 @@ 1 2 - 67287 + 67502 2 3 - 8258 + 8120 3 9 - 9206 + 9203 9 24 - 7615 + 7613 24 - 127 - 7547 + 136 + 7646 - 135 + 136 191 - 710 + 609 @@ -26148,7 +26433,7 @@ 1 2 - 99408 + 99477 2 @@ -26169,11 +26454,11 @@ 1 2 - 5686 + 5684 2 - 22496 + 22495 372 @@ -26190,7 +26475,7 @@ 1 2 - 5923 + 5921 2 @@ -26211,11 +26496,11 @@ 1 2 - 5720 + 5718 2 - 2841 + 2844 338 @@ -26226,19 +26511,19 @@ comments - 11208571 + 11208578 id - 11208571 + 11208578 contents - 4294963 + 4294966 location - 11208571 + 11208578 @@ -26252,7 +26537,7 @@ 1 2 - 11208571 + 11208578 @@ -26268,7 +26553,7 @@ 1 2 - 11208571 + 11208578 @@ -26284,7 +26569,7 @@ 1 2 - 3920498 + 3920500 2 @@ -26310,7 +26595,7 @@ 1 2 - 3920498 + 3920500 2 @@ -26336,7 +26621,7 @@ 1 2 - 11208571 + 11208578 @@ -26352,7 +26637,7 @@ 1 2 - 11208571 + 11208578 @@ -26362,15 +26647,15 @@ commentbinding - 3905315 + 3905318 id - 3342684 + 3342686 element - 3740172 + 3740175 @@ -26384,7 +26669,7 @@ 1 2 - 3281207 + 3281209 2 @@ -26405,7 +26690,7 @@ 1 2 - 3575029 + 3575031 2 @@ -26420,15 +26705,15 @@ exprconv - 9634070 + 9634075 converted - 9633964 + 9633970 conversion - 9634070 + 9634075 @@ -26442,7 +26727,7 @@ 1 2 - 9633859 + 9633864 2 @@ -26463,7 +26748,7 @@ 1 2 - 9634070 + 9634075 @@ -26473,22 +26758,22 @@ compgenerated - 9923433 + 9923218 id - 9923433 + 9923218 synthetic_destructor_call - 1666648 + 1666585 element - 1241201 + 1241154 i @@ -26496,7 +26781,7 @@ destructor_call - 1666648 + 1666585 @@ -26510,12 +26795,12 @@ 1 2 - 826180 + 826149 2 3 - 408242 + 408226 3 @@ -26536,12 +26821,12 @@ 1 2 - 826180 + 826149 2 3 - 408242 + 408226 3 @@ -26694,7 +26979,7 @@ 1 2 - 1666648 + 1666585 @@ -26710,7 +26995,7 @@ 1 2 - 1666648 + 1666585 @@ -26789,7 +27074,7 @@ namespacembrs - 2110396 + 2110397 parentid @@ -26797,7 +27082,7 @@ memberid - 2110396 + 2110397 @@ -26887,7 +27172,7 @@ 1 2 - 2110396 + 2110397 @@ -26897,11 +27182,11 @@ exprparents - 19456287 + 19456298 expr_id - 19456287 + 19456298 child_index @@ -26909,7 +27194,7 @@ parent_id - 12941374 + 12941382 @@ -26923,7 +27208,7 @@ 1 2 - 19456287 + 19456298 @@ -26939,7 +27224,7 @@ 1 2 - 19456287 + 19456298 @@ -27057,12 +27342,12 @@ 1 2 - 7395561 + 7395566 2 3 - 5083213 + 5083216 3 @@ -27083,12 +27368,12 @@ 1 2 - 7395561 + 7395566 2 3 - 5083213 + 5083216 3 @@ -27103,22 +27388,22 @@ expr_isload - 6898013 + 6897613 expr_id - 6898013 + 6897613 conversionkinds - 6051175 + 6051176 expr_id - 6051175 + 6051176 kind @@ -27136,7 +27421,7 @@ 1 2 - 6051175 + 6051176 @@ -27180,8 +27465,8 @@ 1 - 5832065 - 5832066 + 5832066 + 5832067 1 @@ -27192,11 +27477,11 @@ iscall - 5790816 + 5790597 caller - 5790816 + 5790597 kind @@ -27214,7 +27499,7 @@ 1 2 - 5790816 + 5790597 @@ -27376,23 +27661,23 @@ namequalifiers - 3042586 + 3042471 id - 3042586 + 3042471 qualifiableelement - 3042586 + 3042471 qualifyingelement - 47729 + 47727 location - 554605 + 554584 @@ -27406,7 +27691,7 @@ 1 2 - 3042586 + 3042471 @@ -27422,7 +27707,7 @@ 1 2 - 3042586 + 3042471 @@ -27438,7 +27723,7 @@ 1 2 - 3042586 + 3042471 @@ -27454,7 +27739,7 @@ 1 2 - 3042586 + 3042471 @@ -27470,7 +27755,7 @@ 1 2 - 3042586 + 3042471 @@ -27486,7 +27771,7 @@ 1 2 - 3042586 + 3042471 @@ -27502,7 +27787,7 @@ 1 2 - 31447 + 31446 2 @@ -27512,7 +27797,7 @@ 3 5 - 4140 + 4139 5 @@ -27538,7 +27823,7 @@ 1 2 - 31447 + 31446 2 @@ -27548,7 +27833,7 @@ 3 5 - 4140 + 4139 5 @@ -27574,7 +27859,7 @@ 1 2 - 34665 + 34664 2 @@ -27605,22 +27890,22 @@ 1 2 - 79413 + 79410 2 6 - 41015 + 41013 6 7 - 397795 + 397780 7 192 - 36381 + 36380 @@ -27636,22 +27921,22 @@ 1 2 - 79413 + 79410 2 6 - 41015 + 41013 6 7 - 397795 + 397780 7 192 - 36381 + 36380 @@ -27667,22 +27952,22 @@ 1 2 - 114958 + 114953 2 4 - 13321 + 13320 4 5 - 414055 + 414040 5 33 - 12270 + 12269 @@ -27692,15 +27977,15 @@ varbind - 8255498 + 8255503 expr - 8255498 + 8255503 var - 1050486 + 1050487 @@ -27714,7 +27999,7 @@ 1 2 - 8255498 + 8255503 @@ -27730,7 +28015,7 @@ 1 2 - 171553 + 171554 2 @@ -27760,7 +28045,7 @@ 7 9 - 80823 + 80824 9 @@ -27785,15 +28070,15 @@ funbind - 5806089 + 5805870 expr - 5803622 + 5803403 fun - 275286 + 275275 @@ -27807,7 +28092,7 @@ 1 2 - 5801155 + 5800937 2 @@ -27828,12 +28113,12 @@ 1 2 - 181071 + 181064 2 3 - 38312 + 38310 3 @@ -27843,12 +28128,12 @@ 4 8 - 22931 + 22930 8 37798 - 16067 + 16066 @@ -27858,11 +28143,11 @@ expr_allocator - 44948 + 44949 expr - 44948 + 44949 func @@ -27884,7 +28169,7 @@ 1 2 - 44948 + 44949 @@ -27900,7 +28185,7 @@ 1 2 - 44948 + 44949 @@ -28131,15 +28416,15 @@ expr_cond_guard - 897971 + 897972 cond - 897971 + 897972 guard - 897971 + 897972 @@ -28153,7 +28438,7 @@ 1 2 - 897971 + 897972 @@ -28169,7 +28454,7 @@ 1 2 - 897971 + 897972 @@ -28179,15 +28464,15 @@ expr_cond_true - 897967 + 897968 cond - 897967 + 897968 true - 897967 + 897968 @@ -28201,7 +28486,7 @@ 1 2 - 897967 + 897968 @@ -28217,7 +28502,7 @@ 1 2 - 897967 + 897968 @@ -28227,15 +28512,15 @@ expr_cond_false - 897971 + 897972 cond - 897971 + 897972 false - 897971 + 897972 @@ -28249,7 +28534,7 @@ 1 2 - 897971 + 897972 @@ -28265,7 +28550,7 @@ 1 2 - 897971 + 897972 @@ -28275,11 +28560,11 @@ values - 13541557 + 13541565 id - 13541557 + 13541565 str @@ -28297,7 +28582,7 @@ 1 2 - 13541557 + 13541565 @@ -28343,11 +28628,11 @@ valuetext - 6637698 + 6637657 id - 6637698 + 6637657 text @@ -28365,7 +28650,7 @@ 1 2 - 6637698 + 6637657 @@ -28395,7 +28680,7 @@ 7 - 593717 + 593719 27872 @@ -28406,15 +28691,15 @@ valuebind - 13649707 + 13649715 val - 13541557 + 13541565 expr - 13649707 + 13649715 @@ -28428,7 +28713,7 @@ 1 2 - 13451399 + 13451407 2 @@ -28449,7 +28734,7 @@ 1 2 - 13649707 + 13649715 @@ -28459,15 +28744,15 @@ fieldoffsets - 1500528 + 1502766 id - 1500528 + 1502766 byteoffset - 31369 + 31367 bitoffset @@ -28485,7 +28770,7 @@ 1 2 - 1500528 + 1502766 @@ -28501,7 +28786,7 @@ 1 2 - 1500528 + 1502766 @@ -28517,7 +28802,7 @@ 1 2 - 17700 + 17698 2 @@ -28532,22 +28817,22 @@ 5 12 - 2614 + 2613 12 35 - 2450 + 2396 35 - 211 + 200 2396 - 250 - 5971 - 1089 + 210 + 5988 + 1143 @@ -28563,7 +28848,7 @@ 1 2 - 30335 + 30333 2 @@ -28592,13 +28877,13 @@ 54 - 45 - 46 + 46 + 47 54 - 46 - 47 + 47 + 48 54 @@ -28607,18 +28892,18 @@ 54 - 65 - 66 + 67 + 68 54 - 82 - 83 + 84 + 85 54 - 27193 - 27194 + 27230 + 27231 54 @@ -28851,23 +29136,23 @@ initialisers - 2244826 + 2245206 init - 2244826 + 2245206 var - 978848 + 979091 expr - 2244826 + 2245206 location - 515723 + 515984 @@ -28881,7 +29166,7 @@ 1 2 - 2244826 + 2245206 @@ -28897,7 +29182,7 @@ 1 2 - 2244826 + 2245206 @@ -28913,7 +29198,7 @@ 1 2 - 2244826 + 2245206 @@ -28929,17 +29214,17 @@ 1 2 - 868819 + 869052 2 15 - 37292 + 37306 16 25 - 72737 + 72733 @@ -28955,17 +29240,17 @@ 1 2 - 868819 + 869052 2 15 - 37292 + 37306 16 25 - 72737 + 72733 @@ -28981,7 +29266,7 @@ 1 2 - 978840 + 979083 2 @@ -29002,7 +29287,7 @@ 1 2 - 2244826 + 2245206 @@ -29018,7 +29303,7 @@ 1 2 - 2244826 + 2245206 @@ -29034,7 +29319,7 @@ 1 2 - 2244826 + 2245206 @@ -29050,22 +29335,22 @@ 1 2 - 414196 + 414456 2 3 - 33502 + 33500 3 13 - 41940 + 41937 13 - 111925 - 26084 + 111939 + 26090 @@ -29081,17 +29366,17 @@ 1 2 - 443422 + 443688 2 3 - 34409 + 34407 3 - 12247 - 37891 + 12248 + 37889 @@ -29107,22 +29392,22 @@ 1 2 - 414196 + 414456 2 3 - 33502 + 33500 3 13 - 41940 + 41937 13 - 111925 - 26084 + 111939 + 26090 @@ -29132,26 +29417,26 @@ braced_initialisers - 67652 + 67650 init - 67652 + 67650 expr_ancestor - 1672611 + 1672548 exp - 1672611 + 1672548 ancestor - 837120 + 837089 @@ -29165,7 +29450,7 @@ 1 2 - 1672611 + 1672548 @@ -29181,17 +29466,17 @@ 1 2 - 17032 + 17031 2 3 - 810049 + 810018 3 19 - 10039 + 10038 @@ -29201,11 +29486,11 @@ exprs - 25213250 + 25213265 id - 25213250 + 25213265 kind @@ -29213,7 +29498,7 @@ location - 10586806 + 10586812 @@ -29227,7 +29512,7 @@ 1 2 - 25213250 + 25213265 @@ -29243,7 +29528,7 @@ 1 2 - 25213250 + 25213265 @@ -29421,7 +29706,7 @@ 1 2 - 8904640 + 8904645 2 @@ -29452,7 +29737,7 @@ 1 2 - 9044058 + 9044064 2 @@ -29462,7 +29747,7 @@ 3 32 - 768383 + 768384 @@ -29472,15 +29757,15 @@ expr_reuse - 844478 + 844446 reuse - 844478 + 844446 original - 844478 + 844446 value_category @@ -29498,7 +29783,7 @@ 1 2 - 844478 + 844446 @@ -29514,7 +29799,7 @@ 1 2 - 844478 + 844446 @@ -29530,7 +29815,7 @@ 1 2 - 844478 + 844446 @@ -29546,7 +29831,7 @@ 1 2 - 844478 + 844446 @@ -29598,11 +29883,11 @@ expr_types - 25213250 + 25213265 id - 25213250 + 25213265 typeid @@ -29624,7 +29909,7 @@ 1 2 - 25213250 + 25213265 @@ -29640,7 +29925,7 @@ 1 2 - 25213250 + 25213265 @@ -29671,7 +29956,7 @@ 4 5 - 14530 + 14531 5 @@ -29793,7 +30078,7 @@ type_id - 27212 + 27213 @@ -29828,7 +30113,7 @@ 2 3 - 14384 + 14385 3 @@ -29906,11 +30191,11 @@ param_ref_to_this - 24952 + 24951 expr - 24952 + 24951 @@ -31253,15 +31538,15 @@ condition_decl_bind - 407684 + 407669 expr - 407684 + 407669 decl - 407684 + 407669 @@ -31275,7 +31560,7 @@ 1 2 - 407684 + 407669 @@ -31291,7 +31576,7 @@ 1 2 - 407684 + 407669 @@ -31301,11 +31586,11 @@ typeid_bind - 47588 + 47589 expr - 47588 + 47589 type_id @@ -31323,7 +31608,7 @@ 1 2 - 47588 + 47589 @@ -31359,15 +31644,15 @@ uuidof_bind - 26691 + 26787 expr - 26691 + 26787 type_id - 26440 + 26536 @@ -31381,7 +31666,7 @@ 1 2 - 26691 + 26787 @@ -31397,7 +31682,7 @@ 1 2 - 26229 + 26325 2 @@ -31543,11 +31828,11 @@ lambdas - 18998 + 18997 expr - 18998 + 18997 default_capture @@ -31573,7 +31858,7 @@ 1 2 - 18998 + 18997 @@ -31589,7 +31874,7 @@ 1 2 - 18998 + 18997 @@ -31605,7 +31890,7 @@ 1 2 - 18998 + 18997 @@ -31789,15 +32074,15 @@ lambda_capture - 31866 + 31864 id - 31866 + 31864 lambda - 15443 + 15442 index @@ -31805,7 +32090,7 @@ field - 31866 + 31864 captured_by_reference @@ -31817,7 +32102,7 @@ location - 17888 + 17887 @@ -31831,7 +32116,7 @@ 1 2 - 31866 + 31864 @@ -31847,7 +32132,7 @@ 1 2 - 31866 + 31864 @@ -31863,7 +32148,7 @@ 1 2 - 31866 + 31864 @@ -31879,7 +32164,7 @@ 1 2 - 31866 + 31864 @@ -31895,7 +32180,7 @@ 1 2 - 31866 + 31864 @@ -31911,7 +32196,7 @@ 1 2 - 31866 + 31864 @@ -31927,7 +32212,7 @@ 1 2 - 8187 + 8186 2 @@ -31937,7 +32222,7 @@ 3 4 - 1652 + 1651 4 @@ -31963,7 +32248,7 @@ 1 2 - 8187 + 8186 2 @@ -31973,7 +32258,7 @@ 3 4 - 1652 + 1651 4 @@ -31999,7 +32284,7 @@ 1 2 - 8187 + 8186 2 @@ -32009,7 +32294,7 @@ 3 4 - 1652 + 1651 4 @@ -32035,12 +32320,12 @@ 1 2 - 14204 + 14203 2 3 - 1239 + 1238 @@ -32056,7 +32341,7 @@ 1 2 - 15321 + 15320 2 @@ -32077,7 +32362,7 @@ 1 2 - 8778 + 8777 2 @@ -32539,7 +32824,7 @@ 1 2 - 31866 + 31864 @@ -32555,7 +32840,7 @@ 1 2 - 31866 + 31864 @@ -32571,7 +32856,7 @@ 1 2 - 31866 + 31864 @@ -32587,7 +32872,7 @@ 1 2 - 31866 + 31864 @@ -32603,7 +32888,7 @@ 1 2 - 31866 + 31864 @@ -32619,7 +32904,7 @@ 1 2 - 31866 + 31864 @@ -32877,7 +33162,7 @@ 1 2 - 15645 + 15644 2 @@ -32903,7 +33188,7 @@ 1 2 - 16220 + 16219 2 @@ -32929,7 +33214,7 @@ 1 2 - 17200 + 17199 2 @@ -32950,7 +33235,7 @@ 1 2 - 15645 + 15644 2 @@ -32976,7 +33261,7 @@ 1 2 - 17864 + 17863 2 @@ -32997,7 +33282,7 @@ 1 2 - 17888 + 17887 @@ -33133,11 +33418,11 @@ stmts - 6349654 + 6349367 id - 6349654 + 6349367 kind @@ -33145,7 +33430,7 @@ location - 2676166 + 2676092 @@ -33159,7 +33444,7 @@ 1 2 - 6349654 + 6349367 @@ -33175,7 +33460,7 @@ 1 2 - 6349654 + 6349367 @@ -33274,13 +33559,13 @@ 8 - 119906 - 119907 + 119911 + 119912 8 - 200140 - 200141 + 200145 + 200146 8 @@ -33385,13 +33670,13 @@ 8 - 49040 - 49041 + 49045 + 49046 8 - 86406 - 86407 + 86411 + 86412 8 @@ -33413,22 +33698,22 @@ 1 2 - 2218094 + 2218046 2 3 - 181666 + 181655 3 10 - 201547 + 201535 10 1789 - 74859 + 74855 @@ -33444,12 +33729,12 @@ 1 2 - 2593460 + 2593391 2 10 - 82706 + 82701 @@ -33614,15 +33899,15 @@ if_then - 990318 + 990319 if_stmt - 990318 + 990319 then_id - 990318 + 990319 @@ -33636,7 +33921,7 @@ 1 2 - 990318 + 990319 @@ -33652,7 +33937,7 @@ 1 2 - 990318 + 990319 @@ -33662,15 +33947,15 @@ if_else - 435785 + 435769 if_stmt - 435785 + 435769 else_id - 435785 + 435769 @@ -33684,7 +33969,7 @@ 1 2 - 435785 + 435769 @@ -33700,7 +33985,7 @@ 1 2 - 435785 + 435769 @@ -34094,11 +34379,11 @@ switch_case - 833624 + 833592 switch_stmt - 410623 + 410607 index @@ -34106,7 +34391,7 @@ case_id - 833624 + 833592 @@ -34125,12 +34410,12 @@ 2 3 - 407748 + 407733 3 19 - 2853 + 2852 @@ -34151,12 +34436,12 @@ 2 3 - 407748 + 407733 3 19 - 2853 + 2852 @@ -34314,7 +34599,7 @@ 1 2 - 833624 + 833592 @@ -34330,7 +34615,7 @@ 1 2 - 833624 + 833592 @@ -34340,15 +34625,15 @@ switch_body - 410623 + 410607 switch_stmt - 410623 + 410607 body_id - 410623 + 410607 @@ -34362,7 +34647,7 @@ 1 2 - 410623 + 410607 @@ -34378,7 +34663,7 @@ 1 2 - 410623 + 410607 @@ -34580,19 +34865,19 @@ stmtparents - 5611093 + 5610809 id - 5611093 + 5610809 index - 15726 + 15725 parent - 2374340 + 2374243 @@ -34606,7 +34891,7 @@ 1 2 - 5611093 + 5610809 @@ -34622,7 +34907,7 @@ 1 2 - 5611093 + 5610809 @@ -34682,7 +34967,7 @@ 78 - 209703 + 209708 898 @@ -34743,7 +35028,7 @@ 78 - 209703 + 209708 898 @@ -34760,32 +35045,32 @@ 1 2 - 1355057 + 1355019 2 3 - 515763 + 515733 3 4 - 151046 + 151038 4 6 - 155241 + 155232 6 16 - 178313 + 178303 16 1943 - 18917 + 18916 @@ -34801,32 +35086,32 @@ 1 2 - 1355057 + 1355019 2 3 - 515763 + 515733 3 4 - 151046 + 151038 4 6 - 155241 + 155232 6 16 - 178313 + 178303 16 1943 - 18917 + 18916 @@ -34836,22 +35121,22 @@ ishandler - 43218 + 43224 block - 43218 + 43224 stmt_decl_bind - 723619 + 723577 stmt - 713083 + 713042 num @@ -34859,7 +35144,7 @@ decl - 723619 + 723577 @@ -34873,12 +35158,12 @@ 1 2 - 705641 + 705600 2 10 - 7442 + 7441 @@ -34894,12 +35179,12 @@ 1 2 - 705641 + 705600 2 10 - 7442 + 7441 @@ -35027,7 +35312,7 @@ 1 2 - 723619 + 723577 @@ -35043,7 +35328,7 @@ 1 2 - 723619 + 723577 @@ -35053,11 +35338,11 @@ stmt_decl_entry_bind - 723619 + 723577 stmt - 713083 + 713042 num @@ -35065,7 +35350,7 @@ decl_entry - 723619 + 723577 @@ -35079,12 +35364,12 @@ 1 2 - 705641 + 705600 2 10 - 7442 + 7441 @@ -35100,12 +35385,12 @@ 1 2 - 705641 + 705600 2 10 - 7442 + 7441 @@ -35233,7 +35518,7 @@ 1 2 - 723619 + 723577 @@ -35249,7 +35534,7 @@ 1 2 - 723619 + 723577 @@ -35259,15 +35544,15 @@ blockscope - 1640354 + 1640355 block - 1640354 + 1640355 enclosing - 1423689 + 1423690 @@ -35281,7 +35566,7 @@ 1 2 - 1640354 + 1640355 @@ -35297,7 +35582,7 @@ 1 2 - 1291401 + 1291402 2 @@ -35498,11 +35783,11 @@ preprocdirects - 5395212 + 5395215 id - 5395212 + 5395215 kind @@ -35510,7 +35795,7 @@ location - 5392101 + 5392104 @@ -35524,7 +35809,7 @@ 1 2 - 5395212 + 5395215 @@ -35540,7 +35825,7 @@ 1 2 - 5395212 + 5395215 @@ -35688,7 +35973,7 @@ 1 2 - 5391976 + 5391979 26 @@ -35709,7 +35994,7 @@ 1 2 - 5392101 + 5392104 @@ -35741,7 +36026,7 @@ 1 2 - 648002 + 648003 2 @@ -35777,11 +36062,11 @@ preproctrue - 438182 + 438183 branch - 438182 + 438183 @@ -35799,19 +36084,19 @@ preproctext - 4341756 + 4341759 id - 4341756 + 4341759 head - 2947934 + 2947935 body - 1679306 + 1679307 @@ -35825,7 +36110,7 @@ 1 2 - 4341756 + 4341759 @@ -35841,7 +36126,7 @@ 1 2 - 4341756 + 4341759 @@ -35857,12 +36142,12 @@ 1 2 - 2749812 + 2749813 2 798 - 198121 + 198122 @@ -35878,7 +36163,7 @@ 1 2 - 2866918 + 2866919 2 @@ -35899,7 +36184,7 @@ 1 2 - 1531462 + 1531463 2 @@ -35925,7 +36210,7 @@ 1 2 - 1535693 + 1535694 2 @@ -35945,11 +36230,11 @@ includes - 317337 + 317338 id - 317337 + 317338 included @@ -35967,7 +36252,7 @@ 1 2 - 317337 + 317338 @@ -36119,11 +36404,11 @@ link_parent - 30224787 + 30225171 element - 3843719 + 3843767 link_target @@ -36141,17 +36426,17 @@ 1 2 - 527063 + 527070 2 9 - 26772 + 26773 9 10 - 3289882 + 3289924 diff --git a/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/in_trap_or_tag.ql b/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/in_trap_or_tag.ql new file mode 100644 index 000000000000..331806e01fd3 --- /dev/null +++ b/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/in_trap_or_tag.ql @@ -0,0 +1,11 @@ +class Element extends @element { + string toString() { none() } +} + +class Trap extends @trap { + string toString() { none() } +} + +from Element e, Trap trap +where in_trap(e, trap) +select e, trap diff --git a/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/old.dbscheme b/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/old.dbscheme new file mode 100644 index 000000000000..7e7c2f55670f --- /dev/null +++ b/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/old.dbscheme @@ -0,0 +1,2517 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +/** + * Gives the TRAP filename that `trap` is associated with. + * For debugging only. + */ +trap_filename( + int trap: @trap, + string filename: string ref +); + +/** + * In `build-mode: none` overlay mode, indicates that `source_file` + * (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the + * TRAP file corresponding to `foo.c`, something it transitively + * includes, or a template instantiation it transitively uses. + */ +source_file_uses_trap( + string source_file: string ref, + int trap_file: @trap ref +); + +/** + * Holds if there is a definition of `element` in TRAP file `trap_file`. + */ +in_trap( + int element: @element ref, + int trap_file: @trap ref +); + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +// ... 40 _Decimal32 +// ... 41 _Decimal64 +// ... 42 _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +case @type_operator.kind of + 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +case @usertype.kind of + 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +| 394 = @isinvocable +| 395 = @isnothrowinvocable +| 396 = @isbitwisecloneable +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + | @isinvocable + | @isnothrowinvocable + | @isbitwisecloneable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +param_ref_to_this( + int expr: @param_ref ref +) + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 17 = @ppd_embed +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +embeds( + unique int id: @ppd_embed ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/semmlecode.cpp.dbscheme new file mode 100644 index 000000000000..770002bb0232 --- /dev/null +++ b/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/semmlecode.cpp.dbscheme @@ -0,0 +1,2545 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +/** + * Gives the TRAP filename that `trap` is associated with. + * For debugging only. + */ +trap_filename( + int trap: @trap, + string filename: string ref +); + +/** + * Gives the tag name for `tag`. + * For debugging only. + */ +tag_name( + int tag: @tag, + string name: string ref +); + +@trap_or_tag = @tag | @trap; + +/** + * Gives the name for the source file. + */ +source_file_name( + int sf: @source_file, + string name: string ref +); + +/** + * In `build-mode: none` overlay mode, indicates that `source_file` + * (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the + * TRAP file corresponding to `foo.c`, something it transitively + * includes, or a template instantiation it transitively uses. + */ +source_file_uses_trap( + int source_file: @source_file ref, + int trap_file: @trap ref +); + +/** + * In `build-mode: none` overlay mode, indicates that the TRAP file + * `trap_file` uses tag `tag`. + */ +trap_uses_tag( + int trap_file: @trap ref, + int tag: @tag ref +); + +/** + * Holds if there is a definition of `element` in TRAP file or tag `t`. + */ +in_trap_or_tag( + int element: @element ref, + int t: @trap_or_tag ref +); + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +// ... 40 _Decimal32 +// ... 41 _Decimal64 +// ... 42 _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +case @type_operator.kind of + 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +case @usertype.kind of + 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +| 394 = @isinvocable +| 395 = @isnothrowinvocable +| 396 = @isbitwisecloneable +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + | @isinvocable + | @isnothrowinvocable + | @isbitwisecloneable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +param_ref_to_this( + int expr: @param_ref ref +) + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 17 = @ppd_embed +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +embeds( + unique int id: @ppd_embed ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/source_files.ql b/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/source_files.ql new file mode 100644 index 000000000000..19c08d64ece8 --- /dev/null +++ b/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/source_files.ql @@ -0,0 +1,22 @@ +newtype TSourceFile = MkSourceFile(string name) { source_file_uses_trap(name, _) } + +module FreshSourceFile = QlBuiltins::NewEntity; + +class SourceFile extends FreshSourceFile::EntityId { + string toString() { none() } +} + +class Trap extends @trap { + string toString() { none() } +} + +query predicate mk_source_file_name(SourceFile source_file, string name) { + source_file = FreshSourceFile::map(MkSourceFile(name)) +} + +query predicate mk_source_file_uses_trap(SourceFile source_file, Trap trap) { + exists(string name | + source_file_uses_trap(name, trap) and + mk_source_file_name(source_file, name) + ) +} diff --git a/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/upgrade.properties b/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/upgrade.properties new file mode 100644 index 000000000000..26400eeded84 --- /dev/null +++ b/cpp/ql/lib/upgrades/7e7c2f55670f8123d514cf542ccb1938118ac561/upgrade.properties @@ -0,0 +1,6 @@ +description: Add source_file_name +compatibility: backwards +source_file_uses_trap.rel: run source_files.ql mk_source_file_uses_trap +source_file_name.rel: run source_files.ql mk_source_file_name +in_trap.rel: delete +in_trap_or_tag.rel: run in_trap_or_tag.ql diff --git a/cpp/ql/lib/upgrades/9439176c1d1312787926458dd54d65a849069118/old.dbscheme b/cpp/ql/lib/upgrades/9439176c1d1312787926458dd54d65a849069118/old.dbscheme new file mode 100644 index 000000000000..9439176c1d13 --- /dev/null +++ b/cpp/ql/lib/upgrades/9439176c1d1312787926458dd54d65a849069118/old.dbscheme @@ -0,0 +1,2489 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +// ... 40 _Decimal32 +// ... 41 _Decimal64 +// ... 42 _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +case @type_operator.kind of + 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +case @usertype.kind of + 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +| 394 = @isinvocable +| 395 = @isnothrowinvocable +| 396 = @isbitwisecloneable +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + | @isinvocable + | @isnothrowinvocable + | @isbitwisecloneable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +param_ref_to_this( + int expr: @param_ref ref +) + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 17 = @ppd_embed +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +embeds( + unique int id: @ppd_embed ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/9439176c1d1312787926458dd54d65a849069118/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/9439176c1d1312787926458dd54d65a849069118/semmlecode.cpp.dbscheme new file mode 100644 index 000000000000..7e7c2f55670f --- /dev/null +++ b/cpp/ql/lib/upgrades/9439176c1d1312787926458dd54d65a849069118/semmlecode.cpp.dbscheme @@ -0,0 +1,2517 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +/** + * Gives the TRAP filename that `trap` is associated with. + * For debugging only. + */ +trap_filename( + int trap: @trap, + string filename: string ref +); + +/** + * In `build-mode: none` overlay mode, indicates that `source_file` + * (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the + * TRAP file corresponding to `foo.c`, something it transitively + * includes, or a template instantiation it transitively uses. + */ +source_file_uses_trap( + string source_file: string ref, + int trap_file: @trap ref +); + +/** + * Holds if there is a definition of `element` in TRAP file `trap_file`. + */ +in_trap( + int element: @element ref, + int trap_file: @trap ref +); + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +// ... 40 _Decimal32 +// ... 41 _Decimal64 +// ... 42 _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +case @type_operator.kind of + 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +case @usertype.kind of + 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +| 394 = @isinvocable +| 395 = @isnothrowinvocable +| 396 = @isbitwisecloneable +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + | @isinvocable + | @isnothrowinvocable + | @isbitwisecloneable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +param_ref_to_this( + int expr: @param_ref ref +) + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 17 = @ppd_embed +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +embeds( + unique int id: @ppd_embed ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/9439176c1d1312787926458dd54d65a849069118/upgrade.properties b/cpp/ql/lib/upgrades/9439176c1d1312787926458dd54d65a849069118/upgrade.properties new file mode 100644 index 000000000000..a50cc3b23134 --- /dev/null +++ b/cpp/ql/lib/upgrades/9439176c1d1312787926458dd54d65a849069118/upgrade.properties @@ -0,0 +1,2 @@ +description: Add trap_filename, source_file_uses_trap and in_trap relations +compatibility: full diff --git a/cpp/ql/src/CHANGELOG.md b/cpp/ql/src/CHANGELOG.md index 61792c6a700b..640b66a910dd 100644 --- a/cpp/ql/src/CHANGELOG.md +++ b/cpp/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.5.11 + +No user-facing changes. + ## 1.5.10 No user-facing changes. diff --git a/cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll b/cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll index 2b68730fa58d..99981873d26d 100644 --- a/cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll +++ b/cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll @@ -308,3 +308,37 @@ private module PossibleYearArithmeticOperationCheckConfig implements DataFlow::C module PossibleYearArithmeticOperationCheckFlow = TaintTracking::Global; + +/** + * A time conversion function where either + * 1) an incorrect leap year date would result in an error that can be checked from the return value or + * 2) an incorrect leap year date is auto corrected (no checks required) + */ +class TimeConversionFunction extends Function { + boolean autoLeapYearCorrecting; + + TimeConversionFunction() { + autoLeapYearCorrecting = false and + ( + this.getName() = + [ + "FileTimeToSystemTime", "SystemTimeToFileTime", "SystemTimeToTzSpecificLocalTime", + "SystemTimeToTzSpecificLocalTimeEx", "TzSpecificLocalTimeToSystemTime", + "TzSpecificLocalTimeToSystemTimeEx", "RtlLocalTimeToSystemTime", + "RtlTimeToSecondsSince1970", "_mkgmtime", "SetSystemTime", "VarUdateFromDate", "from_tm" + ] + or + // Matches all forms of GetDateFormat, e.g. GetDateFormatA/W/Ex + this.getName().matches("GetDateFormat%") + ) + or + autoLeapYearCorrecting = true and + this.getName() = + ["mktime", "_mktime32", "_mktime64", "SystemTimeToVariantTime", "VariantTimeToSystemTime"] + } + + /** + * Holds if the function is expected to auto convert a bad leap year date. + */ + predicate isAutoLeapYearCorrecting() { autoLeapYearCorrecting = true } +} diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql index 03570b3611cd..0a52a2b0ff4c 100644 --- a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql +++ b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql @@ -1,7 +1,7 @@ /** * @name Year field changed using an arithmetic operation without checking for leap year * @description A field that represents a year is being modified by an arithmetic operation, but no proper check for leap years can be detected afterwards. - * @kind problem + * @kind path-problem * @problem.severity warning * @id cpp/leap-year/unchecked-after-arithmetic-year-modification * @precision medium @@ -11,49 +11,844 @@ import cpp import LeapYear +import semmle.code.cpp.controlflow.IRGuards -from Variable var, LeapYearFieldAccess yfa -where - exists(VariableAccess va | - yfa.getQualifier() = va and - var.getAnAccess() = va and - // The year is modified with an arithmetic operation. Avoid values that are likely false positives - yfa.isModifiedByArithmeticOperationNotForNormalization() and - // Avoid false positives - not ( - // If there is a local check for leap year after the modification - exists(LeapYearFieldAccess yfacheck | - yfacheck.getQualifier() = var.getAnAccess() and - yfacheck.isUsedInCorrectLeapYearCheck() and - yfacheck.getBasicBlock() = yfa.getBasicBlock().getASuccessor*() +/** + * Functions whose operations should never be considered a + * source or sink of a dangerous leap year operation. + * The general concept is to add conversion functions + * that convert one time type to another. Often + * other ignorable operation heuristics will filter these, + * but some cases, the simplest approach is to simply filter + * the function entirely. + * Note that flow through these functions should still be allowed + * we just cannot start or end flow from an operation to a + * year assignment in one of these functions. + */ +class IgnorableFunction extends Function { + IgnorableFunction() { + // arithmetic in known time conversion functions may look like dangerous operations + // we assume all known time conversion functions are safe. + this instanceof TimeConversionFunction + or + // Helper utility in postgres with string time conversions + this.getName() = "DecodeISO8601Interval" + or + // helper utility for date conversions in qtbase + this.getName() = "adjacentDay" + or + // Windows API function that does timezone conversions + this.getName().matches("%SystemTimeToTzSpecificLocalTime%") + or + // Windows APIs that do time conversions + this.getName().matches("%localtime%\\_s%") + or + // Windows APIs that do time conversions + this.getName().matches("%SpecificLocalTimeToSystemTime%") + or + // postgres function for diffing timestamps, date for leap year + // is not applicable. + this.getName().toLowerCase().matches("%timestamp%age%") + or + // Reading byte streams often involves operations of some base, but that's + // not a real source of leap year issues. + this.getName().toLowerCase().matches("%read%bytes%") + or + // A postgres function for local time conversions + // conversion operations (from one time structure to another) are generally ignorable + this.getName() = "localsub" + or + // Indication of a calendar not applicable to + // gregorian leap year, e.g., Hijri, Persian, Hebrew + this.getName().toLowerCase().matches("%hijri%") + or + this.getFile().getBaseName().toLowerCase().matches("%hijri%") + or + this.getName().toLowerCase().matches("%persian%") + or + this.getFile().getBaseName().toLowerCase().matches("%persian%") + or + this.getName().toLowerCase().matches("%hebrew%") + or + this.getFile().getBaseName().toLowerCase().matches("%hebrew%") + or + // misc. from string/char converters heuristic + this.getName() + .toLowerCase() + .matches(["%char%to%", "%string%to%", "%from%char%", "%from%string%"]) + or + // boost's gregorian.cpp has year manipulations that are checked in complex ways. + // ignore the entire file as a source or sink. + this.getFile().getAbsolutePath().toLowerCase().matches("%boost%gregorian.cpp%") + } +} + +/** + * The set of expressions which are ignorable; either because they seem to not be part of a year mutation, + * or because they seem to be a conversion pattern of mapping date scalars. + */ +abstract class IgnorableOperation extends Expr { } + +class IgnorableExprRem extends IgnorableOperation instanceof RemExpr { } + +/** + * An operation with 10, 100, 1000, 10000 as an operand is often a sign of conversion + * or atoi. + */ +class IgnorableExpr10MultipleComponent extends IgnorableOperation { + IgnorableExpr10MultipleComponent() { + this.(Operation).getAnOperand().getValue().toInt() in [10, 100, 1000, 10000] + or + exists(AssignOperation a | a.getRValue() = this | + a.getRValue().getValue().toInt() in [10, 100, 1000, 10000] + ) + } +} + +/** + * An operation involving a sub expression with char literal `48`, ignore as a likely string conversion. For example: `X - '0'` + */ +class IgnorableExpr48Mapping extends IgnorableOperation { + IgnorableExpr48Mapping() { + this.(SubExpr).getRightOperand().getValue().toInt() = 48 + or + exists(AssignSubExpr e | e.getRValue() = this | e.getRValue().getValue().toInt() = 48) + } +} + +/** + * A binary or arithmetic operation whereby one of the components is textual or a string. + */ +class IgnorableCharLiteralArithmetic extends IgnorableOperation { + IgnorableCharLiteralArithmetic() { + this.(BinaryArithmeticOperation).getAnOperand() instanceof TextLiteral + or + this instanceof TextLiteral and + any(AssignArithmeticOperation arith).getRValue() = this + } +} + +/** + * Constants often used in date conversions (from one date data type to another) + * Numerous examples exist, like 1900 or 2000 that convert years from one + * representation to another. + * Also '0' is sometimes observed as an atoi style conversion. + */ +bindingset[c] +predicate isLikelyConversionConstant(int c) { + exists(int i | i = c.abs() | + i = + [ + 146097, // days in 400-year Gregorian cycle + 36524, // days in 100-year Gregorian subcycle + 1461, // days in 4-year cycle (incl. 1 leap) + 32044, // Fliegel-van Flandern JDN epoch shift + 1721425, // JDN of 0001-01-01 (Gregorian) + 1721119, // alt epoch offset + 2400000, // MJD -> JDN conversion + 2400001, // alt MJD -> JDN conversion + 2141, // fixed-point month/day extraction + 65536, // observed in some conversions + 7834, // observed in some conversions + 256, // observed in some conversions + 292275056, // qdatetime.h Qt Core year range first year constant + 292278994, // qdatetime.h Qt Core year range last year constant + 1601, // Windows FILETIME epoch start year + 1970, // Unix epoch start year + 70, // Unix epoch start year short form + 1899, // Observed in uses with 1900 to address off by one scenarios + 1900, // Used when converting a 2 digit year + 2000, // Used when converting a 2 digit year + 1400, // Hijri base year, used when converting a 2 digit year + 1980, // FAT filesystem epoch start year + 227013, // constant observed for Hirji year conversion, and Hirji years are not applicable for gregorian leap year + 10631, // constant observed for Hirji year conversion, and Hirji years are not applicable for gregorian leap year, + 80, // 1980/01/01 is the start of the epoch on DOS + 0 + ] + ) +} + +/** + * An `isLikelyConversionConstant` constant indicates conversion that is ignorable, e.g., + * julian to gregorian conversion or conversions from linux time structs + * that start at 1900, etc. + */ +class IgnorableConstantArithmetic extends IgnorableOperation { + IgnorableConstantArithmetic() { + exists(int i | isLikelyConversionConstant(i) | + this.(Operation).getAnOperand().getValue().toInt() = i + or + exists(AssignArithmeticOperation a | this = a.getRValue() | + a.getRValue().getValue().toInt() = i + ) + ) + } +} + +// If a unary minus assume it is some sort of conversion +class IgnorableUnaryMinus extends IgnorableOperation { + IgnorableUnaryMinus() { + this instanceof UnaryMinusExpr + or + this.(Operation).getAnOperand() instanceof UnaryMinusExpr + } +} + +/** + * An argument to a function is ignorable if the function that is called is an ignored function + */ +class OperationAsArgToIgnorableFunction extends IgnorableOperation { + OperationAsArgToIgnorableFunction() { + exists(Call c | + c.getAnArgument().getAChild*() = this and + c.getTarget() instanceof IgnorableFunction + ) + } +} + +/** + * A binary operation on two literals means the result is constant/known + * and the operation is basically ignorable (it's not a real operation but + * probably one visual simplicity what it means). + */ +class ConstantBinaryArithmeticOperation extends IgnorableOperation, BinaryArithmeticOperation { + ConstantBinaryArithmeticOperation() { + this.getLeftOperand() instanceof Literal and + this.getRightOperand() instanceof Literal + } +} + +class IgnorableBinaryBitwiseOperation extends IgnorableOperation instanceof BinaryBitwiseOperation { +} + +class IgnorableUnaryBitwiseOperation extends IgnorableOperation instanceof UnaryBitwiseOperation { } + +class IgnorableAssignmentBitwiseOperation extends IgnorableOperation instanceof AssignBitwiseOperation +{ } + +/** + * An arithmetic operation where one of the operands is a pointer or char type, ignore it + */ +class IgnorablePointerOrCharArithmetic extends IgnorableOperation { + IgnorablePointerOrCharArithmetic() { + this instanceof BinaryArithmeticOperation and + exists(Expr op | op = this.(BinaryArithmeticOperation).getAnOperand() | + op.getUnspecifiedType() instanceof PointerType + or + op.getUnspecifiedType() instanceof CharType + or + // Operations on calls to functions that accept char or char* + op.(Call).getAnArgument().getUnspecifiedType().stripType() instanceof CharType + or + // Operations on calls to functions named like "strlen", "wcslen", etc + // NOTE: workaround for cases where the wchar_t type is not a char, but an unsigned short + // unclear if there is a best way to filter cases like these out based on type info. + op.(Call).getTarget().getName().matches("%len%") + ) + or + exists(AssignArithmeticOperation a | a.getRValue() = this | + exists(Expr op | op = a.getAnOperand() | + op.getUnspecifiedType() instanceof PointerType + or + op.getUnspecifiedType() instanceof CharType + or + // Operations on calls to functions that accept char or char* + op.(Call).getAnArgument().getUnspecifiedType().stripType() instanceof CharType + ) + or + // Operations on calls to functions named like "strlen", "wcslen", etc + // for example `strlen(foo) + bar` + this.(BinaryArithmeticOperation).getAnOperand().(Call).getTarget().getName().matches("%len%") + ) + } +} + +/** + * Holds for an expression that is an add or similar operation that could flow to a Year field. + */ +predicate isOperationSourceCandidate(Expr e) { + not e instanceof IgnorableOperation and + exists(Function f | + f = e.getEnclosingFunction() and + not f instanceof IgnorableFunction + ) and + ( + e instanceof SubExpr + or + e instanceof AddExpr + or + e instanceof CrementOperation + or + e instanceof AssignSubExpr + or + e instanceof AssignAddExpr + ) +} + +/** + * A data flow that tracks an ignorable operation (such as a bitwise operation) to an operation source, so we may disqualify it. + */ +module IgnorableOperationToOperationSourceCandidateConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node n) { n.asExpr() instanceof IgnorableOperation } + + predicate isSink(DataFlow::Node n) { isOperationSourceCandidate(n.asExpr()) } + + // looking for sources and sinks in the same function + DataFlow::FlowFeature getAFeature() { + result instanceof DataFlow::FeatureEqualSourceSinkCallContext + } +} + +module IgnorableOperationToOperationSourceCandidateFlow = + TaintTracking::Global; + +/** + * The set of all expressions which is a candidate expression and also does not flow from to to some ignorable expression (eg. bitwise op) + * ``` + * a = something <<< 2; + * myDate.year = a + 1; // invalid + * ... + * a = someDate.year + 1; + * myDate.year = a; // valid + * ``` + */ +class OperationSource extends Expr { + OperationSource() { + isOperationSourceCandidate(this) and + // If the candidate came from an ignorable operation, ignore the candidate + // NOTE: we cannot easily flow the candidate to an ignorable operation as that can + // be tricky in practice, e.g., a mod operation on a year would be part of a leap year check + // but a mod operation ending in a year is more indicative of something to ignore (a conversion) + not exists(IgnorableOperationToOperationSourceCandidateFlow::PathNode sink | + sink.getNode().asExpr() = this and + sink.isSink() + ) + } +} + +class YearFieldAssignmentNode extends DataFlow::Node { + YearFieldAccess access; + + YearFieldAssignmentNode() { + exists(Function f | + f = this.getEnclosingCallable().getUnderlyingCallable() and not f instanceof IgnorableFunction + ) and + ( + this.asDefinition().(Assignment).getLValue() = access + or + this.asDefinition().(CrementOperation).getOperand() = access + or + exists(Call c | c.getAnArgument() = access and this.asDefiningArgument() = access) + or + exists(Call c, AddressOfExpr aoe | + c.getAnArgument() = aoe and + aoe.getOperand() = access and + this.asDefiningArgument() = aoe ) + ) + } + + YearFieldAccess getYearFieldAccess() { result = access } +} + +/** + * A DataFlow configuration for identifying flows from an identified source + * to the Year field of a date object. + */ +module OperationToYearAssignmentConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node n) { n.asExpr() instanceof OperationSource } + + predicate isSink(DataFlow::Node n) { + n instanceof YearFieldAssignmentNode and + not isYearModifiedWithCheck(n) and + not isControlledByMonthEqualityCheckNonFebruary(n.asExpr()) + } + + predicate isBarrier(DataFlow::Node n) { + exists(ArrayExpr arr | arr.getArrayOffset() = n.asExpr()) + or + n.getType().getUnspecifiedType() instanceof PointerType + or + n.getType().getUnspecifiedType() instanceof CharType + or + // If a type resembles "string" ignore flow (likely string conversion, currently ignored) + n.getType().getUnspecifiedType().stripType().getName().toLowerCase().matches("%string%") + or + n.asExpr() instanceof IgnorableOperation + or + // Flowing into variables that indicate likely non-gregorian years are barriers + // e.g., names similar to hijri, persian, lunar, chinese, hebrew, etc. + exists(Variable v | + v.getName() + .toLowerCase() + .matches(["%hijri%", "%persian%", "%lunar%", "%chinese%", "%hebrew%"]) and + v.getAnAccess() = [n.asIndirectExpr(), n.asExpr()] + ) + or + isLeapYearCheckSink(n) + or + // this is a bit of a hack to address cases where a year is normalized and checked, but the + // normalized year is never itself assigned to the final year struct + // isLeapYear(getCivilYear(year)) + // struct.year = year + // This is assuming a user would have done this all on one line though. + // setting a variable for the conversion and passing that separately would be more difficult to track + // considering this approach good enough for current observed false positives + exists(Expr arg | + isLeapYearCheckCall(_, arg) and arg.getAChild*() = [n.asExpr(), n.asIndirectExpr()] + ) + or + // If as the flow progresses, the value holding a dangerous operation result + // is apparently being passed by address to some function, it is more than likely + // intended to be modified, and therefore, the definition is killed. + exists(Call c | c.getAnArgument().(AddressOfExpr).getAnOperand() = n.asIndirectExpr()) + } + + /** Block flow out of an operation source to get the "closest" operation to the sink */ + predicate isBarrierIn(DataFlow::Node n) { isSource(n) } + + predicate isBarrierOut(DataFlow::Node n) { isSink(n) } +} + +module OperationToYearAssignmentFlow = TaintTracking::Global; + +predicate isLeapYearCheckSink(DataFlow::Node sink) { + exists(LeapYearGuardCondition lgc | + lgc.checkedYearAccess() = [sink.asExpr(), sink.asIndirectExpr()] + ) + or + isLeapYearCheckCall(_, [sink.asExpr(), sink.asIndirectExpr()]) +} + +predicate yearAssignmentToCheckCommonSteps(DataFlow::Node node1, DataFlow::Node node2) { + // flow from a YearFieldAccess to the qualifier + node2.asExpr() = node1.asExpr().(YearFieldAccess).getQualifier*() + or + // getting the 'access' can be tricky at definitions (assignments especially) + // as dataflow uses asDefinition not asExpr. + // the YearFieldAssignmentNode holds the access in these cases + node1.(YearFieldAssignmentNode).getYearFieldAccess().getQualifier() = node2.asExpr() + or + // flow from a year access qualifier to a year field + exists(YearFieldAccess yfa | node2.asExpr() = yfa and node1.asExpr() = yfa.getQualifier()) + or + node1.(YearFieldAssignmentNode).getYearFieldAccess().getQualifier() = node2.asExpr() + or + // Pass through any intermediate struct + exists(Assignment a | + a.getRValue() = node1.asExpr() and + node2.asExpr() = a.getLValue().(YearFieldAccess).getQualifier*() + ) + or + // in cases of t.year = x and the value of x is checked, but the year t.year isn't directly checked + // flow from a year assignment node to an RHS if it is an assignment + // e.g., + // t.year = x; + // isLeapYear(x); + // --> at this point there is no flow of t.year to a check, but only its raw value + // To detect the flow of 'x' to the isLeapYear check, + // flow from t.year to 'x' (at assignment, t.year = x, flow to the RHS to track use-use flow of x) + exists(YearFieldAssignmentNode yfan | + node1 = yfan and + node2.asExpr() = yfan.asDefinition().(Assignment).getRValue() + ) +} + +/** + * A flow configuration from a Year field access to some Leap year check or guard + */ +module YearAssignmentToLeapYearCheckConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { source instanceof YearFieldAssignmentNode } + + predicate isSink(DataFlow::Node sink) { isLeapYearCheckSink(sink) } + + predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { + yearAssignmentToCheckCommonSteps(node1, node2) + } + + /** + * Enforcing the check must occur in the same call context as the source, + * i.e., do not return from the source function and check in a caller. + */ + DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureHasSourceCallContext } +} + +module YearAssignmentToLeapYearCheckFlow = + TaintTracking::Global; + +/** Does there exist a flow from the given YearFieldAccess to a Leap Year check or guard? */ +predicate isYearModifiedWithCheck(YearFieldAssignmentNode n) { + exists(YearAssignmentToLeapYearCheckFlow::PathNode src | + src.isSource() and + src.getNode() = n + ) + or + // If the time flows to a time conversion whose value/result is checked, + // assume the leap year is being handled. + exists(YearAssignmentToCheckedTimeConversionFlow::PathNode timeQualSrc | + timeQualSrc.isSource() and + timeQualSrc.getNode() = n + ) +} + +/** + * An expression which checks the value of a Month field `a->month == 1`. + */ +class MonthEqualityCheck extends EqualityOperation { + MonthEqualityCheck() { this.getAnOperand() instanceof MonthFieldAccess } + + Expr getExprCompared() { + exists(Expr e | + e = this.getAnOperand() and + not e instanceof MonthFieldAccess and + result = e + ) + } +} + +final class FinalMonthEqualityCheck = MonthEqualityCheck; + +class MonthEqualityCheckGuard extends GuardCondition, FinalMonthEqualityCheck { } + +/** + * Verifies if the expression is guarded by a check on the Month property of a date struct, that is NOT February. + */ +bindingset[e] +pragma[inline_late] +predicate isControlledByMonthEqualityCheckNonFebruary(Expr e) { + exists(MonthEqualityCheckGuard monthGuard, Expr compared | + monthGuard.controls(e.getBasicBlock(), true) and + compared = monthGuard.getExprCompared() and + not compared.getValue().toInt() = 2 + ) +} + +/** + * Flow from a year field access to a time conversion function + * that auto converts feb29 in non-leap year, or through a conversion function that doesn't + * auto convert to a sanity check guard of the result for error conditions. + */ +module YearAssignmentToCheckedTimeConversionConfig implements DataFlow::StateConfigSig { + // Flow state tracks if flow goes through a known time conversion function + // see `TimeConversionFunction`. + // A valid check with a time conversion function is either the case: + // 1) the year flows into a time conversion function, and the time conversion function's result is checked or + // 2) the year flows into a time conversion function that auto corrects for leap year, so no check is necessary. + class FlowState = boolean; + + predicate isSource(DataFlow::Node source, FlowState state) { + source instanceof YearFieldAssignmentNode and + state = false + } + + predicate isSink(DataFlow::Node sink, FlowState state) { + // Case 1: Flow through a time conversion function that requires a check, + // and we have arrived at a guard, implying the result was checked for possible error, including leap year error. + // state = true indicates the flow went through a time conversion function + state = true and + ( + exists(IfStmt ifs | ifs.getCondition().getAChild*() = [sink.asExpr(), sink.asIndirectExpr()]) or - // If there is a data flow from the variable that was modified to a function that seems to check for leap year - exists(VariableAccess source, ChecksForLeapYearFunctionCall fc | - source = var.getAnAccess() and - LeapYearCheckFlow::flow(DataFlow::exprNode(source), DataFlow::exprNode(fc.getAnArgument())) + exists(ConditionalExpr ce | + ce.getCondition().getAChild*() = [sink.asExpr(), sink.asIndirectExpr()] ) or - // If there is a data flow from the field that was modified to a function that seems to check for leap year - exists(VariableAccess vacheck, YearFieldAccess yfacheck, ChecksForLeapYearFunctionCall fc | - vacheck = var.getAnAccess() and - yfacheck.getQualifier() = vacheck and - LeapYearCheckFlow::flow(DataFlow::exprNode(yfacheck), DataFlow::exprNode(fc.getAnArgument())) + exists(Loop l | l.getCondition().getAChild*() = [sink.asExpr(), sink.asIndirectExpr()]) + ) + or + // Case 2: Flow through a time conversion function that auto corrects for leap year, so no check is necessary. + // state true or false, as flowing through a time conversion function is not necessary in this instance. + state in [true, false] and + exists(Call c, TimeConversionFunction f | + f.isAutoLeapYearCorrecting() and + c.getTarget() = f and + c.getAnArgument().getAChild*() = [sink.asExpr(), sink.asIndirectExpr()] + ) + } + + predicate isAdditionalFlowStep( + DataFlow::Node node1, FlowState state1, DataFlow::Node node2, FlowState state2 + ) { + state1 in [true, false] and + state2 = true and + exists(Call c | + c.getTarget() instanceof TimeConversionFunction and + c.getAnArgument().getAChild*() = [node1.asExpr(), node1.asIndirectExpr()] and + node2.asExpr() = c + ) + } + + predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { + yearAssignmentToCheckCommonSteps(node1, node2) + } + + DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureHasSourceCallContext } +} + +module YearAssignmentToCheckedTimeConversionFlow = + DataFlow::GlobalWithState; + +/** + * Finds flow from a parameter of a function to a leap year check. + * This is necessary to handle for scenarios like this: + * + * year = DANGEROUS_OP // source + * isLeap = isLeapYear(year); + * // logic based on isLeap + * struct.year = year; // sink + * + * In this case, we may flow a dangerous op to a year assignment, failing + * to barrier the flow through a leap year check, as the leap year check + * is nested, and dataflow does not progress down into the check and out. + * Instead, the point of this flow is to detect isLeapYear's argument + * is checked for leap year, making the isLeapYear call a barrier for + * the dangerous flow if we flow through the parameter identified to + * be checked. + */ +module ParameterToLeapYearCheckConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { exists(source.asParameter()) } + + predicate isSink(DataFlow::Node sink) { + exists(LeapYearGuardCondition lgc | + lgc.checkedYearAccess() = [sink.asExpr(), sink.asIndirectExpr()] + ) + } + + predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { + // flow from a YearFieldAccess to the qualifier + node2.asExpr() = node1.asExpr().(YearFieldAccess).getQualifier*() + or + // flow from a year access qualifier to a year field + exists(YearFieldAccess yfa | node2.asExpr() = yfa and node1.asExpr() = yfa.getQualifier()) + } + + /** + * Enforcing the check must occur in the same call context as the source, + * i.e., do not return from the source function and check in a caller. + */ + DataFlow::FlowFeature getAFeature() { result instanceof DataFlow::FeatureHasSourceCallContext } +} + +// NOTE: I do not believe taint flow is necessary here as we should +// be flowing directyly from some parameter to a leap year check. +module ParameterToLeapYearCheckFlow = DataFlow::Global; + +predicate isLeapYearCheckCall(Call c, Expr arg) { + exists(ParameterToLeapYearCheckFlow::PathNode src, Function f, int i | + src.isSource() and + f.getParameter(i) = src.getNode().asParameter() and + c.getTarget() = f and + c.getArgument(i) = arg + ) +} + +class LeapYearGuardCondition extends GuardCondition { + Expr yearSinkDiv4; + Expr yearSinkDiv100; + Expr yearSinkDiv400; + + LeapYearGuardCondition() { + exists( + LogicalAndExpr andExpr, LogicalOrExpr orExpr, GuardCondition div4Check, + GuardCondition div100Check, GuardCondition div400Check, GuardValue gv + | + // canonical case: + // form: `(year % 4 == 0) && (year % 100 != 0 || year % 400 == 0)` + // `!((year % 4 == 0) && (year % 100 != 0 || year % 400 == 0))` + // `!(year % 4) && (year % 100 || !(year % 400))` + // Also accepting `((year & 3) == 0) && (year % 100 != 0 || year % 400 == 0)` + // and `(year % 4 == 0) && (year % 100 > 0 || year % 400 == 0)` + this = andExpr and + andExpr.hasOperands(div4Check, orExpr) and + orExpr.hasOperands(div100Check, div400Check) and + ( + // year % 4 == 0 + exists(RemExpr e | + div4Check.comparesEq(e, 0, true, gv) and + e.getRightOperand().getValue().toInt() = 4 and + yearSinkDiv4 = e.getLeftOperand() + ) + or + // year & 3 == 0 + exists(BitwiseAndExpr e | + div4Check.comparesEq(e, 0, true, gv) and + e.getRightOperand().getValue().toInt() = 3 and + yearSinkDiv4 = e.getLeftOperand() + ) + ) and + exists(RemExpr e | + // year % 100 != 0 or year % 100 > 0 + ( + div100Check.comparesEq(e, 0, false, gv) or + div100Check.comparesLt(e, 1, false, gv) + ) and + e.getRightOperand().getValue().toInt() = 100 and + yearSinkDiv100 = e.getLeftOperand() + ) and + // year % 400 == 0 + exists(RemExpr e | + div400Check.comparesEq(e, 0, true, gv) and + e.getRightOperand().getValue().toInt() = 400 and + yearSinkDiv400 = e.getLeftOperand() ) or - // If there is a successor or predecessor that sets the month = 1 - exists(MonthFieldAccess mfa, AssignExpr ae | - mfa.getQualifier() = var.getAnAccess() and - mfa.isModified() and + // Inverted logic case: + // `year % 4 != 0 || (year % 100 == 0 && year % 400 != 0)` + // or `year & 3 != 0 || (year % 100 == 0 && year % 400 != 0)` + // also accepting `year % 4 > 0 || (year % 100 == 0 && year % 400 > 0)` + this = orExpr and + orExpr.hasOperands(div4Check, andExpr) and + andExpr.hasOperands(div100Check, div400Check) and + ( + // year % 4 != 0 or year % 4 > 0 + exists(RemExpr e | + ( + div4Check.comparesEq(e, 0, false, gv) + or + div4Check.comparesLt(e, 1, false, gv) + ) and + e.getRightOperand().getValue().toInt() = 4 and + yearSinkDiv4 = e.getLeftOperand() + ) + or + // year & 3 != 0 + exists(BitwiseAndExpr e | + div4Check.comparesEq(e, 0, false, gv) and + e.getRightOperand().getValue().toInt() = 3 and + yearSinkDiv4 = e.getLeftOperand() + ) + ) and + // year % 100 == 0 + exists(RemExpr e | + div100Check.comparesEq(e, 0, true, gv) and + e.getRightOperand().getValue().toInt() = 100 and + yearSinkDiv100 = e.getLeftOperand() + ) and + // year % 400 != 0 or year % 400 > 0 + exists(RemExpr e | ( - mfa.getBasicBlock() = yfa.getBasicBlock().getASuccessor*() or - yfa.getBasicBlock() = mfa.getBasicBlock().getASuccessor+() + div400Check.comparesEq(e, 0, false, gv) + or + div400Check.comparesLt(e, 1, false, gv) ) and - ae = mfa.getEnclosingElement() and - ae.getAnOperand().getValue().toInt() = 1 + e.getRightOperand().getValue().toInt() = 400 and + yearSinkDiv400 = e.getLeftOperand() + ) + ) + } + + Expr getYearSinkDiv4() { result = yearSinkDiv4 } + + Expr getYearSinkDiv100() { result = yearSinkDiv100 } + + Expr getYearSinkDiv400() { result = yearSinkDiv400 } + + /** + * Gets the variable access that is used in all 3 components of the leap year check + * e.g., see getYearSinkDiv4/100/400.. + * If a field access is used, the qualifier and the field access are both returned + * in checked condition. + * NOTE: if the year is not checked using the same access in all 3 components, no result is returned. + * The typical case observed is a consistent variable access is used. If not, this may indicate a bug. + * We could check more accurately with a dataflow analysis, but this is likely sufficient for now. + */ + VariableAccess checkedYearAccess() { + exists(Variable var | + ( + this.getYearSinkDiv4().getAChild*() = var.getAnAccess() and + this.getYearSinkDiv100().getAChild*() = var.getAnAccess() and + this.getYearSinkDiv400().getAChild*() = var.getAnAccess() and + result = var.getAnAccess() and + ( + result = this.getYearSinkDiv4().getAChild*() or + result = this.getYearSinkDiv100().getAChild*() or + result = this.getYearSinkDiv400().getAChild*() + ) ) ) + } +} + +/** + * A difficult case to detect is if a year modification is tied to a month or day modification + * and the month or day is safe for leap year. + * e.g., + * year++; + * month = 1; + * // alternative: day = 15; + * ... values eventually used in the same time struct + * If this is even more challenging if the struct the values end up in are not + * local (set inter-procedurally). + * This configuration looks for constants 1-31 flowing to a month or day assignment. + * It is assumed a user of this flow will check if the month/day source and month/day sink + * are in the same basic blocks as a year modification source and a year modification sink. + * It is also assumed a user will check if the constant source is a value that is ignorable + * e.g., if it is 2 and the sink is a month assignment, then it isn't ignorable or + * if the value is < 27 and is a day assignment, it is likely ignorable + * + * Obviously this does not handle all conditions (e.g., the month set in another block). + * It is meant to capture the most common cases of false positives. + */ +module CandidateConstantToDayOrMonthAssignmentConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node source) { + source.asExpr().getValue().toInt() in [1 .. 31] and + ( + exists(Assignment a | a.getRValue() = source.asExpr()) + or + exists(Call c | c.getAnArgument() = source.asExpr()) + ) + } + + predicate isSink(DataFlow::Node sink) { + exists(Assignment a | + (a.getLValue() instanceof MonthFieldAccess or a.getLValue() instanceof DayFieldAccess) and + a.getRValue() = sink.asExpr() + ) + } +} + +// NOTE: only data flow here (no taint tracking) as we want the exact +// constant flowing to the month assignment +module CandidateConstantToDayOrMonthAssignmentFlow = + DataFlow::Global; + +/** + * Holds if value the assignment `a` resolves to (`dayOrMonthValSrcExpr`) doesn't represent February, + * and/or if it represents a day, is a 'safe' day (meaning the 27th or prior). + */ +bindingset[dayOrMonthValSrcExpr] +predicate isSafeValueForAssignmentOfMonthOrDayValue(Assignment a, Expr dayOrMonthValSrcExpr) { + a.getLValue() instanceof MonthFieldAccess and + dayOrMonthValSrcExpr.getValue().toInt() != 2 + or + a.getLValue() instanceof DayFieldAccess and + dayOrMonthValSrcExpr.getValue().toInt() <= 27 +} + +import OperationToYearAssignmentFlow::PathGraph + +from OperationToYearAssignmentFlow::PathNode src, OperationToYearAssignmentFlow::PathNode sink +where + OperationToYearAssignmentFlow::flowPath(src, sink) and + // Check if a month is set in the same block as the year operation source + // and the month value would indicate its set to any other month than february. + // Finds if the source year node is in the same block as a source month block + // and if the same for the sinks. + not exists(DataFlow::Node dayOrMonthValSrc, DataFlow::Node dayOrMonthValSink, Assignment a | + CandidateConstantToDayOrMonthAssignmentFlow::flow(dayOrMonthValSrc, dayOrMonthValSink) and + a.getRValue() = dayOrMonthValSink.asExpr() and + dayOrMonthValSink.getBasicBlock() = sink.getNode().getBasicBlock() and + exists(IRBlock dayOrMonthValBB | + dayOrMonthValBB = dayOrMonthValSrc.getBasicBlock() and + // The source of the day is set in the same block as the source for the year + // or the source for the day is set in the same block as the sink for the year + dayOrMonthValBB in [ + src.getNode().getBasicBlock(), + sink.getNode().getBasicBlock() + ] + ) and + isSafeValueForAssignmentOfMonthOrDayValue(a, dayOrMonthValSrc.asExpr()) ) -select yfa, - "Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found.", - yfa.getTarget(), yfa.getTarget().toString(), var, var.toString() +select sink, src, sink, + "Year field has been modified, but no appropriate check for LeapYear was found." diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.ql b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.ql index af02a2814a20..8e2d6e9d10fe 100644 --- a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.ql +++ b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedReturnValueForTimeFunctions.ql @@ -44,23 +44,9 @@ class SafeTimeGatheringFunction extends Function { } } -/** - * This list of APIs should check for the return value to detect problems during the conversion. - */ -class TimeConversionFunction extends Function { - TimeConversionFunction() { - this.getQualifiedName() = - [ - "FileTimeToSystemTime", "SystemTimeToFileTime", "SystemTimeToTzSpecificLocalTime", - "SystemTimeToTzSpecificLocalTimeEx", "TzSpecificLocalTimeToSystemTime", - "TzSpecificLocalTimeToSystemTimeEx", "RtlLocalTimeToSystemTime", - "RtlTimeToSecondsSince1970", "_mkgmtime" - ] - } -} - from FunctionCall fcall, TimeConversionFunction trf, Variable var where + not trf.isAutoLeapYearCorrecting() and fcall = trf.getACallToThisFunction() and fcall instanceof ExprInVoidContext and var.getUnderlyingType() instanceof UnpackedTimeType and diff --git a/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql b/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql index b4e517b3bab9..c85b33a9727a 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql @@ -15,6 +15,7 @@ import cpp import semmle.code.cpp.rangeanalysis.RangeAnalysisUtils import semmle.code.cpp.ir.dataflow.DataFlow +private import semmle.code.cpp.ir.dataflow.internal.DataFlowNodes /** Gets a loop that contains `e`. */ Loop getAnEnclosingLoopOfExpr(Expr e) { result = getAnEnclosingLoopOfStmt(e.getEnclosingStmt()) } @@ -45,9 +46,9 @@ private Expr getExpr(DataFlow::Node node) { or result = node.asOperand().getUse().getAst() or - result = node.(DataFlow::RawIndirectInstruction).getInstruction().getAst() + result = node.(RawIndirectInstruction).getInstruction().getAst() or - result = node.(DataFlow::RawIndirectOperand).getOperand().getUse().getAst() + result = node.(RawIndirectOperand).getOperand().getUse().getAst() } /** @@ -208,7 +209,7 @@ class LoopWithAlloca extends Stmt { this.conditionRequiresInequality(va, _, _) and DataFlow::localFlow(result, DataFlow::exprNode(va)) and // Phi nodes will be preceded by nodes that represent actual definitions - not result instanceof DataFlow::SsaSynthNode and + not result instanceof SsaSynthNode and // A source is outside the loop if it's not inside the loop not exists(Expr e | e = getExpr(result) | this = getAnEnclosingLoopOfExpr(e)) ) diff --git a/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.ql b/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.ql index b87889103322..efd136bcd2df 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.ql @@ -16,17 +16,15 @@ import cpp import semmle.code.cpp.ir.IR import semmle.code.cpp.ir.dataflow.MustFlow -import PathGraph +import ReturnStackAllocatedMemory::PathGraph /** Holds if `f` has a name that we interpret as evidence of intentionally returning the value of the stack pointer. */ predicate intentionallyReturnsStackPointer(Function f) { f.getName().toLowerCase().matches(["%stack%", "%sp%"]) } -class ReturnStackAllocatedMemoryConfig extends MustFlowConfiguration { - ReturnStackAllocatedMemoryConfig() { this = "ReturnStackAllocatedMemoryConfig" } - - override predicate isSource(Instruction source) { +module ReturnStackAllocatedMemoryConfig implements MustFlow::ConfigSig { + predicate isSource(Instruction source) { exists(Function func | // Rule out FPs caused by extraction errors. not func.hasErrors() and @@ -50,7 +48,7 @@ class ReturnStackAllocatedMemoryConfig extends MustFlowConfiguration { ) } - override predicate isSink(Operand sink) { + predicate isSink(Operand sink) { // Holds if `sink` is a node that represents the `StoreInstruction` that is subsequently used in // a `ReturnValueInstruction`. // We use the `StoreInstruction` instead of the instruction that defines the @@ -72,7 +70,7 @@ class ReturnStackAllocatedMemoryConfig extends MustFlowConfiguration { // int* px = id(&x); // } // ``` - override predicate allowInterproceduralFlow() { none() } + predicate allowInterproceduralFlow() { none() } /** * This configuration intentionally conflates addresses of fields and their object, and pointer offsets @@ -87,20 +85,22 @@ class ReturnStackAllocatedMemoryConfig extends MustFlowConfiguration { * } * ``` */ - override predicate isAdditionalFlowStep(Operand node1, Instruction node2) { + predicate isAdditionalFlowStep(Operand node1, Instruction node2) { node2.(FieldAddressInstruction).getObjectAddressOperand() = node1 or node2.(PointerOffsetInstruction).getLeftOperand() = node1 } - override predicate isBarrier(Instruction n) { n.getResultType() instanceof ErroneousType } + predicate isBarrier(Instruction n) { n.getResultType() instanceof ErroneousType } } +module ReturnStackAllocatedMemory = MustFlow::Global; + from - MustFlowPathNode source, MustFlowPathNode sink, Instruction instr, - ReturnStackAllocatedMemoryConfig conf + ReturnStackAllocatedMemory::PathNode source, ReturnStackAllocatedMemory::PathNode sink, + Instruction instr where - conf.hasFlowPath(pragma[only_bind_into](source), pragma[only_bind_into](sink)) and + ReturnStackAllocatedMemory::flowPath(pragma[only_bind_into](source), pragma[only_bind_into](sink)) and source.getInstruction() = instr select sink.getInstruction(), source, sink, "May return stack-allocated memory from $@.", instr.getAst(), instr.getAst().toString() diff --git a/cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql b/cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql index 763a142f1b90..1697ad318105 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql @@ -15,7 +15,7 @@ import cpp import semmle.code.cpp.ir.IR import semmle.code.cpp.ir.dataflow.MustFlow -import PathGraph +import UninitializedLocal::PathGraph /** * Auxiliary predicate: Types that don't require initialization @@ -70,25 +70,26 @@ predicate isSinkImpl(Instruction sink, VariableAccess va) { ) } -class MustFlow extends MustFlowConfiguration { - MustFlow() { this = "MustFlow" } - - override predicate isSource(Instruction source) { +module UninitializedLocalConfig implements MustFlow::ConfigSig { + predicate isSource(Instruction source) { source instanceof UninitializedInstruction and exists(Type t | t = source.getResultType() | not allocatedType(t)) } - override predicate isSink(Operand sink) { isSinkImpl(sink.getDef(), _) } + predicate isSink(Operand sink) { isSinkImpl(sink.getDef(), _) } - override predicate allowInterproceduralFlow() { none() } + predicate allowInterproceduralFlow() { none() } - override predicate isBarrier(Instruction instr) { instr instanceof ChiInstruction } + predicate isBarrier(Instruction instr) { instr instanceof ChiInstruction } } +module UninitializedLocal = MustFlow::Global; + from - VariableAccess va, LocalVariable v, MustFlow conf, MustFlowPathNode source, MustFlowPathNode sink + VariableAccess va, LocalVariable v, UninitializedLocal::PathNode source, + UninitializedLocal::PathNode sink where - conf.hasFlowPath(source, sink) and + UninitializedLocal::flowPath(source, sink) and isSinkImpl(sink.getInstruction(), va) and v = va.getTarget() select va, source, sink, "The variable $@ may not be initialized at this access.", v, v.getName() diff --git a/cpp/ql/src/Likely Bugs/OO/UnsafeUseOfThis.ql b/cpp/ql/src/Likely Bugs/OO/UnsafeUseOfThis.ql index bb62cfc17553..63b56d470e2d 100644 --- a/cpp/ql/src/Likely Bugs/OO/UnsafeUseOfThis.ql +++ b/cpp/ql/src/Likely Bugs/OO/UnsafeUseOfThis.ql @@ -17,16 +17,16 @@ import cpp import semmle.code.cpp.ir.IR import semmle.code.cpp.ir.dataflow.MustFlow -import PathGraph +import UnsafeUseOfThis::PathGraph -class UnsafeUseOfThisConfig extends MustFlowConfiguration { - UnsafeUseOfThisConfig() { this = "UnsafeUseOfThisConfig" } +module UnsafeUseOfThisConfig implements MustFlow::ConfigSig { + predicate isSource(Instruction source) { isSource(source, _, _) } - override predicate isSource(Instruction source) { isSource(source, _, _) } - - override predicate isSink(Operand sink) { isSink(sink, _) } + predicate isSink(Operand sink) { isSink(sink, _) } } +module UnsafeUseOfThis = MustFlow::Global; + /** Holds if `sink` is a `this` pointer used by the call instruction `call`. */ predicate isSink(Operand sink, CallInstruction call) { exists(PureVirtualFunction func | @@ -66,19 +66,17 @@ predicate isSource(InitializeParameterInstruction source, string msg, Class c) { * - `msg` is a string describing whether `source` is from a constructor or destructor. */ predicate flows( - MustFlowPathNode source, string msg, Class sourceClass, MustFlowPathNode sink, + UnsafeUseOfThis::PathNode source, string msg, Class sourceClass, UnsafeUseOfThis::PathNode sink, CallInstruction call ) { - exists(UnsafeUseOfThisConfig conf | - conf.hasFlowPath(source, sink) and - isSource(source.getInstruction(), msg, sourceClass) and - isSink(sink.getInstruction().getAUse(), call) - ) + UnsafeUseOfThis::flowPath(source, sink) and + isSource(source.getInstruction(), msg, sourceClass) and + isSink(sink.getInstruction().getAUse(), call) } from - MustFlowPathNode source, MustFlowPathNode sink, CallInstruction call, string msg, - Class sourceClass + UnsafeUseOfThis::PathNode source, UnsafeUseOfThis::PathNode sink, CallInstruction call, + string msg, Class sourceClass where flows(source, msg, sourceClass, sink, call) and // Only raise an alert if there is no override of the pure virtual function in any base class. diff --git a/cpp/ql/src/change-notes/released/1.5.11.md b/cpp/ql/src/change-notes/released/1.5.11.md new file mode 100644 index 000000000000..5f42fc9133da --- /dev/null +++ b/cpp/ql/src/change-notes/released/1.5.11.md @@ -0,0 +1,3 @@ +## 1.5.11 + +No user-facing changes. diff --git a/cpp/ql/src/codeql-pack.release.yml b/cpp/ql/src/codeql-pack.release.yml index fda54b31bffb..7e8e8103d99a 100644 --- a/cpp/ql/src/codeql-pack.release.yml +++ b/cpp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.5.10 +lastReleaseVersion: 1.5.11 diff --git a/cpp/ql/src/qlpack.yml b/cpp/ql/src/qlpack.yml index 232836a053d8..d8620439fe62 100644 --- a/cpp/ql/src/qlpack.yml +++ b/cpp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-queries -version: 1.5.10 +version: 1.5.12-dev groups: - cpp - queries diff --git a/cpp/ql/src/utils/modelgenerator/internal/CaptureModels.qll b/cpp/ql/src/utils/modelgenerator/internal/CaptureModels.qll index f2c621d04cb6..90160df3c210 100644 --- a/cpp/ql/src/utils/modelgenerator/internal/CaptureModels.qll +++ b/cpp/ql/src/utils/modelgenerator/internal/CaptureModels.qll @@ -8,6 +8,7 @@ private import semmle.code.cpp.dataflow.ExternalFlow as ExternalFlow private import semmle.code.cpp.ir.dataflow.internal.DataFlowImplCommon as DataFlowImplCommon private import semmle.code.cpp.ir.dataflow.internal.DataFlowImplSpecific private import semmle.code.cpp.ir.dataflow.internal.DataFlowPrivate as DataFlowPrivate +private import semmle.code.cpp.ir.dataflow.internal.DataFlowNodes as DataFlowNodes private import semmle.code.cpp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl private import semmle.code.cpp.ir.dataflow.internal.TaintTrackingImplSpecific private import semmle.code.cpp.dataflow.new.TaintTracking as Tt @@ -403,7 +404,7 @@ private module SinkModelGeneratorInput implements SinkModelGeneratorInputSig { } predicate apiSource(DataFlow::Node source) { - DataFlowPrivate::nodeHasOperand(source, any(DataFlow::FieldAddress fa), 1) + DataFlowPrivate::nodeHasOperand(source, any(DataFlowNodes::FieldAddress fa), 1) or source instanceof DataFlow::ParameterNode } @@ -416,7 +417,7 @@ private module SinkModelGeneratorInput implements SinkModelGeneratorInputSig { result = "Argument[" + DataFlow::repeatStars(indirectionIndex) + argumentIndex + "]" ) or - DataFlowPrivate::nodeHasOperand(source, any(DataFlow::FieldAddress fa), 1) and + DataFlowPrivate::nodeHasOperand(source, any(DataFlowNodes::FieldAddress fa), 1) and result = qualifierString() } diff --git a/cpp/ql/test/library-tests/dataflow/external-models/azure.cpp b/cpp/ql/test/library-tests/dataflow/external-models/azure.cpp new file mode 100644 index 000000000000..14407a8b5bed --- /dev/null +++ b/cpp/ql/test/library-tests/dataflow/external-models/azure.cpp @@ -0,0 +1,297 @@ +using uint16_t = unsigned short; +using int64_t = long long; +using size_t = unsigned long; +using uint8_t = unsigned char; +using int32_t = int; +using uint32_t = unsigned int; + +namespace std +{ + class string + { + public: + string(); + string(const char *); + ~string(); + }; + + template + class map + { + public: + map(); + ~map(); + + V& operator[](const K& key); + }; + + template + class vector + { + public: + vector(); + ~vector(); + + T& operator[](size_t); + }; + + template + class unique_ptr { + public: + unique_ptr(); + ~unique_ptr(); + + T* get(); + }; +} + +namespace Azure +{ + template + class Nullable + { + public: + Nullable(); + Nullable(const T); + Nullable(const Nullable &); + ~Nullable(); + Nullable (Nullable &&); + Nullable & operator= (const Nullable &); + bool HasValue() const; + const T & Value () const; + T& Value (); + const T * operator-> () const; + T * operator-> (); + const T & operator* () const; + T & operator* (); + }; + + namespace Core + { + class Url + { + public: + Url(); + Url(const std::string &); + void AppendPath(const std::string &encodedPath); + void AppendQueryParameter(const std::string &encodedKey, + const std::string &encodedValue); + + static std::string Url::Decode(const std::string &value); + static std::string Url::Encode(const std::string &value, + const std::string &doNotEncodeSymbols = ""); + + std::string Url::GetAbsoluteUrl() const; + const std::string &GetHost() const; + const std::string &GetPath() const; + uint16_t GetPort() const; + std::map GetQueryParameters() const; + std::string Url::GetRelativeUrl() const; + const std::string &GetScheme() const; + void RemoveQueryParameter(const std::string &encodedKey); + void SetHost(const std::string &encodedHost); + void SetPath(const std::string &encodedPath); + void SetPort(uint16_t port); + void SetQueryParameters(std::map queryParameters); + void SetScheme(const std::string &scheme); + }; + + class Context + { + public: + Context(); + }; + + namespace IO + { + class BodyStream + { + public: + virtual ~BodyStream(); + virtual int64_t Length() const = 0; + virtual void Rewind(); + size_t Read(uint8_t *buffer, size_t count, Azure::Core::Context const &context = Azure::Core::Context()); + size_t ReadToCount(uint8_t *buffer, size_t count, Azure::Core::Context const &context = Azure::Core::Context()); + std::vector ReadToEnd(Azure::Core::Context const &context = Azure::Core::Context()); + }; + } + + enum class HttpStatusCode { + None = 0, + Continue = 100, + SwitchingProtocols = 101, + Processing = 102, + EarlyHints = 103, + OK = 200, + Created = 201, + Accepted = 202, + NonAuthoritativeInformation = 203, + NoContent = 204, + ResetContent = 205, + PartialContent = 206, + MultiStatus = 207, + AlreadyReported = 208, + IMUsed = 226, + MultipleChoices = 300, + MovedPermanently = 301, + Found = 302, + SeeOther = 303, + NotModified = 304, + UseProxy = 305, + TemporaryRedirect = 307, + PermanentRedirect = 308, + BadRequest = 400, + Unauthorized = 401, + PaymentRequired = 402, + Forbidden = 403, + NotFound = 404, + MethodNotAllowed = 405, + NotAcceptable = 406, + ProxyAuthenticationRequired = 407, + RequestTimeout = 408, + Conflict = 409, + Gone = 410, + LengthRequired = 411, + PreconditionFailed = 412, + PayloadTooLarge = 413, + URITooLong = 414, + UnsupportedMediaType = 415, + RangeNotSatisfiable = 416, + ExpectationFailed = 417, + MisdirectedRequest = 421, + UnprocessableEntity = 422, + Locked = 423, + FailedDependency = 424, + TooEarly = 425, + UpgradeRequired = 426, + PreconditionRequired = 428, + TooManyRequests = 429, + RequestHeaderFieldsTooLarge = 431, + UnavailableForLegalReasons = 451, + InternalServerError = 500, + NotImplemented = 501, + BadGateway = 502, + ServiceUnavailable = 503, + GatewayTimeout = 504, + HTTPVersionNotSupported = 505, + VariantAlsoNegotiates = 506, + InsufficientStorage = 507, + LoopDetected = 508, + NotExtended = 510, + NetworkAuthenticationRequired = 511 + }; + + namespace Http + { + class HttpMethod + { + public: + HttpMethod(std::string value); + bool operator==(const HttpMethod &other) const; + bool operator!=(const HttpMethod &other) const; + const std::string &ToString() const; + }; + + extern const HttpMethod Get; + extern const HttpMethod Head; + extern const HttpMethod Post; + extern const HttpMethod Put; + extern const HttpMethod Delete; + extern const HttpMethod Patch; + extern const HttpMethod Options; + + class Request + { + public: + explicit Request(HttpMethod httpMethod, + Url url); + explicit Request(HttpMethod httpMethod, + Url url, + bool shouldBufferResponse); + explicit Request(HttpMethod httpMethod, + Url url, + IO::BodyStream *bodyStream); + explicit Request(HttpMethod httpMethod, + Url url, + IO::BodyStream *bodyStream, + bool shouldBufferResponse); + std::map GetHeaders () const; + Azure::Nullable GetHeader(std::string const &name); + IO::BodyStream * GetBodyStream(); + Azure::Core::IO::BodyStream const* GetBodyStream () const; + }; + + class RawResponse { + public: + RawResponse (int32_t majorVersion, int32_t minorVersion, HttpStatusCode statusCode, std::string const &reasonPhrase); + RawResponse (RawResponse const &response); + RawResponse (RawResponse &&response); + ~RawResponse (); + void SetHeader (std::string const &name, std::string const &value); + void SetBodyStream (std::unique_ptr< Azure::Core::IO::BodyStream > stream); + void SetBody (std::vector< uint8_t > body); + uint32_t GetMajorVersion () const; + uint32_t GetMinorVersion () const; + HttpStatusCode GetStatusCode () const; + std::string const & GetReasonPhrase () const; + std::map& GetHeaders () const; + std::unique_ptr ExtractBodyStream (); + std::vector & GetBody (); + std::vector const& GetBody() const; + }; + } + } +} + +void sink(char); +void sink(std::string); +void sink(std::vector); +void sink(Azure::Nullable); + +void test_BodyStream() { + Azure::Core::Http::Request request(Azure::Core::Http::Get, Azure::Core::Url("http://example.com")); + Azure::Core::IO::BodyStream * resp = request.GetBodyStream(); + + { + unsigned char buffer[1024]; + resp->Read(buffer, sizeof(buffer)); + sink(*buffer); // $ ir + } + { + unsigned char buffer[1024]; + resp->ReadToCount(buffer, sizeof(buffer)); + sink(*buffer); // $ ir + } + { + std::vector vec = resp->ReadToEnd(); + sink(vec); // $ ir + } +} + +void test_RawResponse(Azure::Core::Http::RawResponse& resp) { + { + std::map body = resp.GetHeaders(); + sink(body["Content-Type"]); // $ ir + } + { + std::vector body = resp.GetBody(); + sink(body); // $ ir + } + { + std::unique_ptr bodyStream = resp.ExtractBodyStream(); + sink(bodyStream.get()->ReadToEnd()); // $ ir + } +} + +void test_GetHeader() { + Azure::Core::Http::Request request(Azure::Core::Http::Get, Azure::Core::Url("http://example.com")); + { + auto headerValue = request.GetHeader("Content-Type").Value(); + sink(headerValue); // $ ir + } + { + std::map headers = request.GetHeaders(); + std::string contentType = headers["Content-Type"]; + sink(contentType); // $ ir + } +} \ No newline at end of file diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected index d47ae8950fb3..1e46060c97ed 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected @@ -14,45 +14,111 @@ models | 13 | Source: ; ; false; NtReadFile; ; ; Argument[*5]; local; manual | | 14 | Source: ; ; false; ReadFile; ; ; Argument[*1]; local; manual | | 15 | Source: ; ; false; ReadFileEx; ; ; Argument[*1]; local; manual | -| 16 | Source: ; ; false; ymlSource; ; ; ReturnValue; local; manual | -| 17 | Source: boost::asio; ; false; read_until; ; ; Argument[*1]; remote; manual | -| 18 | Summary: ; ; false; CommandLineToArgvA; ; ; Argument[*0]; ReturnValue[**]; taint; manual | -| 19 | Summary: ; ; false; CreateRemoteThread; ; ; Argument[@4]; Argument[3].Parameter[@0]; value; manual | -| 20 | Summary: ; ; false; CreateRemoteThreadEx; ; ; Argument[@4]; Argument[3].Parameter[@0]; value; manual | -| 21 | Summary: ; ; false; CreateThread; ; ; Argument[@3]; Argument[2].Parameter[@0]; value; manual | -| 22 | Summary: ; ; false; ReadFileEx; ; ; Argument[*3].Field[@hEvent]; Argument[4].Parameter[*2].Field[@hEvent]; value; manual | -| 23 | Summary: ; ; false; RtlCopyDeviceMemory; ; ; Argument[*@1]; Argument[*@0]; value; manual | -| 24 | Summary: ; ; false; RtlCopyMemory; ; ; Argument[*@1]; Argument[*@0]; value; manual | -| 25 | Summary: ; ; false; RtlCopyMemoryNonTemporal; ; ; Argument[*@1]; Argument[*@0]; value; manual | -| 26 | Summary: ; ; false; RtlCopyUnicodeString; ; ; Argument[*1].Field[*Buffer]; Argument[*0].Field[*Buffer]; value; manual | -| 27 | Summary: ; ; false; RtlCopyVolatileMemory; ; ; Argument[*@1]; Argument[*@0]; value; manual | -| 28 | Summary: ; ; false; RtlInitUnicodeString; ; ; Argument[*1]; Argument[*0].Field[*Buffer]; value; manual | -| 29 | Summary: ; ; false; RtlMoveMemory; ; ; Argument[*@1]; Argument[*@0]; value; manual | -| 30 | Summary: ; ; false; RtlMoveVolatileMemory; ; ; Argument[*@1]; Argument[*@0]; value; manual | -| 31 | Summary: ; ; false; callWithArgument; ; ; Argument[1]; Argument[0].Parameter[0]; value; manual | -| 32 | Summary: ; ; false; callWithNonTypeTemplate; (const T &); ; Argument[*0]; ReturnValue; value; manual | -| 33 | Summary: ; ; false; pthread_create; ; ; Argument[@3]; Argument[2].Parameter[@0]; value; manual | -| 34 | Summary: ; ; false; ymlStepGenerated; ; ; Argument[0]; ReturnValue; taint; df-generated | -| 35 | Summary: ; ; false; ymlStepManual; ; ; Argument[0]; ReturnValue; taint; manual | -| 36 | Summary: ; ; false; ymlStepManual_with_body; ; ; Argument[0]; ReturnValue; taint; manual | -| 37 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual | +| 16 | Source: ; ; false; WinHttpQueryHeaders; ; ; Argument[*3]; remote; manual | +| 17 | Source: ; ; false; WinHttpQueryHeadersEx; ; ; Argument[**8]; remote; manual | +| 18 | Source: ; ; false; WinHttpQueryHeadersEx; ; ; Argument[*5]; remote; manual | +| 19 | Source: ; ; false; WinHttpQueryHeadersEx; ; ; Argument[*6]; remote; manual | +| 20 | Source: ; ; false; WinHttpReadData; ; ; Argument[*1]; remote; manual | +| 21 | Source: ; ; false; WinHttpReadDataEx; ; ; Argument[*1]; remote; manual | +| 22 | Source: ; ; false; ymlSource; ; ; ReturnValue; local; manual | +| 23 | Source: Azure::Core::Http; RawResponse; true; ExtractBodyStream; ; ; ReturnValue[*]; remote; manual | +| 24 | Source: Azure::Core::Http; RawResponse; true; GetBody; ; ; ReturnValue[*]; remote; manual | +| 25 | Source: Azure::Core::Http; RawResponse; true; GetHeaders; ; ; ReturnValue[*]; remote; manual | +| 26 | Source: Azure::Core::Http; Request; true; GetBodyStream; ; ; ReturnValue[*]; remote; manual | +| 27 | Source: Azure::Core::Http; Request; true; GetHeader; ; ; ReturnValue; remote; manual | +| 28 | Source: Azure::Core::Http; Request; true; GetHeaders; ; ; ReturnValue; remote; manual | +| 29 | Source: boost::asio; ; false; read_until; ; ; Argument[*1]; remote; manual | +| 30 | Summary: ; ; false; CommandLineToArgvA; ; ; Argument[*0]; ReturnValue[**]; taint; manual | +| 31 | Summary: ; ; false; CreateRemoteThread; ; ; Argument[@4]; Argument[3].Parameter[@0]; value; manual | +| 32 | Summary: ; ; false; CreateRemoteThreadEx; ; ; Argument[@4]; Argument[3].Parameter[@0]; value; manual | +| 33 | Summary: ; ; false; CreateThread; ; ; Argument[@3]; Argument[2].Parameter[@0]; value; manual | +| 34 | Summary: ; ; false; ReadFileEx; ; ; Argument[*3].Field[@hEvent]; Argument[4].Parameter[*2].Field[@hEvent]; value; manual | +| 35 | Summary: ; ; false; RtlCopyDeviceMemory; ; ; Argument[*@1]; Argument[*@0]; value; manual | +| 36 | Summary: ; ; false; RtlCopyMemory; ; ; Argument[*@1]; Argument[*@0]; value; manual | +| 37 | Summary: ; ; false; RtlCopyMemoryNonTemporal; ; ; Argument[*@1]; Argument[*@0]; value; manual | +| 38 | Summary: ; ; false; RtlCopyUnicodeString; ; ; Argument[*1].Field[*Buffer]; Argument[*0].Field[*Buffer]; value; manual | +| 39 | Summary: ; ; false; RtlCopyVolatileMemory; ; ; Argument[*@1]; Argument[*@0]; value; manual | +| 40 | Summary: ; ; false; RtlInitUnicodeString; ; ; Argument[*1]; Argument[*0].Field[*Buffer]; value; manual | +| 41 | Summary: ; ; false; RtlMoveMemory; ; ; Argument[*@1]; Argument[*@0]; value; manual | +| 42 | Summary: ; ; false; RtlMoveVolatileMemory; ; ; Argument[*@1]; Argument[*@0]; value; manual | +| 43 | Summary: ; ; false; WinHttpCrackUrl; ; ; Argument[*0]; Argument[*3]; taint; manual | +| 44 | Summary: ; ; false; callWithArgument; ; ; Argument[1]; Argument[0].Parameter[0]; value; manual | +| 45 | Summary: ; ; false; callWithNonTypeTemplate; (const T &); ; Argument[*0]; ReturnValue; value; manual | +| 46 | Summary: ; ; false; pthread_create; ; ; Argument[@3]; Argument[2].Parameter[@0]; value; manual | +| 47 | Summary: ; ; false; ymlStepGenerated; ; ; Argument[0]; ReturnValue; taint; df-generated | +| 48 | Summary: ; ; false; ymlStepManual; ; ; Argument[0]; ReturnValue; taint; manual | +| 49 | Summary: ; ; false; ymlStepManual_with_body; ; ; Argument[0]; ReturnValue; taint; manual | +| 50 | Summary: Azure::Core::IO; BodyStream; true; Read; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 51 | Summary: Azure::Core::IO; BodyStream; true; ReadToCount; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 52 | Summary: Azure::Core::IO; BodyStream; true; ReadToEnd; ; ; Argument[-1]; ReturnValue.Element; taint; manual | +| 53 | Summary: Azure; Nullable; true; Value; ; ; Argument[-1]; ReturnValue[*]; taint; manual | +| 54 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual | edges -| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:37 | -| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:17 | -| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | *recv_buffer | provenance | Src:MaD:17 Sink:MaD:2 | +| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:54 | +| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:29 | +| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | *recv_buffer | provenance | Src:MaD:29 Sink:MaD:2 | | asio_streams.cpp:97:37:97:44 | call to source | asio_streams.cpp:98:7:98:14 | send_str | provenance | TaintFunction | | asio_streams.cpp:97:37:97:44 | call to source | asio_streams.cpp:100:64:100:71 | *send_str | provenance | TaintFunction | | asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | | | asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:101:7:101:17 | send_buffer | provenance | | | asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:103:29:103:39 | *send_buffer | provenance | Sink:MaD:2 | | asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | provenance | | -| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:37 | -| test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | provenance | MaD:35 | -| test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | provenance | MaD:34 | -| test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | provenance | MaD:36 | +| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:54 | +| azure.cpp:62:10:62:14 | [summary param] this in Value | azure.cpp:62:10:62:14 | [summary] to write: ReturnValue[*] in Value | provenance | MaD:53 | +| azure.cpp:113:16:113:19 | [summary param] this in Read | azure.cpp:113:16:113:19 | [summary param] *0 in Read [Return] | provenance | MaD:50 | +| azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | azure.cpp:114:16:114:26 | [summary param] *0 in ReadToCount [Return] | provenance | MaD:51 | +| azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue.Element in ReadToEnd | provenance | MaD:52 | +| azure.cpp:115:30:115:38 | [summary] to write: ReturnValue.Element in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue in ReadToEnd [element] | provenance | | +| azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:253:48:253:60 | *call to GetBodyStream | provenance | Src:MaD:26 | +| azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:257:5:257:8 | *resp | provenance | | +| azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:262:5:262:8 | *resp | provenance | | +| azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:266:38:266:41 | *resp | provenance | | +| azure.cpp:257:5:257:8 | *resp | azure.cpp:113:16:113:19 | [summary param] this in Read | provenance | | +| azure.cpp:257:5:257:8 | *resp | azure.cpp:257:16:257:21 | Read output argument | provenance | MaD:50 | +| azure.cpp:257:16:257:21 | Read output argument | azure.cpp:258:10:258:16 | * ... | provenance | | +| azure.cpp:262:5:262:8 | *resp | azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | provenance | | +| azure.cpp:262:5:262:8 | *resp | azure.cpp:262:23:262:28 | ReadToCount output argument | provenance | MaD:51 | +| azure.cpp:262:23:262:28 | ReadToCount output argument | azure.cpp:263:10:263:16 | * ... | provenance | | +| azure.cpp:266:38:266:41 | *resp | azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | provenance | | +| azure.cpp:266:38:266:41 | *resp | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | provenance | MaD:52 | +| azure.cpp:266:44:266:52 | call to ReadToEnd [element] | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | provenance | | +| azure.cpp:266:44:266:52 | call to ReadToEnd [element] | azure.cpp:267:10:267:12 | vec [element] | provenance | | +| azure.cpp:267:10:267:12 | vec [element] | azure.cpp:267:10:267:12 | vec | provenance | | +| azure.cpp:273:62:273:64 | call to GetHeaders | azure.cpp:273:62:273:64 | call to GetHeaders | provenance | Src:MaD:25 | +| azure.cpp:273:62:273:64 | call to GetHeaders | azure.cpp:274:14:274:29 | call to operator[] | provenance | TaintFunction | +| azure.cpp:273:62:273:64 | call to GetHeaders | azure.cpp:274:14:274:29 | call to operator[] | provenance | TaintFunction | +| azure.cpp:273:62:273:64 | call to GetHeaders | azure.cpp:274:14:274:29 | call to operator[] | provenance | TaintFunction | +| azure.cpp:274:14:274:29 | call to operator[] | azure.cpp:274:10:274:29 | call to operator[] | provenance | | +| azure.cpp:274:14:274:29 | call to operator[] | azure.cpp:274:14:274:29 | call to operator[] | provenance | | +| azure.cpp:277:45:277:47 | call to GetBody | azure.cpp:277:45:277:47 | call to GetBody | provenance | Src:MaD:24 | +| azure.cpp:277:45:277:47 | call to GetBody | azure.cpp:278:10:278:13 | body | provenance | | +| azure.cpp:277:45:277:47 | call to GetBody | azure.cpp:278:10:278:13 | body | provenance | | +| azure.cpp:278:10:278:13 | body | azure.cpp:278:10:278:13 | body | provenance | | +| azure.cpp:281:68:281:84 | *call to ExtractBodyStream | azure.cpp:281:68:281:84 | *call to ExtractBodyStream | provenance | Src:MaD:23 | +| azure.cpp:281:68:281:84 | *call to ExtractBodyStream | azure.cpp:282:21:282:23 | *call to get | provenance | | +| azure.cpp:282:21:282:23 | *call to get | azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | provenance | | +| azure.cpp:282:21:282:23 | *call to get | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | provenance | MaD:52 | +| azure.cpp:282:28:282:36 | call to ReadToEnd [element] | azure.cpp:282:10:282:38 | call to ReadToEnd | provenance | | +| azure.cpp:282:28:282:36 | call to ReadToEnd [element] | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | provenance | | +| azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:62:10:62:14 | [summary param] this in Value | provenance | | +| azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:289:63:289:65 | call to Value | provenance | MaD:53 | +| azure.cpp:289:32:289:40 | call to GetHeader | azure.cpp:289:24:289:56 | call to GetHeader | provenance | | +| azure.cpp:289:32:289:40 | call to GetHeader | azure.cpp:289:32:289:40 | call to GetHeader | provenance | Src:MaD:27 | +| azure.cpp:289:63:289:65 | call to Value | azure.cpp:289:63:289:65 | call to Value | provenance | | +| azure.cpp:289:63:289:65 | call to Value | azure.cpp:290:10:290:20 | headerValue | provenance | | +| azure.cpp:289:63:289:65 | call to Value | azure.cpp:290:10:290:20 | headerValue | provenance | | +| azure.cpp:290:10:290:20 | headerValue | azure.cpp:290:10:290:20 | headerValue | provenance | | +| azure.cpp:293:58:293:67 | call to GetHeaders | azure.cpp:293:58:293:67 | call to GetHeaders | provenance | Src:MaD:28 | +| azure.cpp:293:58:293:67 | call to GetHeaders | azure.cpp:294:38:294:53 | call to operator[] | provenance | TaintFunction | +| azure.cpp:294:38:294:53 | call to operator[] | azure.cpp:295:10:295:20 | contentType | provenance | | +| azure.cpp:294:38:294:53 | call to operator[] | azure.cpp:295:10:295:20 | contentType | provenance | | +| azure.cpp:295:10:295:20 | contentType | azure.cpp:295:10:295:20 | contentType | provenance | | +| test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | provenance | MaD:48 | +| test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | provenance | MaD:47 | +| test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | provenance | MaD:49 | | test.cpp:7:47:7:52 | value2 | test.cpp:7:64:7:69 | value2 | provenance | | | test.cpp:7:64:7:69 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | provenance | | -| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:10:10:10:18 | call to ymlSource | provenance | Src:MaD:16 | +| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:10:10:10:18 | call to ymlSource | provenance | Src:MaD:22 | | test.cpp:10:10:10:18 | call to ymlSource | test.cpp:14:10:14:10 | x | provenance | Sink:MaD:1 | | test.cpp:10:10:10:18 | call to ymlSource | test.cpp:17:24:17:24 | x | provenance | | | test.cpp:10:10:10:18 | call to ymlSource | test.cpp:21:27:21:27 | x | provenance | | @@ -61,15 +127,15 @@ edges | test.cpp:17:10:17:22 | call to ymlStepManual | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | | | test.cpp:17:10:17:22 | call to ymlStepManual | test.cpp:18:10:18:10 | y | provenance | Sink:MaD:1 | | test.cpp:17:24:17:24 | x | test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | provenance | | -| test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | MaD:35 | +| test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | MaD:48 | | test.cpp:21:10:21:25 | call to ymlStepGenerated | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | | | test.cpp:21:10:21:25 | call to ymlStepGenerated | test.cpp:22:10:22:10 | z | provenance | Sink:MaD:1 | | test.cpp:21:27:21:27 | x | test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | provenance | | -| test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | MaD:34 | +| test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | MaD:47 | | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | | | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | test.cpp:26:10:26:11 | y2 | provenance | Sink:MaD:1 | | test.cpp:25:35:25:35 | x | test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | provenance | | -| test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | MaD:36 | +| test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | MaD:49 | | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | provenance | | | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | test.cpp:33:10:33:11 | z2 | provenance | Sink:MaD:1 | | test.cpp:32:41:32:41 | x | test.cpp:7:47:7:52 | value2 | provenance | | @@ -77,16 +143,16 @@ edges | test.cpp:46:30:46:32 | *arg [x] | test.cpp:47:12:47:19 | *arg [x] | provenance | | | test.cpp:47:12:47:19 | *arg [x] | test.cpp:48:13:48:13 | *s [x] | provenance | | | test.cpp:48:13:48:13 | *s [x] | test.cpp:48:16:48:16 | x | provenance | Sink:MaD:1 | -| test.cpp:52:5:52:18 | [summary param] *3 in pthread_create [x] | test.cpp:52:5:52:18 | [summary] to write: Argument[2].Parameter[*0] in pthread_create [x] | provenance | MaD:33 | +| test.cpp:52:5:52:18 | [summary param] *3 in pthread_create [x] | test.cpp:52:5:52:18 | [summary] to write: Argument[2].Parameter[*0] in pthread_create [x] | provenance | MaD:46 | | test.cpp:52:5:52:18 | [summary] to write: Argument[2].Parameter[*0] in pthread_create [x] | test.cpp:46:30:46:32 | *arg [x] | provenance | | | test.cpp:56:2:56:2 | *s [post update] [x] | test.cpp:59:55:59:64 | *& ... [x] | provenance | | | test.cpp:56:2:56:18 | ... = ... | test.cpp:56:2:56:2 | *s [post update] [x] | provenance | | -| test.cpp:56:8:56:16 | call to ymlSource | test.cpp:56:2:56:18 | ... = ... | provenance | Src:MaD:16 | +| test.cpp:56:8:56:16 | call to ymlSource | test.cpp:56:2:56:18 | ... = ... | provenance | Src:MaD:22 | | test.cpp:59:55:59:64 | *& ... [x] | test.cpp:52:5:52:18 | [summary param] *3 in pthread_create [x] | provenance | | -| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | provenance | MaD:31 | -| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | provenance | MaD:31 | -| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | provenance | MaD:31 | -| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | provenance | MaD:31 | +| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | provenance | MaD:44 | +| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | provenance | MaD:44 | +| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | provenance | MaD:44 | +| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | provenance | MaD:44 | | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | test.cpp:68:22:68:22 | y | provenance | | | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | test.cpp:74:22:74:22 | y | provenance | | | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | test.cpp:82:22:82:22 | y | provenance | | @@ -95,7 +161,7 @@ edges | test.cpp:74:22:74:22 | y | test.cpp:75:11:75:11 | y | provenance | Sink:MaD:1 | | test.cpp:82:22:82:22 | y | test.cpp:83:11:83:11 | y | provenance | Sink:MaD:1 | | test.cpp:88:22:88:22 | y | test.cpp:89:11:89:11 | y | provenance | Sink:MaD:1 | -| test.cpp:94:10:94:18 | call to ymlSource | test.cpp:94:10:94:18 | call to ymlSource | provenance | Src:MaD:16 | +| test.cpp:94:10:94:18 | call to ymlSource | test.cpp:94:10:94:18 | call to ymlSource | provenance | Src:MaD:22 | | test.cpp:94:10:94:18 | call to ymlSource | test.cpp:97:26:97:26 | x | provenance | | | test.cpp:94:10:94:18 | call to ymlSource | test.cpp:101:26:101:26 | x | provenance | | | test.cpp:94:10:94:18 | call to ymlSource | test.cpp:103:63:103:63 | x | provenance | | @@ -104,28 +170,28 @@ edges | test.cpp:101:26:101:26 | x | test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | provenance | | | test.cpp:103:63:103:63 | x | test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | provenance | | | test.cpp:104:62:104:62 | x | test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | provenance | | -| test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | test.cpp:111:3:111:25 | [summary] to write: ReturnValue in callWithNonTypeTemplate | provenance | MaD:32 | -| test.cpp:114:10:114:18 | call to ymlSource | test.cpp:114:10:114:18 | call to ymlSource | provenance | Src:MaD:16 | +| test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | test.cpp:111:3:111:25 | [summary] to write: ReturnValue in callWithNonTypeTemplate | provenance | MaD:45 | +| test.cpp:114:10:114:18 | call to ymlSource | test.cpp:114:10:114:18 | call to ymlSource | provenance | Src:MaD:22 | | test.cpp:114:10:114:18 | call to ymlSource | test.cpp:118:44:118:44 | *x | provenance | | | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | provenance | | | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | test.cpp:119:10:119:11 | y2 | provenance | Sink:MaD:1 | | test.cpp:118:44:118:44 | *x | test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | provenance | | -| test.cpp:118:44:118:44 | *x | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | provenance | MaD:32 | -| windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | provenance | MaD:18 | +| test.cpp:118:44:118:44 | *x | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | provenance | MaD:45 | +| windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | provenance | MaD:30 | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:22:15:22:29 | *call to GetCommandLineA | provenance | Src:MaD:3 | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:24:8:24:11 | * ... | provenance | | | windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:27:36:27:38 | *cmd | provenance | | | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | provenance | | | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | windows.cpp:30:8:30:15 | * ... | provenance | | | windows.cpp:27:36:27:38 | *cmd | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | provenance | | -| windows.cpp:27:36:27:38 | *cmd | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | provenance | MaD:18 | +| windows.cpp:27:36:27:38 | *cmd | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | provenance | MaD:30 | | windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | provenance | Src:MaD:4 | | windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | windows.cpp:36:10:36:13 | * ... | provenance | | | windows.cpp:39:36:39:38 | GetEnvironmentVariableA output argument | windows.cpp:41:10:41:13 | * ... | provenance | Src:MaD:5 | | windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [*hEvent] | windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx | provenance | | | windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [hEvent] | windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx | provenance | | -| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx | provenance | MaD:22 | -| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[hEvent] in ReadFileEx | provenance | MaD:22 | +| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx | provenance | MaD:34 | +| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[hEvent] in ReadFileEx | provenance | MaD:34 | | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [*hEvent] | windows.cpp:147:16:147:27 | *lpOverlapped [*hEvent] | provenance | | | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [hEvent] | windows.cpp:157:16:157:27 | *lpOverlapped [hEvent] | provenance | | | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [*hEvent] | provenance | | @@ -173,11 +239,11 @@ edges | windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | provenance | Src:MaD:12 | | windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | windows.cpp:333:20:333:52 | *pMapView | provenance | | | windows.cpp:333:20:333:52 | *pMapView | windows.cpp:335:10:335:16 | * ... | provenance | | -| windows.cpp:349:8:349:19 | [summary param] *3 in CreateThread [x] | windows.cpp:349:8:349:19 | [summary] to write: Argument[2].Parameter[*0] in CreateThread [x] | provenance | MaD:21 | +| windows.cpp:349:8:349:19 | [summary param] *3 in CreateThread [x] | windows.cpp:349:8:349:19 | [summary] to write: Argument[2].Parameter[*0] in CreateThread [x] | provenance | MaD:33 | | windows.cpp:349:8:349:19 | [summary] to write: Argument[2].Parameter[*0] in CreateThread [x] | windows.cpp:403:26:403:36 | *lpParameter [x] | provenance | | -| windows.cpp:357:8:357:25 | [summary param] *4 in CreateRemoteThread [x] | windows.cpp:357:8:357:25 | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThread [x] | provenance | MaD:19 | +| windows.cpp:357:8:357:25 | [summary param] *4 in CreateRemoteThread [x] | windows.cpp:357:8:357:25 | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThread [x] | provenance | MaD:31 | | windows.cpp:357:8:357:25 | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThread [x] | windows.cpp:410:26:410:36 | *lpParameter [x] | provenance | | -| windows.cpp:387:8:387:27 | [summary param] *4 in CreateRemoteThreadEx [x] | windows.cpp:387:8:387:27 | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThreadEx [x] | provenance | MaD:20 | +| windows.cpp:387:8:387:27 | [summary param] *4 in CreateRemoteThreadEx [x] | windows.cpp:387:8:387:27 | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThreadEx [x] | provenance | MaD:32 | | windows.cpp:387:8:387:27 | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThreadEx [x] | windows.cpp:417:26:417:36 | *lpParameter [x] | provenance | | | windows.cpp:403:26:403:36 | *lpParameter [x] | windows.cpp:405:10:405:25 | *lpParameter [x] | provenance | | | windows.cpp:405:10:405:25 | *lpParameter [x] | windows.cpp:406:8:406:8 | *s [x] | provenance | | @@ -196,17 +262,17 @@ edges | windows.cpp:439:7:439:8 | *& ... [x] | windows.cpp:349:8:349:19 | [summary param] *3 in CreateThread [x] | provenance | | | windows.cpp:451:7:451:8 | *& ... [x] | windows.cpp:357:8:357:25 | [summary param] *4 in CreateRemoteThread [x] | provenance | | | windows.cpp:464:7:464:8 | *& ... [x] | windows.cpp:387:8:387:27 | [summary param] *4 in CreateRemoteThreadEx [x] | provenance | | -| windows.cpp:473:17:473:37 | [summary param] *1 in RtlCopyVolatileMemory | windows.cpp:473:17:473:37 | [summary param] *0 in RtlCopyVolatileMemory [Return] | provenance | MaD:27 | -| windows.cpp:479:17:479:35 | [summary param] *1 in RtlCopyDeviceMemory | windows.cpp:479:17:479:35 | [summary param] *0 in RtlCopyDeviceMemory [Return] | provenance | MaD:23 | -| windows.cpp:485:6:485:18 | [summary param] *1 in RtlCopyMemory | windows.cpp:485:6:485:18 | [summary param] *0 in RtlCopyMemory [Return] | provenance | MaD:24 | -| windows.cpp:493:6:493:29 | [summary param] *1 in RtlCopyMemoryNonTemporal | windows.cpp:493:6:493:29 | [summary param] *0 in RtlCopyMemoryNonTemporal [Return] | provenance | MaD:25 | +| windows.cpp:473:17:473:37 | [summary param] *1 in RtlCopyVolatileMemory | windows.cpp:473:17:473:37 | [summary param] *0 in RtlCopyVolatileMemory [Return] | provenance | MaD:39 | +| windows.cpp:479:17:479:35 | [summary param] *1 in RtlCopyDeviceMemory | windows.cpp:479:17:479:35 | [summary param] *0 in RtlCopyDeviceMemory [Return] | provenance | MaD:35 | +| windows.cpp:485:6:485:18 | [summary param] *1 in RtlCopyMemory | windows.cpp:485:6:485:18 | [summary param] *0 in RtlCopyMemory [Return] | provenance | MaD:36 | +| windows.cpp:493:6:493:29 | [summary param] *1 in RtlCopyMemoryNonTemporal | windows.cpp:493:6:493:29 | [summary param] *0 in RtlCopyMemoryNonTemporal [Return] | provenance | MaD:37 | | windows.cpp:510:6:510:25 | [summary param] *1 in RtlCopyUnicodeString [*Buffer] | windows.cpp:510:6:510:25 | [summary] read: Argument[*1].Field[*Buffer] in RtlCopyUnicodeString | provenance | | -| windows.cpp:510:6:510:25 | [summary] read: Argument[*1].Field[*Buffer] in RtlCopyUnicodeString | windows.cpp:510:6:510:25 | [summary] to write: Argument[*0].Field[*Buffer] in RtlCopyUnicodeString | provenance | MaD:26 | +| windows.cpp:510:6:510:25 | [summary] read: Argument[*1].Field[*Buffer] in RtlCopyUnicodeString | windows.cpp:510:6:510:25 | [summary] to write: Argument[*0].Field[*Buffer] in RtlCopyUnicodeString | provenance | MaD:38 | | windows.cpp:510:6:510:25 | [summary] to write: Argument[*0] in RtlCopyUnicodeString [*Buffer] | windows.cpp:510:6:510:25 | [summary param] *0 in RtlCopyUnicodeString [Return] [*Buffer] | provenance | | | windows.cpp:510:6:510:25 | [summary] to write: Argument[*0].Field[*Buffer] in RtlCopyUnicodeString | windows.cpp:510:6:510:25 | [summary] to write: Argument[*0] in RtlCopyUnicodeString [*Buffer] | provenance | | -| windows.cpp:515:6:515:18 | [summary param] *1 in RtlMoveMemory | windows.cpp:515:6:515:18 | [summary param] *0 in RtlMoveMemory [Return] | provenance | MaD:29 | -| windows.cpp:521:17:521:37 | [summary param] *1 in RtlMoveVolatileMemory | windows.cpp:521:17:521:37 | [summary param] *0 in RtlMoveVolatileMemory [Return] | provenance | MaD:30 | -| windows.cpp:527:6:527:25 | [summary param] *1 in RtlInitUnicodeString | windows.cpp:527:6:527:25 | [summary] to write: Argument[*0].Field[*Buffer] in RtlInitUnicodeString | provenance | MaD:28 | +| windows.cpp:515:6:515:18 | [summary param] *1 in RtlMoveMemory | windows.cpp:515:6:515:18 | [summary param] *0 in RtlMoveMemory [Return] | provenance | MaD:41 | +| windows.cpp:521:17:521:37 | [summary param] *1 in RtlMoveVolatileMemory | windows.cpp:521:17:521:37 | [summary param] *0 in RtlMoveVolatileMemory [Return] | provenance | MaD:42 | +| windows.cpp:527:6:527:25 | [summary param] *1 in RtlInitUnicodeString | windows.cpp:527:6:527:25 | [summary] to write: Argument[*0].Field[*Buffer] in RtlInitUnicodeString | provenance | MaD:40 | | windows.cpp:527:6:527:25 | [summary] to write: Argument[*0] in RtlInitUnicodeString [*Buffer] | windows.cpp:527:6:527:25 | [summary param] *0 in RtlInitUnicodeString [Return] [*Buffer] | provenance | | | windows.cpp:527:6:527:25 | [summary] to write: Argument[*0].Field[*Buffer] in RtlInitUnicodeString | windows.cpp:527:6:527:25 | [summary] to write: Argument[*0] in RtlInitUnicodeString [*Buffer] | provenance | | | windows.cpp:533:11:533:16 | call to source | windows.cpp:533:11:533:16 | call to source | provenance | | @@ -218,37 +284,51 @@ edges | windows.cpp:533:11:533:16 | call to source | windows.cpp:573:40:573:41 | *& ... | provenance | | | windows.cpp:537:27:537:37 | RtlCopyVolatileMemory output argument | windows.cpp:538:10:538:23 | access to array | provenance | | | windows.cpp:537:40:537:41 | *& ... | windows.cpp:473:17:473:37 | [summary param] *1 in RtlCopyVolatileMemory | provenance | | -| windows.cpp:537:40:537:41 | *& ... | windows.cpp:537:27:537:37 | RtlCopyVolatileMemory output argument | provenance | MaD:27 | +| windows.cpp:537:40:537:41 | *& ... | windows.cpp:537:27:537:37 | RtlCopyVolatileMemory output argument | provenance | MaD:39 | | windows.cpp:542:25:542:35 | RtlCopyDeviceMemory output argument | windows.cpp:543:10:543:23 | access to array | provenance | | | windows.cpp:542:38:542:39 | *& ... | windows.cpp:479:17:479:35 | [summary param] *1 in RtlCopyDeviceMemory | provenance | | -| windows.cpp:542:38:542:39 | *& ... | windows.cpp:542:25:542:35 | RtlCopyDeviceMemory output argument | provenance | MaD:23 | +| windows.cpp:542:38:542:39 | *& ... | windows.cpp:542:25:542:35 | RtlCopyDeviceMemory output argument | provenance | MaD:35 | | windows.cpp:547:19:547:29 | RtlCopyMemory output argument | windows.cpp:548:10:548:23 | access to array | provenance | | | windows.cpp:547:32:547:33 | *& ... | windows.cpp:485:6:485:18 | [summary param] *1 in RtlCopyMemory | provenance | | -| windows.cpp:547:32:547:33 | *& ... | windows.cpp:547:19:547:29 | RtlCopyMemory output argument | provenance | MaD:24 | +| windows.cpp:547:32:547:33 | *& ... | windows.cpp:547:19:547:29 | RtlCopyMemory output argument | provenance | MaD:36 | | windows.cpp:552:30:552:40 | RtlCopyMemoryNonTemporal output argument | windows.cpp:553:10:553:23 | access to array | provenance | | | windows.cpp:552:43:552:44 | *& ... | windows.cpp:493:6:493:29 | [summary param] *1 in RtlCopyMemoryNonTemporal | provenance | | -| windows.cpp:552:43:552:44 | *& ... | windows.cpp:552:30:552:40 | RtlCopyMemoryNonTemporal output argument | provenance | MaD:25 | +| windows.cpp:552:43:552:44 | *& ... | windows.cpp:552:30:552:40 | RtlCopyMemoryNonTemporal output argument | provenance | MaD:37 | | windows.cpp:559:5:559:24 | ... = ... | windows.cpp:561:39:561:44 | *buffer | provenance | | | windows.cpp:559:17:559:24 | call to source | windows.cpp:559:5:559:24 | ... = ... | provenance | | | windows.cpp:561:26:561:36 | RtlInitUnicodeString output argument [*Buffer] | windows.cpp:562:10:562:19 | *src_string [*Buffer] | provenance | | | windows.cpp:561:26:561:36 | RtlInitUnicodeString output argument [*Buffer] | windows.cpp:563:40:563:50 | *& ... [*Buffer] | provenance | | | windows.cpp:561:39:561:44 | *buffer | windows.cpp:527:6:527:25 | [summary param] *1 in RtlInitUnicodeString | provenance | | -| windows.cpp:561:39:561:44 | *buffer | windows.cpp:561:26:561:36 | RtlInitUnicodeString output argument [*Buffer] | provenance | MaD:28 | +| windows.cpp:561:39:561:44 | *buffer | windows.cpp:561:26:561:36 | RtlInitUnicodeString output argument [*Buffer] | provenance | MaD:40 | | windows.cpp:562:10:562:19 | *src_string [*Buffer] | windows.cpp:562:10:562:29 | access to array | provenance | | | windows.cpp:562:10:562:19 | *src_string [*Buffer] | windows.cpp:562:21:562:26 | *Buffer | provenance | | | windows.cpp:562:21:562:26 | *Buffer | windows.cpp:562:10:562:29 | access to array | provenance | | | windows.cpp:563:26:563:37 | RtlCopyUnicodeString output argument [*Buffer] | windows.cpp:564:10:564:20 | *dest_string [*Buffer] | provenance | | | windows.cpp:563:40:563:50 | *& ... [*Buffer] | windows.cpp:510:6:510:25 | [summary param] *1 in RtlCopyUnicodeString [*Buffer] | provenance | | -| windows.cpp:563:40:563:50 | *& ... [*Buffer] | windows.cpp:563:26:563:37 | RtlCopyUnicodeString output argument [*Buffer] | provenance | MaD:26 | +| windows.cpp:563:40:563:50 | *& ... [*Buffer] | windows.cpp:563:26:563:37 | RtlCopyUnicodeString output argument [*Buffer] | provenance | MaD:38 | | windows.cpp:564:10:564:20 | *dest_string [*Buffer] | windows.cpp:564:10:564:30 | access to array | provenance | | | windows.cpp:564:10:564:20 | *dest_string [*Buffer] | windows.cpp:564:22:564:27 | *Buffer | provenance | | | windows.cpp:564:22:564:27 | *Buffer | windows.cpp:564:10:564:30 | access to array | provenance | | | windows.cpp:568:19:568:29 | RtlMoveMemory output argument | windows.cpp:569:10:569:23 | access to array | provenance | | | windows.cpp:568:32:568:33 | *& ... | windows.cpp:515:6:515:18 | [summary param] *1 in RtlMoveMemory | provenance | | -| windows.cpp:568:32:568:33 | *& ... | windows.cpp:568:19:568:29 | RtlMoveMemory output argument | provenance | MaD:29 | +| windows.cpp:568:32:568:33 | *& ... | windows.cpp:568:19:568:29 | RtlMoveMemory output argument | provenance | MaD:41 | | windows.cpp:573:27:573:37 | RtlMoveVolatileMemory output argument | windows.cpp:574:10:574:23 | access to array | provenance | | | windows.cpp:573:40:573:41 | *& ... | windows.cpp:521:17:521:37 | [summary param] *1 in RtlMoveVolatileMemory | provenance | | -| windows.cpp:573:40:573:41 | *& ... | windows.cpp:573:27:573:37 | RtlMoveVolatileMemory output argument | provenance | MaD:30 | +| windows.cpp:573:40:573:41 | *& ... | windows.cpp:573:27:573:37 | RtlMoveVolatileMemory output argument | provenance | MaD:42 | +| windows.cpp:645:45:645:50 | WinHttpReadData output argument | windows.cpp:647:10:647:16 | * ... | provenance | Src:MaD:20 | +| windows.cpp:652:48:652:53 | WinHttpReadDataEx output argument | windows.cpp:654:10:654:16 | * ... | provenance | Src:MaD:21 | +| windows.cpp:659:47:659:52 | WinHttpQueryHeaders output argument | windows.cpp:661:10:661:16 | * ... | provenance | Src:MaD:16 | +| windows.cpp:669:70:669:79 | WinHttpQueryHeadersEx output argument | windows.cpp:673:10:673:29 | * ... | provenance | Src:MaD:18 | +| windows.cpp:669:82:669:87 | WinHttpQueryHeadersEx output argument | windows.cpp:671:10:671:16 | * ... | provenance | Src:MaD:19 | +| windows.cpp:669:105:669:112 | WinHttpQueryHeadersEx output argument | windows.cpp:675:10:675:27 | * ... | provenance | Src:MaD:17 | +| windows.cpp:714:6:714:20 | [summary param] *0 in WinHttpCrackUrl | windows.cpp:714:6:714:20 | [summary param] *3 in WinHttpCrackUrl [Return] | provenance | MaD:43 | +| windows.cpp:728:5:728:28 | ... = ... | windows.cpp:729:35:729:35 | *x | provenance | | +| windows.cpp:728:12:728:28 | call to source | windows.cpp:728:5:728:28 | ... = ... | provenance | | +| windows.cpp:729:35:729:35 | *x | windows.cpp:714:6:714:20 | [summary param] *0 in WinHttpCrackUrl | provenance | | +| windows.cpp:729:35:729:35 | *x | windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | provenance | MaD:43 | +| windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | windows.cpp:731:10:731:36 | * ... | provenance | | +| windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | windows.cpp:733:10:733:35 | * ... | provenance | | +| windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | windows.cpp:735:10:735:37 | * ... | provenance | | nodes | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | semmle.label | [summary param] *0 in buffer | | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | semmle.label | [summary] to write: ReturnValue in buffer | @@ -262,6 +342,59 @@ nodes | asio_streams.cpp:100:64:100:71 | *send_str | semmle.label | *send_str | | asio_streams.cpp:101:7:101:17 | send_buffer | semmle.label | send_buffer | | asio_streams.cpp:103:29:103:39 | *send_buffer | semmle.label | *send_buffer | +| azure.cpp:62:10:62:14 | [summary param] this in Value | semmle.label | [summary param] this in Value | +| azure.cpp:62:10:62:14 | [summary] to write: ReturnValue[*] in Value | semmle.label | [summary] to write: ReturnValue[*] in Value | +| azure.cpp:113:16:113:19 | [summary param] *0 in Read [Return] | semmle.label | [summary param] *0 in Read [Return] | +| azure.cpp:113:16:113:19 | [summary param] this in Read | semmle.label | [summary param] this in Read | +| azure.cpp:114:16:114:26 | [summary param] *0 in ReadToCount [Return] | semmle.label | [summary param] *0 in ReadToCount [Return] | +| azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | semmle.label | [summary param] this in ReadToCount | +| azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | semmle.label | [summary param] this in ReadToEnd | +| azure.cpp:115:30:115:38 | [summary] to write: ReturnValue in ReadToEnd [element] | semmle.label | [summary] to write: ReturnValue in ReadToEnd [element] | +| azure.cpp:115:30:115:38 | [summary] to write: ReturnValue.Element in ReadToEnd | semmle.label | [summary] to write: ReturnValue.Element in ReadToEnd | +| azure.cpp:253:48:253:60 | *call to GetBodyStream | semmle.label | *call to GetBodyStream | +| azure.cpp:253:48:253:60 | *call to GetBodyStream | semmle.label | *call to GetBodyStream | +| azure.cpp:257:5:257:8 | *resp | semmle.label | *resp | +| azure.cpp:257:16:257:21 | Read output argument | semmle.label | Read output argument | +| azure.cpp:258:10:258:16 | * ... | semmle.label | * ... | +| azure.cpp:262:5:262:8 | *resp | semmle.label | *resp | +| azure.cpp:262:23:262:28 | ReadToCount output argument | semmle.label | ReadToCount output argument | +| azure.cpp:263:10:263:16 | * ... | semmle.label | * ... | +| azure.cpp:266:38:266:41 | *resp | semmle.label | *resp | +| azure.cpp:266:44:266:52 | call to ReadToEnd [element] | semmle.label | call to ReadToEnd [element] | +| azure.cpp:266:44:266:52 | call to ReadToEnd [element] | semmle.label | call to ReadToEnd [element] | +| azure.cpp:267:10:267:12 | vec | semmle.label | vec | +| azure.cpp:267:10:267:12 | vec [element] | semmle.label | vec [element] | +| azure.cpp:273:62:273:64 | call to GetHeaders | semmle.label | call to GetHeaders | +| azure.cpp:273:62:273:64 | call to GetHeaders | semmle.label | call to GetHeaders | +| azure.cpp:274:10:274:29 | call to operator[] | semmle.label | call to operator[] | +| azure.cpp:274:14:274:29 | call to operator[] | semmle.label | call to operator[] | +| azure.cpp:274:14:274:29 | call to operator[] | semmle.label | call to operator[] | +| azure.cpp:274:14:274:29 | call to operator[] | semmle.label | call to operator[] | +| azure.cpp:277:45:277:47 | call to GetBody | semmle.label | call to GetBody | +| azure.cpp:277:45:277:47 | call to GetBody | semmle.label | call to GetBody | +| azure.cpp:278:10:278:13 | body | semmle.label | body | +| azure.cpp:278:10:278:13 | body | semmle.label | body | +| azure.cpp:278:10:278:13 | body | semmle.label | body | +| azure.cpp:281:68:281:84 | *call to ExtractBodyStream | semmle.label | *call to ExtractBodyStream | +| azure.cpp:281:68:281:84 | *call to ExtractBodyStream | semmle.label | *call to ExtractBodyStream | +| azure.cpp:282:10:282:38 | call to ReadToEnd | semmle.label | call to ReadToEnd | +| azure.cpp:282:21:282:23 | *call to get | semmle.label | *call to get | +| azure.cpp:282:28:282:36 | call to ReadToEnd [element] | semmle.label | call to ReadToEnd [element] | +| azure.cpp:282:28:282:36 | call to ReadToEnd [element] | semmle.label | call to ReadToEnd [element] | +| azure.cpp:289:24:289:56 | call to GetHeader | semmle.label | call to GetHeader | +| azure.cpp:289:32:289:40 | call to GetHeader | semmle.label | call to GetHeader | +| azure.cpp:289:32:289:40 | call to GetHeader | semmle.label | call to GetHeader | +| azure.cpp:289:63:289:65 | call to Value | semmle.label | call to Value | +| azure.cpp:289:63:289:65 | call to Value | semmle.label | call to Value | +| azure.cpp:290:10:290:20 | headerValue | semmle.label | headerValue | +| azure.cpp:290:10:290:20 | headerValue | semmle.label | headerValue | +| azure.cpp:290:10:290:20 | headerValue | semmle.label | headerValue | +| azure.cpp:293:58:293:67 | call to GetHeaders | semmle.label | call to GetHeaders | +| azure.cpp:293:58:293:67 | call to GetHeaders | semmle.label | call to GetHeaders | +| azure.cpp:294:38:294:53 | call to operator[] | semmle.label | call to operator[] | +| azure.cpp:295:10:295:20 | contentType | semmle.label | contentType | +| azure.cpp:295:10:295:20 | contentType | semmle.label | contentType | +| azure.cpp:295:10:295:20 | contentType | semmle.label | contentType | | test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | semmle.label | [summary param] 0 in ymlStepManual | | test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | semmle.label | [summary] to write: ReturnValue in ymlStepManual | | test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | semmle.label | [summary param] 0 in ymlStepGenerated | @@ -482,8 +615,34 @@ nodes | windows.cpp:573:27:573:37 | RtlMoveVolatileMemory output argument | semmle.label | RtlMoveVolatileMemory output argument | | windows.cpp:573:40:573:41 | *& ... | semmle.label | *& ... | | windows.cpp:574:10:574:23 | access to array | semmle.label | access to array | +| windows.cpp:645:45:645:50 | WinHttpReadData output argument | semmle.label | WinHttpReadData output argument | +| windows.cpp:647:10:647:16 | * ... | semmle.label | * ... | +| windows.cpp:652:48:652:53 | WinHttpReadDataEx output argument | semmle.label | WinHttpReadDataEx output argument | +| windows.cpp:654:10:654:16 | * ... | semmle.label | * ... | +| windows.cpp:659:47:659:52 | WinHttpQueryHeaders output argument | semmle.label | WinHttpQueryHeaders output argument | +| windows.cpp:661:10:661:16 | * ... | semmle.label | * ... | +| windows.cpp:669:70:669:79 | WinHttpQueryHeadersEx output argument | semmle.label | WinHttpQueryHeadersEx output argument | +| windows.cpp:669:82:669:87 | WinHttpQueryHeadersEx output argument | semmle.label | WinHttpQueryHeadersEx output argument | +| windows.cpp:669:105:669:112 | WinHttpQueryHeadersEx output argument | semmle.label | WinHttpQueryHeadersEx output argument | +| windows.cpp:671:10:671:16 | * ... | semmle.label | * ... | +| windows.cpp:673:10:673:29 | * ... | semmle.label | * ... | +| windows.cpp:675:10:675:27 | * ... | semmle.label | * ... | +| windows.cpp:714:6:714:20 | [summary param] *0 in WinHttpCrackUrl | semmle.label | [summary param] *0 in WinHttpCrackUrl | +| windows.cpp:714:6:714:20 | [summary param] *3 in WinHttpCrackUrl [Return] | semmle.label | [summary param] *3 in WinHttpCrackUrl [Return] | +| windows.cpp:728:5:728:28 | ... = ... | semmle.label | ... = ... | +| windows.cpp:728:12:728:28 | call to source | semmle.label | call to source | +| windows.cpp:729:35:729:35 | *x | semmle.label | *x | +| windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | semmle.label | WinHttpCrackUrl output argument | +| windows.cpp:731:10:731:36 | * ... | semmle.label | * ... | +| windows.cpp:733:10:733:35 | * ... | semmle.label | * ... | +| windows.cpp:735:10:735:37 | * ... | semmle.label | * ... | subpaths | asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | asio_streams.cpp:100:44:100:62 | call to buffer | +| azure.cpp:257:5:257:8 | *resp | azure.cpp:113:16:113:19 | [summary param] this in Read | azure.cpp:113:16:113:19 | [summary param] *0 in Read [Return] | azure.cpp:257:16:257:21 | Read output argument | +| azure.cpp:262:5:262:8 | *resp | azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | azure.cpp:114:16:114:26 | [summary param] *0 in ReadToCount [Return] | azure.cpp:262:23:262:28 | ReadToCount output argument | +| azure.cpp:266:38:266:41 | *resp | azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue in ReadToEnd [element] | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | +| azure.cpp:282:21:282:23 | *call to get | azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue in ReadToEnd [element] | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | +| azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:62:10:62:14 | [summary param] this in Value | azure.cpp:62:10:62:14 | [summary] to write: ReturnValue[*] in Value | azure.cpp:289:63:289:65 | call to Value | | test.cpp:17:24:17:24 | x | test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | test.cpp:17:10:17:22 | call to ymlStepManual | | test.cpp:21:27:21:27 | x | test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | test.cpp:21:10:21:25 | call to ymlStepGenerated | | test.cpp:25:35:25:35 | x | test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | @@ -498,4 +657,5 @@ subpaths | windows.cpp:563:40:563:50 | *& ... [*Buffer] | windows.cpp:510:6:510:25 | [summary param] *1 in RtlCopyUnicodeString [*Buffer] | windows.cpp:510:6:510:25 | [summary param] *0 in RtlCopyUnicodeString [Return] [*Buffer] | windows.cpp:563:26:563:37 | RtlCopyUnicodeString output argument [*Buffer] | | windows.cpp:568:32:568:33 | *& ... | windows.cpp:515:6:515:18 | [summary param] *1 in RtlMoveMemory | windows.cpp:515:6:515:18 | [summary param] *0 in RtlMoveMemory [Return] | windows.cpp:568:19:568:29 | RtlMoveMemory output argument | | windows.cpp:573:40:573:41 | *& ... | windows.cpp:521:17:521:37 | [summary param] *1 in RtlMoveVolatileMemory | windows.cpp:521:17:521:37 | [summary param] *0 in RtlMoveVolatileMemory [Return] | windows.cpp:573:27:573:37 | RtlMoveVolatileMemory output argument | +| windows.cpp:729:35:729:35 | *x | windows.cpp:714:6:714:20 | [summary param] *0 in WinHttpCrackUrl | windows.cpp:714:6:714:20 | [summary param] *3 in WinHttpCrackUrl [Return] | windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | testFailures diff --git a/cpp/ql/test/library-tests/dataflow/external-models/sources.expected b/cpp/ql/test/library-tests/dataflow/external-models/sources.expected index cb7e06b801d0..c683d8539a07 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/sources.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/sources.expected @@ -1,4 +1,10 @@ | asio_streams.cpp:87:34:87:44 | read_until output argument | remote | +| azure.cpp:253:48:253:60 | *call to GetBodyStream | remote | +| azure.cpp:273:62:273:64 | call to GetHeaders | remote | +| azure.cpp:277:45:277:47 | call to GetBody | remote | +| azure.cpp:281:68:281:84 | *call to ExtractBodyStream | remote | +| azure.cpp:289:32:289:40 | call to GetHeader | remote | +| azure.cpp:293:58:293:67 | call to GetHeaders | remote | | test.cpp:10:10:10:18 | call to ymlSource | local | | test.cpp:56:8:56:16 | call to ymlSource | local | | test.cpp:94:10:94:18 | call to ymlSource | local | @@ -20,3 +26,9 @@ | windows.cpp:318:23:318:37 | *call to MapViewOfFileEx | local | | windows.cpp:325:23:325:42 | *call to MapViewOfFileFromApp | local | | windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | local | +| windows.cpp:645:45:645:50 | WinHttpReadData output argument | remote | +| windows.cpp:652:48:652:53 | WinHttpReadDataEx output argument | remote | +| windows.cpp:659:47:659:52 | WinHttpQueryHeaders output argument | remote | +| windows.cpp:669:70:669:79 | WinHttpQueryHeadersEx output argument | remote | +| windows.cpp:669:82:669:87 | WinHttpQueryHeadersEx output argument | remote | +| windows.cpp:669:105:669:112 | WinHttpQueryHeadersEx output argument | remote | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/steps.expected b/cpp/ql/test/library-tests/dataflow/external-models/steps.expected index 9f4a5f55fef1..61b05459ade1 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/steps.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/steps.expected @@ -1,6 +1,12 @@ | asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | +| azure.cpp:252:79:252:98 | call to string | azure.cpp:252:62:252:99 | call to Url | +| azure.cpp:257:5:257:8 | *resp | azure.cpp:257:16:257:21 | Read output argument | +| azure.cpp:262:5:262:8 | *resp | azure.cpp:262:23:262:28 | ReadToCount output argument | +| azure.cpp:287:79:287:98 | call to string | azure.cpp:287:62:287:99 | call to Url | +| azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:289:63:289:65 | call to Value | | test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | | test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | | test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | | test.cpp:28:35:28:35 | 0 | test.cpp:28:11:28:33 | call to ymlStepManual_with_body | | windows.cpp:27:36:27:38 | *cmd | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | +| windows.cpp:729:35:729:35 | *x | windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected b/cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected index 1b74b290eb39..15ae50bddc26 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected @@ -5586,3 +5586,6 @@ | Unrecognized output specification "Field[***hEvent]" in summary model. | | Unrecognized output specification "Parameter[***0]" in summary model. | | Unrecognized output specification "Parameter[****0]" in summary model. | +| Unrecognized output specification "ReturnValue[*****]" in summary model. | +| Unrecognized output specification "ReturnValue[****]" in summary model. | +| Unrecognized output specification "ReturnValue[***]" in summary model. | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/windows.cpp b/cpp/ql/test/library-tests/dataflow/external-models/windows.cpp index 3e03c1a69a5b..2900af9034c8 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/windows.cpp +++ b/cpp/ql/test/library-tests/dataflow/external-models/windows.cpp @@ -573,4 +573,165 @@ void test_copy_and_move_memory() { RtlMoveVolatileMemory(dest_buffer, &x, sizeof(x)); sink(dest_buffer[0]); // $ ir } +} + +using HINTERNET = void*; +using ULONGLONG = unsigned long long; +using UINT = unsigned int; +using PDWORD = DWORD*; +using PCSTR = const char*; +typedef union _WINHTTP_HEADER_NAME { + PCWSTR pwszName; + PCSTR pszName; +} WINHTTP_HEADER_NAME, *PWINHTTP_HEADER_NAME; +typedef struct _WINHTTP_EXTENDED_HEADER { + union { + PCWSTR pwszName; + PCSTR pszName; + }; + union { + PCWSTR pwszValue; + PCSTR pszValue; + }; +} WINHTTP_EXTENDED_HEADER, *PWINHTTP_EXTENDED_HEADER; + +BOOL WinHttpReadData( + HINTERNET hRequest, + LPVOID lpBuffer, + DWORD dwNumberOfBytesToRead, + LPDWORD lpdwNumberOfBytesRead +); + +DWORD WinHttpReadDataEx( + HINTERNET hRequest, + LPVOID lpBuffer, + DWORD dwNumberOfBytesToRead, + LPDWORD lpdwNumberOfBytesRead, + ULONGLONG ullFlags, + DWORD cbProperty, + PVOID pvProperty +); + +using LPCWSTR = const wchar_t*; + +BOOL WinHttpQueryHeaders( + HINTERNET hRequest, + DWORD dwInfoLevel, + LPCWSTR pwszName, + LPVOID lpBuffer, + LPDWORD lpdwBufferLength, + LPDWORD lpdwIndex +); + +DWORD WinHttpQueryHeadersEx( + HINTERNET hRequest, + DWORD dwInfoLevel, + ULONGLONG ullFlags, + UINT uiCodePage, + PDWORD pdwIndex, + PWINHTTP_HEADER_NAME pHeaderName, + PVOID pBuffer, + PDWORD pdwBufferLength, + PWINHTTP_EXTENDED_HEADER *ppHeaders, + PDWORD pdwHeadersCount +); + +void sink(PCSTR); + +void test_winhttp(HINTERNET hRequest) { + { + char buffer[1024]; + DWORD bytesRead; + BOOL result = WinHttpReadData(hRequest, buffer, sizeof(buffer), &bytesRead); + sink(buffer); + sink(*buffer); // $ ir + } + { + char buffer[1024]; + DWORD bytesRead; + DWORD result = WinHttpReadDataEx(hRequest, buffer, sizeof(buffer), &bytesRead, 0, 0, nullptr); + sink(buffer); + sink(*buffer); // $ ir + } + { + char buffer[1024]; + DWORD bufferLength = sizeof(buffer); + WinHttpQueryHeaders(hRequest, 0, nullptr, buffer, &bufferLength, nullptr); + sink(buffer); + sink(*buffer); // $ ir + } + { + char buffer[1024]; + DWORD bufferLength = sizeof(buffer); + PWINHTTP_EXTENDED_HEADER headers; + DWORD headersCount; + PWINHTTP_HEADER_NAME headerName; + DWORD result = WinHttpQueryHeadersEx(hRequest, 0, 0, 0, nullptr, headerName, buffer, &bufferLength, &headers, &headersCount); + sink(buffer); + sink(*buffer); // $ ir + sink(headerName->pszName); + sink(*headerName->pszName); // $ ir + sink(headers->pszValue); + sink(*headers->pszValue); // $ ir + } +} + +using LPWSTR = wchar_t*; +using INTERNET_SCHEME = enum { + INTERNET_SCHEME_INVALID = -1, + INTERNET_SCHEME_UNKNOWN = 0, + INTERNET_SCHEME_HTTP = 1, + INTERNET_SCHEME_HTTPS = 2, + INTERNET_SCHEME_FTP = 3, + INTERNET_SCHEME_FILE = 4, + INTERNET_SCHEME_NEWS = 5, + INTERNET_SCHEME_MAILTO = 6, + INTERNET_SCHEME_SNEWS = 7, + INTERNET_SCHEME_SOCKS = 8, + INTERNET_SCHEME_WAIS = 9, + INTERNET_SCHEME_LAST = 10 +}; +using INTERNET_PORT = unsigned short; + +typedef struct _WINHTTP_URL_COMPONENTS { + DWORD dwStructSize; + LPWSTR lpszScheme; + DWORD dwSchemeLength; + INTERNET_SCHEME nScheme; + LPWSTR lpszHostName; + DWORD dwHostNameLength; + INTERNET_PORT nPort; + LPWSTR lpszUserName; + DWORD dwUserNameLength; + LPWSTR lpszPassword; + DWORD dwPasswordLength; + LPWSTR lpszUrlPath; + DWORD dwUrlPathLength; + LPWSTR lpszExtraInfo; + DWORD dwExtraInfoLength; +} URL_COMPONENTS, *LPURL_COMPONENTS; + +BOOL WinHttpCrackUrl( + LPCWSTR pwszUrl, + DWORD dwUrlLength, + DWORD dwFlags, + LPURL_COMPONENTS lpUrlComponents +); + +void sink(LPWSTR); + +void test_winhttp_crack_url() { + { + URL_COMPONENTS urlComponents; + urlComponents.dwStructSize = sizeof(URL_COMPONENTS); + wchar_t x[256]; + x[0] = (wchar_t)source(); + BOOL result = WinHttpCrackUrl(x, 0, 0, &urlComponents); + sink(urlComponents.lpszHostName); + sink(*urlComponents.lpszHostName); // $ ir + sink(urlComponents.lpszUrlPath); + sink(*urlComponents.lpszUrlPath); // $ ir + sink(urlComponents.lpszExtraInfo); + sink(*urlComponents.lpszExtraInfo); // $ ir + } } \ No newline at end of file diff --git a/cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.ql b/cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.ql index 8948c65e33c0..ce7b79991020 100644 --- a/cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.ql +++ b/cpp/ql/test/library-tests/dataflow/ir-barrier-guards/test.ql @@ -15,7 +15,10 @@ predicate instructionGuardChecks(IRGuardCondition gc, Instruction checked, boole module BarrierGuard = DataFlow::InstructionBarrierGuard; predicate indirectBarrierGuard(DataFlow::Node node, string s) { - node = BarrierGuard::getAnIndirectBarrierNode(_) and + // This any(...) could technically be removed, but it helps us verify that we don't + // accidentially change the API of this predicate (for instance, by having + // the column be a unit parameter). + node = BarrierGuard::getAnIndirectBarrierNode(any(int indirectionIndex)) and if node.isGLValue() then s = "glval<" + node.getType().toString().replaceAll(" ", "") + ">" else s = node.getType().toString().replaceAll(" ", "") diff --git a/cpp/ql/test/library-tests/dataflow/models-as-data/FlowSummaryNode.ql b/cpp/ql/test/library-tests/dataflow/models-as-data/FlowSummaryNode.ql index 399e2e129b3b..7b551515b460 100644 --- a/cpp/ql/test/library-tests/dataflow/models-as-data/FlowSummaryNode.ql +++ b/cpp/ql/test/library-tests/dataflow/models-as-data/FlowSummaryNode.ql @@ -1,6 +1,7 @@ import testModels private import semmle.code.cpp.ir.dataflow.internal.DataFlowPrivate private import semmle.code.cpp.ir.dataflow.internal.DataFlowUtil +private import semmle.code.cpp.ir.dataflow.internal.DataFlowNodes string describe(DataFlow::Node n) { n instanceof ParameterNode and result = "ParameterNode" diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected index 0c520190c8b0..231b0b22e320 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected @@ -513,518 +513,553 @@ | test.c:445:7:445:9 | rhs | 0 | | test.c:445:19:445:21 | rhs | 0 | | test.c:446:10:446:12 | rhs | 0 | -| test.c:450:7:450:7 | a | -2147483648 | -| test.c:451:9:451:9 | b | -2147483648 | -| test.c:452:7:452:7 | a | 17 | -| test.c:452:12:452:12 | b | 23 | -| test.c:454:9:454:9 | a | 17 | -| test.c:455:7:455:7 | b | -2147483648 | -| test.c:460:11:460:11 | a | -2147483648 | -| test.c:460:15:460:15 | b | -2147483648 | -| test.c:461:10:461:10 | a | -2147483648 | -| test.c:461:14:461:14 | b | -2147483648 | -| test.c:468:10:468:11 | ip | 0 | -| test.c:468:20:468:21 | ip | 0 | -| test.c:468:40:468:41 | ip | 0 | -| test.c:469:14:469:15 | ip | 1 | -| test.c:470:14:470:15 | ip | 0 | -| test.c:470:34:470:35 | ip | 0 | -| test.c:471:11:471:12 | ip | 0 | -| test.c:472:13:472:14 | ip | 0 | -| test.c:473:14:473:15 | ip | 0 | -| test.c:474:14:474:15 | ip | 0 | -| test.c:475:15:475:16 | ip | 0 | -| test.c:475:41:475:42 | ip | 0 | -| test.c:475:52:475:53 | ip | 0 | -| test.c:475:67:475:68 | ip | 0 | -| test.c:475:78:475:79 | ip | 0 | -| test.c:476:18:476:19 | ip | 0 | -| test.c:477:23:477:24 | ip | 0 | -| test.c:477:34:477:35 | ip | 0 | -| test.c:478:25:478:26 | ip | 0 | -| test.c:479:20:479:21 | ip | 0 | -| test.c:480:11:480:12 | ip | 0 | -| test.c:480:26:480:27 | ip | 0 | -| test.c:481:16:481:17 | ip | 0 | -| test.c:482:16:482:17 | ip | 0 | -| test.c:483:16:483:17 | ip | 0 | -| test.c:484:17:484:18 | ip | 0 | -| test.c:485:22:485:23 | ip | 0 | -| test.c:485:33:485:34 | ip | 0 | -| test.c:485:48:485:49 | ip | 0 | -| test.c:485:59:485:60 | ip | 0 | -| test.c:486:20:486:21 | ip | 0 | -| test.c:487:25:487:26 | ip | 0 | -| test.c:487:36:487:37 | ip | 0 | -| test.c:488:27:488:28 | ip | 0 | -| test.c:489:22:489:23 | ip | 0 | -| test.c:490:15:490:16 | ip | 0 | -| test.c:490:30:490:31 | ip | 0 | -| test.c:491:11:491:12 | ip | 0 | -| test.c:492:12:492:13 | ip | 0 | -| test.c:493:12:493:13 | ip | 0 | -| test.c:494:13:494:14 | ip | 0 | -| test.c:494:39:494:40 | ip | 0 | -| test.c:494:50:494:51 | ip | 0 | -| test.c:494:65:494:66 | ip | 0 | -| test.c:494:76:494:77 | ip | 0 | -| test.c:495:16:495:17 | ip | 0 | -| test.c:496:21:496:22 | ip | 0 | -| test.c:496:32:496:33 | ip | 0 | -| test.c:497:23:497:24 | ip | 0 | -| test.c:498:18:498:19 | ip | 0 | -| test.c:499:11:499:12 | ip | 0 | -| test.c:499:17:499:18 | ip | 0 | -| test.c:499:37:499:38 | ip | 0 | -| test.c:499:43:499:44 | ip | 0 | -| test.c:500:14:500:15 | ip | 0 | -| test.c:501:14:501:15 | ip | 0 | -| test.c:502:14:502:15 | ip | 0 | -| test.c:503:15:503:16 | ip | 0 | -| test.c:503:41:503:42 | ip | 0 | -| test.c:503:52:503:53 | ip | 0 | -| test.c:503:67:503:68 | ip | 0 | -| test.c:503:78:503:79 | ip | 0 | -| test.c:504:18:504:19 | ip | 0 | -| test.c:505:23:505:24 | ip | 0 | -| test.c:505:34:505:35 | ip | 0 | -| test.c:506:25:506:26 | ip | 0 | -| test.c:507:20:507:21 | ip | 0 | -| test.c:508:14:508:15 | ip | 0 | -| test.c:508:20:508:21 | ip | 0 | -| test.c:509:16:509:17 | ip | 0 | +| test.c:452:7:452:9 | rhs | 0 | +| test.c:452:19:452:21 | rhs | 0 | +| test.c:452:38:452:40 | rhs | 10 | +| test.c:453:7:453:9 | rhs | 0 | +| test.c:453:19:453:21 | rhs | 0 | +| test.c:453:38:453:40 | rhs | 11 | +| test.c:454:7:454:9 | rhs | 0 | +| test.c:454:19:454:21 | rhs | 0 | +| test.c:454:38:454:40 | rhs | 12 | +| test.c:455:7:455:9 | rhs | 0 | +| test.c:455:19:455:21 | rhs | 0 | +| test.c:455:38:455:40 | rhs | 13 | +| test.c:456:7:456:9 | rhs | 0 | +| test.c:456:19:456:21 | rhs | 0 | +| test.c:456:38:456:40 | rhs | 14 | +| test.c:457:7:457:9 | rhs | 0 | +| test.c:457:19:457:21 | rhs | 0 | +| test.c:457:38:457:40 | rhs | 15 | +| test.c:458:7:458:9 | rhs | 0 | +| test.c:458:19:458:21 | rhs | 0 | +| test.c:458:38:458:40 | rhs | 16 | +| test.c:459:7:459:9 | rhs | 0 | +| test.c:459:19:459:21 | rhs | 0 | +| test.c:459:38:459:40 | rhs | 17 | +| test.c:460:7:460:9 | rhs | 0 | +| test.c:460:19:460:21 | rhs | 0 | +| test.c:460:38:460:40 | rhs | 18 | +| test.c:461:7:461:9 | rhs | 0 | +| test.c:461:19:461:21 | rhs | 0 | +| test.c:461:38:461:40 | rhs | 19 | +| test.c:462:7:462:9 | rhs | 0 | +| test.c:462:19:462:21 | rhs | 0 | +| test.c:462:38:462:40 | rhs | 20 | +| test.c:463:10:463:12 | rhs | 0 | +| test.c:467:7:467:7 | a | -2147483648 | +| test.c:468:9:468:9 | b | -2147483648 | +| test.c:469:7:469:7 | a | 17 | +| test.c:469:12:469:12 | b | 23 | +| test.c:471:9:471:9 | a | 17 | +| test.c:472:7:472:7 | b | -2147483648 | +| test.c:477:11:477:11 | a | -2147483648 | +| test.c:477:15:477:15 | b | -2147483648 | +| test.c:478:10:478:10 | a | -2147483648 | +| test.c:478:14:478:14 | b | -2147483648 | +| test.c:485:10:485:11 | ip | 0 | +| test.c:485:20:485:21 | ip | 0 | +| test.c:485:40:485:41 | ip | 0 | +| test.c:486:14:486:15 | ip | 1 | +| test.c:487:14:487:15 | ip | 0 | +| test.c:487:34:487:35 | ip | 0 | +| test.c:488:11:488:12 | ip | 0 | +| test.c:489:13:489:14 | ip | 0 | +| test.c:490:14:490:15 | ip | 0 | +| test.c:491:14:491:15 | ip | 0 | +| test.c:492:15:492:16 | ip | 0 | +| test.c:492:41:492:42 | ip | 0 | +| test.c:492:52:492:53 | ip | 0 | +| test.c:492:67:492:68 | ip | 0 | +| test.c:492:78:492:79 | ip | 0 | +| test.c:493:18:493:19 | ip | 0 | +| test.c:494:23:494:24 | ip | 0 | +| test.c:494:34:494:35 | ip | 0 | +| test.c:495:25:495:26 | ip | 0 | +| test.c:496:20:496:21 | ip | 0 | +| test.c:497:11:497:12 | ip | 0 | +| test.c:497:26:497:27 | ip | 0 | +| test.c:498:16:498:17 | ip | 0 | +| test.c:499:16:499:17 | ip | 0 | +| test.c:500:16:500:17 | ip | 0 | +| test.c:501:17:501:18 | ip | 0 | +| test.c:502:22:502:23 | ip | 0 | +| test.c:502:33:502:34 | ip | 0 | +| test.c:502:48:502:49 | ip | 0 | +| test.c:502:59:502:60 | ip | 0 | +| test.c:503:20:503:21 | ip | 0 | +| test.c:504:25:504:26 | ip | 0 | +| test.c:504:36:504:37 | ip | 0 | +| test.c:505:27:505:28 | ip | 0 | +| test.c:506:22:506:23 | ip | 0 | +| test.c:507:15:507:16 | ip | 0 | +| test.c:507:30:507:31 | ip | 0 | +| test.c:508:11:508:12 | ip | 0 | +| test.c:509:12:509:13 | ip | 0 | | test.c:510:12:510:13 | ip | 0 | -| test.c:511:14:511:15 | ip | 0 | -| test.c:512:15:512:16 | ip | 0 | -| test.c:513:16:513:17 | ip | 0 | -| test.c:514:16:514:17 | ip | 0 | -| test.c:515:17:515:18 | ip | 0 | -| test.c:516:22:516:23 | ip | 0 | -| test.c:516:33:516:34 | ip | 0 | -| test.c:516:48:516:49 | ip | 0 | -| test.c:516:59:516:60 | ip | 0 | -| test.c:517:20:517:21 | ip | 0 | -| test.c:518:25:518:26 | ip | 0 | -| test.c:518:36:518:37 | ip | 0 | -| test.c:519:27:519:28 | ip | 0 | -| test.c:520:22:520:23 | ip | 0 | -| test.c:521:13:521:14 | ip | 0 | -| test.c:521:28:521:29 | ip | 0 | -| test.c:522:18:522:19 | ip | 0 | -| test.c:523:18:523:19 | ip | 0 | -| test.c:524:18:524:19 | ip | 0 | -| test.c:525:19:525:20 | ip | 0 | -| test.c:526:24:526:25 | ip | 0 | -| test.c:526:35:526:36 | ip | 0 | -| test.c:526:50:526:51 | ip | 0 | -| test.c:526:61:526:62 | ip | 0 | -| test.c:527:22:527:23 | ip | 0 | -| test.c:528:27:528:28 | ip | 0 | -| test.c:528:38:528:39 | ip | 0 | -| test.c:529:29:529:30 | ip | 0 | -| test.c:530:24:530:25 | ip | 0 | -| test.c:531:17:531:18 | ip | 0 | -| test.c:531:32:531:33 | ip | 0 | -| test.c:532:14:532:15 | ip | 0 | -| test.c:533:18:533:19 | ip | 0 | -| test.c:534:18:534:19 | ip | 0 | -| test.c:535:19:535:20 | ip | 0 | -| test.c:536:24:536:25 | ip | 0 | -| test.c:536:35:536:36 | ip | 0 | -| test.c:536:50:536:51 | ip | 0 | -| test.c:536:61:536:62 | ip | 0 | +| test.c:511:13:511:14 | ip | 0 | +| test.c:511:39:511:40 | ip | 0 | +| test.c:511:50:511:51 | ip | 0 | +| test.c:511:65:511:66 | ip | 0 | +| test.c:511:76:511:77 | ip | 0 | +| test.c:512:16:512:17 | ip | 0 | +| test.c:513:21:513:22 | ip | 0 | +| test.c:513:32:513:33 | ip | 0 | +| test.c:514:23:514:24 | ip | 0 | +| test.c:515:18:515:19 | ip | 0 | +| test.c:516:11:516:12 | ip | 0 | +| test.c:516:17:516:18 | ip | 0 | +| test.c:516:37:516:38 | ip | 0 | +| test.c:516:43:516:44 | ip | 0 | +| test.c:517:14:517:15 | ip | 0 | +| test.c:518:14:518:15 | ip | 0 | +| test.c:519:14:519:15 | ip | 0 | +| test.c:520:15:520:16 | ip | 0 | +| test.c:520:41:520:42 | ip | 0 | +| test.c:520:52:520:53 | ip | 0 | +| test.c:520:67:520:68 | ip | 0 | +| test.c:520:78:520:79 | ip | 0 | +| test.c:521:18:521:19 | ip | 0 | +| test.c:522:23:522:24 | ip | 0 | +| test.c:522:34:522:35 | ip | 0 | +| test.c:523:25:523:26 | ip | 0 | +| test.c:524:20:524:21 | ip | 0 | +| test.c:525:14:525:15 | ip | 0 | +| test.c:525:20:525:21 | ip | 0 | +| test.c:526:16:526:17 | ip | 0 | +| test.c:527:12:527:13 | ip | 0 | +| test.c:528:14:528:15 | ip | 0 | +| test.c:529:15:529:16 | ip | 0 | +| test.c:530:16:530:17 | ip | 0 | +| test.c:531:16:531:17 | ip | 0 | +| test.c:532:17:532:18 | ip | 0 | +| test.c:533:22:533:23 | ip | 0 | +| test.c:533:33:533:34 | ip | 0 | +| test.c:533:48:533:49 | ip | 0 | +| test.c:533:59:533:60 | ip | 0 | +| test.c:534:20:534:21 | ip | 0 | +| test.c:535:25:535:26 | ip | 0 | +| test.c:535:36:535:37 | ip | 0 | +| test.c:536:27:536:28 | ip | 0 | | test.c:537:22:537:23 | ip | 0 | -| test.c:538:27:538:28 | ip | 0 | -| test.c:538:38:538:39 | ip | 0 | -| test.c:539:29:539:30 | ip | 0 | -| test.c:540:24:540:25 | ip | 0 | -| test.c:541:17:541:18 | ip | 0 | -| test.c:541:23:541:24 | ip | 0 | -| test.c:541:43:541:44 | ip | 0 | -| test.c:541:49:541:50 | ip | 0 | -| test.c:542:16:542:17 | ip | 0 | -| test.c:543:16:543:17 | ip | 0 | -| test.c:544:16:544:17 | ip | 0 | -| test.c:545:17:545:18 | ip | 0 | -| test.c:546:22:546:23 | ip | 0 | -| test.c:546:33:546:34 | ip | 0 | -| test.c:546:48:546:49 | ip | 0 | -| test.c:546:59:546:60 | ip | 0 | -| test.c:547:20:547:21 | ip | 0 | -| test.c:548:25:548:26 | ip | 0 | -| test.c:548:36:548:37 | ip | 0 | -| test.c:549:27:549:28 | ip | 0 | -| test.c:550:22:550:23 | ip | 0 | -| test.c:551:16:551:17 | ip | 0 | -| test.c:551:22:551:23 | ip | 0 | -| test.c:552:18:552:19 | ip | 0 | -| test.c:553:14:553:15 | ip | 0 | -| test.c:554:14:554:15 | ip | 0 | -| test.c:554:24:554:25 | ip | 0 | -| test.c:554:44:554:45 | ip | 0 | -| test.c:555:16:555:17 | ip | 1 | -| test.c:556:16:556:17 | ip | 0 | -| test.c:556:36:556:37 | ip | 0 | -| test.c:557:14:557:15 | ip | 0 | -| test.c:558:19:558:20 | ip | 0 | -| test.c:559:20:559:21 | ip | 0 | -| test.c:560:20:560:21 | ip | 0 | -| test.c:561:21:561:22 | ip | 0 | -| test.c:562:26:562:27 | ip | 0 | -| test.c:562:37:562:38 | ip | 0 | -| test.c:562:52:562:53 | ip | 0 | -| test.c:562:63:562:64 | ip | 0 | -| test.c:563:24:563:25 | ip | 0 | -| test.c:564:29:564:30 | ip | 0 | -| test.c:564:40:564:41 | ip | 0 | -| test.c:565:31:565:32 | ip | 0 | -| test.c:566:26:566:27 | ip | 0 | -| test.c:567:17:567:18 | ip | 0 | -| test.c:567:32:567:33 | ip | 0 | +| test.c:538:13:538:14 | ip | 0 | +| test.c:538:28:538:29 | ip | 0 | +| test.c:539:18:539:19 | ip | 0 | +| test.c:540:18:540:19 | ip | 0 | +| test.c:541:18:541:19 | ip | 0 | +| test.c:542:19:542:20 | ip | 0 | +| test.c:543:24:543:25 | ip | 0 | +| test.c:543:35:543:36 | ip | 0 | +| test.c:543:50:543:51 | ip | 0 | +| test.c:543:61:543:62 | ip | 0 | +| test.c:544:22:544:23 | ip | 0 | +| test.c:545:27:545:28 | ip | 0 | +| test.c:545:38:545:39 | ip | 0 | +| test.c:546:29:546:30 | ip | 0 | +| test.c:547:24:547:25 | ip | 0 | +| test.c:548:17:548:18 | ip | 0 | +| test.c:548:32:548:33 | ip | 0 | +| test.c:549:14:549:15 | ip | 0 | +| test.c:550:18:550:19 | ip | 0 | +| test.c:551:18:551:19 | ip | 0 | +| test.c:552:19:552:20 | ip | 0 | +| test.c:553:24:553:25 | ip | 0 | +| test.c:553:35:553:36 | ip | 0 | +| test.c:553:50:553:51 | ip | 0 | +| test.c:553:61:553:62 | ip | 0 | +| test.c:554:22:554:23 | ip | 0 | +| test.c:555:27:555:28 | ip | 0 | +| test.c:555:38:555:39 | ip | 0 | +| test.c:556:29:556:30 | ip | 0 | +| test.c:557:24:557:25 | ip | 0 | +| test.c:558:17:558:18 | ip | 0 | +| test.c:558:23:558:24 | ip | 0 | +| test.c:558:43:558:44 | ip | 0 | +| test.c:558:49:558:50 | ip | 0 | +| test.c:559:16:559:17 | ip | 0 | +| test.c:560:16:560:17 | ip | 0 | +| test.c:561:16:561:17 | ip | 0 | +| test.c:562:17:562:18 | ip | 0 | +| test.c:563:22:563:23 | ip | 0 | +| test.c:563:33:563:34 | ip | 0 | +| test.c:563:48:563:49 | ip | 0 | +| test.c:563:59:563:60 | ip | 0 | +| test.c:564:20:564:21 | ip | 0 | +| test.c:565:25:565:26 | ip | 0 | +| test.c:565:36:565:37 | ip | 0 | +| test.c:566:27:566:28 | ip | 0 | +| test.c:567:22:567:23 | ip | 0 | +| test.c:568:16:568:17 | ip | 0 | | test.c:568:22:568:23 | ip | 0 | -| test.c:569:22:569:23 | ip | 0 | -| test.c:570:22:570:23 | ip | 0 | -| test.c:571:23:571:24 | ip | 0 | -| test.c:572:28:572:29 | ip | 0 | -| test.c:572:39:572:40 | ip | 0 | -| test.c:572:54:572:55 | ip | 0 | -| test.c:572:65:572:66 | ip | 0 | -| test.c:573:26:573:27 | ip | 0 | -| test.c:574:31:574:32 | ip | 0 | -| test.c:574:42:574:43 | ip | 0 | -| test.c:575:33:575:34 | ip | 0 | -| test.c:576:28:576:29 | ip | 0 | -| test.c:577:21:577:22 | ip | 0 | -| test.c:577:36:577:37 | ip | 0 | -| test.c:578:17:578:18 | ip | 0 | -| test.c:579:18:579:19 | ip | 0 | -| test.c:580:18:580:19 | ip | 0 | -| test.c:581:19:581:20 | ip | 0 | -| test.c:582:24:582:25 | ip | 0 | -| test.c:582:35:582:36 | ip | 0 | -| test.c:582:50:582:51 | ip | 0 | -| test.c:582:61:582:62 | ip | 0 | -| test.c:583:22:583:23 | ip | 0 | -| test.c:584:27:584:28 | ip | 0 | -| test.c:584:38:584:39 | ip | 0 | -| test.c:585:29:585:30 | ip | 0 | -| test.c:586:24:586:25 | ip | 0 | -| test.c:587:17:587:18 | ip | 0 | -| test.c:587:23:587:24 | ip | 0 | -| test.c:587:43:587:44 | ip | 0 | -| test.c:587:49:587:50 | ip | 0 | -| test.c:588:20:588:21 | ip | 0 | -| test.c:589:20:589:21 | ip | 0 | -| test.c:590:20:590:21 | ip | 0 | -| test.c:591:21:591:22 | ip | 0 | -| test.c:592:26:592:27 | ip | 0 | -| test.c:592:37:592:38 | ip | 0 | -| test.c:592:52:592:53 | ip | 0 | -| test.c:592:63:592:64 | ip | 0 | -| test.c:593:24:593:25 | ip | 0 | -| test.c:594:29:594:30 | ip | 0 | -| test.c:594:40:594:41 | ip | 0 | -| test.c:595:31:595:32 | ip | 0 | -| test.c:596:26:596:27 | ip | 0 | -| test.c:597:20:597:21 | ip | 0 | -| test.c:597:26:597:27 | ip | 0 | -| test.c:598:22:598:23 | ip | 0 | -| test.c:599:18:599:19 | ip | 0 | -| test.c:600:16:600:17 | ip | 0 | -| test.c:601:17:601:18 | ip | 0 | -| test.c:602:18:602:19 | ip | 0 | -| test.c:603:18:603:19 | ip | 0 | -| test.c:604:19:604:20 | ip | 0 | -| test.c:605:24:605:25 | ip | 0 | -| test.c:605:35:605:36 | ip | 0 | -| test.c:605:50:605:51 | ip | 0 | -| test.c:605:61:605:62 | ip | 0 | -| test.c:606:22:606:23 | ip | 0 | -| test.c:607:27:607:28 | ip | 0 | -| test.c:607:38:607:39 | ip | 0 | -| test.c:608:29:608:30 | ip | 0 | -| test.c:609:24:609:25 | ip | 0 | -| test.c:610:15:610:16 | ip | 0 | -| test.c:610:30:610:31 | ip | 0 | -| test.c:611:20:611:21 | ip | 0 | -| test.c:612:20:612:21 | ip | 0 | -| test.c:613:20:613:21 | ip | 0 | -| test.c:614:21:614:22 | ip | 0 | -| test.c:615:26:615:27 | ip | 0 | -| test.c:615:37:615:38 | ip | 0 | -| test.c:615:52:615:53 | ip | 0 | -| test.c:615:63:615:64 | ip | 0 | -| test.c:616:24:616:25 | ip | 0 | -| test.c:617:29:617:30 | ip | 0 | -| test.c:617:40:617:41 | ip | 0 | -| test.c:618:31:618:32 | ip | 0 | -| test.c:619:26:619:27 | ip | 0 | -| test.c:620:19:620:20 | ip | 0 | -| test.c:620:34:620:35 | ip | 0 | -| test.c:621:16:621:17 | ip | 0 | -| test.c:622:20:622:21 | ip | 0 | -| test.c:623:20:623:21 | ip | 0 | -| test.c:624:21:624:22 | ip | 0 | -| test.c:625:26:625:27 | ip | 0 | -| test.c:625:37:625:38 | ip | 0 | -| test.c:625:52:625:53 | ip | 0 | -| test.c:625:63:625:64 | ip | 0 | +| test.c:569:18:569:19 | ip | 0 | +| test.c:570:14:570:15 | ip | 0 | +| test.c:571:14:571:15 | ip | 0 | +| test.c:571:24:571:25 | ip | 0 | +| test.c:571:44:571:45 | ip | 0 | +| test.c:572:16:572:17 | ip | 1 | +| test.c:573:16:573:17 | ip | 0 | +| test.c:573:36:573:37 | ip | 0 | +| test.c:574:14:574:15 | ip | 0 | +| test.c:575:19:575:20 | ip | 0 | +| test.c:576:20:576:21 | ip | 0 | +| test.c:577:20:577:21 | ip | 0 | +| test.c:578:21:578:22 | ip | 0 | +| test.c:579:26:579:27 | ip | 0 | +| test.c:579:37:579:38 | ip | 0 | +| test.c:579:52:579:53 | ip | 0 | +| test.c:579:63:579:64 | ip | 0 | +| test.c:580:24:580:25 | ip | 0 | +| test.c:581:29:581:30 | ip | 0 | +| test.c:581:40:581:41 | ip | 0 | +| test.c:582:31:582:32 | ip | 0 | +| test.c:583:26:583:27 | ip | 0 | +| test.c:584:17:584:18 | ip | 0 | +| test.c:584:32:584:33 | ip | 0 | +| test.c:585:22:585:23 | ip | 0 | +| test.c:586:22:586:23 | ip | 0 | +| test.c:587:22:587:23 | ip | 0 | +| test.c:588:23:588:24 | ip | 0 | +| test.c:589:28:589:29 | ip | 0 | +| test.c:589:39:589:40 | ip | 0 | +| test.c:589:54:589:55 | ip | 0 | +| test.c:589:65:589:66 | ip | 0 | +| test.c:590:26:590:27 | ip | 0 | +| test.c:591:31:591:32 | ip | 0 | +| test.c:591:42:591:43 | ip | 0 | +| test.c:592:33:592:34 | ip | 0 | +| test.c:593:28:593:29 | ip | 0 | +| test.c:594:21:594:22 | ip | 0 | +| test.c:594:36:594:37 | ip | 0 | +| test.c:595:17:595:18 | ip | 0 | +| test.c:596:18:596:19 | ip | 0 | +| test.c:597:18:597:19 | ip | 0 | +| test.c:598:19:598:20 | ip | 0 | +| test.c:599:24:599:25 | ip | 0 | +| test.c:599:35:599:36 | ip | 0 | +| test.c:599:50:599:51 | ip | 0 | +| test.c:599:61:599:62 | ip | 0 | +| test.c:600:22:600:23 | ip | 0 | +| test.c:601:27:601:28 | ip | 0 | +| test.c:601:38:601:39 | ip | 0 | +| test.c:602:29:602:30 | ip | 0 | +| test.c:603:24:603:25 | ip | 0 | +| test.c:604:17:604:18 | ip | 0 | +| test.c:604:23:604:24 | ip | 0 | +| test.c:604:43:604:44 | ip | 0 | +| test.c:604:49:604:50 | ip | 0 | +| test.c:605:20:605:21 | ip | 0 | +| test.c:606:20:606:21 | ip | 0 | +| test.c:607:20:607:21 | ip | 0 | +| test.c:608:21:608:22 | ip | 0 | +| test.c:609:26:609:27 | ip | 0 | +| test.c:609:37:609:38 | ip | 0 | +| test.c:609:52:609:53 | ip | 0 | +| test.c:609:63:609:64 | ip | 0 | +| test.c:610:24:610:25 | ip | 0 | +| test.c:611:29:611:30 | ip | 0 | +| test.c:611:40:611:41 | ip | 0 | +| test.c:612:31:612:32 | ip | 0 | +| test.c:613:26:613:27 | ip | 0 | +| test.c:614:20:614:21 | ip | 0 | +| test.c:614:26:614:27 | ip | 0 | +| test.c:615:22:615:23 | ip | 0 | +| test.c:616:18:616:19 | ip | 0 | +| test.c:617:16:617:17 | ip | 0 | +| test.c:618:17:618:18 | ip | 0 | +| test.c:619:18:619:19 | ip | 0 | +| test.c:620:18:620:19 | ip | 0 | +| test.c:621:19:621:20 | ip | 0 | +| test.c:622:24:622:25 | ip | 0 | +| test.c:622:35:622:36 | ip | 0 | +| test.c:622:50:622:51 | ip | 0 | +| test.c:622:61:622:62 | ip | 0 | +| test.c:623:22:623:23 | ip | 0 | +| test.c:624:27:624:28 | ip | 0 | +| test.c:624:38:624:39 | ip | 0 | +| test.c:625:29:625:30 | ip | 0 | | test.c:626:24:626:25 | ip | 0 | -| test.c:627:29:627:30 | ip | 0 | -| test.c:627:40:627:41 | ip | 0 | -| test.c:628:31:628:32 | ip | 0 | -| test.c:629:26:629:27 | ip | 0 | -| test.c:630:19:630:20 | ip | 0 | -| test.c:630:25:630:26 | ip | 0 | -| test.c:630:45:630:46 | ip | 0 | -| test.c:630:51:630:52 | ip | 0 | -| test.c:631:18:631:19 | ip | 0 | -| test.c:632:18:632:19 | ip | 0 | -| test.c:633:18:633:19 | ip | 0 | -| test.c:634:19:634:20 | ip | 0 | -| test.c:635:24:635:25 | ip | 0 | -| test.c:635:35:635:36 | ip | 0 | -| test.c:635:50:635:51 | ip | 0 | -| test.c:635:61:635:62 | ip | 0 | -| test.c:636:22:636:23 | ip | 0 | -| test.c:637:27:637:28 | ip | 0 | -| test.c:637:38:637:39 | ip | 0 | -| test.c:638:29:638:30 | ip | 0 | -| test.c:639:24:639:25 | ip | 0 | -| test.c:640:18:640:19 | ip | 0 | -| test.c:640:24:640:25 | ip | 0 | -| test.c:641:20:641:21 | ip | 0 | -| test.c:642:16:642:17 | ip | 0 | -| test.c:643:10:643:23 | special_number | 0 | -| test.c:651:7:651:8 | c1 | -2147483648 | -| test.c:651:13:651:13 | x | 0 | -| test.c:652:7:652:8 | c2 | -2147483648 | -| test.c:652:13:652:13 | x | 0 | -| test.c:653:7:653:8 | c3 | -2147483648 | -| test.c:653:13:653:13 | x | 0 | -| test.c:654:7:654:8 | c4 | -2147483648 | -| test.c:654:13:654:13 | x | 0 | -| test.c:655:7:655:8 | c5 | -2147483648 | -| test.c:655:13:655:13 | x | 0 | -| test.c:656:7:656:8 | c1 | -2147483648 | -| test.c:656:13:656:14 | c2 | -2147483648 | -| test.c:656:19:656:19 | x | 0 | -| test.c:657:7:657:8 | c1 | -2147483648 | -| test.c:657:13:657:14 | c3 | -2147483648 | -| test.c:657:19:657:19 | x | 0 | -| test.c:658:7:658:8 | c1 | -2147483648 | -| test.c:658:13:658:14 | c4 | -2147483648 | -| test.c:658:19:658:19 | x | 0 | -| test.c:659:7:659:8 | c1 | -2147483648 | -| test.c:659:13:659:14 | c5 | -2147483648 | -| test.c:659:19:659:19 | x | 0 | -| test.c:660:7:660:8 | c2 | -2147483648 | -| test.c:660:13:660:14 | c3 | -2147483648 | -| test.c:660:19:660:19 | x | 0 | -| test.c:662:11:662:11 | x | 0 | -| test.c:662:15:662:15 | x | 0 | -| test.c:662:19:662:19 | x | 0 | -| test.c:662:23:662:23 | x | 0 | -| test.c:662:27:662:27 | x | 0 | -| test.c:662:31:662:31 | x | 0 | -| test.c:662:35:662:35 | x | 0 | -| test.c:662:39:662:39 | x | 0 | -| test.c:662:43:662:43 | x | 0 | -| test.c:662:47:662:47 | x | 0 | -| test.c:662:51:662:51 | x | 0 | -| test.c:662:55:662:55 | x | 0 | -| test.c:663:10:663:10 | y | -2147483648 | -| test.c:668:20:668:20 | x | 0 | -| test.c:668:30:668:30 | x | 0 | -| test.c:671:3:671:4 | y1 | 0 | -| test.c:671:11:671:11 | y | 0 | -| test.c:671:14:671:14 | y | 1 | -| test.c:672:3:672:4 | y2 | 0 | -| test.c:672:9:672:9 | y | 1 | -| test.c:672:14:672:14 | y | 2 | -| test.c:672:22:672:22 | y | 5 | -| test.c:673:10:673:11 | y1 | 1 | -| test.c:673:15:673:16 | y2 | 5 | -| test.c:681:3:681:3 | i | -2147483648 | -| test.c:682:7:682:7 | i | 10 | -| test.c:684:3:684:3 | i | -2147483648 | -| test.c:685:3:685:3 | i | 10 | -| test.c:686:7:686:7 | i | 20 | -| test.c:688:3:688:3 | i | -2147483648 | -| test.c:689:3:689:3 | i | 40 | -| test.c:690:7:690:7 | i | 30 | -| test.c:692:3:692:3 | i | -2147483648 | -| test.c:692:7:692:7 | j | -2147483648 | -| test.c:693:7:693:7 | i | 40 | -| test.c:695:3:695:3 | i | -2147483648 | -| test.c:695:8:695:8 | j | 40 | -| test.c:696:7:696:7 | i | 50 | +| test.c:627:15:627:16 | ip | 0 | +| test.c:627:30:627:31 | ip | 0 | +| test.c:628:20:628:21 | ip | 0 | +| test.c:629:20:629:21 | ip | 0 | +| test.c:630:20:630:21 | ip | 0 | +| test.c:631:21:631:22 | ip | 0 | +| test.c:632:26:632:27 | ip | 0 | +| test.c:632:37:632:38 | ip | 0 | +| test.c:632:52:632:53 | ip | 0 | +| test.c:632:63:632:64 | ip | 0 | +| test.c:633:24:633:25 | ip | 0 | +| test.c:634:29:634:30 | ip | 0 | +| test.c:634:40:634:41 | ip | 0 | +| test.c:635:31:635:32 | ip | 0 | +| test.c:636:26:636:27 | ip | 0 | +| test.c:637:19:637:20 | ip | 0 | +| test.c:637:34:637:35 | ip | 0 | +| test.c:638:16:638:17 | ip | 0 | +| test.c:639:20:639:21 | ip | 0 | +| test.c:640:20:640:21 | ip | 0 | +| test.c:641:21:641:22 | ip | 0 | +| test.c:642:26:642:27 | ip | 0 | +| test.c:642:37:642:38 | ip | 0 | +| test.c:642:52:642:53 | ip | 0 | +| test.c:642:63:642:64 | ip | 0 | +| test.c:643:24:643:25 | ip | 0 | +| test.c:644:29:644:30 | ip | 0 | +| test.c:644:40:644:41 | ip | 0 | +| test.c:645:31:645:32 | ip | 0 | +| test.c:646:26:646:27 | ip | 0 | +| test.c:647:19:647:20 | ip | 0 | +| test.c:647:25:647:26 | ip | 0 | +| test.c:647:45:647:46 | ip | 0 | +| test.c:647:51:647:52 | ip | 0 | +| test.c:648:18:648:19 | ip | 0 | +| test.c:649:18:649:19 | ip | 0 | +| test.c:650:18:650:19 | ip | 0 | +| test.c:651:19:651:20 | ip | 0 | +| test.c:652:24:652:25 | ip | 0 | +| test.c:652:35:652:36 | ip | 0 | +| test.c:652:50:652:51 | ip | 0 | +| test.c:652:61:652:62 | ip | 0 | +| test.c:653:22:653:23 | ip | 0 | +| test.c:654:27:654:28 | ip | 0 | +| test.c:654:38:654:39 | ip | 0 | +| test.c:655:29:655:30 | ip | 0 | +| test.c:656:24:656:25 | ip | 0 | +| test.c:657:18:657:19 | ip | 0 | +| test.c:657:24:657:25 | ip | 0 | +| test.c:658:20:658:21 | ip | 0 | +| test.c:659:16:659:17 | ip | 0 | +| test.c:660:10:660:23 | special_number | 0 | +| test.c:668:7:668:8 | c1 | -2147483648 | +| test.c:668:13:668:13 | x | 0 | +| test.c:669:7:669:8 | c2 | -2147483648 | +| test.c:669:13:669:13 | x | 0 | +| test.c:670:7:670:8 | c3 | -2147483648 | +| test.c:670:13:670:13 | x | 0 | +| test.c:671:7:671:8 | c4 | -2147483648 | +| test.c:671:13:671:13 | x | 0 | +| test.c:672:7:672:8 | c5 | -2147483648 | +| test.c:672:13:672:13 | x | 0 | +| test.c:673:7:673:8 | c1 | -2147483648 | +| test.c:673:13:673:14 | c2 | -2147483648 | +| test.c:673:19:673:19 | x | 0 | +| test.c:674:7:674:8 | c1 | -2147483648 | +| test.c:674:13:674:14 | c3 | -2147483648 | +| test.c:674:19:674:19 | x | 0 | +| test.c:675:7:675:8 | c1 | -2147483648 | +| test.c:675:13:675:14 | c4 | -2147483648 | +| test.c:675:19:675:19 | x | 0 | +| test.c:676:7:676:8 | c1 | -2147483648 | +| test.c:676:13:676:14 | c5 | -2147483648 | +| test.c:676:19:676:19 | x | 0 | +| test.c:677:7:677:8 | c2 | -2147483648 | +| test.c:677:13:677:14 | c3 | -2147483648 | +| test.c:677:19:677:19 | x | 0 | +| test.c:679:11:679:11 | x | 0 | +| test.c:679:15:679:15 | x | 0 | +| test.c:679:19:679:19 | x | 0 | +| test.c:679:23:679:23 | x | 0 | +| test.c:679:27:679:27 | x | 0 | +| test.c:679:31:679:31 | x | 0 | +| test.c:679:35:679:35 | x | 0 | +| test.c:679:39:679:39 | x | 0 | +| test.c:679:43:679:43 | x | 0 | +| test.c:679:47:679:47 | x | 0 | +| test.c:679:51:679:51 | x | 0 | +| test.c:679:55:679:55 | x | 0 | +| test.c:680:10:680:10 | y | -2147483648 | +| test.c:685:20:685:20 | x | 0 | +| test.c:685:30:685:30 | x | 0 | +| test.c:688:3:688:4 | y1 | 0 | +| test.c:688:11:688:11 | y | 0 | +| test.c:688:14:688:14 | y | 1 | +| test.c:689:3:689:4 | y2 | 0 | +| test.c:689:9:689:9 | y | 1 | +| test.c:689:14:689:14 | y | 2 | +| test.c:689:22:689:22 | y | 5 | +| test.c:690:10:690:11 | y1 | 1 | +| test.c:690:15:690:16 | y2 | 5 | | test.c:698:3:698:3 | i | -2147483648 | -| test.c:698:13:698:13 | j | 50 | -| test.c:699:7:699:7 | i | 60 | -| test.c:706:12:706:12 | a | 0 | -| test.c:706:17:706:17 | a | 3 | -| test.c:706:33:706:33 | b | 0 | -| test.c:706:38:706:38 | b | 5 | -| test.c:707:13:707:13 | a | 3 | -| test.c:707:15:707:15 | b | 5 | -| test.c:708:5:708:9 | total | 0 | -| test.c:708:14:708:14 | r | 15 | -| test.c:710:12:710:12 | a | 0 | -| test.c:710:17:710:17 | a | 3 | -| test.c:710:33:710:33 | b | 0 | -| test.c:710:38:710:38 | b | 0 | -| test.c:711:13:711:13 | a | 3 | -| test.c:711:15:711:15 | b | 0 | -| test.c:712:5:712:9 | total | 0 | -| test.c:712:14:712:14 | r | 0 | -| test.c:714:12:714:12 | a | 0 | -| test.c:714:17:714:17 | a | 3 | -| test.c:714:34:714:34 | b | 0 | -| test.c:714:39:714:39 | b | 13 | -| test.c:715:13:715:13 | a | 3 | -| test.c:715:15:715:15 | b | 13 | -| test.c:716:5:716:9 | total | 0 | -| test.c:716:14:716:14 | r | 39 | -| test.c:719:10:719:14 | total | 0 | -| test.c:725:12:725:12 | b | 0 | -| test.c:725:17:725:17 | b | 5 | -| test.c:726:16:726:16 | b | 5 | -| test.c:727:5:727:9 | total | 0 | -| test.c:727:14:727:14 | r | 55 | -| test.c:729:12:729:12 | b | 0 | -| test.c:729:17:729:17 | b | 0 | -| test.c:730:16:730:16 | b | 0 | -| test.c:731:5:731:9 | total | 0 | -| test.c:731:14:731:14 | r | 0 | -| test.c:733:13:733:13 | b | 0 | -| test.c:733:18:733:18 | b | 13 | -| test.c:734:16:734:16 | b | 13 | -| test.c:735:5:735:9 | total | 0 | -| test.c:735:14:735:14 | r | 143 | -| test.c:738:10:738:14 | total | 0 | -| test.c:743:3:743:3 | x | 0 | -| test.c:743:7:743:7 | y | 0 | -| test.c:744:3:744:4 | xy | 0 | -| test.c:744:8:744:8 | x | 1000000003 | -| test.c:744:12:744:12 | y | 1000000003 | -| test.c:745:10:745:11 | xy | 1000000006000000000 | -| test.c:750:3:750:3 | x | 0 | -| test.c:751:3:751:3 | y | 0 | -| test.c:752:3:752:4 | xy | 0 | -| test.c:752:8:752:8 | x | 274177 | -| test.c:752:12:752:12 | y | 67280421310721 | -| test.c:753:10:753:11 | xy | 18446744073709551616 | -| test.c:757:7:757:8 | ui | 0 | -| test.c:758:43:758:44 | ui | 10 | -| test.c:758:48:758:49 | ui | 10 | -| test.c:759:12:759:17 | result | 100 | -| test.c:761:7:761:8 | ul | 0 | -| test.c:762:28:762:29 | ul | 10 | -| test.c:762:33:762:34 | ul | 10 | -| test.c:763:12:763:17 | result | 0 | -| test.c:769:7:769:8 | ui | 0 | -| test.c:769:19:769:20 | ui | 0 | -| test.c:770:5:770:6 | ui | 2 | -| test.c:770:11:770:12 | ui | 2 | -| test.c:771:12:771:13 | ui | 4 | -| test.c:775:3:775:9 | uiconst | 10 | -| test.c:778:3:778:9 | ulconst | 10 | -| test.c:779:10:779:16 | uiconst | 40 | -| test.c:779:20:779:26 | ulconst | 40 | -| test.c:783:7:783:7 | i | -2147483648 | -| test.c:783:18:783:18 | i | -1 | -| test.c:784:5:784:5 | i | -2147483648 | -| test.c:784:13:784:13 | i | -1 | -| test.c:785:9:785:9 | i | -5 | -| test.c:787:5:787:5 | i | -2147483648 | -| test.c:787:9:787:9 | i | -5 | -| test.c:788:9:788:9 | i | -30 | -| test.c:790:5:790:5 | i | -30 | -| test.c:791:9:791:9 | i | -210 | -| test.c:793:5:793:5 | i | -210 | -| test.c:794:9:794:9 | i | -1155 | -| test.c:796:7:796:7 | i | -2147483648 | -| test.c:797:5:797:5 | i | -2147483648 | -| test.c:797:9:797:9 | i | -1 | -| test.c:798:9:798:9 | i | 1 | -| test.c:800:3:800:3 | i | -2147483648 | +| test.c:699:7:699:7 | i | 10 | +| test.c:701:3:701:3 | i | -2147483648 | +| test.c:702:3:702:3 | i | 10 | +| test.c:703:7:703:7 | i | 20 | +| test.c:705:3:705:3 | i | -2147483648 | +| test.c:706:3:706:3 | i | 40 | +| test.c:707:7:707:7 | i | 30 | +| test.c:709:3:709:3 | i | -2147483648 | +| test.c:709:7:709:7 | j | -2147483648 | +| test.c:710:7:710:7 | i | 40 | +| test.c:712:3:712:3 | i | -2147483648 | +| test.c:712:8:712:8 | j | 40 | +| test.c:713:7:713:7 | i | 50 | +| test.c:715:3:715:3 | i | -2147483648 | +| test.c:715:13:715:13 | j | 50 | +| test.c:716:7:716:7 | i | 60 | +| test.c:723:12:723:12 | a | 0 | +| test.c:723:17:723:17 | a | 3 | +| test.c:723:33:723:33 | b | 0 | +| test.c:723:38:723:38 | b | 5 | +| test.c:724:13:724:13 | a | 3 | +| test.c:724:15:724:15 | b | 5 | +| test.c:725:5:725:9 | total | 0 | +| test.c:725:14:725:14 | r | 15 | +| test.c:727:12:727:12 | a | 0 | +| test.c:727:17:727:17 | a | 3 | +| test.c:727:33:727:33 | b | 0 | +| test.c:727:38:727:38 | b | 0 | +| test.c:728:13:728:13 | a | 3 | +| test.c:728:15:728:15 | b | 0 | +| test.c:729:5:729:9 | total | 0 | +| test.c:729:14:729:14 | r | 0 | +| test.c:731:12:731:12 | a | 0 | +| test.c:731:17:731:17 | a | 3 | +| test.c:731:34:731:34 | b | 0 | +| test.c:731:39:731:39 | b | 13 | +| test.c:732:13:732:13 | a | 3 | +| test.c:732:15:732:15 | b | 13 | +| test.c:733:5:733:9 | total | 0 | +| test.c:733:14:733:14 | r | 39 | +| test.c:736:10:736:14 | total | 0 | +| test.c:742:12:742:12 | b | 0 | +| test.c:742:17:742:17 | b | 5 | +| test.c:743:16:743:16 | b | 5 | +| test.c:744:5:744:9 | total | 0 | +| test.c:744:14:744:14 | r | 55 | +| test.c:746:12:746:12 | b | 0 | +| test.c:746:17:746:17 | b | 0 | +| test.c:747:16:747:16 | b | 0 | +| test.c:748:5:748:9 | total | 0 | +| test.c:748:14:748:14 | r | 0 | +| test.c:750:13:750:13 | b | 0 | +| test.c:750:18:750:18 | b | 13 | +| test.c:751:16:751:16 | b | 13 | +| test.c:752:5:752:9 | total | 0 | +| test.c:752:14:752:14 | r | 143 | +| test.c:755:10:755:14 | total | 0 | +| test.c:760:3:760:3 | x | 0 | +| test.c:760:7:760:7 | y | 0 | +| test.c:761:3:761:4 | xy | 0 | +| test.c:761:8:761:8 | x | 1000000003 | +| test.c:761:12:761:12 | y | 1000000003 | +| test.c:762:10:762:11 | xy | 1000000006000000000 | +| test.c:767:3:767:3 | x | 0 | +| test.c:768:3:768:3 | y | 0 | +| test.c:769:3:769:4 | xy | 0 | +| test.c:769:8:769:8 | x | 274177 | +| test.c:769:12:769:12 | y | 67280421310721 | +| test.c:770:10:770:11 | xy | 18446744073709551616 | +| test.c:774:7:774:8 | ui | 0 | +| test.c:775:43:775:44 | ui | 10 | +| test.c:775:48:775:49 | ui | 10 | +| test.c:776:12:776:17 | result | 100 | +| test.c:778:7:778:8 | ul | 0 | +| test.c:779:28:779:29 | ul | 10 | +| test.c:779:33:779:34 | ul | 10 | +| test.c:780:12:780:17 | result | 0 | +| test.c:786:7:786:8 | ui | 0 | +| test.c:786:19:786:20 | ui | 0 | +| test.c:787:5:787:6 | ui | 2 | +| test.c:787:11:787:12 | ui | 2 | +| test.c:788:12:788:13 | ui | 4 | +| test.c:792:3:792:9 | uiconst | 10 | +| test.c:795:3:795:9 | ulconst | 10 | +| test.c:796:10:796:16 | uiconst | 40 | +| test.c:796:20:796:26 | ulconst | 40 | | test.c:800:7:800:7 | i | -2147483648 | -| test.c:801:10:801:10 | i | -2147483648 | -| test.c:804:3:804:3 | i | -2147483648 | -| test.c:804:10:804:11 | sc | 1 | -| test.c:806:7:806:7 | i | -128 | -| test.c:813:7:813:7 | n | 0 | -| test.c:815:7:815:7 | n | 0 | -| test.c:816:9:816:9 | n | 1 | -| test.c:819:7:819:7 | n | 0 | -| test.c:820:9:820:9 | n | 1 | -| test.c:822:9:822:9 | n | 0 | -| test.c:825:8:825:8 | n | 0 | -| test.c:826:9:826:9 | n | 0 | -| test.c:828:9:828:9 | n | 1 | -| test.c:831:10:831:10 | n | 0 | -| test.c:832:5:832:5 | n | 1 | -| test.c:835:7:835:7 | n | 0 | -| test.c:839:7:839:7 | n | -32768 | -| test.c:842:7:842:7 | n | 0 | +| test.c:800:18:800:18 | i | -1 | +| test.c:801:5:801:5 | i | -2147483648 | +| test.c:801:13:801:13 | i | -1 | +| test.c:802:9:802:9 | i | -5 | +| test.c:804:5:804:5 | i | -2147483648 | +| test.c:804:9:804:9 | i | -5 | +| test.c:805:9:805:9 | i | -30 | +| test.c:807:5:807:5 | i | -30 | +| test.c:808:9:808:9 | i | -210 | +| test.c:810:5:810:5 | i | -210 | +| test.c:811:9:811:9 | i | -1155 | +| test.c:813:7:813:7 | i | -2147483648 | +| test.c:814:5:814:5 | i | -2147483648 | +| test.c:814:9:814:9 | i | -1 | +| test.c:815:9:815:9 | i | 1 | +| test.c:817:3:817:3 | i | -2147483648 | +| test.c:817:7:817:7 | i | -2147483648 | +| test.c:818:10:818:10 | i | -2147483648 | +| test.c:821:3:821:3 | i | -2147483648 | +| test.c:821:10:821:11 | sc | 1 | +| test.c:823:7:823:7 | i | -128 | +| test.c:830:7:830:7 | n | 0 | +| test.c:832:7:832:7 | n | 0 | +| test.c:833:9:833:9 | n | 1 | +| test.c:836:7:836:7 | n | 0 | +| test.c:837:9:837:9 | n | 1 | +| test.c:839:9:839:9 | n | 0 | +| test.c:842:8:842:8 | n | 0 | | test.c:843:9:843:9 | n | 0 | | test.c:845:9:845:9 | n | 1 | -| test.c:848:7:848:7 | n | 0 | -| test.c:849:9:849:9 | n | 1 | -| test.c:851:9:851:9 | n | 0 | -| test.c:854:10:854:10 | n | 0 | -| test.c:855:5:855:5 | n | 1 | -| test.c:858:7:858:7 | n | 0 | -| test.c:862:7:862:7 | n | -32768 | -| test.c:863:9:863:9 | n | -32768 | -| test.c:864:11:864:11 | n | 0 | -| test.c:868:7:868:7 | n | -32768 | -| test.c:869:13:869:13 | n | 5 | -| test.c:872:9:872:9 | n | 6 | -| test.c:875:7:875:7 | n | -32768 | -| test.c:875:22:875:22 | n | -32767 | -| test.c:876:9:876:9 | n | -32766 | +| test.c:848:10:848:10 | n | 0 | +| test.c:849:5:849:5 | n | 1 | +| test.c:852:7:852:7 | n | 0 | +| test.c:856:7:856:7 | n | -32768 | +| test.c:859:7:859:7 | n | 0 | +| test.c:860:9:860:9 | n | 0 | +| test.c:862:9:862:9 | n | 1 | +| test.c:865:7:865:7 | n | 0 | +| test.c:866:9:866:9 | n | 1 | +| test.c:868:9:868:9 | n | 0 | +| test.c:871:10:871:10 | n | 0 | +| test.c:872:5:872:5 | n | 1 | +| test.c:875:7:875:7 | n | 0 | | test.c:879:7:879:7 | n | -32768 | -| test.c:880:5:880:5 | n | 0 | -| test.c:880:10:880:10 | n | 1 | -| test.c:880:14:880:14 | n | 0 | -| test.c:881:6:881:6 | n | 0 | -| test.c:881:10:881:10 | n | 0 | -| test.c:881:14:881:14 | n | 1 | -| test.c:892:7:892:8 | ss | -32768 | -| test.c:893:9:893:10 | ss | 0 | -| test.c:896:7:896:8 | ss | -32768 | -| test.c:897:9:897:10 | ss | -32768 | -| test.c:900:14:900:15 | us | 0 | -| test.c:901:9:901:10 | us | 0 | -| test.c:904:14:904:15 | us | 0 | -| test.c:905:9:905:10 | us | 0 | -| test.c:908:7:908:8 | ss | -32768 | -| test.c:909:9:909:10 | ss | -32768 | -| test.c:912:7:912:8 | ss | -32768 | -| test.c:913:9:913:10 | ss | -1 | -| test.c:919:8:919:8 | s | -2147483648 | -| test.c:919:15:919:15 | s | 0 | -| test.c:919:23:919:23 | s | 0 | -| test.c:920:18:920:18 | s | 0 | -| test.c:920:22:920:22 | s | 0 | -| test.c:921:9:921:14 | result | 0 | -| test.c:927:7:927:7 | i | 0 | -| test.c:928:9:928:9 | i | -2147483648 | -| test.c:932:7:932:7 | u | 0 | -| test.c:933:9:933:9 | u | 0 | -| test.c:938:12:938:12 | s | -2147483648 | -| test.c:939:7:939:8 | s2 | -4 | -| test.c:944:7:944:7 | x | -2147483648 | -| test.c:945:9:945:9 | y | -2147483648 | -| test.c:949:7:949:7 | y | -2147483648 | -| test.c:958:7:958:7 | x | -2147483648 | -| test.c:963:7:963:7 | x | -2147483648 | -| test.c:970:8:970:8 | x | 2147483647 | -| test.c:970:12:970:12 | y | 256 | -| test.c:971:9:971:9 | x | 2147483647 | -| test.c:972:9:972:9 | y | 256 | +| test.c:880:9:880:9 | n | -32768 | +| test.c:881:11:881:11 | n | 0 | +| test.c:885:7:885:7 | n | -32768 | +| test.c:886:13:886:13 | n | 5 | +| test.c:889:9:889:9 | n | 6 | +| test.c:892:7:892:7 | n | -32768 | +| test.c:892:22:892:22 | n | -32767 | +| test.c:893:9:893:9 | n | -32766 | +| test.c:896:7:896:7 | n | -32768 | +| test.c:897:5:897:5 | n | 0 | +| test.c:897:10:897:10 | n | 1 | +| test.c:897:14:897:14 | n | 0 | +| test.c:898:6:898:6 | n | 0 | +| test.c:898:10:898:10 | n | 0 | +| test.c:898:14:898:14 | n | 1 | +| test.c:909:7:909:8 | ss | -32768 | +| test.c:910:9:910:10 | ss | 0 | +| test.c:913:7:913:8 | ss | -32768 | +| test.c:914:9:914:10 | ss | -32768 | +| test.c:917:14:917:15 | us | 0 | +| test.c:918:9:918:10 | us | 0 | +| test.c:921:14:921:15 | us | 0 | +| test.c:922:9:922:10 | us | 0 | +| test.c:925:7:925:8 | ss | -32768 | +| test.c:926:9:926:10 | ss | -32768 | +| test.c:929:7:929:8 | ss | -32768 | +| test.c:930:9:930:10 | ss | -1 | +| test.c:936:8:936:8 | s | -2147483648 | +| test.c:936:15:936:15 | s | 0 | +| test.c:936:23:936:23 | s | 0 | +| test.c:937:18:937:18 | s | 0 | +| test.c:937:22:937:22 | s | 0 | +| test.c:938:9:938:14 | result | 0 | +| test.c:944:7:944:7 | i | 0 | +| test.c:945:9:945:9 | i | -2147483648 | +| test.c:949:7:949:7 | u | 0 | +| test.c:950:9:950:9 | u | 0 | +| test.c:955:12:955:12 | s | -2147483648 | +| test.c:956:7:956:8 | s2 | -4 | +| test.c:961:7:961:7 | x | -2147483648 | +| test.c:962:9:962:9 | y | -2147483648 | +| test.c:966:7:966:7 | y | -2147483648 | +| test.c:975:7:975:7 | x | -2147483648 | +| test.c:980:7:980:7 | x | -2147483648 | +| test.c:987:8:987:8 | x | 2147483647 | +| test.c:987:12:987:12 | y | 256 | +| test.c:988:9:988:9 | x | 2147483647 | +| test.c:989:9:989:9 | y | 256 | +| test.c:1002:7:1002:7 | e | -2147483648 | | test.cpp:10:7:10:7 | b | -2147483648 | | test.cpp:11:5:11:5 | x | -2147483648 | | test.cpp:13:10:13:10 | x | -2147483648 | @@ -1093,3 +1128,64 @@ | test.cpp:122:4:122:4 | n | 0 | | test.cpp:122:8:122:8 | n | 0 | | test.cpp:122:12:122:12 | n | 1 | +| test_nr_of_bounds.cpp:40:5:40:20 | x | 0 | +| test_nr_of_bounds.cpp:40:5:40:20 | x | 0 | +| test_nr_of_bounds.cpp:41:5:41:20 | x | 0 | +| test_nr_of_bounds.cpp:41:5:41:20 | x | 0 | +| test_nr_of_bounds.cpp:42:5:42:20 | x | 0 | +| test_nr_of_bounds.cpp:42:5:42:20 | x | 0 | +| test_nr_of_bounds.cpp:43:5:43:20 | x | 0 | +| test_nr_of_bounds.cpp:43:5:43:20 | x | 0 | +| test_nr_of_bounds.cpp:44:5:44:20 | x | 0 | +| test_nr_of_bounds.cpp:44:5:44:20 | x | 0 | +| test_nr_of_bounds.cpp:45:5:45:20 | x | 0 | +| test_nr_of_bounds.cpp:45:5:45:20 | x | 0 | +| test_nr_of_bounds.cpp:46:5:46:20 | x | 0 | +| test_nr_of_bounds.cpp:46:5:46:20 | x | 0 | +| test_nr_of_bounds.cpp:47:5:47:20 | x | 0 | +| test_nr_of_bounds.cpp:47:5:47:20 | x | 0 | +| test_nr_of_bounds.cpp:48:5:48:20 | x | 0 | +| test_nr_of_bounds.cpp:48:5:48:20 | x | 0 | +| test_nr_of_bounds.cpp:49:5:49:20 | x | 0 | +| test_nr_of_bounds.cpp:49:5:49:20 | x | 0 | +| test_nr_of_bounds.cpp:50:5:50:20 | x | 0 | +| test_nr_of_bounds.cpp:50:5:50:20 | x | 0 | +| test_nr_of_bounds.cpp:51:5:51:20 | x | 0 | +| test_nr_of_bounds.cpp:51:5:51:20 | x | 0 | +| test_nr_of_bounds.cpp:52:5:52:20 | x | 0 | +| test_nr_of_bounds.cpp:52:5:52:20 | x | 0 | +| test_nr_of_bounds.cpp:53:5:53:20 | x | 0 | +| test_nr_of_bounds.cpp:53:5:53:20 | x | 0 | +| test_nr_of_bounds.cpp:54:5:54:20 | x | 0 | +| test_nr_of_bounds.cpp:54:5:54:20 | x | 0 | +| test_nr_of_bounds.cpp:55:5:55:20 | x | 0 | +| test_nr_of_bounds.cpp:55:5:55:20 | x | 0 | +| test_nr_of_bounds.cpp:56:5:56:20 | x | 0 | +| test_nr_of_bounds.cpp:56:5:56:20 | x | 0 | +| test_nr_of_bounds.cpp:57:5:57:20 | x | 0 | +| test_nr_of_bounds.cpp:57:5:57:20 | x | 0 | +| test_nr_of_bounds.cpp:58:5:58:20 | x | 0 | +| test_nr_of_bounds.cpp:58:5:58:20 | x | 0 | +| test_nr_of_bounds.cpp:59:5:59:20 | x | 0 | +| test_nr_of_bounds.cpp:59:5:59:20 | x | 0 | +| test_nr_of_bounds.cpp:60:5:60:20 | x | 0 | +| test_nr_of_bounds.cpp:60:5:60:20 | x | 0 | +| test_nr_of_bounds.cpp:61:5:61:20 | x | 0 | +| test_nr_of_bounds.cpp:61:5:61:20 | x | 0 | +| test_nr_of_bounds.cpp:62:5:62:20 | x | 0 | +| test_nr_of_bounds.cpp:62:5:62:20 | x | 0 | +| test_nr_of_bounds.cpp:63:5:63:20 | x | 0 | +| test_nr_of_bounds.cpp:63:5:63:20 | x | 0 | +| test_nr_of_bounds.cpp:64:5:64:20 | x | 0 | +| test_nr_of_bounds.cpp:64:5:64:20 | x | 0 | +| test_nr_of_bounds.cpp:65:5:65:21 | x | 0 | +| test_nr_of_bounds.cpp:65:5:65:21 | x | 0 | +| test_nr_of_bounds.cpp:66:5:66:21 | x | 0 | +| test_nr_of_bounds.cpp:66:5:66:21 | x | 0 | +| test_nr_of_bounds.cpp:67:5:67:21 | x | 0 | +| test_nr_of_bounds.cpp:67:5:67:21 | x | 0 | +| test_nr_of_bounds.cpp:68:5:68:21 | x | 0 | +| test_nr_of_bounds.cpp:68:5:68:21 | x | 0 | +| test_nr_of_bounds.cpp:69:5:69:21 | x | 0 | +| test_nr_of_bounds.cpp:69:5:69:21 | x | 0 | +| test_nr_of_bounds.cpp:72:12:72:12 | x | 0 | diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.expected b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.expected index 7d583e47f5bb..b8424b8f01ad 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.expected @@ -1,4723 +1,5233 @@ testFailures estimateNrOfBounds -| inline_assembly.c:9:20:9:20 | 0 | 1.0 | -| inline_assembly.c:9:20:9:20 | (unsigned int)... | 1.0 | -| inline_assembly.c:10:3:10:3 | y | 1.0 | -| inline_assembly.c:10:3:10:7 | ... = ... | 1.0 | -| inline_assembly.c:10:7:10:7 | 1 | 1.0 | -| inline_assembly.c:10:7:10:7 | (unsigned int)... | 1.0 | -| inline_assembly.c:12:3:12:8 | call to printf | 1.0 | -| inline_assembly.c:12:29:12:29 | x | 1.0 | -| inline_assembly.c:12:32:12:32 | y | 1.0 | -| inline_assembly.c:16:25:16:25 | x | 1.0 | -| inline_assembly.c:16:35:16:35 | y | 1.0 | -| inline_assembly.c:21:3:21:8 | call to printf | 1.0 | -| inline_assembly.c:21:29:21:29 | x | 1.0 | -| inline_assembly.c:21:32:21:32 | y | 1.0 | -| inline_assembly.c:23:10:23:10 | 0 | 1.0 | -| minmax.c:16:9:16:10 | 1 | 1.0 | -| minmax.c:16:16:16:17 | 2 | 1.0 | -| minmax.c:16:23:16:24 | 3 | 1.0 | -| minmax.c:18:2:18:7 | call to printf | 1.0 | -| minmax.c:18:37:18:37 | x | 1.0 | -| minmax.c:18:40:18:40 | y | 1.0 | -| minmax.c:18:43:18:43 | z | 1.0 | -| minmax.c:20:2:20:2 | z | 1.0 | -| minmax.c:20:2:24:3 | ... = ... | 2.0 | -| minmax.c:20:6:24:3 | (statement expression) | 2.0 | -| minmax.c:21:10:21:11 | 0 | 1.0 | -| minmax.c:22:7:22:14 | ... != ... | 1.0 | -| minmax.c:22:8:22:8 | x | 1.0 | -| minmax.c:22:14:22:14 | y | 1.0 | -| minmax.c:22:18:22:18 | t | 1.0 | -| minmax.c:22:18:22:22 | ... = ... | 1.0 | -| minmax.c:22:22:22:22 | x | 1.0 | -| minmax.c:23:3:23:3 | t | 2.0 | -| minmax.c:26:2:26:7 | call to printf | 1.0 | -| minmax.c:26:37:26:37 | x | 1.0 | -| minmax.c:26:40:26:40 | y | 1.0 | -| minmax.c:26:43:26:43 | z | 2.0 | -| test.c:6:14:6:15 | 0 | 1.0 | -| test.c:8:5:8:9 | count | 1.0 | -| test.c:8:5:8:19 | ... = ... | 13.0 | -| test.c:8:13:8:17 | count | 13.0 | -| test.c:8:13:8:19 | ... + ... | 13.0 | -| test.c:8:19:8:19 | 1 | 1.0 | -| test.c:10:10:10:14 | count | 13.0 | -| test.c:14:14:14:15 | 0 | 1.0 | -| test.c:16:5:16:9 | count | 1.0 | -| test.c:16:5:16:26 | ... = ... | 13.0 | -| test.c:16:13:16:21 | (...) | 13.0 | -| test.c:16:13:16:26 | ... % ... | 13.0 | -| test.c:16:14:16:18 | count | 13.0 | -| test.c:16:14:16:20 | ... + ... | 13.0 | -| test.c:16:20:16:20 | 1 | 1.0 | -| test.c:16:25:16:26 | 10 | 1.0 | -| test.c:18:10:18:14 | count | 13.0 | -| test.c:22:14:22:15 | 0 | 1.0 | -| test.c:24:5:24:9 | count | 13.0 | -| test.c:24:5:24:11 | ... ++ | 13.0 | -| test.c:25:5:25:9 | count | 1.0 | -| test.c:25:5:25:22 | ... = ... | 13.0 | -| test.c:25:13:25:17 | count | 13.0 | -| test.c:25:13:25:22 | ... % ... | 13.0 | -| test.c:25:21:25:22 | 10 | 1.0 | -| test.c:27:10:27:14 | count | 13.0 | -| test.c:31:10:31:11 | 0 | 1.0 | -| test.c:32:14:32:15 | 0 | 1.0 | -| test.c:33:8:33:8 | i | 1.0 | -| test.c:33:8:33:12 | ... = ... | 1.0 | -| test.c:33:12:33:12 | 0 | 1.0 | -| test.c:33:15:33:15 | i | 13.0 | -| test.c:33:15:33:19 | ... < ... | 1.0 | -| test.c:33:19:33:19 | 2 | 1.0 | -| test.c:33:22:33:22 | i | 1.0 | -| test.c:33:22:33:28 | ... = ... | 13.0 | -| test.c:33:26:33:26 | i | 13.0 | -| test.c:33:26:33:28 | ... + ... | 13.0 | -| test.c:33:28:33:28 | 1 | 1.0 | -| test.c:34:5:34:9 | total | 13.0 | -| test.c:34:5:34:14 | ... += ... | 13.0 | -| test.c:34:14:34:14 | i | 13.0 | -| test.c:36:10:36:14 | total | 13.0 | -| test.c:36:10:36:18 | ... + ... | 13.0 | -| test.c:36:18:36:18 | i | 13.0 | -| test.c:40:10:40:11 | 0 | 1.0 | -| test.c:41:14:41:15 | 0 | 1.0 | -| test.c:42:8:42:8 | i | 1.0 | -| test.c:42:8:42:12 | ... = ... | 1.0 | -| test.c:42:12:42:12 | 0 | 1.0 | -| test.c:42:15:42:15 | i | 13.0 | -| test.c:42:15:42:19 | ... < ... | 1.0 | -| test.c:42:19:42:19 | 2 | 1.0 | -| test.c:42:22:42:22 | i | 13.0 | -| test.c:42:22:42:24 | ... ++ | 13.0 | -| test.c:43:5:43:9 | total | 13.0 | -| test.c:43:5:43:14 | ... += ... | 13.0 | -| test.c:43:14:43:14 | i | 13.0 | -| test.c:45:10:45:14 | total | 13.0 | -| test.c:45:10:45:18 | ... + ... | 13.0 | -| test.c:45:18:45:18 | i | 13.0 | -| test.c:49:10:49:11 | 0 | 1.0 | -| test.c:50:14:50:15 | 0 | 1.0 | -| test.c:51:8:51:8 | i | 1.0 | -| test.c:51:8:51:12 | ... = ... | 1.0 | -| test.c:51:12:51:12 | 0 | 1.0 | -| test.c:51:15:51:15 | i | 13.0 | -| test.c:51:15:51:17 | ... + ... | 13.0 | -| test.c:51:15:51:21 | ... < ... | 1.0 | -| test.c:51:17:51:17 | 2 | 1.0 | -| test.c:51:21:51:21 | 4 | 1.0 | -| test.c:51:24:51:24 | i | 1.0 | -| test.c:51:24:51:30 | ... = ... | 13.0 | -| test.c:51:28:51:28 | i | 13.0 | -| test.c:51:28:51:30 | ... + ... | 13.0 | -| test.c:51:30:51:30 | 1 | 1.0 | -| test.c:52:5:52:9 | total | 13.0 | -| test.c:52:5:52:14 | ... += ... | 13.0 | -| test.c:52:14:52:14 | i | 13.0 | -| test.c:54:10:54:14 | total | 13.0 | -| test.c:54:10:54:18 | ... + ... | 13.0 | -| test.c:54:18:54:18 | i | 13.0 | -| test.c:58:7:58:7 | i | 1.0 | -| test.c:58:7:58:11 | ... < ... | 1.0 | -| test.c:58:11:58:11 | 4 | 1.0 | -| test.c:59:9:59:9 | i | 1.0 | -| test.c:59:9:59:13 | ... < ... | 1.0 | -| test.c:59:13:59:13 | 5 | 1.0 | -| test.c:60:14:60:14 | i | 1.0 | -| test.c:63:10:63:10 | 1 | 1.0 | -| test.c:67:7:67:11 | - ... | 1.0 | -| test.c:67:7:67:15 | ... < ... | 1.0 | -| test.c:67:7:67:25 | ... && ... | 1.0 | -| test.c:67:8:67:11 | 1000 | 1.0 | -| test.c:67:15:67:15 | y | 1.0 | -| test.c:67:20:67:20 | y | 1.0 | -| test.c:67:20:67:25 | ... < ... | 1.0 | -| test.c:67:24:67:25 | 10 | 1.0 | -| test.c:68:9:68:9 | x | 1.0 | -| test.c:68:9:68:15 | ... < ... | 1.0 | -| test.c:68:13:68:13 | y | 1.0 | -| test.c:68:13:68:15 | ... - ... | 1.0 | -| test.c:68:15:68:15 | 2 | 1.0 | -| test.c:69:14:69:14 | x | 1.0 | -| test.c:72:10:72:10 | y | 1.0 | -| test.c:76:7:76:7 | y | 1.0 | -| test.c:76:7:76:12 | ... == ... | 1.0 | -| test.c:76:12:76:12 | 0 | 1.0 | -| test.c:77:9:77:9 | x | 1.0 | -| test.c:77:9:77:13 | ... < ... | 1.0 | -| test.c:77:13:77:13 | 4 | 1.0 | -| test.c:78:14:78:14 | 0 | 1.0 | -| test.c:81:9:81:9 | x | 1.0 | -| test.c:81:9:81:13 | ... < ... | 1.0 | -| test.c:81:13:81:13 | 4 | 1.0 | -| test.c:82:14:82:14 | 1 | 1.0 | -| test.c:85:10:85:10 | x | 1.0 | -| test.c:89:7:89:7 | y | 1.0 | -| test.c:89:7:89:11 | ... > ... | 1.0 | -| test.c:89:11:89:11 | 7 | 1.0 | -| test.c:90:9:90:9 | x | 1.0 | -| test.c:90:9:90:13 | ... < ... | 1.0 | -| test.c:90:13:90:13 | y | 1.0 | -| test.c:91:14:91:14 | 0 | 1.0 | -| test.c:93:12:93:12 | x | 1.0 | -| test.c:95:10:95:10 | 1 | 1.0 | -| test.c:100:3:100:3 | c | 1.0 | -| test.c:100:3:100:8 | ... = ... | 1.0 | -| test.c:100:7:100:8 | * ... | 1.0 | -| test.c:101:7:101:7 | (int)... | 1.0 | -| test.c:101:7:101:7 | c | 1.0 | -| test.c:101:7:101:15 | ... != ... | 1.0 | -| test.c:101:12:101:15 | 0 | 1.0 | -| test.c:102:5:102:8 | * ... | 1.0 | -| test.c:102:5:102:15 | ... = ... | 1.0 | -| test.c:102:12:102:15 | 0 | 1.0 | -| test.c:102:12:102:15 | (char)... | 1.0 | -| test.c:104:7:104:7 | (int)... | 2.0 | -| test.c:104:7:104:7 | c | 2.0 | -| test.c:104:7:104:14 | ... == ... | 1.0 | -| test.c:104:12:104:14 | 58 | 1.0 | -| test.c:105:5:105:5 | c | 1.0 | -| test.c:105:5:105:10 | ... = ... | 1.0 | -| test.c:105:9:105:10 | * ... | 1.0 | -| test.c:106:9:106:9 | (int)... | 1.0 | -| test.c:106:9:106:9 | c | 1.0 | -| test.c:106:9:106:17 | ... != ... | 1.0 | -| test.c:106:14:106:17 | 0 | 1.0 | -| test.c:107:7:107:10 | * ... | 1.0 | -| test.c:107:7:107:17 | ... = ... | 1.0 | -| test.c:107:14:107:17 | 0 | 1.0 | -| test.c:107:14:107:17 | (char)... | 1.0 | -| test.c:109:9:109:9 | (int)... | 2.0 | -| test.c:109:9:109:9 | c | 2.0 | -| test.c:109:9:109:16 | ... != ... | 1.0 | -| test.c:109:14:109:16 | 44 | 1.0 | -| test.c:110:14:110:14 | 1 | 1.0 | -| test.c:112:10:112:10 | 0 | 1.0 | -| test.c:118:24:118:24 | 0 | 1.0 | -| test.c:118:24:118:24 | (size_type)... | 1.0 | -| test.c:119:10:119:10 | n | 1.0 | -| test.c:119:10:119:12 | ... ++ | 1.0 | -| test.c:123:22:123:22 | 0 | 1.0 | -| test.c:123:22:123:22 | (size_type)... | 1.0 | -| test.c:124:11:124:15 | Start | 13.0 | -| test.c:124:11:124:36 | ... <= ... | 1.0 | -| test.c:124:20:124:32 | call to test12_helper | 1.0 | -| test.c:124:20:124:36 | ... - ... | 1.0 | -| test.c:124:36:124:36 | 1 | 1.0 | -| test.c:124:36:124:36 | (unsigned long long)... | 1.0 | -| test.c:126:31:126:43 | call to test12_helper | 1.0 | -| test.c:127:6:127:10 | Start | 13.0 | -| test.c:127:6:127:24 | ... += ... | 13.0 | -| test.c:127:15:127:20 | Length | 1.0 | -| test.c:127:15:127:24 | ... + ... | 1.0 | -| test.c:127:24:127:24 | 1 | 1.0 | -| test.c:127:24:127:24 | (unsigned long long)... | 1.0 | -| test.c:130:11:130:11 | 1 | 1.0 | -| test.c:135:22:135:22 | (unsigned char)... | 1.0 | -| test.c:135:22:135:22 | c | 1.0 | -| test.c:136:20:136:20 | 0 | 1.0 | -| test.c:136:20:136:20 | (unsigned int)... | 1.0 | -| test.c:137:20:137:20 | x | 1.0 | -| test.c:137:20:137:22 | ... - ... | 1.0 | -| test.c:137:22:137:22 | 1 | 1.0 | -| test.c:137:22:137:22 | (unsigned int)... | 1.0 | -| test.c:138:11:138:11 | i | 1.0 | -| test.c:138:11:138:13 | ... + ... | 1.0 | -| test.c:138:13:138:13 | 1 | 1.0 | -| test.c:139:10:139:41 | (double)... | 1.0 | -| test.c:139:10:139:41 | (int)... | 1.0 | -| test.c:139:18:139:41 | (...) | 1.0 | -| test.c:139:19:139:19 | (int)... | 1.0 | -| test.c:139:19:139:19 | c | 1.0 | -| test.c:139:19:139:23 | ... + ... | 1.0 | -| test.c:139:19:139:28 | (unsigned int)... | 1.0 | -| test.c:139:19:139:28 | ... + ... | 1.0 | -| test.c:139:19:139:32 | ... + ... | 1.0 | -| test.c:139:19:139:36 | ... + ... | 1.0 | -| test.c:139:19:139:40 | ... + ... | 1.0 | -| test.c:139:23:139:23 | i | 1.0 | -| test.c:139:27:139:28 | (int)... | 1.0 | -| test.c:139:27:139:28 | uc | 1.0 | -| test.c:139:32:139:32 | x | 1.0 | -| test.c:139:36:139:36 | y | 1.0 | -| test.c:139:40:139:40 | (unsigned int)... | 1.0 | -| test.c:139:40:139:40 | z | 1.0 | -| test.c:144:12:144:23 | (int)... | 1.0 | -| test.c:144:17:144:23 | (char)... | 1.0 | -| test.c:144:23:144:23 | x | 1.0 | -| test.c:145:12:145:32 | (int)... | 1.0 | -| test.c:145:17:145:32 | (unsigned char)... | 1.0 | -| test.c:145:32:145:32 | x | 1.0 | -| test.c:146:12:146:33 | (int)... | 1.0 | -| test.c:146:17:146:33 | (unsigned short)... | 1.0 | -| test.c:146:33:146:33 | x | 1.0 | -| test.c:147:12:147:31 | (int)... | 1.0 | -| test.c:147:17:147:31 | (unsigned int)... | 1.0 | -| test.c:147:31:147:31 | x | 1.0 | -| test.c:148:13:148:13 | (char)... | 1.0 | -| test.c:148:13:148:13 | x | 1.0 | -| test.c:149:23:149:23 | (unsigned short)... | 1.0 | -| test.c:149:23:149:23 | x | 1.0 | -| test.c:150:10:150:11 | x0 | 1.0 | -| test.c:150:10:150:16 | ... + ... | 1.0 | -| test.c:150:10:150:21 | ... + ... | 1.0 | -| test.c:150:10:150:26 | ... + ... | 1.0 | -| test.c:150:10:150:31 | ... + ... | 1.0 | -| test.c:150:10:150:36 | ... + ... | 1.0 | -| test.c:150:15:150:16 | x1 | 1.0 | -| test.c:150:20:150:21 | x2 | 1.0 | -| test.c:150:25:150:26 | x3 | 1.0 | -| test.c:150:30:150:31 | (int)... | 1.0 | -| test.c:150:30:150:31 | c0 | 1.0 | -| test.c:150:35:150:36 | (int)... | 1.0 | -| test.c:150:35:150:36 | s0 | 1.0 | -| test.c:154:10:154:31 | (...) | 1.0 | -| test.c:154:10:154:40 | ... ? ... : ... | 1.0 | -| test.c:154:11:154:11 | x | 1.0 | -| test.c:154:11:154:15 | ... > ... | 1.0 | -| test.c:154:11:154:30 | ... && ... | 1.0 | -| test.c:154:15:154:15 | 0 | 1.0 | -| test.c:154:15:154:15 | (long long)... | 1.0 | -| test.c:154:20:154:20 | x | 1.0 | -| test.c:154:20:154:30 | ... == ... | 1.0 | -| test.c:154:25:154:30 | (int)... | 1.0 | -| test.c:154:25:154:30 | (long long)... | 1.0 | -| test.c:154:30:154:30 | x | 1.0 | -| test.c:154:35:154:35 | x | 1.0 | -| test.c:154:39:154:40 | (long long)... | 1.0 | -| test.c:154:39:154:40 | - ... | 1.0 | -| test.c:154:40:154:40 | 1 | 1.0 | -| test.c:159:14:159:15 | 0 | 1.0 | -| test.c:161:7:161:7 | 3 | 1.0 | -| test.c:161:7:161:12 | ... <= ... | 1.0 | -| test.c:161:7:161:23 | ... && ... | 1.0 | -| test.c:161:12:161:12 | a | 1.0 | -| test.c:161:17:161:17 | a | 1.0 | -| test.c:161:17:161:23 | ... <= ... | 1.0 | -| test.c:161:22:161:23 | 11 | 1.0 | -| test.c:162:13:162:14 | + ... | 1.0 | -| test.c:162:14:162:14 | a | 1.0 | -| test.c:163:13:163:14 | - ... | 1.0 | -| test.c:163:14:163:14 | a | 1.0 | -| test.c:164:5:164:9 | total | 1.0 | -| test.c:164:5:164:16 | ... += ... | 1.0 | -| test.c:164:14:164:14 | b | 1.0 | -| test.c:164:14:164:16 | ... + ... | 1.0 | -| test.c:164:16:164:16 | c | 1.0 | -| test.c:166:7:166:7 | 0 | 1.0 | -| test.c:166:7:166:12 | ... <= ... | 1.0 | -| test.c:166:7:166:23 | ... && ... | 1.0 | -| test.c:166:12:166:12 | a | 2.0 | -| test.c:166:17:166:17 | a | 2.0 | -| test.c:166:17:166:23 | ... <= ... | 1.0 | -| test.c:166:22:166:23 | 11 | 1.0 | -| test.c:167:13:167:14 | + ... | 2.0 | -| test.c:167:14:167:14 | a | 2.0 | -| test.c:168:13:168:14 | - ... | 2.0 | -| test.c:168:14:168:14 | a | 2.0 | -| test.c:169:5:169:9 | total | 2.0 | -| test.c:169:5:169:16 | ... += ... | 8.0 | -| test.c:169:14:169:14 | b | 2.0 | -| test.c:169:14:169:16 | ... + ... | 4.0 | -| test.c:169:16:169:16 | c | 2.0 | -| test.c:171:7:171:8 | - ... | 1.0 | -| test.c:171:7:171:13 | ... <= ... | 1.0 | -| test.c:171:7:171:24 | ... && ... | 1.0 | -| test.c:171:8:171:8 | 7 | 1.0 | -| test.c:171:13:171:13 | a | 3.0 | -| test.c:171:18:171:18 | a | 3.0 | -| test.c:171:18:171:24 | ... <= ... | 1.0 | -| test.c:171:23:171:24 | 11 | 1.0 | -| test.c:172:13:172:14 | + ... | 3.0 | -| test.c:172:14:172:14 | a | 3.0 | -| test.c:173:13:173:14 | - ... | 3.0 | -| test.c:173:14:173:14 | a | 3.0 | -| test.c:174:5:174:9 | total | 10.0 | -| test.c:174:5:174:16 | ... += ... | 90.0 | -| test.c:174:14:174:14 | b | 3.0 | -| test.c:174:14:174:16 | ... + ... | 9.0 | -| test.c:174:16:174:16 | c | 3.0 | -| test.c:176:7:176:8 | - ... | 1.0 | -| test.c:176:7:176:13 | ... <= ... | 1.0 | -| test.c:176:7:176:23 | ... && ... | 1.0 | -| test.c:176:8:176:8 | 7 | 1.0 | -| test.c:176:13:176:13 | a | 4.0 | -| test.c:176:18:176:18 | a | 4.0 | -| test.c:176:18:176:23 | ... <= ... | 1.0 | -| test.c:176:23:176:23 | 1 | 1.0 | -| test.c:177:13:177:14 | + ... | 4.0 | -| test.c:177:14:177:14 | a | 4.0 | -| test.c:178:13:178:14 | - ... | 4.0 | -| test.c:178:14:178:14 | a | 4.0 | -| test.c:179:5:179:9 | total | 100.0 | -| test.c:179:5:179:16 | ... += ... | 1600.0 | -| test.c:179:14:179:14 | b | 4.0 | -| test.c:179:14:179:16 | ... + ... | 16.0 | -| test.c:179:16:179:16 | c | 4.0 | -| test.c:181:7:181:8 | - ... | 1.0 | -| test.c:181:7:181:13 | ... <= ... | 1.0 | -| test.c:181:7:181:23 | ... && ... | 1.0 | -| test.c:181:8:181:8 | 7 | 1.0 | -| test.c:181:13:181:13 | a | 5.0 | -| test.c:181:18:181:18 | a | 5.0 | -| test.c:181:18:181:23 | ... <= ... | 1.0 | -| test.c:181:23:181:23 | 0 | 1.0 | -| test.c:182:13:182:14 | + ... | 5.0 | -| test.c:182:14:182:14 | a | 5.0 | -| test.c:183:13:183:14 | - ... | 5.0 | -| test.c:183:14:183:14 | a | 5.0 | -| test.c:184:5:184:9 | total | 1700.0 | -| test.c:184:5:184:16 | ... += ... | 42500.0 | -| test.c:184:14:184:14 | b | 5.0 | -| test.c:184:14:184:16 | ... + ... | 25.0 | -| test.c:184:16:184:16 | c | 5.0 | -| test.c:186:7:186:8 | - ... | 1.0 | -| test.c:186:7:186:13 | ... <= ... | 1.0 | -| test.c:186:7:186:24 | ... && ... | 1.0 | -| test.c:186:8:186:8 | 7 | 1.0 | -| test.c:186:13:186:13 | a | 6.0 | -| test.c:186:18:186:18 | a | 6.0 | -| test.c:186:18:186:24 | ... <= ... | 1.0 | -| test.c:186:23:186:24 | - ... | 1.0 | -| test.c:186:24:186:24 | 2 | 1.0 | -| test.c:187:13:187:14 | + ... | 6.0 | -| test.c:187:14:187:14 | a | 6.0 | -| test.c:188:13:188:14 | - ... | 6.0 | -| test.c:188:14:188:14 | a | 6.0 | -| test.c:189:5:189:9 | total | 44200.0 | -| test.c:189:5:189:16 | ... += ... | 1591200.0 | -| test.c:189:14:189:14 | b | 6.0 | -| test.c:189:14:189:16 | ... + ... | 36.0 | -| test.c:189:16:189:16 | c | 6.0 | -| test.c:192:10:192:14 | total | 1635400.0 | -| test.c:198:14:198:15 | 0 | 1.0 | -| test.c:200:7:200:7 | 3 | 1.0 | -| test.c:200:7:200:12 | ... <= ... | 1.0 | -| test.c:200:7:200:23 | ... && ... | 1.0 | -| test.c:200:7:200:33 | ... && ... | 1.0 | -| test.c:200:7:200:44 | ... && ... | 1.0 | -| test.c:200:12:200:12 | a | 1.0 | -| test.c:200:17:200:17 | a | 1.0 | -| test.c:200:17:200:23 | ... <= ... | 1.0 | -| test.c:200:22:200:23 | 11 | 1.0 | -| test.c:200:28:200:28 | 5 | 1.0 | -| test.c:200:28:200:33 | ... <= ... | 1.0 | -| test.c:200:33:200:33 | b | 1.0 | -| test.c:200:38:200:38 | b | 1.0 | -| test.c:200:38:200:44 | ... <= ... | 1.0 | -| test.c:200:43:200:44 | 23 | 1.0 | -| test.c:201:13:201:13 | a | 1.0 | -| test.c:201:13:201:15 | ... * ... | 1.0 | -| test.c:201:15:201:15 | b | 1.0 | -| test.c:202:5:202:9 | total | 1.0 | -| test.c:202:5:202:14 | ... += ... | 1.0 | -| test.c:202:14:202:14 | r | 1.0 | -| test.c:204:7:204:7 | 3 | 1.0 | -| test.c:204:7:204:12 | ... <= ... | 1.0 | -| test.c:204:7:204:23 | ... && ... | 1.0 | -| test.c:204:7:204:33 | ... && ... | 1.0 | -| test.c:204:7:204:44 | ... && ... | 1.0 | -| test.c:204:12:204:12 | a | 2.0 | -| test.c:204:17:204:17 | a | 2.0 | -| test.c:204:17:204:23 | ... <= ... | 1.0 | -| test.c:204:22:204:23 | 11 | 1.0 | -| test.c:204:28:204:28 | 0 | 1.0 | -| test.c:204:28:204:33 | ... <= ... | 1.0 | -| test.c:204:33:204:33 | b | 3.0 | -| test.c:204:38:204:38 | b | 3.0 | -| test.c:204:38:204:44 | ... <= ... | 1.0 | -| test.c:204:43:204:44 | 23 | 1.0 | -| test.c:205:13:205:13 | a | 2.0 | -| test.c:205:13:205:15 | ... * ... | 1.0 | -| test.c:205:15:205:15 | b | 3.0 | -| test.c:206:5:206:9 | total | 2.0 | -| test.c:206:5:206:14 | ... += ... | 2.0 | -| test.c:206:14:206:14 | r | 1.0 | -| test.c:208:7:208:7 | 3 | 1.0 | -| test.c:208:7:208:12 | ... <= ... | 1.0 | -| test.c:208:7:208:23 | ... && ... | 1.0 | -| test.c:208:7:208:35 | ... && ... | 1.0 | -| test.c:208:7:208:46 | ... && ... | 1.0 | -| test.c:208:12:208:12 | a | 3.0 | -| test.c:208:17:208:17 | a | 3.0 | -| test.c:208:17:208:23 | ... <= ... | 1.0 | -| test.c:208:22:208:23 | 11 | 1.0 | -| test.c:208:28:208:30 | - ... | 1.0 | -| test.c:208:28:208:35 | ... <= ... | 1.0 | -| test.c:208:29:208:30 | 13 | 1.0 | -| test.c:208:35:208:35 | b | 7.0 | -| test.c:208:40:208:40 | b | 7.0 | -| test.c:208:40:208:46 | ... <= ... | 1.0 | -| test.c:208:45:208:46 | 23 | 1.0 | -| test.c:209:13:209:13 | a | 3.0 | -| test.c:209:13:209:15 | ... * ... | 1.0 | -| test.c:209:15:209:15 | b | 7.0 | -| test.c:210:5:210:9 | total | 4.0 | -| test.c:210:5:210:14 | ... += ... | 4.0 | -| test.c:210:14:210:14 | r | 1.0 | -| test.c:212:7:212:7 | 3 | 1.0 | -| test.c:212:7:212:12 | ... <= ... | 1.0 | -| test.c:212:7:212:23 | ... && ... | 1.0 | -| test.c:212:7:212:35 | ... && ... | 1.0 | -| test.c:212:7:212:45 | ... && ... | 1.0 | -| test.c:212:12:212:12 | a | 4.0 | -| test.c:212:17:212:17 | a | 4.0 | -| test.c:212:17:212:23 | ... <= ... | 1.0 | -| test.c:212:22:212:23 | 11 | 1.0 | -| test.c:212:28:212:30 | - ... | 1.0 | -| test.c:212:28:212:35 | ... <= ... | 1.0 | -| test.c:212:29:212:30 | 13 | 1.0 | -| test.c:212:35:212:35 | b | 15.0 | -| test.c:212:40:212:40 | b | 15.0 | -| test.c:212:40:212:45 | ... <= ... | 1.0 | -| test.c:212:45:212:45 | 0 | 1.0 | -| test.c:213:13:213:13 | a | 4.0 | -| test.c:213:13:213:15 | ... * ... | 1.0 | -| test.c:213:15:213:15 | b | 15.0 | -| test.c:214:5:214:9 | total | 8.0 | -| test.c:214:5:214:14 | ... += ... | 8.0 | -| test.c:214:14:214:14 | r | 1.0 | -| test.c:216:7:216:7 | 3 | 1.0 | -| test.c:216:7:216:12 | ... <= ... | 1.0 | -| test.c:216:7:216:23 | ... && ... | 1.0 | -| test.c:216:7:216:35 | ... && ... | 1.0 | -| test.c:216:7:216:46 | ... && ... | 1.0 | -| test.c:216:12:216:12 | a | 5.0 | -| test.c:216:17:216:17 | a | 5.0 | -| test.c:216:17:216:23 | ... <= ... | 1.0 | -| test.c:216:22:216:23 | 11 | 1.0 | -| test.c:216:28:216:30 | - ... | 1.0 | -| test.c:216:28:216:35 | ... <= ... | 1.0 | -| test.c:216:29:216:30 | 13 | 1.0 | -| test.c:216:35:216:35 | b | 31.0 | -| test.c:216:40:216:40 | b | 31.0 | -| test.c:216:40:216:46 | ... <= ... | 1.0 | -| test.c:216:45:216:46 | - ... | 1.0 | -| test.c:216:46:216:46 | 7 | 1.0 | -| test.c:217:13:217:13 | a | 5.0 | -| test.c:217:13:217:15 | ... * ... | 1.0 | -| test.c:217:15:217:15 | b | 31.0 | -| test.c:218:5:218:9 | total | 16.0 | -| test.c:218:5:218:14 | ... += ... | 16.0 | -| test.c:218:14:218:14 | r | 1.0 | -| test.c:221:10:221:14 | total | 32.0 | -| test.c:226:14:226:15 | 0 | 1.0 | -| test.c:228:7:228:7 | 0 | 1.0 | -| test.c:228:7:228:12 | ... <= ... | 1.0 | -| test.c:228:7:228:23 | ... && ... | 1.0 | -| test.c:228:7:228:33 | ... && ... | 1.0 | -| test.c:228:7:228:44 | ... && ... | 1.0 | -| test.c:228:12:228:12 | a | 1.0 | -| test.c:228:17:228:17 | a | 1.0 | -| test.c:228:17:228:23 | ... <= ... | 1.0 | -| test.c:228:22:228:23 | 11 | 1.0 | -| test.c:228:28:228:28 | 5 | 1.0 | -| test.c:228:28:228:33 | ... <= ... | 1.0 | -| test.c:228:33:228:33 | b | 1.0 | -| test.c:228:38:228:38 | b | 1.0 | -| test.c:228:38:228:44 | ... <= ... | 1.0 | -| test.c:228:43:228:44 | 23 | 1.0 | -| test.c:229:13:229:13 | a | 1.0 | -| test.c:229:13:229:15 | ... * ... | 1.0 | -| test.c:229:15:229:15 | b | 1.0 | -| test.c:230:5:230:9 | total | 1.0 | -| test.c:230:5:230:14 | ... += ... | 1.0 | -| test.c:230:14:230:14 | r | 1.0 | -| test.c:232:7:232:7 | 0 | 1.0 | -| test.c:232:7:232:12 | ... <= ... | 1.0 | -| test.c:232:7:232:23 | ... && ... | 1.0 | -| test.c:232:7:232:33 | ... && ... | 1.0 | -| test.c:232:7:232:44 | ... && ... | 1.0 | -| test.c:232:12:232:12 | a | 2.0 | -| test.c:232:17:232:17 | a | 2.0 | -| test.c:232:17:232:23 | ... <= ... | 1.0 | -| test.c:232:22:232:23 | 11 | 1.0 | -| test.c:232:28:232:28 | 0 | 1.0 | -| test.c:232:28:232:33 | ... <= ... | 1.0 | -| test.c:232:33:232:33 | b | 3.0 | -| test.c:232:38:232:38 | b | 3.0 | -| test.c:232:38:232:44 | ... <= ... | 1.0 | -| test.c:232:43:232:44 | 23 | 1.0 | -| test.c:233:13:233:13 | a | 2.0 | -| test.c:233:13:233:15 | ... * ... | 1.0 | -| test.c:233:15:233:15 | b | 3.0 | -| test.c:234:5:234:9 | total | 2.0 | -| test.c:234:5:234:14 | ... += ... | 2.0 | -| test.c:234:14:234:14 | r | 1.0 | -| test.c:236:7:236:7 | 0 | 1.0 | -| test.c:236:7:236:12 | ... <= ... | 1.0 | -| test.c:236:7:236:23 | ... && ... | 1.0 | -| test.c:236:7:236:35 | ... && ... | 1.0 | -| test.c:236:7:236:46 | ... && ... | 1.0 | -| test.c:236:12:236:12 | a | 3.0 | -| test.c:236:17:236:17 | a | 3.0 | -| test.c:236:17:236:23 | ... <= ... | 1.0 | -| test.c:236:22:236:23 | 11 | 1.0 | -| test.c:236:28:236:30 | - ... | 1.0 | -| test.c:236:28:236:35 | ... <= ... | 1.0 | -| test.c:236:29:236:30 | 13 | 1.0 | -| test.c:236:35:236:35 | b | 7.0 | -| test.c:236:40:236:40 | b | 7.0 | -| test.c:236:40:236:46 | ... <= ... | 1.0 | -| test.c:236:45:236:46 | 23 | 1.0 | -| test.c:237:13:237:13 | a | 3.0 | -| test.c:237:13:237:15 | ... * ... | 1.0 | -| test.c:237:15:237:15 | b | 7.0 | -| test.c:238:5:238:9 | total | 4.0 | -| test.c:238:5:238:14 | ... += ... | 4.0 | -| test.c:238:14:238:14 | r | 1.0 | -| test.c:240:7:240:7 | 0 | 1.0 | -| test.c:240:7:240:12 | ... <= ... | 1.0 | -| test.c:240:7:240:23 | ... && ... | 1.0 | -| test.c:240:7:240:35 | ... && ... | 1.0 | -| test.c:240:7:240:45 | ... && ... | 1.0 | -| test.c:240:12:240:12 | a | 4.0 | -| test.c:240:17:240:17 | a | 4.0 | -| test.c:240:17:240:23 | ... <= ... | 1.0 | -| test.c:240:22:240:23 | 11 | 1.0 | -| test.c:240:28:240:30 | - ... | 1.0 | -| test.c:240:28:240:35 | ... <= ... | 1.0 | -| test.c:240:29:240:30 | 13 | 1.0 | -| test.c:240:35:240:35 | b | 15.0 | -| test.c:240:40:240:40 | b | 15.0 | -| test.c:240:40:240:45 | ... <= ... | 1.0 | -| test.c:240:45:240:45 | 0 | 1.0 | -| test.c:241:13:241:13 | a | 4.0 | -| test.c:241:13:241:15 | ... * ... | 1.0 | -| test.c:241:15:241:15 | b | 15.0 | -| test.c:242:5:242:9 | total | 8.0 | -| test.c:242:5:242:14 | ... += ... | 8.0 | -| test.c:242:14:242:14 | r | 1.0 | -| test.c:244:7:244:7 | 0 | 1.0 | -| test.c:244:7:244:12 | ... <= ... | 1.0 | -| test.c:244:7:244:23 | ... && ... | 1.0 | -| test.c:244:7:244:35 | ... && ... | 1.0 | -| test.c:244:7:244:46 | ... && ... | 1.0 | -| test.c:244:12:244:12 | a | 5.0 | -| test.c:244:17:244:17 | a | 5.0 | -| test.c:244:17:244:23 | ... <= ... | 1.0 | -| test.c:244:22:244:23 | 11 | 1.0 | -| test.c:244:28:244:30 | - ... | 1.0 | -| test.c:244:28:244:35 | ... <= ... | 1.0 | -| test.c:244:29:244:30 | 13 | 1.0 | -| test.c:244:35:244:35 | b | 31.0 | -| test.c:244:40:244:40 | b | 31.0 | -| test.c:244:40:244:46 | ... <= ... | 1.0 | -| test.c:244:45:244:46 | - ... | 1.0 | -| test.c:244:46:244:46 | 7 | 1.0 | -| test.c:245:13:245:13 | a | 5.0 | -| test.c:245:13:245:15 | ... * ... | 1.0 | -| test.c:245:15:245:15 | b | 31.0 | -| test.c:246:5:246:9 | total | 16.0 | -| test.c:246:5:246:14 | ... += ... | 16.0 | -| test.c:246:14:246:14 | r | 1.0 | -| test.c:249:10:249:14 | total | 32.0 | -| test.c:254:14:254:15 | 0 | 1.0 | -| test.c:256:7:256:9 | - ... | 1.0 | -| test.c:256:7:256:14 | ... <= ... | 1.0 | -| test.c:256:7:256:25 | ... && ... | 1.0 | -| test.c:256:7:256:35 | ... && ... | 1.0 | -| test.c:256:7:256:46 | ... && ... | 1.0 | -| test.c:256:8:256:9 | 17 | 1.0 | -| test.c:256:14:256:14 | a | 1.0 | -| test.c:256:19:256:19 | a | 1.0 | -| test.c:256:19:256:25 | ... <= ... | 1.0 | -| test.c:256:24:256:25 | 11 | 1.0 | -| test.c:256:30:256:30 | 5 | 1.0 | -| test.c:256:30:256:35 | ... <= ... | 1.0 | -| test.c:256:35:256:35 | b | 1.0 | -| test.c:256:40:256:40 | b | 1.0 | -| test.c:256:40:256:46 | ... <= ... | 1.0 | -| test.c:256:45:256:46 | 23 | 1.0 | -| test.c:257:13:257:13 | a | 1.0 | -| test.c:257:13:257:15 | ... * ... | 1.0 | -| test.c:257:15:257:15 | b | 1.0 | -| test.c:258:5:258:9 | total | 1.0 | -| test.c:258:5:258:14 | ... += ... | 1.0 | -| test.c:258:14:258:14 | r | 1.0 | -| test.c:260:7:260:9 | - ... | 1.0 | -| test.c:260:7:260:14 | ... <= ... | 1.0 | -| test.c:260:7:260:25 | ... && ... | 1.0 | -| test.c:260:7:260:35 | ... && ... | 1.0 | -| test.c:260:7:260:46 | ... && ... | 1.0 | -| test.c:260:8:260:9 | 17 | 1.0 | -| test.c:260:14:260:14 | a | 2.0 | -| test.c:260:19:260:19 | a | 2.0 | -| test.c:260:19:260:25 | ... <= ... | 1.0 | -| test.c:260:24:260:25 | 11 | 1.0 | -| test.c:260:30:260:30 | 0 | 1.0 | -| test.c:260:30:260:35 | ... <= ... | 1.0 | -| test.c:260:35:260:35 | b | 3.0 | -| test.c:260:40:260:40 | b | 3.0 | -| test.c:260:40:260:46 | ... <= ... | 1.0 | -| test.c:260:45:260:46 | 23 | 1.0 | -| test.c:261:13:261:13 | a | 2.0 | -| test.c:261:13:261:15 | ... * ... | 1.0 | -| test.c:261:15:261:15 | b | 3.0 | -| test.c:262:5:262:9 | total | 2.0 | -| test.c:262:5:262:14 | ... += ... | 2.0 | -| test.c:262:14:262:14 | r | 1.0 | -| test.c:264:7:264:9 | - ... | 1.0 | -| test.c:264:7:264:14 | ... <= ... | 1.0 | -| test.c:264:7:264:25 | ... && ... | 1.0 | -| test.c:264:7:264:37 | ... && ... | 1.0 | -| test.c:264:7:264:48 | ... && ... | 1.0 | -| test.c:264:8:264:9 | 17 | 1.0 | -| test.c:264:14:264:14 | a | 3.0 | -| test.c:264:19:264:19 | a | 3.0 | -| test.c:264:19:264:25 | ... <= ... | 1.0 | -| test.c:264:24:264:25 | 11 | 1.0 | -| test.c:264:30:264:32 | - ... | 1.0 | -| test.c:264:30:264:37 | ... <= ... | 1.0 | -| test.c:264:31:264:32 | 13 | 1.0 | -| test.c:264:37:264:37 | b | 7.0 | -| test.c:264:42:264:42 | b | 7.0 | -| test.c:264:42:264:48 | ... <= ... | 1.0 | -| test.c:264:47:264:48 | 23 | 1.0 | -| test.c:265:13:265:13 | a | 3.0 | -| test.c:265:13:265:15 | ... * ... | 1.0 | -| test.c:265:15:265:15 | b | 7.0 | -| test.c:266:5:266:9 | total | 4.0 | -| test.c:266:5:266:14 | ... += ... | 4.0 | -| test.c:266:14:266:14 | r | 1.0 | -| test.c:268:7:268:9 | - ... | 1.0 | -| test.c:268:7:268:14 | ... <= ... | 1.0 | -| test.c:268:7:268:25 | ... && ... | 1.0 | -| test.c:268:7:268:37 | ... && ... | 1.0 | -| test.c:268:7:268:47 | ... && ... | 1.0 | -| test.c:268:8:268:9 | 17 | 1.0 | -| test.c:268:14:268:14 | a | 4.0 | -| test.c:268:19:268:19 | a | 4.0 | -| test.c:268:19:268:25 | ... <= ... | 1.0 | -| test.c:268:24:268:25 | 11 | 1.0 | -| test.c:268:30:268:32 | - ... | 1.0 | -| test.c:268:30:268:37 | ... <= ... | 1.0 | -| test.c:268:31:268:32 | 13 | 1.0 | -| test.c:268:37:268:37 | b | 15.0 | -| test.c:268:42:268:42 | b | 15.0 | -| test.c:268:42:268:47 | ... <= ... | 1.0 | -| test.c:268:47:268:47 | 0 | 1.0 | -| test.c:269:13:269:13 | a | 4.0 | -| test.c:269:13:269:15 | ... * ... | 1.0 | -| test.c:269:15:269:15 | b | 15.0 | -| test.c:270:5:270:9 | total | 8.0 | -| test.c:270:5:270:14 | ... += ... | 8.0 | -| test.c:270:14:270:14 | r | 1.0 | -| test.c:272:7:272:9 | - ... | 1.0 | -| test.c:272:7:272:14 | ... <= ... | 1.0 | -| test.c:272:7:272:25 | ... && ... | 1.0 | -| test.c:272:7:272:37 | ... && ... | 1.0 | -| test.c:272:7:272:48 | ... && ... | 1.0 | -| test.c:272:8:272:9 | 17 | 1.0 | -| test.c:272:14:272:14 | a | 5.0 | -| test.c:272:19:272:19 | a | 5.0 | -| test.c:272:19:272:25 | ... <= ... | 1.0 | -| test.c:272:24:272:25 | 11 | 1.0 | -| test.c:272:30:272:32 | - ... | 1.0 | -| test.c:272:30:272:37 | ... <= ... | 1.0 | -| test.c:272:31:272:32 | 13 | 1.0 | -| test.c:272:37:272:37 | b | 31.0 | -| test.c:272:42:272:42 | b | 31.0 | -| test.c:272:42:272:48 | ... <= ... | 1.0 | -| test.c:272:47:272:48 | - ... | 1.0 | -| test.c:272:48:272:48 | 7 | 1.0 | -| test.c:273:13:273:13 | a | 5.0 | -| test.c:273:13:273:15 | ... * ... | 1.0 | -| test.c:273:15:273:15 | b | 31.0 | -| test.c:274:5:274:9 | total | 16.0 | -| test.c:274:5:274:14 | ... += ... | 16.0 | -| test.c:274:14:274:14 | r | 1.0 | -| test.c:277:10:277:14 | total | 32.0 | -| test.c:282:14:282:15 | 0 | 1.0 | -| test.c:284:7:284:9 | - ... | 1.0 | -| test.c:284:7:284:14 | ... <= ... | 1.0 | -| test.c:284:7:284:24 | ... && ... | 1.0 | -| test.c:284:7:284:34 | ... && ... | 1.0 | -| test.c:284:7:284:45 | ... && ... | 1.0 | -| test.c:284:8:284:9 | 17 | 1.0 | -| test.c:284:14:284:14 | a | 1.0 | -| test.c:284:19:284:19 | a | 1.0 | -| test.c:284:19:284:24 | ... <= ... | 1.0 | -| test.c:284:24:284:24 | 0 | 1.0 | -| test.c:284:29:284:29 | 5 | 1.0 | -| test.c:284:29:284:34 | ... <= ... | 1.0 | -| test.c:284:34:284:34 | b | 1.0 | -| test.c:284:39:284:39 | b | 1.0 | -| test.c:284:39:284:45 | ... <= ... | 1.0 | -| test.c:284:44:284:45 | 23 | 1.0 | -| test.c:285:13:285:13 | a | 1.0 | -| test.c:285:13:285:15 | ... * ... | 1.0 | -| test.c:285:15:285:15 | b | 1.0 | -| test.c:286:5:286:9 | total | 1.0 | -| test.c:286:5:286:14 | ... += ... | 1.0 | -| test.c:286:14:286:14 | r | 1.0 | -| test.c:288:7:288:9 | - ... | 1.0 | -| test.c:288:7:288:14 | ... <= ... | 1.0 | -| test.c:288:7:288:24 | ... && ... | 1.0 | -| test.c:288:7:288:34 | ... && ... | 1.0 | -| test.c:288:7:288:45 | ... && ... | 1.0 | -| test.c:288:8:288:9 | 17 | 1.0 | -| test.c:288:14:288:14 | a | 2.0 | -| test.c:288:19:288:19 | a | 2.0 | -| test.c:288:19:288:24 | ... <= ... | 1.0 | -| test.c:288:24:288:24 | 0 | 1.0 | -| test.c:288:29:288:29 | 0 | 1.0 | -| test.c:288:29:288:34 | ... <= ... | 1.0 | -| test.c:288:34:288:34 | b | 3.0 | -| test.c:288:39:288:39 | b | 3.0 | -| test.c:288:39:288:45 | ... <= ... | 1.0 | -| test.c:288:44:288:45 | 23 | 1.0 | -| test.c:289:13:289:13 | a | 2.0 | -| test.c:289:13:289:15 | ... * ... | 1.0 | -| test.c:289:15:289:15 | b | 3.0 | -| test.c:290:5:290:9 | total | 2.0 | -| test.c:290:5:290:14 | ... += ... | 2.0 | -| test.c:290:14:290:14 | r | 1.0 | -| test.c:292:7:292:9 | - ... | 1.0 | -| test.c:292:7:292:14 | ... <= ... | 1.0 | -| test.c:292:7:292:24 | ... && ... | 1.0 | -| test.c:292:7:292:36 | ... && ... | 1.0 | -| test.c:292:7:292:47 | ... && ... | 1.0 | -| test.c:292:8:292:9 | 17 | 1.0 | -| test.c:292:14:292:14 | a | 3.0 | -| test.c:292:19:292:19 | a | 3.0 | -| test.c:292:19:292:24 | ... <= ... | 1.0 | -| test.c:292:24:292:24 | 0 | 1.0 | -| test.c:292:29:292:31 | - ... | 1.0 | -| test.c:292:29:292:36 | ... <= ... | 1.0 | -| test.c:292:30:292:31 | 13 | 1.0 | -| test.c:292:36:292:36 | b | 7.0 | -| test.c:292:41:292:41 | b | 7.0 | -| test.c:292:41:292:47 | ... <= ... | 1.0 | -| test.c:292:46:292:47 | 23 | 1.0 | -| test.c:293:13:293:13 | a | 3.0 | -| test.c:293:13:293:15 | ... * ... | 1.0 | -| test.c:293:15:293:15 | b | 7.0 | -| test.c:294:5:294:9 | total | 4.0 | -| test.c:294:5:294:14 | ... += ... | 4.0 | -| test.c:294:14:294:14 | r | 1.0 | -| test.c:296:7:296:9 | - ... | 1.0 | -| test.c:296:7:296:14 | ... <= ... | 1.0 | -| test.c:296:7:296:24 | ... && ... | 1.0 | -| test.c:296:7:296:36 | ... && ... | 1.0 | -| test.c:296:7:296:46 | ... && ... | 1.0 | -| test.c:296:8:296:9 | 17 | 1.0 | -| test.c:296:14:296:14 | a | 4.0 | -| test.c:296:19:296:19 | a | 4.0 | -| test.c:296:19:296:24 | ... <= ... | 1.0 | -| test.c:296:24:296:24 | 0 | 1.0 | -| test.c:296:29:296:31 | - ... | 1.0 | -| test.c:296:29:296:36 | ... <= ... | 1.0 | -| test.c:296:30:296:31 | 13 | 1.0 | -| test.c:296:36:296:36 | b | 15.0 | -| test.c:296:41:296:41 | b | 15.0 | -| test.c:296:41:296:46 | ... <= ... | 1.0 | -| test.c:296:46:296:46 | 0 | 1.0 | -| test.c:297:13:297:13 | a | 4.0 | -| test.c:297:13:297:15 | ... * ... | 1.0 | -| test.c:297:15:297:15 | b | 15.0 | -| test.c:298:5:298:9 | total | 8.0 | -| test.c:298:5:298:14 | ... += ... | 8.0 | -| test.c:298:14:298:14 | r | 1.0 | -| test.c:300:7:300:9 | - ... | 1.0 | -| test.c:300:7:300:14 | ... <= ... | 1.0 | -| test.c:300:7:300:24 | ... && ... | 1.0 | -| test.c:300:7:300:36 | ... && ... | 1.0 | -| test.c:300:7:300:47 | ... && ... | 1.0 | -| test.c:300:8:300:9 | 17 | 1.0 | -| test.c:300:14:300:14 | a | 5.0 | -| test.c:300:19:300:19 | a | 5.0 | -| test.c:300:19:300:24 | ... <= ... | 1.0 | -| test.c:300:24:300:24 | 0 | 1.0 | -| test.c:300:29:300:31 | - ... | 1.0 | -| test.c:300:29:300:36 | ... <= ... | 1.0 | -| test.c:300:30:300:31 | 13 | 1.0 | -| test.c:300:36:300:36 | b | 31.0 | -| test.c:300:41:300:41 | b | 31.0 | -| test.c:300:41:300:47 | ... <= ... | 1.0 | -| test.c:300:46:300:47 | - ... | 1.0 | -| test.c:300:47:300:47 | 7 | 1.0 | -| test.c:301:13:301:13 | a | 5.0 | -| test.c:301:13:301:15 | ... * ... | 1.0 | -| test.c:301:15:301:15 | b | 31.0 | -| test.c:302:5:302:9 | total | 16.0 | -| test.c:302:5:302:14 | ... += ... | 16.0 | -| test.c:302:14:302:14 | r | 1.0 | -| test.c:305:10:305:14 | total | 32.0 | -| test.c:310:14:310:15 | 0 | 1.0 | -| test.c:312:7:312:9 | - ... | 1.0 | -| test.c:312:7:312:14 | ... <= ... | 1.0 | -| test.c:312:7:312:25 | ... && ... | 1.0 | -| test.c:312:7:312:35 | ... && ... | 1.0 | -| test.c:312:7:312:46 | ... && ... | 1.0 | -| test.c:312:8:312:9 | 17 | 1.0 | -| test.c:312:14:312:14 | a | 1.0 | -| test.c:312:19:312:19 | a | 1.0 | -| test.c:312:19:312:25 | ... <= ... | 1.0 | -| test.c:312:24:312:25 | - ... | 1.0 | -| test.c:312:25:312:25 | 2 | 1.0 | -| test.c:312:30:312:30 | 5 | 1.0 | -| test.c:312:30:312:35 | ... <= ... | 1.0 | -| test.c:312:35:312:35 | b | 1.0 | -| test.c:312:40:312:40 | b | 1.0 | -| test.c:312:40:312:46 | ... <= ... | 1.0 | -| test.c:312:45:312:46 | 23 | 1.0 | -| test.c:313:13:313:13 | a | 1.0 | -| test.c:313:13:313:15 | ... * ... | 1.0 | -| test.c:313:15:313:15 | b | 1.0 | -| test.c:314:5:314:9 | total | 1.0 | -| test.c:314:5:314:14 | ... += ... | 1.0 | -| test.c:314:14:314:14 | r | 1.0 | -| test.c:316:7:316:9 | - ... | 1.0 | -| test.c:316:7:316:14 | ... <= ... | 1.0 | -| test.c:316:7:316:25 | ... && ... | 1.0 | -| test.c:316:7:316:35 | ... && ... | 1.0 | -| test.c:316:7:316:46 | ... && ... | 1.0 | -| test.c:316:8:316:9 | 17 | 1.0 | -| test.c:316:14:316:14 | a | 2.0 | -| test.c:316:19:316:19 | a | 2.0 | -| test.c:316:19:316:25 | ... <= ... | 1.0 | -| test.c:316:24:316:25 | - ... | 1.0 | -| test.c:316:25:316:25 | 2 | 1.0 | -| test.c:316:30:316:30 | 0 | 1.0 | -| test.c:316:30:316:35 | ... <= ... | 1.0 | -| test.c:316:35:316:35 | b | 3.0 | -| test.c:316:40:316:40 | b | 3.0 | -| test.c:316:40:316:46 | ... <= ... | 1.0 | -| test.c:316:45:316:46 | 23 | 1.0 | -| test.c:317:13:317:13 | a | 2.0 | -| test.c:317:13:317:15 | ... * ... | 1.0 | -| test.c:317:15:317:15 | b | 3.0 | -| test.c:318:5:318:9 | total | 2.0 | -| test.c:318:5:318:14 | ... += ... | 2.0 | -| test.c:318:14:318:14 | r | 1.0 | -| test.c:320:7:320:9 | - ... | 1.0 | -| test.c:320:7:320:14 | ... <= ... | 1.0 | -| test.c:320:7:320:25 | ... && ... | 1.0 | -| test.c:320:7:320:37 | ... && ... | 1.0 | -| test.c:320:7:320:48 | ... && ... | 1.0 | -| test.c:320:8:320:9 | 17 | 1.0 | -| test.c:320:14:320:14 | a | 3.0 | -| test.c:320:19:320:19 | a | 3.0 | -| test.c:320:19:320:25 | ... <= ... | 1.0 | -| test.c:320:24:320:25 | - ... | 1.0 | -| test.c:320:25:320:25 | 2 | 1.0 | -| test.c:320:30:320:32 | - ... | 1.0 | -| test.c:320:30:320:37 | ... <= ... | 1.0 | -| test.c:320:31:320:32 | 13 | 1.0 | -| test.c:320:37:320:37 | b | 7.0 | -| test.c:320:42:320:42 | b | 7.0 | -| test.c:320:42:320:48 | ... <= ... | 1.0 | -| test.c:320:47:320:48 | 23 | 1.0 | -| test.c:321:13:321:13 | a | 3.0 | -| test.c:321:13:321:15 | ... * ... | 1.0 | -| test.c:321:15:321:15 | b | 7.0 | -| test.c:322:5:322:9 | total | 4.0 | -| test.c:322:5:322:14 | ... += ... | 4.0 | -| test.c:322:14:322:14 | r | 1.0 | -| test.c:324:7:324:9 | - ... | 1.0 | -| test.c:324:7:324:14 | ... <= ... | 1.0 | -| test.c:324:7:324:25 | ... && ... | 1.0 | -| test.c:324:7:324:37 | ... && ... | 1.0 | -| test.c:324:7:324:47 | ... && ... | 1.0 | -| test.c:324:8:324:9 | 17 | 1.0 | -| test.c:324:14:324:14 | a | 4.0 | -| test.c:324:19:324:19 | a | 4.0 | -| test.c:324:19:324:25 | ... <= ... | 1.0 | -| test.c:324:24:324:25 | - ... | 1.0 | -| test.c:324:25:324:25 | 2 | 1.0 | -| test.c:324:30:324:32 | - ... | 1.0 | -| test.c:324:30:324:37 | ... <= ... | 1.0 | -| test.c:324:31:324:32 | 13 | 1.0 | -| test.c:324:37:324:37 | b | 15.0 | -| test.c:324:42:324:42 | b | 15.0 | -| test.c:324:42:324:47 | ... <= ... | 1.0 | -| test.c:324:47:324:47 | 0 | 1.0 | -| test.c:325:13:325:13 | a | 4.0 | -| test.c:325:13:325:15 | ... * ... | 1.0 | -| test.c:325:15:325:15 | b | 15.0 | -| test.c:326:5:326:9 | total | 8.0 | -| test.c:326:5:326:14 | ... += ... | 8.0 | -| test.c:326:14:326:14 | r | 1.0 | -| test.c:328:7:328:9 | - ... | 1.0 | -| test.c:328:7:328:14 | ... <= ... | 1.0 | -| test.c:328:7:328:25 | ... && ... | 1.0 | -| test.c:328:7:328:37 | ... && ... | 1.0 | -| test.c:328:7:328:48 | ... && ... | 1.0 | -| test.c:328:8:328:9 | 17 | 1.0 | -| test.c:328:14:328:14 | a | 5.0 | -| test.c:328:19:328:19 | a | 5.0 | -| test.c:328:19:328:25 | ... <= ... | 1.0 | -| test.c:328:24:328:25 | - ... | 1.0 | -| test.c:328:25:328:25 | 2 | 1.0 | -| test.c:328:30:328:32 | - ... | 1.0 | -| test.c:328:30:328:37 | ... <= ... | 1.0 | -| test.c:328:31:328:32 | 13 | 1.0 | -| test.c:328:37:328:37 | b | 31.0 | -| test.c:328:42:328:42 | b | 31.0 | -| test.c:328:42:328:48 | ... <= ... | 1.0 | -| test.c:328:47:328:48 | - ... | 1.0 | -| test.c:328:48:328:48 | 7 | 1.0 | -| test.c:329:13:329:13 | a | 5.0 | -| test.c:329:13:329:15 | ... * ... | 1.0 | -| test.c:329:15:329:15 | b | 31.0 | -| test.c:330:5:330:9 | total | 16.0 | -| test.c:330:5:330:14 | ... += ... | 16.0 | -| test.c:330:14:330:14 | r | 1.0 | -| test.c:333:10:333:14 | total | 32.0 | -| test.c:339:28:339:43 | 9007199254740992 | 1.0 | -| test.c:339:28:339:47 | (unsigned long long)... | 1.0 | -| test.c:339:28:339:47 | ... - ... | 1.0 | -| test.c:339:47:339:47 | 1 | 1.0 | -| test.c:339:47:339:47 | (long)... | 1.0 | -| test.c:341:32:341:34 | odd | 1.0 | -| test.c:341:32:341:39 | ... >> ... | 1.0 | -| test.c:341:39:341:39 | 1 | 1.0 | -| test.c:343:10:343:16 | shifted | 1.0 | -| test.c:348:22:348:32 | (...) | 1.0 | -| test.c:348:22:348:36 | ... > ... | 1.0 | -| test.c:348:22:348:44 | ... ? ... : ... | 1.0 | -| test.c:348:23:348:23 | 2 | 1.0 | -| test.c:348:23:348:23 | (unsigned int)... | 1.0 | -| test.c:348:23:348:27 | ... * ... | 1.0 | -| test.c:348:23:348:31 | ... + ... | 1.0 | -| test.c:348:27:348:27 | e | 1.0 | -| test.c:348:31:348:31 | 1 | 1.0 | -| test.c:348:31:348:31 | (unsigned int)... | 1.0 | -| test.c:348:36:348:36 | 0 | 1.0 | -| test.c:348:36:348:36 | (unsigned int)... | 1.0 | -| test.c:348:40:348:40 | e | 1.0 | -| test.c:348:44:348:44 | 2 | 1.0 | -| test.c:348:44:348:44 | (unsigned int)... | 1.0 | -| test.c:349:20:349:30 | (...) | 2.0 | -| test.c:349:20:349:35 | ... >= ... | 1.0 | -| test.c:349:20:349:43 | (signed int)... | 2.0 | -| test.c:349:20:349:43 | ... ? ... : ... | 2.0 | -| test.c:349:21:349:21 | 2 | 1.0 | -| test.c:349:21:349:21 | (unsigned int)... | 1.0 | -| test.c:349:21:349:25 | ... * ... | 2.0 | -| test.c:349:21:349:29 | ... + ... | 2.0 | -| test.c:349:25:349:25 | e | 2.0 | -| test.c:349:29:349:29 | 1 | 1.0 | -| test.c:349:29:349:29 | (unsigned int)... | 1.0 | -| test.c:349:35:349:35 | 0 | 1.0 | -| test.c:349:35:349:35 | (unsigned int)... | 1.0 | -| test.c:349:39:349:39 | e | 2.0 | -| test.c:349:43:349:43 | 2 | 1.0 | -| test.c:349:43:349:43 | (unsigned int)... | 1.0 | -| test.c:350:22:350:32 | (...) | 4.0 | -| test.c:350:22:350:36 | ... > ... | 1.0 | -| test.c:350:22:350:44 | ... ? ... : ... | 4.0 | -| test.c:350:23:350:23 | 3 | 1.0 | -| test.c:350:23:350:23 | (unsigned int)... | 1.0 | -| test.c:350:23:350:27 | ... * ... | 4.0 | -| test.c:350:23:350:31 | ... + ... | 4.0 | -| test.c:350:27:350:27 | e | 4.0 | -| test.c:350:31:350:31 | 2 | 1.0 | -| test.c:350:31:350:31 | (unsigned int)... | 1.0 | -| test.c:350:36:350:36 | 0 | 1.0 | -| test.c:350:36:350:36 | (unsigned int)... | 1.0 | -| test.c:350:40:350:40 | e | 4.0 | -| test.c:350:44:350:44 | 2 | 1.0 | -| test.c:350:44:350:44 | (unsigned int)... | 1.0 | -| test.c:351:22:351:32 | (...) | 8.0 | -| test.c:351:22:351:36 | ... > ... | 1.0 | -| test.c:351:22:351:44 | ... ? ... : ... | 8.0 | -| test.c:351:23:351:23 | 2 | 1.0 | -| test.c:351:23:351:23 | (unsigned int)... | 1.0 | -| test.c:351:23:351:27 | ... * ... | 8.0 | -| test.c:351:23:351:31 | ... + ... | 8.0 | -| test.c:351:27:351:27 | e | 8.0 | -| test.c:351:31:351:31 | 1 | 1.0 | -| test.c:351:31:351:31 | (unsigned int)... | 1.0 | -| test.c:351:36:351:36 | 0 | 1.0 | -| test.c:351:36:351:36 | (unsigned int)... | 1.0 | -| test.c:351:40:351:40 | e | 8.0 | -| test.c:351:44:351:44 | 2 | 1.0 | -| test.c:351:44:351:44 | (unsigned int)... | 1.0 | -| test.c:352:22:352:32 | (...) | 16.0 | -| test.c:352:22:352:37 | ... > ... | 1.0 | -| test.c:352:22:352:45 | ... ? ... : ... | 16.0 | -| test.c:352:23:352:23 | 2 | 1.0 | -| test.c:352:23:352:23 | (unsigned int)... | 1.0 | -| test.c:352:23:352:27 | ... * ... | 16.0 | -| test.c:352:23:352:31 | ... + ... | 16.0 | -| test.c:352:27:352:27 | e | 16.0 | -| test.c:352:31:352:31 | 1 | 1.0 | -| test.c:352:31:352:31 | (unsigned int)... | 1.0 | -| test.c:352:36:352:37 | 16 | 1.0 | -| test.c:352:36:352:37 | (unsigned int)... | 1.0 | -| test.c:352:41:352:41 | e | 16.0 | -| test.c:352:45:352:45 | 2 | 1.0 | -| test.c:352:45:352:45 | (unsigned int)... | 1.0 | -| test.c:354:10:354:12 | bi1 | 1.0 | -| test.c:354:10:354:18 | ... + ... | 2.0 | -| test.c:354:10:354:24 | ... + ... | 8.0 | -| test.c:354:10:354:30 | ... + ... | 64.0 | -| test.c:354:10:354:36 | ... + ... | 1024.0 | -| test.c:354:16:354:18 | (unsigned int)... | 2.0 | -| test.c:354:16:354:18 | bi2 | 2.0 | -| test.c:354:22:354:24 | bi3 | 4.0 | -| test.c:354:28:354:30 | bi4 | 8.0 | -| test.c:354:34:354:36 | bi5 | 16.0 | -| test.c:358:13:358:14 | 0 | 1.0 | -| test.c:359:7:359:7 | x | 1.0 | -| test.c:359:7:359:11 | ... < ... | 1.0 | -| test.c:359:11:359:11 | 0 | 1.0 | -| test.c:360:12:360:13 | - ... | 1.0 | -| test.c:360:13:360:13 | 1 | 1.0 | -| test.c:363:10:363:10 | i | 13.0 | -| test.c:363:10:363:14 | ... < ... | 1.0 | -| test.c:363:14:363:14 | 3 | 1.0 | -| test.c:364:5:364:5 | i | 13.0 | -| test.c:364:5:364:7 | ... ++ | 13.0 | -| test.c:366:3:366:3 | d | 1.0 | -| test.c:366:3:366:7 | ... = ... | 13.0 | -| test.c:366:7:366:7 | i | 13.0 | -| test.c:367:7:367:7 | x | 1.0 | -| test.c:367:7:367:11 | ... < ... | 1.0 | -| test.c:367:11:367:11 | 0 | 1.0 | -| test.c:368:9:368:9 | d | 13.0 | -| test.c:368:9:368:14 | ... > ... | 1.0 | -| test.c:368:13:368:14 | - ... | 1.0 | -| test.c:368:14:368:14 | x | 1.0 | -| test.c:369:14:369:14 | 1 | 1.0 | -| test.c:372:10:372:10 | 0 | 1.0 | -| test.c:378:3:378:4 | y1 | 1.0 | -| test.c:378:3:378:23 | ... = ... | 1.0 | -| test.c:378:8:378:8 | x | 1.0 | -| test.c:378:8:378:14 | ... < ... | 1.0 | -| test.c:378:8:378:23 | ... ? ... : ... | 1.0 | -| test.c:378:12:378:14 | 100 | 1.0 | -| test.c:378:12:378:14 | (unsigned int)... | 1.0 | -| test.c:378:18:378:18 | x | 1.0 | -| test.c:378:22:378:23 | 10 | 1.0 | -| test.c:378:22:378:23 | (unsigned int)... | 1.0 | -| test.c:379:3:379:4 | y2 | 1.0 | -| test.c:379:3:379:24 | ... = ... | 2.0 | -| test.c:379:8:379:8 | x | 2.0 | -| test.c:379:8:379:15 | ... >= ... | 1.0 | -| test.c:379:8:379:24 | ... ? ... : ... | 2.0 | -| test.c:379:13:379:15 | 100 | 1.0 | -| test.c:379:13:379:15 | (unsigned int)... | 1.0 | -| test.c:379:19:379:20 | 10 | 1.0 | -| test.c:379:19:379:20 | (unsigned int)... | 1.0 | -| test.c:379:24:379:24 | x | 2.0 | -| test.c:380:3:380:4 | y3 | 1.0 | -| test.c:380:3:380:8 | ... = ... | 1.0 | -| test.c:380:8:380:8 | 0 | 1.0 | -| test.c:380:8:380:8 | (unsigned int)... | 1.0 | -| test.c:381:3:381:4 | y4 | 1.0 | -| test.c:381:3:381:8 | ... = ... | 1.0 | -| test.c:381:8:381:8 | 0 | 1.0 | -| test.c:381:8:381:8 | (unsigned int)... | 1.0 | -| test.c:382:3:382:4 | y5 | 1.0 | -| test.c:382:3:382:8 | ... = ... | 1.0 | -| test.c:382:8:382:8 | 0 | 1.0 | -| test.c:382:8:382:8 | (unsigned int)... | 1.0 | -| test.c:383:3:383:4 | y6 | 1.0 | -| test.c:383:3:383:8 | ... = ... | 1.0 | -| test.c:383:8:383:8 | 0 | 1.0 | -| test.c:383:8:383:8 | (unsigned int)... | 1.0 | -| test.c:384:3:384:4 | y7 | 1.0 | -| test.c:384:3:384:8 | ... = ... | 1.0 | -| test.c:384:8:384:8 | 0 | 1.0 | -| test.c:384:8:384:8 | (unsigned int)... | 1.0 | -| test.c:385:3:385:4 | y8 | 1.0 | -| test.c:385:3:385:8 | ... = ... | 1.0 | -| test.c:385:8:385:8 | 0 | 1.0 | -| test.c:385:8:385:8 | (unsigned int)... | 1.0 | -| test.c:386:7:386:7 | x | 4.0 | -| test.c:386:7:386:13 | ... < ... | 1.0 | -| test.c:386:11:386:13 | 300 | 1.0 | -| test.c:386:11:386:13 | (unsigned int)... | 1.0 | -| test.c:387:5:387:6 | y3 | 1.0 | -| test.c:387:5:387:15 | ... = ... | 4.0 | -| test.c:387:10:387:10 | x | 4.0 | -| test.c:387:10:387:15 | ... ? ... : ... | 4.0 | -| test.c:387:15:387:15 | 5 | 1.0 | -| test.c:387:15:387:15 | (unsigned int)... | 1.0 | -| test.c:388:5:388:6 | y4 | 1.0 | -| test.c:388:5:388:17 | ... = ... | 4.0 | -| test.c:388:10:388:10 | x | 4.0 | -| test.c:388:10:388:17 | ... ? ... : ... | 4.0 | -| test.c:388:15:388:17 | 500 | 1.0 | -| test.c:388:15:388:17 | (unsigned int)... | 1.0 | -| test.c:389:5:389:6 | y5 | 1.0 | -| test.c:389:5:389:21 | ... = ... | 4.0 | -| test.c:389:10:389:14 | (...) | 4.0 | -| test.c:389:10:389:21 | ... ? ... : ... | 4.0 | -| test.c:389:11:389:11 | x | 4.0 | -| test.c:389:11:389:13 | ... + ... | 4.0 | -| test.c:389:13:389:13 | 1 | 1.0 | -| test.c:389:13:389:13 | (unsigned int)... | 1.0 | -| test.c:389:19:389:21 | 500 | 1.0 | -| test.c:389:19:389:21 | (unsigned int)... | 1.0 | -| test.c:390:5:390:6 | y6 | 1.0 | -| test.c:390:5:390:36 | ... = ... | 4.0 | -| test.c:390:10:390:31 | (...) | 4.0 | -| test.c:390:10:390:36 | (unsigned int)... | 4.0 | -| test.c:390:10:390:36 | ... ? ... : ... | 4.0 | -| test.c:390:11:390:30 | (unsigned char)... | 4.0 | -| test.c:390:26:390:30 | (...) | 4.0 | -| test.c:390:27:390:27 | x | 4.0 | -| test.c:390:27:390:29 | ... + ... | 4.0 | -| test.c:390:29:390:29 | 1 | 1.0 | -| test.c:390:29:390:29 | (unsigned int)... | 1.0 | -| test.c:390:36:390:36 | 5 | 1.0 | -| test.c:391:5:391:6 | y7 | 1.0 | -| test.c:391:5:391:38 | ... = ... | 4.0 | -| test.c:391:10:391:31 | (...) | 4.0 | -| test.c:391:10:391:38 | (unsigned int)... | 4.0 | -| test.c:391:10:391:38 | ... ? ... : ... | 4.0 | -| test.c:391:11:391:30 | (unsigned char)... | 4.0 | -| test.c:391:26:391:30 | (...) | 4.0 | -| test.c:391:27:391:27 | x | 4.0 | -| test.c:391:27:391:29 | ... + ... | 4.0 | -| test.c:391:29:391:29 | 1 | 1.0 | -| test.c:391:29:391:29 | (unsigned int)... | 1.0 | -| test.c:391:36:391:38 | 500 | 1.0 | -| test.c:392:5:392:6 | y8 | 1.0 | -| test.c:392:5:392:39 | ... = ... | 4.0 | -| test.c:392:10:392:32 | (...) | 4.0 | -| test.c:392:10:392:39 | (unsigned int)... | 4.0 | -| test.c:392:10:392:39 | ... ? ... : ... | 4.0 | -| test.c:392:11:392:31 | (unsigned short)... | 4.0 | -| test.c:392:27:392:31 | (...) | 4.0 | -| test.c:392:28:392:28 | x | 4.0 | -| test.c:392:28:392:30 | ... + ... | 4.0 | -| test.c:392:30:392:30 | 1 | 1.0 | -| test.c:392:30:392:30 | (unsigned int)... | 1.0 | -| test.c:392:37:392:39 | 500 | 1.0 | -| test.c:394:10:394:11 | y1 | 1.0 | -| test.c:394:10:394:16 | ... + ... | 2.0 | -| test.c:394:10:394:21 | ... + ... | 10.0 | -| test.c:394:10:394:26 | ... + ... | 50.0 | -| test.c:394:10:394:31 | ... + ... | 250.0 | -| test.c:394:10:394:36 | ... + ... | 1250.0 | -| test.c:394:10:394:41 | ... + ... | 6250.0 | -| test.c:394:10:394:46 | ... + ... | 31250.0 | -| test.c:394:15:394:16 | y2 | 2.0 | -| test.c:394:20:394:21 | y3 | 5.0 | -| test.c:394:25:394:26 | y4 | 5.0 | -| test.c:394:30:394:31 | y5 | 5.0 | -| test.c:394:35:394:36 | y6 | 5.0 | -| test.c:394:40:394:41 | y7 | 5.0 | -| test.c:394:45:394:46 | y8 | 5.0 | -| test.c:400:3:400:4 | y1 | 1.0 | -| test.c:400:3:400:24 | ... = ... | 1.0 | -| test.c:400:8:400:8 | x | 1.0 | -| test.c:400:8:400:14 | ... > ... | 1.0 | -| test.c:400:8:400:24 | ... ? ... : ... | 1.0 | -| test.c:400:12:400:14 | 100 | 1.0 | -| test.c:400:12:400:14 | (unsigned int)... | 1.0 | -| test.c:400:18:400:18 | x | 1.0 | -| test.c:400:22:400:24 | 110 | 1.0 | -| test.c:400:22:400:24 | (unsigned int)... | 1.0 | -| test.c:401:3:401:4 | y2 | 1.0 | -| test.c:401:3:401:25 | ... = ... | 2.0 | -| test.c:401:8:401:8 | x | 2.0 | -| test.c:401:8:401:15 | ... <= ... | 1.0 | -| test.c:401:8:401:25 | ... ? ... : ... | 2.0 | -| test.c:401:13:401:15 | 100 | 1.0 | -| test.c:401:13:401:15 | (unsigned int)... | 1.0 | -| test.c:401:19:401:21 | 110 | 1.0 | -| test.c:401:19:401:21 | (unsigned int)... | 1.0 | -| test.c:401:25:401:25 | x | 2.0 | -| test.c:402:3:402:4 | y3 | 1.0 | -| test.c:402:3:402:11 | ... = ... | 1.0 | -| test.c:402:8:402:11 | 1000 | 1.0 | -| test.c:402:8:402:11 | (unsigned int)... | 1.0 | -| test.c:403:3:403:4 | y4 | 1.0 | -| test.c:403:3:403:11 | ... = ... | 1.0 | -| test.c:403:8:403:11 | 1000 | 1.0 | -| test.c:403:8:403:11 | (unsigned int)... | 1.0 | -| test.c:404:3:404:4 | y5 | 1.0 | -| test.c:404:3:404:11 | ... = ... | 1.0 | -| test.c:404:8:404:11 | 1000 | 1.0 | -| test.c:404:8:404:11 | (unsigned int)... | 1.0 | -| test.c:405:7:405:7 | x | 4.0 | -| test.c:405:7:405:14 | ... >= ... | 1.0 | -| test.c:405:12:405:14 | 300 | 1.0 | -| test.c:405:12:405:14 | (unsigned int)... | 1.0 | -| test.c:406:5:406:6 | y3 | 1.0 | -| test.c:406:5:406:21 | ... = ... | 4.0 | -| test.c:406:10:406:16 | (...) | 4.0 | -| test.c:406:10:406:21 | ... ? ... : ... | 4.0 | -| test.c:406:11:406:11 | x | 4.0 | -| test.c:406:11:406:15 | ... - ... | 4.0 | -| test.c:406:13:406:15 | 300 | 1.0 | -| test.c:406:13:406:15 | (unsigned int)... | 1.0 | -| test.c:406:21:406:21 | 5 | 1.0 | -| test.c:406:21:406:21 | (unsigned int)... | 1.0 | -| test.c:407:5:407:6 | y4 | 1.0 | -| test.c:407:5:407:21 | ... = ... | 4.0 | -| test.c:407:10:407:16 | (...) | 4.0 | -| test.c:407:10:407:21 | ... ? ... : ... | 4.0 | -| test.c:407:11:407:11 | x | 4.0 | -| test.c:407:11:407:15 | ... - ... | 4.0 | -| test.c:407:13:407:15 | 200 | 1.0 | -| test.c:407:13:407:15 | (unsigned int)... | 1.0 | -| test.c:407:21:407:21 | 5 | 1.0 | -| test.c:407:21:407:21 | (unsigned int)... | 1.0 | -| test.c:408:5:408:6 | y5 | 1.0 | -| test.c:408:5:408:38 | ... = ... | 4.0 | -| test.c:408:10:408:33 | (...) | 4.0 | -| test.c:408:10:408:38 | (unsigned int)... | 4.0 | -| test.c:408:10:408:38 | ... ? ... : ... | 4.0 | -| test.c:408:11:408:32 | (unsigned char)... | 4.0 | -| test.c:408:26:408:32 | (...) | 4.0 | -| test.c:408:27:408:27 | x | 4.0 | -| test.c:408:27:408:31 | ... - ... | 4.0 | -| test.c:408:29:408:31 | 200 | 1.0 | -| test.c:408:29:408:31 | (unsigned int)... | 1.0 | -| test.c:408:38:408:38 | 5 | 1.0 | -| test.c:410:10:410:11 | y1 | 1.0 | -| test.c:410:10:410:16 | ... + ... | 2.0 | -| test.c:410:10:410:21 | ... + ... | 10.0 | -| test.c:410:10:410:26 | ... + ... | 50.0 | -| test.c:410:10:410:31 | ... + ... | 250.0 | -| test.c:410:15:410:16 | y2 | 2.0 | -| test.c:410:20:410:21 | y3 | 5.0 | -| test.c:410:25:410:26 | y4 | 5.0 | -| test.c:410:30:410:31 | y5 | 5.0 | -| test.c:415:14:415:14 | m | 1.0 | -| test.c:415:14:415:108 | ... ? ... : ... | 1.0 | -| test.c:415:18:415:18 | n | 1.0 | -| test.c:415:18:415:95 | ... ? ... : ... | 1.0 | -| test.c:415:22:415:22 | o | 1.0 | -| test.c:415:22:415:82 | ... ? ... : ... | 1.0 | -| test.c:415:26:415:26 | p | 1.0 | -| test.c:415:26:415:69 | ... ? ... : ... | 1.0 | -| test.c:415:30:415:30 | q | 1.0 | -| test.c:415:30:415:56 | ... ? ... : ... | 1.0 | -| test.c:415:34:415:43 | 0.4743882700000000008 | 1.0 | -| test.c:415:47:415:56 | 0.1433388700000000071 | 1.0 | -| test.c:415:60:415:69 | 0.3527920299999999787 | 1.0 | -| test.c:415:73:415:82 | 0.3920645799999999959 | 1.0 | -| test.c:415:86:415:95 | 0.2154022499999999896 | 1.0 | -| test.c:415:99:415:108 | 0.4049680500000000238 | 1.0 | -| test.c:416:14:416:14 | m | 2.0 | -| test.c:416:14:416:108 | ... ? ... : ... | 1.0 | -| test.c:416:18:416:18 | n | 3.0 | -| test.c:416:18:416:95 | ... ? ... : ... | 1.0 | -| test.c:416:22:416:22 | o | 3.0 | -| test.c:416:22:416:82 | ... ? ... : ... | 1.0 | -| test.c:416:26:416:26 | p | 3.0 | -| test.c:416:26:416:69 | ... ? ... : ... | 1.0 | -| test.c:416:30:416:30 | q | 3.0 | -| test.c:416:30:416:56 | ... ? ... : ... | 1.0 | -| test.c:416:34:416:43 | 0.3418334800000000229 | 1.0 | -| test.c:416:47:416:56 | 0.3533464000000000049 | 1.0 | -| test.c:416:60:416:69 | 0.2224785300000000077 | 1.0 | -| test.c:416:73:416:82 | 0.326618929999999974 | 1.0 | -| test.c:416:86:416:95 | 0.5927046500000000551 | 1.0 | -| test.c:416:99:416:108 | 0.5297741000000000255 | 1.0 | -| test.c:417:14:417:14 | m | 4.0 | -| test.c:417:14:417:108 | ... ? ... : ... | 1.0 | -| test.c:417:18:417:18 | n | 9.0 | -| test.c:417:18:417:95 | ... ? ... : ... | 1.0 | -| test.c:417:22:417:22 | o | 9.0 | -| test.c:417:22:417:82 | ... ? ... : ... | 1.0 | -| test.c:417:26:417:26 | p | 9.0 | -| test.c:417:26:417:69 | ... ? ... : ... | 1.0 | -| test.c:417:30:417:30 | q | 9.0 | -| test.c:417:30:417:56 | ... ? ... : ... | 1.0 | -| test.c:417:34:417:43 | 0.774296030000000024 | 1.0 | -| test.c:417:47:417:56 | 0.3147808400000000062 | 1.0 | -| test.c:417:60:417:69 | 0.3123551399999999756 | 1.0 | -| test.c:417:73:417:82 | 0.05121255999999999725 | 1.0 | -| test.c:417:86:417:95 | 0.7931074500000000471 | 1.0 | -| test.c:417:99:417:108 | 0.6798145100000000385 | 1.0 | -| test.c:418:14:418:14 | m | 8.0 | -| test.c:418:14:418:108 | ... ? ... : ... | 1.0 | -| test.c:418:18:418:18 | n | 27.0 | -| test.c:418:18:418:95 | ... ? ... : ... | 1.0 | -| test.c:418:22:418:22 | o | 27.0 | -| test.c:418:22:418:82 | ... ? ... : ... | 1.0 | -| test.c:418:26:418:26 | p | 27.0 | -| test.c:418:26:418:69 | ... ? ... : ... | 1.0 | -| test.c:418:30:418:30 | q | 27.0 | -| test.c:418:30:418:56 | ... ? ... : ... | 1.0 | -| test.c:418:34:418:43 | 0.4472955599999999809 | 1.0 | -| test.c:418:47:418:56 | 0.8059920200000000312 | 1.0 | -| test.c:418:60:418:69 | 0.9899726199999999698 | 1.0 | -| test.c:418:73:418:82 | 0.5995273199999999747 | 1.0 | -| test.c:418:86:418:95 | 0.3697694799999999837 | 1.0 | -| test.c:418:99:418:108 | 0.8386683499999999514 | 1.0 | -| test.c:419:14:419:14 | m | 16.0 | -| test.c:419:14:419:108 | ... ? ... : ... | 1.0 | -| test.c:419:18:419:18 | n | 81.0 | -| test.c:419:18:419:95 | ... ? ... : ... | 1.0 | -| test.c:419:22:419:22 | o | 81.0 | -| test.c:419:22:419:82 | ... ? ... : ... | 1.0 | -| test.c:419:26:419:26 | p | 81.0 | -| test.c:419:26:419:69 | ... ? ... : ... | 1.0 | -| test.c:419:30:419:30 | q | 81.0 | -| test.c:419:30:419:56 | ... ? ... : ... | 1.0 | -| test.c:419:34:419:43 | 0.4931182800000000199 | 1.0 | -| test.c:419:47:419:56 | 0.9038991100000000056 | 1.0 | -| test.c:419:60:419:69 | 0.1059771199999999941 | 1.0 | -| test.c:419:73:419:82 | 0.2177842600000000073 | 1.0 | -| test.c:419:86:419:95 | 0.7248596600000000167 | 1.0 | -| test.c:419:99:419:108 | 0.6873487400000000136 | 1.0 | -| test.c:420:14:420:14 | m | 32.0 | -| test.c:420:14:420:108 | ... ? ... : ... | 1.0 | -| test.c:420:18:420:18 | n | 243.0 | -| test.c:420:18:420:95 | ... ? ... : ... | 1.0 | -| test.c:420:22:420:22 | o | 243.0 | -| test.c:420:22:420:82 | ... ? ... : ... | 1.0 | -| test.c:420:26:420:26 | p | 243.0 | -| test.c:420:26:420:69 | ... ? ... : ... | 1.0 | -| test.c:420:30:420:30 | q | 243.0 | -| test.c:420:30:420:56 | ... ? ... : ... | 1.0 | -| test.c:420:34:420:43 | 0.4745284799999999747 | 1.0 | -| test.c:420:47:420:56 | 0.107866500000000004 | 1.0 | -| test.c:420:60:420:69 | 0.1188457599999999947 | 1.0 | -| test.c:420:73:420:82 | 0.7616405200000000431 | 1.0 | -| test.c:420:86:420:95 | 0.3480889200000000239 | 1.0 | -| test.c:420:99:420:108 | 0.584408649999999974 | 1.0 | -| test.c:421:14:421:14 | m | 64.0 | -| test.c:421:14:421:108 | ... ? ... : ... | 1.0 | -| test.c:421:18:421:18 | n | 729.0 | -| test.c:421:18:421:95 | ... ? ... : ... | 1.0 | -| test.c:421:22:421:22 | o | 729.0 | -| test.c:421:22:421:82 | ... ? ... : ... | 1.0 | -| test.c:421:26:421:26 | p | 729.0 | -| test.c:421:26:421:69 | ... ? ... : ... | 1.0 | -| test.c:421:30:421:30 | q | 729.0 | -| test.c:421:30:421:56 | ... ? ... : ... | 1.0 | -| test.c:421:34:421:43 | 0.02524326 | 1.0 | -| test.c:421:47:421:56 | 0.8290504600000000446 | 1.0 | -| test.c:421:60:421:69 | 0.95823075000000002 | 1.0 | -| test.c:421:73:421:82 | 0.1251655799999999985 | 1.0 | -| test.c:421:86:421:95 | 0.8523517900000000536 | 1.0 | -| test.c:421:99:421:108 | 0.3623238400000000081 | 1.0 | -| test.c:422:14:422:14 | m | 128.0 | -| test.c:422:14:422:108 | ... ? ... : ... | 1.0 | -| test.c:422:18:422:18 | n | 2187.0 | -| test.c:422:18:422:95 | ... ? ... : ... | 1.0 | -| test.c:422:22:422:22 | o | 2187.0 | -| test.c:422:22:422:82 | ... ? ... : ... | 1.0 | -| test.c:422:26:422:26 | p | 2187.0 | -| test.c:422:26:422:69 | ... ? ... : ... | 1.0 | -| test.c:422:30:422:30 | q | 2187.0 | -| test.c:422:30:422:56 | ... ? ... : ... | 1.0 | -| test.c:422:34:422:43 | 0.3870862600000000153 | 1.0 | -| test.c:422:47:422:56 | 0.3287604399999999871 | 1.0 | -| test.c:422:60:422:69 | 0.1496348500000000137 | 1.0 | -| test.c:422:73:422:82 | 0.4504110800000000192 | 1.0 | -| test.c:422:86:422:95 | 0.4864090899999999884 | 1.0 | -| test.c:422:99:422:108 | 0.8433127200000000157 | 1.0 | -| test.c:423:14:423:14 | m | 256.0 | -| test.c:423:14:423:108 | ... ? ... : ... | 1.0 | -| test.c:423:18:423:18 | n | 6561.0 | -| test.c:423:18:423:95 | ... ? ... : ... | 1.0 | -| test.c:423:22:423:22 | o | 6561.0 | -| test.c:423:22:423:82 | ... ? ... : ... | 1.0 | -| test.c:423:26:423:26 | p | 6561.0 | -| test.c:423:26:423:69 | ... ? ... : ... | 1.0 | -| test.c:423:30:423:30 | q | 6561.0 | -| test.c:423:30:423:56 | ... ? ... : ... | 1.0 | -| test.c:423:34:423:43 | 0.1575506299999999971 | 1.0 | -| test.c:423:47:423:56 | 0.7708683299999999905 | 1.0 | -| test.c:423:60:423:69 | 0.2642848099999999811 | 1.0 | -| test.c:423:73:423:82 | 0.1480050800000000111 | 1.0 | -| test.c:423:86:423:95 | 0.374281430000000026 | 1.0 | -| test.c:423:99:423:108 | 0.05328182000000000057 | 1.0 | -| test.c:424:14:424:14 | m | 512.0 | -| test.c:424:14:424:108 | ... ? ... : ... | 1.0 | -| test.c:424:18:424:18 | n | 19683.0 | -| test.c:424:18:424:95 | ... ? ... : ... | 1.0 | -| test.c:424:22:424:22 | o | 19683.0 | -| test.c:424:22:424:82 | ... ? ... : ... | 1.0 | -| test.c:424:26:424:26 | p | 19683.0 | -| test.c:424:26:424:69 | ... ? ... : ... | 1.0 | -| test.c:424:30:424:30 | q | 19683.0 | -| test.c:424:30:424:56 | ... ? ... : ... | 1.0 | -| test.c:424:34:424:43 | 0.4173653600000000186 | 1.0 | -| test.c:424:47:424:56 | 0.7682662799999999681 | 1.0 | -| test.c:424:60:424:69 | 0.2764323799999999776 | 1.0 | -| test.c:424:73:424:82 | 0.5567927400000000082 | 1.0 | -| test.c:424:86:424:95 | 0.3946885700000000163 | 1.0 | -| test.c:424:99:424:108 | 0.6907214400000000198 | 1.0 | -| test.c:425:14:425:14 | m | 1024.0 | -| test.c:425:14:425:108 | ... ? ... : ... | 1.0 | -| test.c:425:18:425:18 | n | 59049.0 | -| test.c:425:18:425:95 | ... ? ... : ... | 1.0 | -| test.c:425:22:425:22 | o | 59049.0 | -| test.c:425:22:425:82 | ... ? ... : ... | 1.0 | -| test.c:425:26:425:26 | p | 59049.0 | -| test.c:425:26:425:69 | ... ? ... : ... | 1.0 | -| test.c:425:30:425:30 | q | 59049.0 | -| test.c:425:30:425:56 | ... ? ... : ... | 1.0 | -| test.c:425:34:425:43 | 0.8895534499999999678 | 1.0 | -| test.c:425:47:425:56 | 0.2990482400000000207 | 1.0 | -| test.c:425:60:425:69 | 0.7624258299999999711 | 1.0 | -| test.c:425:73:425:82 | 0.2051910999999999874 | 1.0 | -| test.c:425:86:425:95 | 0.8874555899999999609 | 1.0 | -| test.c:425:99:425:108 | 0.8137279800000000174 | 1.0 | -| test.c:426:14:426:14 | m | 2048.0 | -| test.c:426:14:426:108 | ... ? ... : ... | 1.0 | -| test.c:426:18:426:18 | n | 177147.0 | -| test.c:426:18:426:95 | ... ? ... : ... | 1.0 | -| test.c:426:22:426:22 | o | 177147.0 | -| test.c:426:22:426:82 | ... ? ... : ... | 1.0 | -| test.c:426:26:426:26 | p | 177147.0 | -| test.c:426:26:426:69 | ... ? ... : ... | 1.0 | -| test.c:426:30:426:30 | q | 177147.0 | -| test.c:426:30:426:56 | ... ? ... : ... | 1.0 | -| test.c:426:34:426:43 | 0.4218627600000000033 | 1.0 | -| test.c:426:47:426:56 | 0.5384335799999999672 | 1.0 | -| test.c:426:60:426:69 | 0.4499667900000000054 | 1.0 | -| test.c:426:73:426:82 | 0.1320411400000000013 | 1.0 | -| test.c:426:86:426:95 | 0.5203124099999999475 | 1.0 | -| test.c:426:99:426:108 | 0.4276264699999999808 | 1.0 | -| test.c:432:19:432:19 | a | 1.0 | -| test.c:432:19:432:23 | ... + ... | 1.0 | -| test.c:432:19:432:27 | ... + ... | 1.0 | -| test.c:432:19:432:31 | ... + ... | 1.0 | -| test.c:432:19:432:35 | ... + ... | 1.0 | -| test.c:432:19:432:39 | ... + ... | 1.0 | -| test.c:432:19:432:43 | ... + ... | 1.0 | -| test.c:432:19:432:47 | ... + ... | 1.0 | -| test.c:432:19:432:51 | ... + ... | 1.0 | -| test.c:432:19:432:55 | ... + ... | 1.0 | -| test.c:432:19:432:59 | ... + ... | 1.0 | -| test.c:432:19:432:63 | ... + ... | 1.0 | -| test.c:432:23:432:23 | b | 1.0 | -| test.c:432:27:432:27 | c | 1.0 | -| test.c:432:31:432:31 | d | 1.0 | -| test.c:432:35:432:35 | e | 1.0 | -| test.c:432:39:432:39 | f | 1.0 | -| test.c:432:43:432:43 | g | 1.0 | -| test.c:432:47:432:47 | h | 1.0 | -| test.c:432:51:432:51 | i | 1.0 | -| test.c:432:55:432:55 | j | 1.0 | -| test.c:432:59:432:59 | k | 1.0 | -| test.c:432:63:432:63 | l | 1.0 | -| test.c:434:10:434:15 | output | 1.0 | -| test.c:441:7:441:9 | rhs | 1.0 | -| test.c:441:7:441:14 | ... < ... | 1.0 | -| test.c:441:13:441:14 | 12 | 1.0 | -| test.c:441:13:441:14 | (unsigned int)... | 1.0 | -| test.c:441:19:441:21 | rhs | 1.0 | -| test.c:441:19:441:26 | ... << ... | 1.0 | -| test.c:441:26:441:26 | 1 | 1.0 | -| test.c:442:7:442:9 | rhs | 2.0 | -| test.c:442:7:442:14 | ... < ... | 1.0 | -| test.c:442:13:442:14 | 13 | 1.0 | -| test.c:442:13:442:14 | (unsigned int)... | 1.0 | -| test.c:442:19:442:21 | rhs | 2.0 | -| test.c:442:19:442:26 | ... << ... | 1.0 | -| test.c:442:26:442:26 | 1 | 1.0 | -| test.c:443:7:443:9 | rhs | 3.0 | -| test.c:443:7:443:14 | ... < ... | 1.0 | -| test.c:443:13:443:14 | 14 | 1.0 | -| test.c:443:13:443:14 | (unsigned int)... | 1.0 | -| test.c:443:19:443:21 | rhs | 3.0 | -| test.c:443:19:443:26 | ... << ... | 1.0 | -| test.c:443:26:443:26 | 1 | 1.0 | -| test.c:444:7:444:9 | rhs | 4.0 | -| test.c:444:7:444:14 | ... < ... | 1.0 | -| test.c:444:13:444:14 | 15 | 1.0 | -| test.c:444:13:444:14 | (unsigned int)... | 1.0 | -| test.c:444:19:444:21 | rhs | 4.0 | -| test.c:444:19:444:26 | ... << ... | 1.0 | -| test.c:444:26:444:26 | 1 | 1.0 | -| test.c:445:7:445:9 | rhs | 5.0 | -| test.c:445:7:445:14 | ... < ... | 1.0 | -| test.c:445:13:445:14 | 16 | 1.0 | -| test.c:445:13:445:14 | (unsigned int)... | 1.0 | -| test.c:445:19:445:21 | rhs | 5.0 | -| test.c:445:19:445:26 | ... << ... | 1.0 | -| test.c:445:26:445:26 | 1 | 1.0 | -| test.c:446:10:446:12 | (int)... | 6.0 | -| test.c:446:10:446:12 | rhs | 6.0 | -| test.c:450:7:450:7 | a | 1.0 | -| test.c:450:7:450:13 | ... == ... | 1.0 | -| test.c:450:12:450:13 | 17 | 1.0 | -| test.c:451:9:451:9 | b | 1.0 | -| test.c:451:9:451:15 | ... == ... | 1.0 | -| test.c:451:14:451:15 | 23 | 1.0 | -| test.c:452:7:452:7 | a | 1.0 | -| test.c:452:7:452:12 | ... += ... | 1.0 | -| test.c:452:12:452:12 | b | 1.0 | -| test.c:454:9:454:9 | a | 2.0 | -| test.c:454:9:454:15 | ... == ... | 1.0 | -| test.c:454:14:454:15 | 18 | 1.0 | -| test.c:455:7:455:7 | b | 1.0 | -| test.c:455:7:455:12 | ... = ... | 1.0 | -| test.c:455:11:455:12 | 10 | 1.0 | -| test.c:460:11:460:11 | a | 4.0 | -| test.c:460:11:460:15 | ... + ... | 16.0 | -| test.c:460:15:460:15 | b | 4.0 | -| test.c:461:10:461:10 | a | 4.0 | -| test.c:461:10:461:14 | ... + ... | 16.0 | -| test.c:461:14:461:14 | b | 4.0 | -| test.c:468:4:470:50 | (...) | 1.0 | -| test.c:468:4:553:26 | ... > ... | 1.0 | -| test.c:468:4:642:27 | ... ? ... : ... | 1.297918419127476E201 | -| test.c:468:5:468:6 | 14 | 1.0 | -| test.c:468:5:468:6 | (unsigned int)... | 1.0 | -| test.c:468:5:468:11 | ... * ... | 1.0 | -| test.c:468:5:468:55 | ... > ... | 1.0 | -| test.c:468:5:470:49 | ... ? ... : ... | 1.0 | -| test.c:468:10:468:11 | ip | 1.0 | -| test.c:468:15:468:26 | (...) | 1.0 | -| test.c:468:15:468:31 | ... * ... | 1.0 | -| test.c:468:15:468:55 | ... + ... | 1.0 | -| test.c:468:16:468:16 | 2 | 1.0 | -| test.c:468:16:468:16 | (unsigned int)... | 1.0 | -| test.c:468:16:468:21 | ... * ... | 1.0 | -| test.c:468:16:468:25 | ... + ... | 1.0 | -| test.c:468:20:468:21 | ip | 1.0 | -| test.c:468:25:468:25 | 1 | 1.0 | -| test.c:468:25:468:25 | (unsigned int)... | 1.0 | -| test.c:468:30:468:31 | 17 | 1.0 | -| test.c:468:30:468:31 | (unsigned int)... | 1.0 | -| test.c:468:35:468:50 | (...) | 1.0 | -| test.c:468:35:468:55 | ... * ... | 1.0 | -| test.c:468:36:468:36 | 2 | 1.0 | -| test.c:468:36:468:36 | (unsigned int)... | 1.0 | -| test.c:468:36:468:41 | ... * ... | 1.0 | -| test.c:468:36:468:45 | ... + ... | 1.0 | -| test.c:468:36:468:49 | ... + ... | 1.0 | -| test.c:468:40:468:41 | ip | 1.0 | -| test.c:468:45:468:45 | 1 | 1.0 | -| test.c:468:45:468:45 | (unsigned int)... | 1.0 | -| test.c:468:49:468:49 | 1 | 1.0 | -| test.c:468:49:468:49 | (unsigned int)... | 1.0 | -| test.c:468:54:468:55 | 17 | 1.0 | -| test.c:468:54:468:55 | (unsigned int)... | 1.0 | -| test.c:469:9:469:10 | 14 | 1.0 | -| test.c:469:9:469:10 | (unsigned int)... | 1.0 | -| test.c:469:9:469:15 | ... * ... | 1.0 | -| test.c:469:14:469:15 | ip | 1.0 | -| test.c:470:9:470:20 | (...) | 1.0 | -| test.c:470:9:470:25 | ... * ... | 1.0 | -| test.c:470:9:470:49 | ... + ... | 1.0 | -| test.c:470:10:470:10 | 2 | 1.0 | -| test.c:470:10:470:10 | (unsigned int)... | 1.0 | -| test.c:470:10:470:15 | ... * ... | 1.0 | -| test.c:470:10:470:19 | ... + ... | 1.0 | -| test.c:470:14:470:15 | ip | 1.0 | -| test.c:470:19:470:19 | 1 | 1.0 | -| test.c:470:19:470:19 | (unsigned int)... | 1.0 | -| test.c:470:24:470:25 | 14 | 1.0 | -| test.c:470:24:470:25 | (unsigned int)... | 1.0 | -| test.c:470:29:470:44 | (...) | 1.0 | -| test.c:470:29:470:49 | ... * ... | 1.0 | -| test.c:470:30:470:30 | 2 | 1.0 | -| test.c:470:30:470:30 | (unsigned int)... | 1.0 | -| test.c:470:30:470:35 | ... * ... | 1.0 | -| test.c:470:30:470:39 | ... + ... | 1.0 | -| test.c:470:30:470:43 | ... + ... | 1.0 | -| test.c:470:34:470:35 | ip | 1.0 | -| test.c:470:39:470:39 | 1 | 1.0 | -| test.c:470:39:470:39 | (unsigned int)... | 1.0 | -| test.c:470:43:470:43 | 1 | 1.0 | -| test.c:470:43:470:43 | (unsigned int)... | 1.0 | -| test.c:470:48:470:49 | 17 | 1.0 | -| test.c:470:48:470:49 | (unsigned int)... | 1.0 | -| test.c:471:5:553:26 | (...) | 9.29462083211502E84 | -| test.c:471:6:471:6 | 2 | 1.0 | -| test.c:471:6:471:6 | (unsigned int)... | 1.0 | -| test.c:471:6:471:23 | ... * ... | 2.0 | -| test.c:471:6:490:42 | ... + ... | 4.524508125E10 | -| test.c:471:6:510:24 | ... > ... | 1.0 | -| test.c:471:6:553:25 | ... ? ... : ... | 9.29462083211502E84 | -| test.c:471:10:471:23 | (...) | 2.0 | -| test.c:471:11:471:12 | ip | 2.0 | -| test.c:471:11:471:17 | ... * ... | 2.0 | -| test.c:471:11:471:22 | ... + ... | 2.0 | -| test.c:471:16:471:17 | 14 | 1.0 | -| test.c:471:16:471:17 | (unsigned int)... | 1.0 | -| test.c:471:21:471:22 | 32 | 1.0 | -| test.c:471:21:471:22 | (unsigned int)... | 1.0 | -| test.c:472:7:490:42 | (...) | 2.2622540625E10 | -| test.c:472:8:472:8 | 4 | 1.0 | -| test.c:472:8:472:8 | (unsigned int)... | 1.0 | -| test.c:472:8:472:25 | ... * ... | 2.0 | -| test.c:472:8:473:26 | ... + ... | 4.0 | -| test.c:472:8:474:26 | ... + ... | 8.0 | -| test.c:472:8:479:22 | ... + ... | 1000.0 | -| test.c:472:8:480:37 | ... > ... | 1.0 | -| test.c:472:8:490:41 | ... ? ... : ... | 2.2622540625E10 | -| test.c:472:12:472:25 | (...) | 2.0 | -| test.c:472:13:472:14 | ip | 2.0 | -| test.c:472:13:472:19 | ... * ... | 2.0 | -| test.c:472:13:472:24 | ... + ... | 2.0 | -| test.c:472:18:472:19 | 14 | 1.0 | -| test.c:472:18:472:19 | (unsigned int)... | 1.0 | -| test.c:472:23:472:24 | 32 | 1.0 | -| test.c:472:23:472:24 | (unsigned int)... | 1.0 | -| test.c:473:9:473:26 | (...) | 2.0 | -| test.c:473:10:473:10 | 2 | 1.0 | -| test.c:473:10:473:10 | (unsigned int)... | 1.0 | -| test.c:473:10:473:15 | ... * ... | 2.0 | -| test.c:473:10:473:20 | ... * ... | 2.0 | -| test.c:473:10:473:25 | ... + ... | 2.0 | -| test.c:473:14:473:15 | ip | 2.0 | -| test.c:473:19:473:20 | 14 | 1.0 | -| test.c:473:19:473:20 | (unsigned int)... | 1.0 | -| test.c:473:24:473:25 | 32 | 1.0 | -| test.c:473:24:473:25 | (unsigned int)... | 1.0 | -| test.c:474:9:474:9 | 2 | 1.0 | -| test.c:474:9:474:9 | (unsigned int)... | 1.0 | -| test.c:474:9:474:26 | ... * ... | 2.0 | -| test.c:474:13:474:26 | (...) | 2.0 | -| test.c:474:14:474:15 | ip | 2.0 | -| test.c:474:14:474:20 | ... * ... | 2.0 | -| test.c:474:14:474:25 | ... + ... | 2.0 | -| test.c:474:19:474:20 | 14 | 1.0 | -| test.c:474:19:474:20 | (unsigned int)... | 1.0 | -| test.c:474:24:474:25 | 64 | 1.0 | -| test.c:474:24:474:25 | (unsigned int)... | 1.0 | -| test.c:475:9:479:22 | (...) | 125.0 | -| test.c:475:10:475:21 | (...) | 2.0 | -| test.c:475:10:475:26 | ... * ... | 2.0 | -| test.c:475:10:475:80 | ... > ... | 1.0 | -| test.c:475:10:479:21 | ... ? ... : ... | 125.0 | -| test.c:475:11:475:11 | 2 | 1.0 | -| test.c:475:11:475:11 | (unsigned int)... | 1.0 | -| test.c:475:11:475:16 | ... * ... | 2.0 | -| test.c:475:11:475:20 | ... + ... | 2.0 | -| test.c:475:15:475:16 | ip | 2.0 | -| test.c:475:20:475:20 | 1 | 1.0 | -| test.c:475:20:475:20 | (unsigned int)... | 1.0 | -| test.c:475:25:475:26 | 14 | 1.0 | -| test.c:475:25:475:26 | (unsigned int)... | 1.0 | -| test.c:475:30:475:80 | (...) | 4.0 | -| test.c:475:31:475:32 | 17 | 1.0 | -| test.c:475:31:475:32 | (unsigned int)... | 1.0 | -| test.c:475:31:475:43 | ... * ... | 2.0 | -| test.c:475:31:475:53 | ... > ... | 1.0 | -| test.c:475:31:475:79 | ... ? ... : ... | 4.0 | -| test.c:475:36:475:43 | (...) | 2.0 | -| test.c:475:37:475:37 | 2 | 1.0 | -| test.c:475:37:475:37 | (unsigned int)... | 1.0 | -| test.c:475:37:475:42 | ... * ... | 2.0 | -| test.c:475:41:475:42 | ip | 2.0 | -| test.c:475:47:475:48 | 17 | 1.0 | -| test.c:475:47:475:48 | (unsigned int)... | 1.0 | -| test.c:475:47:475:53 | ... * ... | 2.0 | -| test.c:475:52:475:53 | ip | 2.0 | -| test.c:475:57:475:58 | 17 | 1.0 | -| test.c:475:57:475:58 | (unsigned int)... | 1.0 | -| test.c:475:57:475:69 | ... * ... | 2.0 | -| test.c:475:62:475:69 | (...) | 2.0 | -| test.c:475:63:475:63 | 2 | 1.0 | -| test.c:475:63:475:63 | (unsigned int)... | 1.0 | -| test.c:475:63:475:68 | ... * ... | 2.0 | -| test.c:475:67:475:68 | ip | 2.0 | -| test.c:475:73:475:74 | 17 | 1.0 | -| test.c:475:73:475:74 | (unsigned int)... | 1.0 | -| test.c:475:73:475:79 | ... * ... | 2.0 | -| test.c:475:78:475:79 | ip | 2.0 | -| test.c:476:13:476:24 | (...) | 5.0 | -| test.c:476:13:476:29 | ... * ... | 5.0 | -| test.c:476:14:476:14 | 2 | 1.0 | -| test.c:476:14:476:14 | (unsigned int)... | 1.0 | -| test.c:476:14:476:19 | ... * ... | 5.0 | -| test.c:476:14:476:23 | ... + ... | 5.0 | -| test.c:476:18:476:19 | ip | 5.0 | -| test.c:476:23:476:23 | 1 | 1.0 | -| test.c:476:23:476:23 | (unsigned int)... | 1.0 | -| test.c:476:28:476:29 | 14 | 1.0 | -| test.c:476:28:476:29 | (unsigned int)... | 1.0 | -| test.c:477:13:477:14 | 14 | 1.0 | -| test.c:477:13:477:14 | (unsigned int)... | 1.0 | -| test.c:477:13:477:25 | ... * ... | 5.0 | -| test.c:477:13:477:35 | ... > ... | 1.0 | -| test.c:477:13:479:21 | ... ? ... : ... | 25.0 | -| test.c:477:18:477:25 | (...) | 5.0 | -| test.c:477:19:477:19 | 2 | 1.0 | -| test.c:477:19:477:19 | (unsigned int)... | 1.0 | -| test.c:477:19:477:24 | ... * ... | 5.0 | -| test.c:477:23:477:24 | ip | 5.0 | -| test.c:477:29:477:30 | 17 | 1.0 | -| test.c:477:29:477:30 | (unsigned int)... | 1.0 | -| test.c:477:29:477:35 | ... * ... | 5.0 | -| test.c:477:34:477:35 | ip | 5.0 | -| test.c:478:15:478:16 | 14 | 1.0 | -| test.c:478:15:478:16 | (unsigned int)... | 1.0 | -| test.c:478:15:478:27 | ... * ... | 5.0 | -| test.c:478:20:478:27 | (...) | 5.0 | -| test.c:478:21:478:21 | 2 | 1.0 | -| test.c:478:21:478:21 | (unsigned int)... | 1.0 | -| test.c:478:21:478:26 | ... * ... | 5.0 | -| test.c:478:25:478:26 | ip | 5.0 | -| test.c:479:15:479:16 | 14 | 1.0 | -| test.c:479:15:479:16 | (unsigned int)... | 1.0 | -| test.c:479:15:479:21 | ... * ... | 5.0 | -| test.c:479:20:479:21 | ip | 5.0 | -| test.c:480:7:480:7 | 2 | 1.0 | -| test.c:480:7:480:7 | (unsigned int)... | 1.0 | -| test.c:480:7:480:12 | ... * ... | 15.0 | -| test.c:480:7:480:17 | ... * ... | 15.0 | -| test.c:480:7:480:37 | ... + ... | 225.0 | -| test.c:480:11:480:12 | ip | 15.0 | -| test.c:480:16:480:17 | 14 | 1.0 | -| test.c:480:16:480:17 | (unsigned int)... | 1.0 | -| test.c:480:21:480:32 | (...) | 15.0 | -| test.c:480:21:480:37 | ... * ... | 15.0 | -| test.c:480:22:480:22 | 2 | 1.0 | -| test.c:480:22:480:22 | (unsigned int)... | 1.0 | -| test.c:480:22:480:27 | ... * ... | 15.0 | -| test.c:480:22:480:31 | ... + ... | 15.0 | -| test.c:480:26:480:27 | ip | 15.0 | -| test.c:480:31:480:31 | 1 | 1.0 | -| test.c:480:31:480:31 | (unsigned int)... | 1.0 | -| test.c:480:36:480:37 | 17 | 1.0 | -| test.c:480:36:480:37 | (unsigned int)... | 1.0 | -| test.c:481:11:481:11 | 4 | 1.0 | -| test.c:481:11:481:11 | (unsigned int)... | 1.0 | -| test.c:481:11:481:28 | ... * ... | 15.0 | -| test.c:481:11:482:28 | ... + ... | 225.0 | -| test.c:481:11:483:28 | ... + ... | 3375.0 | -| test.c:481:11:489:24 | ... + ... | 1.00544625E8 | -| test.c:481:15:481:28 | (...) | 15.0 | -| test.c:481:16:481:17 | ip | 15.0 | -| test.c:481:16:481:22 | ... * ... | 15.0 | -| test.c:481:16:481:27 | ... + ... | 15.0 | -| test.c:481:21:481:22 | 14 | 1.0 | -| test.c:481:21:481:22 | (unsigned int)... | 1.0 | -| test.c:481:26:481:27 | 32 | 1.0 | -| test.c:481:26:481:27 | (unsigned int)... | 1.0 | -| test.c:482:11:482:28 | (...) | 15.0 | -| test.c:482:12:482:12 | 2 | 1.0 | -| test.c:482:12:482:12 | (unsigned int)... | 1.0 | -| test.c:482:12:482:17 | ... * ... | 15.0 | -| test.c:482:12:482:22 | ... * ... | 15.0 | -| test.c:482:12:482:27 | ... + ... | 15.0 | -| test.c:482:16:482:17 | ip | 15.0 | -| test.c:482:21:482:22 | 14 | 1.0 | -| test.c:482:21:482:22 | (unsigned int)... | 1.0 | -| test.c:482:26:482:27 | 32 | 1.0 | -| test.c:482:26:482:27 | (unsigned int)... | 1.0 | -| test.c:483:11:483:11 | 2 | 1.0 | -| test.c:483:11:483:11 | (unsigned int)... | 1.0 | -| test.c:483:11:483:28 | ... * ... | 15.0 | -| test.c:483:15:483:28 | (...) | 15.0 | -| test.c:483:16:483:17 | ip | 15.0 | -| test.c:483:16:483:22 | ... * ... | 15.0 | -| test.c:483:16:483:27 | ... + ... | 15.0 | -| test.c:483:21:483:22 | 14 | 1.0 | -| test.c:483:21:483:22 | (unsigned int)... | 1.0 | -| test.c:483:26:483:27 | 64 | 1.0 | -| test.c:483:26:483:27 | (unsigned int)... | 1.0 | -| test.c:484:11:489:24 | (...) | 29791.0 | -| test.c:484:12:484:23 | (...) | 15.0 | -| test.c:484:12:484:28 | ... * ... | 15.0 | -| test.c:484:12:485:61 | ... > ... | 1.0 | -| test.c:484:12:489:23 | ... ? ... : ... | 29791.0 | -| test.c:484:13:484:13 | 2 | 1.0 | -| test.c:484:13:484:13 | (unsigned int)... | 1.0 | -| test.c:484:13:484:18 | ... * ... | 15.0 | -| test.c:484:13:484:22 | ... + ... | 15.0 | -| test.c:484:17:484:18 | ip | 15.0 | -| test.c:484:22:484:22 | 1 | 1.0 | -| test.c:484:22:484:22 | (unsigned int)... | 1.0 | -| test.c:484:27:484:28 | 14 | 1.0 | -| test.c:484:27:484:28 | (unsigned int)... | 1.0 | -| test.c:485:11:485:61 | (...) | 225.0 | -| test.c:485:12:485:13 | 14 | 1.0 | -| test.c:485:12:485:13 | (unsigned int)... | 1.0 | -| test.c:485:12:485:24 | ... * ... | 15.0 | -| test.c:485:12:485:34 | ... > ... | 1.0 | -| test.c:485:12:485:60 | ... ? ... : ... | 225.0 | -| test.c:485:17:485:24 | (...) | 15.0 | -| test.c:485:18:485:18 | 2 | 1.0 | -| test.c:485:18:485:18 | (unsigned int)... | 1.0 | -| test.c:485:18:485:23 | ... * ... | 15.0 | -| test.c:485:22:485:23 | ip | 15.0 | -| test.c:485:28:485:29 | 17 | 1.0 | -| test.c:485:28:485:29 | (unsigned int)... | 1.0 | -| test.c:485:28:485:34 | ... * ... | 15.0 | -| test.c:485:33:485:34 | ip | 15.0 | -| test.c:485:38:485:39 | 17 | 1.0 | -| test.c:485:38:485:39 | (unsigned int)... | 1.0 | -| test.c:485:38:485:50 | ... * ... | 15.0 | -| test.c:485:43:485:50 | (...) | 15.0 | -| test.c:485:44:485:44 | 2 | 1.0 | -| test.c:485:44:485:44 | (unsigned int)... | 1.0 | -| test.c:485:44:485:49 | ... * ... | 15.0 | -| test.c:485:48:485:49 | ip | 15.0 | -| test.c:485:54:485:55 | 17 | 1.0 | -| test.c:485:54:485:55 | (unsigned int)... | 1.0 | -| test.c:485:54:485:60 | ... * ... | 15.0 | -| test.c:485:59:485:60 | ip | 15.0 | -| test.c:486:15:486:26 | (...) | 31.0 | -| test.c:486:15:486:31 | ... * ... | 31.0 | -| test.c:486:16:486:16 | 2 | 1.0 | -| test.c:486:16:486:16 | (unsigned int)... | 1.0 | -| test.c:486:16:486:21 | ... * ... | 31.0 | -| test.c:486:16:486:25 | ... + ... | 31.0 | -| test.c:486:20:486:21 | ip | 31.0 | -| test.c:486:25:486:25 | 1 | 1.0 | -| test.c:486:25:486:25 | (unsigned int)... | 1.0 | -| test.c:486:30:486:31 | 14 | 1.0 | -| test.c:486:30:486:31 | (unsigned int)... | 1.0 | -| test.c:487:15:487:16 | 14 | 1.0 | -| test.c:487:15:487:16 | (unsigned int)... | 1.0 | -| test.c:487:15:487:27 | ... * ... | 31.0 | -| test.c:487:15:487:37 | ... > ... | 1.0 | -| test.c:487:15:489:23 | ... ? ... : ... | 961.0 | -| test.c:487:20:487:27 | (...) | 31.0 | -| test.c:487:21:487:21 | 2 | 1.0 | -| test.c:487:21:487:21 | (unsigned int)... | 1.0 | -| test.c:487:21:487:26 | ... * ... | 31.0 | -| test.c:487:25:487:26 | ip | 31.0 | -| test.c:487:31:487:32 | 17 | 1.0 | -| test.c:487:31:487:32 | (unsigned int)... | 1.0 | -| test.c:487:31:487:37 | ... * ... | 31.0 | -| test.c:487:36:487:37 | ip | 31.0 | -| test.c:488:17:488:18 | 14 | 1.0 | -| test.c:488:17:488:18 | (unsigned int)... | 1.0 | -| test.c:488:17:488:29 | ... * ... | 31.0 | -| test.c:488:22:488:29 | (...) | 31.0 | -| test.c:488:23:488:23 | 2 | 1.0 | -| test.c:488:23:488:23 | (unsigned int)... | 1.0 | -| test.c:488:23:488:28 | ... * ... | 31.0 | -| test.c:488:27:488:28 | ip | 31.0 | -| test.c:489:17:489:18 | 14 | 1.0 | -| test.c:489:17:489:18 | (unsigned int)... | 1.0 | -| test.c:489:17:489:23 | ... * ... | 31.0 | -| test.c:489:22:489:23 | ip | 31.0 | -| test.c:490:11:490:11 | 2 | 1.0 | -| test.c:490:11:490:11 | (unsigned int)... | 1.0 | -| test.c:490:11:490:16 | ... * ... | 15.0 | -| test.c:490:11:490:21 | ... * ... | 15.0 | -| test.c:490:11:490:41 | ... + ... | 225.0 | -| test.c:490:15:490:16 | ip | 15.0 | -| test.c:490:20:490:21 | 14 | 1.0 | -| test.c:490:20:490:21 | (unsigned int)... | 1.0 | -| test.c:490:25:490:36 | (...) | 15.0 | -| test.c:490:25:490:41 | ... * ... | 15.0 | -| test.c:490:26:490:26 | 2 | 1.0 | -| test.c:490:26:490:26 | (unsigned int)... | 1.0 | -| test.c:490:26:490:31 | ... * ... | 15.0 | -| test.c:490:26:490:35 | ... + ... | 15.0 | -| test.c:490:30:490:31 | ip | 15.0 | -| test.c:490:35:490:35 | 1 | 1.0 | -| test.c:490:35:490:35 | (unsigned int)... | 1.0 | -| test.c:490:40:490:41 | 17 | 1.0 | -| test.c:490:40:490:41 | (unsigned int)... | 1.0 | -| test.c:491:5:510:24 | (...) | 6.6142118960740864E25 | -| test.c:491:6:491:6 | 4 | 1.0 | -| test.c:491:6:491:6 | (unsigned int)... | 1.0 | -| test.c:491:6:491:23 | ... * ... | 108.0 | -| test.c:491:6:492:24 | ... + ... | 11664.0 | -| test.c:491:6:493:24 | ... + ... | 1259712.0 | -| test.c:491:6:498:20 | ... + ... | 1.2872131505856E13 | -| test.c:491:6:499:55 | ... > ... | 1.0 | -| test.c:491:6:510:23 | ... ? ... : ... | 6.6142118960740864E25 | -| test.c:491:10:491:23 | (...) | 108.0 | -| test.c:491:11:491:12 | ip | 108.0 | -| test.c:491:11:491:17 | ... * ... | 108.0 | -| test.c:491:11:491:22 | ... + ... | 108.0 | -| test.c:491:16:491:17 | 14 | 1.0 | -| test.c:491:16:491:17 | (unsigned int)... | 1.0 | -| test.c:491:21:491:22 | 32 | 1.0 | -| test.c:491:21:491:22 | (unsigned int)... | 1.0 | -| test.c:492:7:492:24 | (...) | 108.0 | -| test.c:492:8:492:8 | 2 | 1.0 | -| test.c:492:8:492:8 | (unsigned int)... | 1.0 | -| test.c:492:8:492:13 | ... * ... | 108.0 | -| test.c:492:8:492:18 | ... * ... | 108.0 | -| test.c:492:8:492:23 | ... + ... | 108.0 | -| test.c:492:12:492:13 | ip | 108.0 | -| test.c:492:17:492:18 | 14 | 1.0 | -| test.c:492:17:492:18 | (unsigned int)... | 1.0 | -| test.c:492:22:492:23 | 32 | 1.0 | -| test.c:492:22:492:23 | (unsigned int)... | 1.0 | -| test.c:493:7:493:7 | 2 | 1.0 | -| test.c:493:7:493:7 | (unsigned int)... | 1.0 | -| test.c:493:7:493:24 | ... * ... | 108.0 | -| test.c:493:11:493:24 | (...) | 108.0 | -| test.c:493:12:493:13 | ip | 108.0 | -| test.c:493:12:493:18 | ... * ... | 108.0 | -| test.c:493:12:493:23 | ... + ... | 108.0 | -| test.c:493:17:493:18 | 14 | 1.0 | -| test.c:493:17:493:18 | (unsigned int)... | 1.0 | -| test.c:493:22:493:23 | 64 | 1.0 | -| test.c:493:22:493:23 | (unsigned int)... | 1.0 | -| test.c:494:7:498:20 | (...) | 1.0218313E7 | -| test.c:494:8:494:19 | (...) | 108.0 | -| test.c:494:8:494:24 | ... * ... | 108.0 | -| test.c:494:8:494:78 | ... > ... | 1.0 | -| test.c:494:8:498:19 | ... ? ... : ... | 1.0218313E7 | -| test.c:494:9:494:9 | 2 | 1.0 | -| test.c:494:9:494:9 | (unsigned int)... | 1.0 | -| test.c:494:9:494:14 | ... * ... | 108.0 | -| test.c:494:9:494:18 | ... + ... | 108.0 | -| test.c:494:13:494:14 | ip | 108.0 | -| test.c:494:18:494:18 | 1 | 1.0 | -| test.c:494:18:494:18 | (unsigned int)... | 1.0 | -| test.c:494:23:494:24 | 14 | 1.0 | -| test.c:494:23:494:24 | (unsigned int)... | 1.0 | -| test.c:494:28:494:78 | (...) | 11664.0 | -| test.c:494:29:494:30 | 17 | 1.0 | -| test.c:494:29:494:30 | (unsigned int)... | 1.0 | -| test.c:494:29:494:41 | ... * ... | 108.0 | -| test.c:494:29:494:51 | ... > ... | 1.0 | -| test.c:494:29:494:77 | ... ? ... : ... | 11664.0 | -| test.c:494:34:494:41 | (...) | 108.0 | -| test.c:494:35:494:35 | 2 | 1.0 | -| test.c:494:35:494:35 | (unsigned int)... | 1.0 | -| test.c:494:35:494:40 | ... * ... | 108.0 | -| test.c:494:39:494:40 | ip | 108.0 | -| test.c:494:45:494:46 | 17 | 1.0 | -| test.c:494:45:494:46 | (unsigned int)... | 1.0 | -| test.c:494:45:494:51 | ... * ... | 108.0 | -| test.c:494:50:494:51 | ip | 108.0 | -| test.c:494:55:494:56 | 17 | 1.0 | -| test.c:494:55:494:56 | (unsigned int)... | 1.0 | -| test.c:494:55:494:67 | ... * ... | 108.0 | -| test.c:494:60:494:67 | (...) | 108.0 | -| test.c:494:61:494:61 | 2 | 1.0 | -| test.c:494:61:494:61 | (unsigned int)... | 1.0 | -| test.c:494:61:494:66 | ... * ... | 108.0 | -| test.c:494:65:494:66 | ip | 108.0 | -| test.c:494:71:494:72 | 17 | 1.0 | -| test.c:494:71:494:72 | (unsigned int)... | 1.0 | -| test.c:494:71:494:77 | ... * ... | 108.0 | -| test.c:494:76:494:77 | ip | 108.0 | -| test.c:495:11:495:22 | (...) | 217.0 | -| test.c:495:11:495:27 | ... * ... | 217.0 | -| test.c:495:12:495:12 | 2 | 1.0 | -| test.c:495:12:495:12 | (unsigned int)... | 1.0 | -| test.c:495:12:495:17 | ... * ... | 217.0 | -| test.c:495:12:495:21 | ... + ... | 217.0 | -| test.c:495:16:495:17 | ip | 217.0 | -| test.c:495:21:495:21 | 1 | 1.0 | -| test.c:495:21:495:21 | (unsigned int)... | 1.0 | -| test.c:495:26:495:27 | 14 | 1.0 | -| test.c:495:26:495:27 | (unsigned int)... | 1.0 | -| test.c:496:11:496:12 | 14 | 1.0 | -| test.c:496:11:496:12 | (unsigned int)... | 1.0 | -| test.c:496:11:496:23 | ... * ... | 217.0 | -| test.c:496:11:496:33 | ... > ... | 1.0 | -| test.c:496:11:498:19 | ... ? ... : ... | 47089.0 | -| test.c:496:16:496:23 | (...) | 217.0 | -| test.c:496:17:496:17 | 2 | 1.0 | -| test.c:496:17:496:17 | (unsigned int)... | 1.0 | -| test.c:496:17:496:22 | ... * ... | 217.0 | -| test.c:496:21:496:22 | ip | 217.0 | -| test.c:496:27:496:28 | 17 | 1.0 | -| test.c:496:27:496:28 | (unsigned int)... | 1.0 | -| test.c:496:27:496:33 | ... * ... | 217.0 | -| test.c:496:32:496:33 | ip | 217.0 | -| test.c:497:13:497:14 | 14 | 1.0 | -| test.c:497:13:497:14 | (unsigned int)... | 1.0 | -| test.c:497:13:497:25 | ... * ... | 217.0 | -| test.c:497:18:497:25 | (...) | 217.0 | -| test.c:497:19:497:19 | 2 | 1.0 | -| test.c:497:19:497:19 | (unsigned int)... | 1.0 | -| test.c:497:19:497:24 | ... * ... | 217.0 | -| test.c:497:23:497:24 | ip | 217.0 | -| test.c:498:13:498:14 | 14 | 1.0 | -| test.c:498:13:498:14 | (unsigned int)... | 1.0 | -| test.c:498:13:498:19 | ... * ... | 217.0 | -| test.c:498:18:498:19 | ip | 217.0 | -| test.c:499:5:499:55 | (...) | 423801.0 | -| test.c:499:6:499:7 | 14 | 1.0 | -| test.c:499:6:499:7 | (unsigned int)... | 1.0 | -| test.c:499:6:499:12 | ... * ... | 651.0 | -| test.c:499:6:499:28 | ... > ... | 1.0 | -| test.c:499:6:499:54 | ... ? ... : ... | 423801.0 | -| test.c:499:11:499:12 | ip | 651.0 | -| test.c:499:16:499:23 | (...) | 651.0 | -| test.c:499:16:499:28 | ... * ... | 651.0 | -| test.c:499:17:499:18 | ip | 651.0 | -| test.c:499:17:499:22 | ... + ... | 651.0 | -| test.c:499:22:499:22 | 1 | 1.0 | -| test.c:499:22:499:22 | (unsigned int)... | 1.0 | -| test.c:499:27:499:28 | 17 | 1.0 | -| test.c:499:27:499:28 | (unsigned int)... | 1.0 | -| test.c:499:32:499:33 | 17 | 1.0 | -| test.c:499:32:499:33 | (unsigned int)... | 1.0 | -| test.c:499:32:499:38 | ... * ... | 651.0 | -| test.c:499:37:499:38 | ip | 651.0 | -| test.c:499:42:499:49 | (...) | 651.0 | -| test.c:499:42:499:54 | ... * ... | 651.0 | -| test.c:499:43:499:44 | ip | 651.0 | -| test.c:499:43:499:48 | ... + ... | 651.0 | -| test.c:499:48:499:48 | 1 | 1.0 | -| test.c:499:48:499:48 | (unsigned int)... | 1.0 | -| test.c:499:53:499:54 | 17 | 1.0 | -| test.c:499:53:499:54 | (unsigned int)... | 1.0 | -| test.c:500:9:500:9 | 4 | 1.0 | -| test.c:500:9:500:9 | (unsigned int)... | 1.0 | -| test.c:500:9:500:26 | ... * ... | 1302.0 | -| test.c:500:9:501:26 | ... + ... | 1695204.0 | -| test.c:500:9:502:26 | ... + ... | 2.207155608E9 | -| test.c:500:9:507:22 | ... + ... | 3.9017203216097214E19 | -| test.c:500:13:500:26 | (...) | 1302.0 | -| test.c:500:14:500:15 | ip | 1302.0 | -| test.c:500:14:500:20 | ... * ... | 1302.0 | -| test.c:500:14:500:25 | ... + ... | 1302.0 | -| test.c:500:19:500:20 | 14 | 1.0 | -| test.c:500:19:500:20 | (unsigned int)... | 1.0 | -| test.c:500:24:500:25 | 32 | 1.0 | -| test.c:500:24:500:25 | (unsigned int)... | 1.0 | -| test.c:501:9:501:26 | (...) | 1302.0 | -| test.c:501:10:501:10 | 2 | 1.0 | -| test.c:501:10:501:10 | (unsigned int)... | 1.0 | -| test.c:501:10:501:15 | ... * ... | 1302.0 | -| test.c:501:10:501:20 | ... * ... | 1302.0 | -| test.c:501:10:501:25 | ... + ... | 1302.0 | -| test.c:501:14:501:15 | ip | 1302.0 | -| test.c:501:19:501:20 | 14 | 1.0 | -| test.c:501:19:501:20 | (unsigned int)... | 1.0 | -| test.c:501:24:501:25 | 32 | 1.0 | -| test.c:501:24:501:25 | (unsigned int)... | 1.0 | -| test.c:502:9:502:9 | 2 | 1.0 | -| test.c:502:9:502:9 | (unsigned int)... | 1.0 | -| test.c:502:9:502:26 | ... * ... | 1302.0 | -| test.c:502:13:502:26 | (...) | 1302.0 | -| test.c:502:14:502:15 | ip | 1302.0 | -| test.c:502:14:502:20 | ... * ... | 1302.0 | -| test.c:502:14:502:25 | ... + ... | 1302.0 | -| test.c:502:19:502:20 | 14 | 1.0 | -| test.c:502:19:502:20 | (unsigned int)... | 1.0 | -| test.c:502:24:502:25 | 64 | 1.0 | -| test.c:502:24:502:25 | (unsigned int)... | 1.0 | -| test.c:503:9:507:22 | (...) | 1.7677595125E10 | -| test.c:503:10:503:21 | (...) | 1302.0 | -| test.c:503:10:503:26 | ... * ... | 1302.0 | -| test.c:503:10:503:80 | ... > ... | 1.0 | -| test.c:503:10:507:21 | ... ? ... : ... | 1.7677595125E10 | -| test.c:503:11:503:11 | 2 | 1.0 | -| test.c:503:11:503:11 | (unsigned int)... | 1.0 | -| test.c:503:11:503:16 | ... * ... | 1302.0 | -| test.c:503:11:503:20 | ... + ... | 1302.0 | -| test.c:503:15:503:16 | ip | 1302.0 | -| test.c:503:20:503:20 | 1 | 1.0 | -| test.c:503:20:503:20 | (unsigned int)... | 1.0 | -| test.c:503:25:503:26 | 14 | 1.0 | -| test.c:503:25:503:26 | (unsigned int)... | 1.0 | -| test.c:503:30:503:80 | (...) | 1695204.0 | -| test.c:503:31:503:32 | 17 | 1.0 | -| test.c:503:31:503:32 | (unsigned int)... | 1.0 | -| test.c:503:31:503:43 | ... * ... | 1302.0 | -| test.c:503:31:503:53 | ... > ... | 1.0 | -| test.c:503:31:503:79 | ... ? ... : ... | 1695204.0 | -| test.c:503:36:503:43 | (...) | 1302.0 | -| test.c:503:37:503:37 | 2 | 1.0 | -| test.c:503:37:503:37 | (unsigned int)... | 1.0 | -| test.c:503:37:503:42 | ... * ... | 1302.0 | -| test.c:503:41:503:42 | ip | 1302.0 | -| test.c:503:47:503:48 | 17 | 1.0 | -| test.c:503:47:503:48 | (unsigned int)... | 1.0 | -| test.c:503:47:503:53 | ... * ... | 1302.0 | -| test.c:503:52:503:53 | ip | 1302.0 | -| test.c:503:57:503:58 | 17 | 1.0 | -| test.c:503:57:503:58 | (unsigned int)... | 1.0 | -| test.c:503:57:503:69 | ... * ... | 1302.0 | -| test.c:503:62:503:69 | (...) | 1302.0 | -| test.c:503:63:503:63 | 2 | 1.0 | -| test.c:503:63:503:63 | (unsigned int)... | 1.0 | -| test.c:503:63:503:68 | ... * ... | 1302.0 | -| test.c:503:67:503:68 | ip | 1302.0 | -| test.c:503:73:503:74 | 17 | 1.0 | -| test.c:503:73:503:74 | (unsigned int)... | 1.0 | -| test.c:503:73:503:79 | ... * ... | 1302.0 | -| test.c:503:78:503:79 | ip | 1302.0 | -| test.c:504:13:504:24 | (...) | 2605.0 | -| test.c:504:13:504:29 | ... * ... | 2605.0 | -| test.c:504:14:504:14 | 2 | 1.0 | -| test.c:504:14:504:14 | (unsigned int)... | 1.0 | -| test.c:504:14:504:19 | ... * ... | 2605.0 | -| test.c:504:14:504:23 | ... + ... | 2605.0 | -| test.c:504:18:504:19 | ip | 2605.0 | -| test.c:504:23:504:23 | 1 | 1.0 | -| test.c:504:23:504:23 | (unsigned int)... | 1.0 | -| test.c:504:28:504:29 | 14 | 1.0 | -| test.c:504:28:504:29 | (unsigned int)... | 1.0 | -| test.c:505:13:505:14 | 14 | 1.0 | -| test.c:505:13:505:14 | (unsigned int)... | 1.0 | -| test.c:505:13:505:25 | ... * ... | 2605.0 | -| test.c:505:13:505:35 | ... > ... | 1.0 | -| test.c:505:13:507:21 | ... ? ... : ... | 6786025.0 | -| test.c:505:18:505:25 | (...) | 2605.0 | -| test.c:505:19:505:19 | 2 | 1.0 | -| test.c:505:19:505:19 | (unsigned int)... | 1.0 | -| test.c:505:19:505:24 | ... * ... | 2605.0 | -| test.c:505:23:505:24 | ip | 2605.0 | -| test.c:505:29:505:30 | 17 | 1.0 | -| test.c:505:29:505:30 | (unsigned int)... | 1.0 | -| test.c:505:29:505:35 | ... * ... | 2605.0 | -| test.c:505:34:505:35 | ip | 2605.0 | -| test.c:506:15:506:16 | 14 | 1.0 | -| test.c:506:15:506:16 | (unsigned int)... | 1.0 | -| test.c:506:15:506:27 | ... * ... | 2605.0 | -| test.c:506:20:506:27 | (...) | 2605.0 | -| test.c:506:21:506:21 | 2 | 1.0 | -| test.c:506:21:506:21 | (unsigned int)... | 1.0 | -| test.c:506:21:506:26 | ... * ... | 2605.0 | -| test.c:506:25:506:26 | ip | 2605.0 | -| test.c:507:15:507:16 | 14 | 1.0 | -| test.c:507:15:507:16 | (unsigned int)... | 1.0 | -| test.c:507:15:507:21 | ... * ... | 2605.0 | -| test.c:507:20:507:21 | ip | 2605.0 | -| test.c:508:9:508:10 | 14 | 1.0 | -| test.c:508:9:508:10 | (unsigned int)... | 1.0 | -| test.c:508:9:508:15 | ... * ... | 1302.0 | -| test.c:508:9:508:31 | ... > ... | 1.0 | -| test.c:508:9:510:23 | ... ? ... : ... | 1695204.0 | -| test.c:508:14:508:15 | ip | 1302.0 | -| test.c:508:19:508:26 | (...) | 1302.0 | -| test.c:508:19:508:31 | ... * ... | 1302.0 | -| test.c:508:20:508:21 | ip | 1302.0 | -| test.c:508:20:508:25 | ... + ... | 1302.0 | -| test.c:508:25:508:25 | 1 | 1.0 | -| test.c:508:25:508:25 | (unsigned int)... | 1.0 | -| test.c:508:30:508:31 | 17 | 1.0 | -| test.c:508:30:508:31 | (unsigned int)... | 1.0 | -| test.c:509:11:509:12 | 14 | 1.0 | -| test.c:509:11:509:12 | (unsigned int)... | 1.0 | -| test.c:509:11:509:17 | ... * ... | 1302.0 | -| test.c:509:16:509:17 | ip | 1302.0 | -| test.c:510:11:510:18 | (...) | 1302.0 | -| test.c:510:11:510:23 | ... * ... | 1302.0 | -| test.c:510:12:510:13 | ip | 1302.0 | -| test.c:510:12:510:17 | ... + ... | 1302.0 | -| test.c:510:17:510:17 | 1 | 1.0 | -| test.c:510:17:510:17 | (unsigned int)... | 1.0 | -| test.c:510:22:510:23 | 14 | 1.0 | -| test.c:510:22:510:23 | (unsigned int)... | 1.0 | -| test.c:511:9:511:9 | 2 | 1.0 | -| test.c:511:9:511:9 | (unsigned int)... | 1.0 | -| test.c:511:9:511:26 | ... * ... | 10419.0 | -| test.c:511:9:531:44 | ... + ... | 1.9449636104972528E43 | -| test.c:511:13:511:26 | (...) | 10419.0 | -| test.c:511:14:511:15 | ip | 10419.0 | -| test.c:511:14:511:20 | ... * ... | 10419.0 | -| test.c:511:14:511:25 | ... + ... | 10419.0 | -| test.c:511:19:511:20 | 14 | 1.0 | -| test.c:511:19:511:20 | (unsigned int)... | 1.0 | -| test.c:511:24:511:25 | 32 | 1.0 | -| test.c:511:24:511:25 | (unsigned int)... | 1.0 | -| test.c:512:9:531:44 | (...) | 1.8667469147684545E39 | -| test.c:512:10:512:10 | 4 | 1.0 | -| test.c:512:10:512:10 | (unsigned int)... | 1.0 | -| test.c:512:10:512:27 | ... * ... | 10419.0 | -| test.c:512:10:513:28 | ... + ... | 1.08555561E8 | -| test.c:512:10:514:28 | ... + ... | 1.131040390059E12 | -| test.c:512:10:520:24 | ... + ... | 1.0235492350954187E25 | -| test.c:512:10:521:39 | ... > ... | 1.0 | -| test.c:512:10:531:43 | ... ? ... : ... | 1.8667469147684545E39 | -| test.c:512:14:512:27 | (...) | 10419.0 | -| test.c:512:15:512:16 | ip | 10419.0 | -| test.c:512:15:512:21 | ... * ... | 10419.0 | -| test.c:512:15:512:26 | ... + ... | 10419.0 | -| test.c:512:20:512:21 | 14 | 1.0 | -| test.c:512:20:512:21 | (unsigned int)... | 1.0 | -| test.c:512:25:512:26 | 32 | 1.0 | -| test.c:512:25:512:26 | (unsigned int)... | 1.0 | -| test.c:513:11:513:28 | (...) | 10419.0 | -| test.c:513:12:513:12 | 2 | 1.0 | -| test.c:513:12:513:12 | (unsigned int)... | 1.0 | -| test.c:513:12:513:17 | ... * ... | 10419.0 | -| test.c:513:12:513:22 | ... * ... | 10419.0 | -| test.c:513:12:513:27 | ... + ... | 10419.0 | -| test.c:513:16:513:17 | ip | 10419.0 | -| test.c:513:21:513:22 | 14 | 1.0 | -| test.c:513:21:513:22 | (unsigned int)... | 1.0 | -| test.c:513:26:513:27 | 32 | 1.0 | -| test.c:513:26:513:27 | (unsigned int)... | 1.0 | -| test.c:514:11:514:11 | 2 | 1.0 | -| test.c:514:11:514:11 | (unsigned int)... | 1.0 | -| test.c:514:11:514:28 | ... * ... | 10419.0 | -| test.c:514:15:514:28 | (...) | 10419.0 | -| test.c:514:16:514:17 | ip | 10419.0 | -| test.c:514:16:514:22 | ... * ... | 10419.0 | -| test.c:514:16:514:27 | ... + ... | 10419.0 | -| test.c:514:21:514:22 | 14 | 1.0 | -| test.c:514:21:514:22 | (unsigned int)... | 1.0 | -| test.c:514:26:514:27 | 64 | 1.0 | -| test.c:514:26:514:27 | (unsigned int)... | 1.0 | -| test.c:515:11:520:24 | (...) | 9.049625849719E12 | -| test.c:515:12:515:23 | (...) | 10419.0 | -| test.c:515:12:515:28 | ... * ... | 10419.0 | -| test.c:515:12:516:61 | ... > ... | 1.0 | -| test.c:515:12:520:23 | ... ? ... : ... | 9.049625849719E12 | -| test.c:515:13:515:13 | 2 | 1.0 | -| test.c:515:13:515:13 | (unsigned int)... | 1.0 | -| test.c:515:13:515:18 | ... * ... | 10419.0 | -| test.c:515:13:515:22 | ... + ... | 10419.0 | -| test.c:515:17:515:18 | ip | 10419.0 | -| test.c:515:22:515:22 | 1 | 1.0 | -| test.c:515:22:515:22 | (unsigned int)... | 1.0 | -| test.c:515:27:515:28 | 14 | 1.0 | -| test.c:515:27:515:28 | (unsigned int)... | 1.0 | -| test.c:516:11:516:61 | (...) | 1.08555561E8 | -| test.c:516:12:516:13 | 14 | 1.0 | -| test.c:516:12:516:13 | (unsigned int)... | 1.0 | -| test.c:516:12:516:24 | ... * ... | 10419.0 | -| test.c:516:12:516:34 | ... > ... | 1.0 | -| test.c:516:12:516:60 | ... ? ... : ... | 1.08555561E8 | -| test.c:516:17:516:24 | (...) | 10419.0 | -| test.c:516:18:516:18 | 2 | 1.0 | -| test.c:516:18:516:18 | (unsigned int)... | 1.0 | -| test.c:516:18:516:23 | ... * ... | 10419.0 | -| test.c:516:22:516:23 | ip | 10419.0 | -| test.c:516:28:516:29 | 17 | 1.0 | -| test.c:516:28:516:29 | (unsigned int)... | 1.0 | -| test.c:516:28:516:34 | ... * ... | 10419.0 | -| test.c:516:33:516:34 | ip | 10419.0 | -| test.c:516:38:516:39 | 17 | 1.0 | -| test.c:516:38:516:39 | (unsigned int)... | 1.0 | -| test.c:516:38:516:50 | ... * ... | 10419.0 | -| test.c:516:43:516:50 | (...) | 10419.0 | -| test.c:516:44:516:44 | 2 | 1.0 | -| test.c:516:44:516:44 | (unsigned int)... | 1.0 | -| test.c:516:44:516:49 | ... * ... | 10419.0 | -| test.c:516:48:516:49 | ip | 10419.0 | -| test.c:516:54:516:55 | 17 | 1.0 | -| test.c:516:54:516:55 | (unsigned int)... | 1.0 | -| test.c:516:54:516:60 | ... * ... | 10419.0 | -| test.c:516:59:516:60 | ip | 10419.0 | -| test.c:517:15:517:26 | (...) | 20839.0 | -| test.c:517:15:517:31 | ... * ... | 20839.0 | -| test.c:517:16:517:16 | 2 | 1.0 | -| test.c:517:16:517:16 | (unsigned int)... | 1.0 | -| test.c:517:16:517:21 | ... * ... | 20839.0 | -| test.c:517:16:517:25 | ... + ... | 20839.0 | -| test.c:517:20:517:21 | ip | 20839.0 | -| test.c:517:25:517:25 | 1 | 1.0 | -| test.c:517:25:517:25 | (unsigned int)... | 1.0 | -| test.c:517:30:517:31 | 14 | 1.0 | -| test.c:517:30:517:31 | (unsigned int)... | 1.0 | -| test.c:518:15:518:16 | 14 | 1.0 | -| test.c:518:15:518:16 | (unsigned int)... | 1.0 | -| test.c:518:15:518:27 | ... * ... | 20839.0 | -| test.c:518:15:518:37 | ... > ... | 1.0 | -| test.c:518:15:520:23 | ... ? ... : ... | 4.34263921E8 | -| test.c:518:20:518:27 | (...) | 20839.0 | -| test.c:518:21:518:21 | 2 | 1.0 | -| test.c:518:21:518:21 | (unsigned int)... | 1.0 | -| test.c:518:21:518:26 | ... * ... | 20839.0 | -| test.c:518:25:518:26 | ip | 20839.0 | -| test.c:518:31:518:32 | 17 | 1.0 | -| test.c:518:31:518:32 | (unsigned int)... | 1.0 | -| test.c:518:31:518:37 | ... * ... | 20839.0 | -| test.c:518:36:518:37 | ip | 20839.0 | -| test.c:519:17:519:18 | 14 | 1.0 | -| test.c:519:17:519:18 | (unsigned int)... | 1.0 | -| test.c:519:17:519:29 | ... * ... | 20839.0 | -| test.c:519:22:519:29 | (...) | 20839.0 | -| test.c:519:23:519:23 | 2 | 1.0 | -| test.c:519:23:519:23 | (unsigned int)... | 1.0 | -| test.c:519:23:519:28 | ... * ... | 20839.0 | -| test.c:519:27:519:28 | ip | 20839.0 | -| test.c:520:17:520:18 | 14 | 1.0 | -| test.c:520:17:520:18 | (unsigned int)... | 1.0 | -| test.c:520:17:520:23 | ... * ... | 20839.0 | -| test.c:520:22:520:23 | ip | 20839.0 | -| test.c:521:9:521:9 | 2 | 1.0 | -| test.c:521:9:521:9 | (unsigned int)... | 1.0 | -| test.c:521:9:521:14 | ... * ... | 62517.0 | -| test.c:521:9:521:19 | ... * ... | 62517.0 | -| test.c:521:9:521:39 | ... + ... | 3.908375289E9 | -| test.c:521:13:521:14 | ip | 62517.0 | -| test.c:521:18:521:19 | 14 | 1.0 | -| test.c:521:18:521:19 | (unsigned int)... | 1.0 | -| test.c:521:23:521:34 | (...) | 62517.0 | -| test.c:521:23:521:39 | ... * ... | 62517.0 | -| test.c:521:24:521:24 | 2 | 1.0 | -| test.c:521:24:521:24 | (unsigned int)... | 1.0 | -| test.c:521:24:521:29 | ... * ... | 62517.0 | -| test.c:521:24:521:33 | ... + ... | 62517.0 | -| test.c:521:28:521:29 | ip | 62517.0 | -| test.c:521:33:521:33 | 1 | 1.0 | -| test.c:521:33:521:33 | (unsigned int)... | 1.0 | -| test.c:521:38:521:39 | 17 | 1.0 | -| test.c:521:38:521:39 | (unsigned int)... | 1.0 | -| test.c:522:13:522:13 | 4 | 1.0 | -| test.c:522:13:522:13 | (unsigned int)... | 1.0 | -| test.c:522:13:522:30 | ... * ... | 62517.0 | -| test.c:522:13:523:30 | ... + ... | 3.908375289E9 | -| test.c:522:13:524:30 | ... + ... | 2.44339897942413E14 | -| test.c:522:13:530:26 | ... + ... | 4.7762734556795386E29 | -| test.c:522:17:522:30 | (...) | 62517.0 | -| test.c:522:18:522:19 | ip | 62517.0 | -| test.c:522:18:522:24 | ... * ... | 62517.0 | -| test.c:522:18:522:29 | ... + ... | 62517.0 | -| test.c:522:23:522:24 | 14 | 1.0 | -| test.c:522:23:522:24 | (unsigned int)... | 1.0 | -| test.c:522:28:522:29 | 32 | 1.0 | -| test.c:522:28:522:29 | (unsigned int)... | 1.0 | -| test.c:523:13:523:30 | (...) | 62517.0 | -| test.c:523:14:523:14 | 2 | 1.0 | -| test.c:523:14:523:14 | (unsigned int)... | 1.0 | -| test.c:523:14:523:19 | ... * ... | 62517.0 | -| test.c:523:14:523:24 | ... * ... | 62517.0 | -| test.c:523:14:523:29 | ... + ... | 62517.0 | -| test.c:523:18:523:19 | ip | 62517.0 | -| test.c:523:23:523:24 | 14 | 1.0 | -| test.c:523:23:523:24 | (unsigned int)... | 1.0 | -| test.c:523:28:523:29 | 32 | 1.0 | -| test.c:523:28:523:29 | (unsigned int)... | 1.0 | -| test.c:524:13:524:13 | 2 | 1.0 | -| test.c:524:13:524:13 | (unsigned int)... | 1.0 | -| test.c:524:13:524:30 | ... * ... | 62517.0 | -| test.c:524:17:524:30 | (...) | 62517.0 | -| test.c:524:18:524:19 | ip | 62517.0 | -| test.c:524:18:524:24 | ... * ... | 62517.0 | -| test.c:524:18:524:29 | ... + ... | 62517.0 | -| test.c:524:23:524:24 | 14 | 1.0 | -| test.c:524:23:524:24 | (unsigned int)... | 1.0 | -| test.c:524:28:524:29 | 64 | 1.0 | -| test.c:524:28:524:29 | (unsigned int)... | 1.0 | -| test.c:525:13:530:26 | (...) | 1.954766084417875E15 | -| test.c:525:14:525:25 | (...) | 62517.0 | -| test.c:525:14:525:30 | ... * ... | 62517.0 | -| test.c:525:14:526:63 | ... > ... | 1.0 | -| test.c:525:14:530:25 | ... ? ... : ... | 1.954766084417875E15 | -| test.c:525:15:525:15 | 2 | 1.0 | -| test.c:525:15:525:15 | (unsigned int)... | 1.0 | -| test.c:525:15:525:20 | ... * ... | 62517.0 | -| test.c:525:15:525:24 | ... + ... | 62517.0 | -| test.c:525:19:525:20 | ip | 62517.0 | -| test.c:525:24:525:24 | 1 | 1.0 | -| test.c:525:24:525:24 | (unsigned int)... | 1.0 | -| test.c:525:29:525:30 | 14 | 1.0 | -| test.c:525:29:525:30 | (unsigned int)... | 1.0 | -| test.c:526:13:526:63 | (...) | 3.908375289E9 | -| test.c:526:14:526:15 | 14 | 1.0 | -| test.c:526:14:526:15 | (unsigned int)... | 1.0 | -| test.c:526:14:526:26 | ... * ... | 62517.0 | -| test.c:526:14:526:36 | ... > ... | 1.0 | -| test.c:526:14:526:62 | ... ? ... : ... | 3.908375289E9 | -| test.c:526:19:526:26 | (...) | 62517.0 | -| test.c:526:20:526:20 | 2 | 1.0 | -| test.c:526:20:526:20 | (unsigned int)... | 1.0 | -| test.c:526:20:526:25 | ... * ... | 62517.0 | -| test.c:526:24:526:25 | ip | 62517.0 | -| test.c:526:30:526:31 | 17 | 1.0 | -| test.c:526:30:526:31 | (unsigned int)... | 1.0 | -| test.c:526:30:526:36 | ... * ... | 62517.0 | -| test.c:526:35:526:36 | ip | 62517.0 | -| test.c:526:40:526:41 | 17 | 1.0 | -| test.c:526:40:526:41 | (unsigned int)... | 1.0 | -| test.c:526:40:526:52 | ... * ... | 62517.0 | -| test.c:526:45:526:52 | (...) | 62517.0 | -| test.c:526:46:526:46 | 2 | 1.0 | -| test.c:526:46:526:46 | (unsigned int)... | 1.0 | -| test.c:526:46:526:51 | ... * ... | 62517.0 | -| test.c:526:50:526:51 | ip | 62517.0 | -| test.c:526:56:526:57 | 17 | 1.0 | -| test.c:526:56:526:57 | (unsigned int)... | 1.0 | -| test.c:526:56:526:62 | ... * ... | 62517.0 | -| test.c:526:61:526:62 | ip | 62517.0 | -| test.c:527:17:527:28 | (...) | 125035.0 | -| test.c:527:17:527:33 | ... * ... | 125035.0 | -| test.c:527:18:527:18 | 2 | 1.0 | -| test.c:527:18:527:18 | (unsigned int)... | 1.0 | -| test.c:527:18:527:23 | ... * ... | 125035.0 | -| test.c:527:18:527:27 | ... + ... | 125035.0 | -| test.c:527:22:527:23 | ip | 125035.0 | -| test.c:527:27:527:27 | 1 | 1.0 | -| test.c:527:27:527:27 | (unsigned int)... | 1.0 | -| test.c:527:32:527:33 | 14 | 1.0 | -| test.c:527:32:527:33 | (unsigned int)... | 1.0 | -| test.c:528:17:528:18 | 14 | 1.0 | -| test.c:528:17:528:18 | (unsigned int)... | 1.0 | -| test.c:528:17:528:29 | ... * ... | 125035.0 | -| test.c:528:17:528:39 | ... > ... | 1.0 | -| test.c:528:17:530:25 | ... ? ... : ... | 1.5633751225E10 | -| test.c:528:22:528:29 | (...) | 125035.0 | -| test.c:528:23:528:23 | 2 | 1.0 | -| test.c:528:23:528:23 | (unsigned int)... | 1.0 | -| test.c:528:23:528:28 | ... * ... | 125035.0 | -| test.c:528:27:528:28 | ip | 125035.0 | -| test.c:528:33:528:34 | 17 | 1.0 | -| test.c:528:33:528:34 | (unsigned int)... | 1.0 | -| test.c:528:33:528:39 | ... * ... | 125035.0 | -| test.c:528:38:528:39 | ip | 125035.0 | -| test.c:529:19:529:20 | 14 | 1.0 | -| test.c:529:19:529:20 | (unsigned int)... | 1.0 | -| test.c:529:19:529:31 | ... * ... | 125035.0 | -| test.c:529:24:529:31 | (...) | 125035.0 | -| test.c:529:25:529:25 | 2 | 1.0 | -| test.c:529:25:529:25 | (unsigned int)... | 1.0 | -| test.c:529:25:529:30 | ... * ... | 125035.0 | -| test.c:529:29:529:30 | ip | 125035.0 | -| test.c:530:19:530:20 | 14 | 1.0 | -| test.c:530:19:530:20 | (unsigned int)... | 1.0 | -| test.c:530:19:530:25 | ... * ... | 125035.0 | -| test.c:530:24:530:25 | ip | 125035.0 | -| test.c:531:13:531:13 | 2 | 1.0 | -| test.c:531:13:531:13 | (unsigned int)... | 1.0 | -| test.c:531:13:531:18 | ... * ... | 62517.0 | -| test.c:531:13:531:23 | ... * ... | 62517.0 | -| test.c:531:13:531:43 | ... + ... | 3.908375289E9 | -| test.c:531:17:531:18 | ip | 62517.0 | -| test.c:531:22:531:23 | 14 | 1.0 | -| test.c:531:22:531:23 | (unsigned int)... | 1.0 | -| test.c:531:27:531:38 | (...) | 62517.0 | -| test.c:531:27:531:43 | ... * ... | 62517.0 | -| test.c:531:28:531:28 | 2 | 1.0 | -| test.c:531:28:531:28 | (unsigned int)... | 1.0 | -| test.c:531:28:531:33 | ... * ... | 62517.0 | -| test.c:531:28:531:37 | ... + ... | 62517.0 | -| test.c:531:32:531:33 | ip | 62517.0 | -| test.c:531:37:531:37 | 1 | 1.0 | -| test.c:531:37:531:37 | (unsigned int)... | 1.0 | -| test.c:531:42:531:43 | 17 | 1.0 | -| test.c:531:42:531:43 | (unsigned int)... | 1.0 | -| test.c:532:9:532:9 | 4 | 1.0 | -| test.c:532:9:532:9 | (unsigned int)... | 1.0 | -| test.c:532:9:532:26 | ... * ... | 10419.0 | -| test.c:532:9:533:30 | ... + ... | 1.08555561E8 | -| test.c:532:9:534:30 | ... + ... | 1.131040390059E12 | -| test.c:532:9:540:26 | ... + ... | 1.0235492350954187E25 | -| test.c:532:9:541:61 | ... > ... | 1.0 | -| test.c:532:9:553:25 | ... ? ... : ... | 4.778814771623795E41 | -| test.c:532:13:532:26 | (...) | 10419.0 | -| test.c:532:14:532:15 | ip | 10419.0 | -| test.c:532:14:532:20 | ... * ... | 10419.0 | -| test.c:532:14:532:25 | ... + ... | 10419.0 | -| test.c:532:19:532:20 | 14 | 1.0 | -| test.c:532:19:532:20 | (unsigned int)... | 1.0 | -| test.c:532:24:532:25 | 32 | 1.0 | -| test.c:532:24:532:25 | (unsigned int)... | 1.0 | -| test.c:533:13:533:30 | (...) | 10419.0 | -| test.c:533:14:533:14 | 2 | 1.0 | -| test.c:533:14:533:14 | (unsigned int)... | 1.0 | -| test.c:533:14:533:19 | ... * ... | 10419.0 | -| test.c:533:14:533:24 | ... * ... | 10419.0 | -| test.c:533:14:533:29 | ... + ... | 10419.0 | -| test.c:533:18:533:19 | ip | 10419.0 | -| test.c:533:23:533:24 | 14 | 1.0 | -| test.c:533:23:533:24 | (unsigned int)... | 1.0 | -| test.c:533:28:533:29 | 32 | 1.0 | -| test.c:533:28:533:29 | (unsigned int)... | 1.0 | -| test.c:534:13:534:13 | 2 | 1.0 | -| test.c:534:13:534:13 | (unsigned int)... | 1.0 | -| test.c:534:13:534:30 | ... * ... | 10419.0 | -| test.c:534:17:534:30 | (...) | 10419.0 | -| test.c:534:18:534:19 | ip | 10419.0 | -| test.c:534:18:534:24 | ... * ... | 10419.0 | -| test.c:534:18:534:29 | ... + ... | 10419.0 | -| test.c:534:23:534:24 | 14 | 1.0 | -| test.c:534:23:534:24 | (unsigned int)... | 1.0 | -| test.c:534:28:534:29 | 64 | 1.0 | -| test.c:534:28:534:29 | (unsigned int)... | 1.0 | -| test.c:535:13:540:26 | (...) | 9.049625849719E12 | -| test.c:535:14:535:25 | (...) | 10419.0 | -| test.c:535:14:535:30 | ... * ... | 10419.0 | -| test.c:535:14:536:63 | ... > ... | 1.0 | -| test.c:535:14:540:25 | ... ? ... : ... | 9.049625849719E12 | -| test.c:535:15:535:15 | 2 | 1.0 | -| test.c:535:15:535:15 | (unsigned int)... | 1.0 | -| test.c:535:15:535:20 | ... * ... | 10419.0 | -| test.c:535:15:535:24 | ... + ... | 10419.0 | -| test.c:535:19:535:20 | ip | 10419.0 | -| test.c:535:24:535:24 | 1 | 1.0 | -| test.c:535:24:535:24 | (unsigned int)... | 1.0 | -| test.c:535:29:535:30 | 14 | 1.0 | -| test.c:535:29:535:30 | (unsigned int)... | 1.0 | -| test.c:536:13:536:63 | (...) | 1.08555561E8 | -| test.c:536:14:536:15 | 14 | 1.0 | -| test.c:536:14:536:15 | (unsigned int)... | 1.0 | -| test.c:536:14:536:26 | ... * ... | 10419.0 | -| test.c:536:14:536:36 | ... > ... | 1.0 | -| test.c:536:14:536:62 | ... ? ... : ... | 1.08555561E8 | -| test.c:536:19:536:26 | (...) | 10419.0 | -| test.c:536:20:536:20 | 2 | 1.0 | -| test.c:536:20:536:20 | (unsigned int)... | 1.0 | -| test.c:536:20:536:25 | ... * ... | 10419.0 | -| test.c:536:24:536:25 | ip | 10419.0 | -| test.c:536:30:536:31 | 17 | 1.0 | -| test.c:536:30:536:31 | (unsigned int)... | 1.0 | -| test.c:536:30:536:36 | ... * ... | 10419.0 | -| test.c:536:35:536:36 | ip | 10419.0 | -| test.c:536:40:536:41 | 17 | 1.0 | -| test.c:536:40:536:41 | (unsigned int)... | 1.0 | -| test.c:536:40:536:52 | ... * ... | 10419.0 | -| test.c:536:45:536:52 | (...) | 10419.0 | -| test.c:536:46:536:46 | 2 | 1.0 | -| test.c:536:46:536:46 | (unsigned int)... | 1.0 | -| test.c:536:46:536:51 | ... * ... | 10419.0 | -| test.c:536:50:536:51 | ip | 10419.0 | -| test.c:536:56:536:57 | 17 | 1.0 | -| test.c:536:56:536:57 | (unsigned int)... | 1.0 | -| test.c:536:56:536:62 | ... * ... | 10419.0 | -| test.c:536:61:536:62 | ip | 10419.0 | -| test.c:537:17:537:28 | (...) | 20839.0 | -| test.c:537:17:537:33 | ... * ... | 20839.0 | -| test.c:537:18:537:18 | 2 | 1.0 | -| test.c:537:18:537:18 | (unsigned int)... | 1.0 | -| test.c:537:18:537:23 | ... * ... | 20839.0 | -| test.c:537:18:537:27 | ... + ... | 20839.0 | -| test.c:537:22:537:23 | ip | 20839.0 | -| test.c:537:27:537:27 | 1 | 1.0 | -| test.c:537:27:537:27 | (unsigned int)... | 1.0 | -| test.c:537:32:537:33 | 14 | 1.0 | -| test.c:537:32:537:33 | (unsigned int)... | 1.0 | -| test.c:538:17:538:18 | 14 | 1.0 | -| test.c:538:17:538:18 | (unsigned int)... | 1.0 | -| test.c:538:17:538:29 | ... * ... | 20839.0 | -| test.c:538:17:538:39 | ... > ... | 1.0 | -| test.c:538:17:540:25 | ... ? ... : ... | 4.34263921E8 | -| test.c:538:22:538:29 | (...) | 20839.0 | -| test.c:538:23:538:23 | 2 | 1.0 | -| test.c:538:23:538:23 | (unsigned int)... | 1.0 | -| test.c:538:23:538:28 | ... * ... | 20839.0 | -| test.c:538:27:538:28 | ip | 20839.0 | -| test.c:538:33:538:34 | 17 | 1.0 | -| test.c:538:33:538:34 | (unsigned int)... | 1.0 | -| test.c:538:33:538:39 | ... * ... | 20839.0 | -| test.c:538:38:538:39 | ip | 20839.0 | -| test.c:539:19:539:20 | 14 | 1.0 | -| test.c:539:19:539:20 | (unsigned int)... | 1.0 | -| test.c:539:19:539:31 | ... * ... | 20839.0 | -| test.c:539:24:539:31 | (...) | 20839.0 | -| test.c:539:25:539:25 | 2 | 1.0 | -| test.c:539:25:539:25 | (unsigned int)... | 1.0 | -| test.c:539:25:539:30 | ... * ... | 20839.0 | -| test.c:539:29:539:30 | ip | 20839.0 | -| test.c:540:19:540:20 | 14 | 1.0 | -| test.c:540:19:540:20 | (unsigned int)... | 1.0 | -| test.c:540:19:540:25 | ... * ... | 20839.0 | -| test.c:540:24:540:25 | ip | 20839.0 | -| test.c:541:11:541:61 | (...) | 3.908375289E9 | -| test.c:541:12:541:13 | 14 | 1.0 | -| test.c:541:12:541:13 | (unsigned int)... | 1.0 | -| test.c:541:12:541:18 | ... * ... | 62517.0 | -| test.c:541:12:541:34 | ... > ... | 1.0 | -| test.c:541:12:541:60 | ... ? ... : ... | 3.908375289E9 | -| test.c:541:17:541:18 | ip | 62517.0 | -| test.c:541:22:541:29 | (...) | 62517.0 | -| test.c:541:22:541:34 | ... * ... | 62517.0 | -| test.c:541:23:541:24 | ip | 62517.0 | -| test.c:541:23:541:28 | ... + ... | 62517.0 | -| test.c:541:28:541:28 | 1 | 1.0 | -| test.c:541:28:541:28 | (unsigned int)... | 1.0 | -| test.c:541:33:541:34 | 17 | 1.0 | -| test.c:541:33:541:34 | (unsigned int)... | 1.0 | -| test.c:541:38:541:39 | 17 | 1.0 | -| test.c:541:38:541:39 | (unsigned int)... | 1.0 | -| test.c:541:38:541:44 | ... * ... | 62517.0 | -| test.c:541:43:541:44 | ip | 62517.0 | -| test.c:541:48:541:55 | (...) | 62517.0 | -| test.c:541:48:541:60 | ... * ... | 62517.0 | -| test.c:541:49:541:50 | ip | 62517.0 | -| test.c:541:49:541:54 | ... + ... | 62517.0 | -| test.c:541:54:541:54 | 1 | 1.0 | -| test.c:541:54:541:54 | (unsigned int)... | 1.0 | -| test.c:541:59:541:60 | 17 | 1.0 | -| test.c:541:59:541:60 | (unsigned int)... | 1.0 | -| test.c:542:11:542:11 | 4 | 1.0 | -| test.c:542:11:542:11 | (unsigned int)... | 1.0 | -| test.c:542:11:542:28 | ... * ... | 125034.0 | -| test.c:542:11:543:28 | ... + ... | 1.5633501156E10 | -| test.c:542:11:544:28 | ... + ... | 1.954719183539304E15 | -| test.c:542:11:550:24 | ... + ... | 3.056778340269433E31 | -| test.c:542:15:542:28 | (...) | 125034.0 | -| test.c:542:16:542:17 | ip | 125034.0 | -| test.c:542:16:542:22 | ... * ... | 125034.0 | -| test.c:542:16:542:27 | ... + ... | 125034.0 | -| test.c:542:21:542:22 | 14 | 1.0 | -| test.c:542:21:542:22 | (unsigned int)... | 1.0 | -| test.c:542:26:542:27 | 32 | 1.0 | -| test.c:542:26:542:27 | (unsigned int)... | 1.0 | -| test.c:543:11:543:28 | (...) | 125034.0 | -| test.c:543:12:543:12 | 2 | 1.0 | -| test.c:543:12:543:12 | (unsigned int)... | 1.0 | -| test.c:543:12:543:17 | ... * ... | 125034.0 | -| test.c:543:12:543:22 | ... * ... | 125034.0 | -| test.c:543:12:543:27 | ... + ... | 125034.0 | -| test.c:543:16:543:17 | ip | 125034.0 | -| test.c:543:21:543:22 | 14 | 1.0 | -| test.c:543:21:543:22 | (unsigned int)... | 1.0 | -| test.c:543:26:543:27 | 32 | 1.0 | -| test.c:543:26:543:27 | (unsigned int)... | 1.0 | -| test.c:544:11:544:11 | 2 | 1.0 | -| test.c:544:11:544:11 | (unsigned int)... | 1.0 | -| test.c:544:11:544:28 | ... * ... | 125034.0 | -| test.c:544:15:544:28 | (...) | 125034.0 | -| test.c:544:16:544:17 | ip | 125034.0 | -| test.c:544:16:544:22 | ... * ... | 125034.0 | -| test.c:544:16:544:27 | ... + ... | 125034.0 | -| test.c:544:21:544:22 | 14 | 1.0 | -| test.c:544:21:544:22 | (unsigned int)... | 1.0 | -| test.c:544:26:544:27 | 64 | 1.0 | -| test.c:544:26:544:27 | (unsigned int)... | 1.0 | -| test.c:545:11:550:24 | (...) | 1.5637941071078508E16 | -| test.c:545:12:545:23 | (...) | 125034.0 | -| test.c:545:12:545:28 | ... * ... | 125034.0 | -| test.c:545:12:546:61 | ... > ... | 1.0 | -| test.c:545:12:550:23 | ... ? ... : ... | 1.5637941071078508E16 | -| test.c:545:13:545:13 | 2 | 1.0 | -| test.c:545:13:545:13 | (unsigned int)... | 1.0 | -| test.c:545:13:545:18 | ... * ... | 125034.0 | -| test.c:545:13:545:22 | ... + ... | 125034.0 | -| test.c:545:17:545:18 | ip | 125034.0 | -| test.c:545:22:545:22 | 1 | 1.0 | -| test.c:545:22:545:22 | (unsigned int)... | 1.0 | -| test.c:545:27:545:28 | 14 | 1.0 | -| test.c:545:27:545:28 | (unsigned int)... | 1.0 | -| test.c:546:11:546:61 | (...) | 1.5633501156E10 | -| test.c:546:12:546:13 | 14 | 1.0 | -| test.c:546:12:546:13 | (unsigned int)... | 1.0 | -| test.c:546:12:546:24 | ... * ... | 125034.0 | -| test.c:546:12:546:34 | ... > ... | 1.0 | -| test.c:546:12:546:60 | ... ? ... : ... | 1.5633501156E10 | -| test.c:546:17:546:24 | (...) | 125034.0 | -| test.c:546:18:546:18 | 2 | 1.0 | -| test.c:546:18:546:18 | (unsigned int)... | 1.0 | -| test.c:546:18:546:23 | ... * ... | 125034.0 | -| test.c:546:22:546:23 | ip | 125034.0 | -| test.c:546:28:546:29 | 17 | 1.0 | -| test.c:546:28:546:29 | (unsigned int)... | 1.0 | -| test.c:546:28:546:34 | ... * ... | 125034.0 | -| test.c:546:33:546:34 | ip | 125034.0 | -| test.c:546:38:546:39 | 17 | 1.0 | -| test.c:546:38:546:39 | (unsigned int)... | 1.0 | -| test.c:546:38:546:50 | ... * ... | 125034.0 | -| test.c:546:43:546:50 | (...) | 125034.0 | -| test.c:546:44:546:44 | 2 | 1.0 | -| test.c:546:44:546:44 | (unsigned int)... | 1.0 | -| test.c:546:44:546:49 | ... * ... | 125034.0 | -| test.c:546:48:546:49 | ip | 125034.0 | -| test.c:546:54:546:55 | 17 | 1.0 | -| test.c:546:54:546:55 | (unsigned int)... | 1.0 | -| test.c:546:54:546:60 | ... * ... | 125034.0 | -| test.c:546:59:546:60 | ip | 125034.0 | -| test.c:547:15:547:26 | (...) | 250069.0 | -| test.c:547:15:547:31 | ... * ... | 250069.0 | -| test.c:547:16:547:16 | 2 | 1.0 | -| test.c:547:16:547:16 | (unsigned int)... | 1.0 | -| test.c:547:16:547:21 | ... * ... | 250069.0 | -| test.c:547:16:547:25 | ... + ... | 250069.0 | -| test.c:547:20:547:21 | ip | 250069.0 | -| test.c:547:25:547:25 | 1 | 1.0 | -| test.c:547:25:547:25 | (unsigned int)... | 1.0 | -| test.c:547:30:547:31 | 14 | 1.0 | -| test.c:547:30:547:31 | (unsigned int)... | 1.0 | -| test.c:548:15:548:16 | 14 | 1.0 | -| test.c:548:15:548:16 | (unsigned int)... | 1.0 | -| test.c:548:15:548:27 | ... * ... | 250069.0 | -| test.c:548:15:548:37 | ... > ... | 1.0 | -| test.c:548:15:550:23 | ... ? ... : ... | 6.2534504761E10 | -| test.c:548:20:548:27 | (...) | 250069.0 | -| test.c:548:21:548:21 | 2 | 1.0 | -| test.c:548:21:548:21 | (unsigned int)... | 1.0 | -| test.c:548:21:548:26 | ... * ... | 250069.0 | -| test.c:548:25:548:26 | ip | 250069.0 | -| test.c:548:31:548:32 | 17 | 1.0 | -| test.c:548:31:548:32 | (unsigned int)... | 1.0 | -| test.c:548:31:548:37 | ... * ... | 250069.0 | -| test.c:548:36:548:37 | ip | 250069.0 | -| test.c:549:17:549:18 | 14 | 1.0 | -| test.c:549:17:549:18 | (unsigned int)... | 1.0 | -| test.c:549:17:549:29 | ... * ... | 250069.0 | -| test.c:549:22:549:29 | (...) | 250069.0 | -| test.c:549:23:549:23 | 2 | 1.0 | -| test.c:549:23:549:23 | (unsigned int)... | 1.0 | -| test.c:549:23:549:28 | ... * ... | 250069.0 | -| test.c:549:27:549:28 | ip | 250069.0 | -| test.c:550:17:550:18 | 14 | 1.0 | -| test.c:550:17:550:18 | (unsigned int)... | 1.0 | -| test.c:550:17:550:23 | ... * ... | 250069.0 | -| test.c:550:22:550:23 | ip | 250069.0 | -| test.c:551:11:551:12 | 14 | 1.0 | -| test.c:551:11:551:12 | (unsigned int)... | 1.0 | -| test.c:551:11:551:17 | ... * ... | 125034.0 | -| test.c:551:11:551:33 | ... > ... | 1.0 | -| test.c:551:11:553:25 | ... ? ... : ... | 1.5633501156E10 | -| test.c:551:16:551:17 | ip | 125034.0 | -| test.c:551:21:551:28 | (...) | 125034.0 | -| test.c:551:21:551:33 | ... * ... | 125034.0 | -| test.c:551:22:551:23 | ip | 125034.0 | -| test.c:551:22:551:27 | ... + ... | 125034.0 | -| test.c:551:27:551:27 | 1 | 1.0 | -| test.c:551:27:551:27 | (unsigned int)... | 1.0 | -| test.c:551:32:551:33 | 17 | 1.0 | -| test.c:551:32:551:33 | (unsigned int)... | 1.0 | -| test.c:552:13:552:14 | 14 | 1.0 | -| test.c:552:13:552:14 | (unsigned int)... | 1.0 | -| test.c:552:13:552:19 | ... * ... | 125034.0 | -| test.c:552:18:552:19 | ip | 125034.0 | -| test.c:553:13:553:20 | (...) | 125034.0 | -| test.c:553:13:553:25 | ... * ... | 125034.0 | -| test.c:553:14:553:15 | ip | 125034.0 | -| test.c:553:14:553:19 | ... + ... | 125034.0 | -| test.c:553:19:553:19 | 1 | 1.0 | -| test.c:553:19:553:19 | (unsigned int)... | 1.0 | -| test.c:553:24:553:25 | 14 | 1.0 | -| test.c:553:24:553:25 | (unsigned int)... | 1.0 | -| test.c:554:9:554:10 | 14 | 1.0 | -| test.c:554:9:554:10 | (unsigned int)... | 1.0 | -| test.c:554:9:554:15 | ... * ... | 1437897.0 | -| test.c:554:9:554:59 | ... > ... | 1.0 | -| test.c:554:9:556:51 | ... ? ... : ... | 2.9729207539701335E18 | -| test.c:554:14:554:15 | ip | 1437897.0 | -| test.c:554:19:554:30 | (...) | 1437897.0 | -| test.c:554:19:554:35 | ... * ... | 1437897.0 | -| test.c:554:19:554:59 | ... + ... | 2.067547782609E12 | -| test.c:554:20:554:20 | 2 | 1.0 | -| test.c:554:20:554:20 | (unsigned int)... | 1.0 | -| test.c:554:20:554:25 | ... * ... | 1437897.0 | -| test.c:554:20:554:29 | ... + ... | 1437897.0 | -| test.c:554:24:554:25 | ip | 1437897.0 | -| test.c:554:29:554:29 | 1 | 1.0 | -| test.c:554:29:554:29 | (unsigned int)... | 1.0 | -| test.c:554:34:554:35 | 17 | 1.0 | -| test.c:554:34:554:35 | (unsigned int)... | 1.0 | -| test.c:554:39:554:54 | (...) | 1437897.0 | -| test.c:554:39:554:59 | ... * ... | 1437897.0 | -| test.c:554:40:554:40 | 2 | 1.0 | -| test.c:554:40:554:40 | (unsigned int)... | 1.0 | -| test.c:554:40:554:45 | ... * ... | 1437897.0 | -| test.c:554:40:554:49 | ... + ... | 1437897.0 | -| test.c:554:40:554:53 | ... + ... | 1437897.0 | -| test.c:554:44:554:45 | ip | 1437897.0 | -| test.c:554:49:554:49 | 1 | 1.0 | -| test.c:554:49:554:49 | (unsigned int)... | 1.0 | -| test.c:554:53:554:53 | 1 | 1.0 | -| test.c:554:53:554:53 | (unsigned int)... | 1.0 | -| test.c:554:58:554:59 | 17 | 1.0 | -| test.c:554:58:554:59 | (unsigned int)... | 1.0 | -| test.c:555:11:555:12 | 14 | 1.0 | -| test.c:555:11:555:12 | (unsigned int)... | 1.0 | -| test.c:555:11:555:17 | ... * ... | 1437897.0 | -| test.c:555:16:555:17 | ip | 1437897.0 | -| test.c:556:11:556:22 | (...) | 1437897.0 | -| test.c:556:11:556:27 | ... * ... | 1437897.0 | -| test.c:556:11:556:51 | ... + ... | 2.067547782609E12 | -| test.c:556:12:556:12 | 2 | 1.0 | -| test.c:556:12:556:12 | (unsigned int)... | 1.0 | -| test.c:556:12:556:17 | ... * ... | 1437897.0 | -| test.c:556:12:556:21 | ... + ... | 1437897.0 | -| test.c:556:16:556:17 | ip | 1437897.0 | -| test.c:556:21:556:21 | 1 | 1.0 | -| test.c:556:21:556:21 | (unsigned int)... | 1.0 | -| test.c:556:26:556:27 | 14 | 1.0 | -| test.c:556:26:556:27 | (unsigned int)... | 1.0 | -| test.c:556:31:556:46 | (...) | 1437897.0 | -| test.c:556:31:556:51 | ... * ... | 1437897.0 | -| test.c:556:32:556:32 | 2 | 1.0 | -| test.c:556:32:556:32 | (unsigned int)... | 1.0 | -| test.c:556:32:556:37 | ... * ... | 1437897.0 | -| test.c:556:32:556:41 | ... + ... | 1437897.0 | -| test.c:556:32:556:45 | ... + ... | 1437897.0 | -| test.c:556:36:556:37 | ip | 1437897.0 | -| test.c:556:41:556:41 | 1 | 1.0 | -| test.c:556:41:556:41 | (unsigned int)... | 1.0 | -| test.c:556:45:556:45 | 1 | 1.0 | -| test.c:556:45:556:45 | (unsigned int)... | 1.0 | -| test.c:556:50:556:51 | 17 | 1.0 | -| test.c:556:50:556:51 | (unsigned int)... | 1.0 | -| test.c:557:9:557:9 | 2 | 1.0 | -| test.c:557:9:557:9 | (unsigned int)... | 1.0 | -| test.c:557:9:557:26 | ... * ... | 1437897.0 | -| test.c:557:9:577:48 | ... + ... | 3.5306223994138077E62 | -| test.c:557:9:599:30 | ... > ... | 1.0 | -| test.c:557:9:642:27 | ... ? ... : ... | 4.3658022750663434E182 | -| test.c:557:13:557:26 | (...) | 1437897.0 | -| test.c:557:14:557:15 | ip | 1437897.0 | -| test.c:557:14:557:20 | ... * ... | 1437897.0 | -| test.c:557:14:557:25 | ... + ... | 1437897.0 | -| test.c:557:19:557:20 | 14 | 1.0 | -| test.c:557:19:557:20 | (unsigned int)... | 1.0 | -| test.c:557:24:557:25 | 32 | 1.0 | -| test.c:557:24:557:25 | (unsigned int)... | 1.0 | -| test.c:558:13:577:48 | (...) | 2.4554070280512497E56 | -| test.c:558:14:558:14 | 4 | 1.0 | -| test.c:558:14:558:14 | (unsigned int)... | 1.0 | -| test.c:558:14:558:31 | ... * ... | 1437897.0 | -| test.c:558:14:559:32 | ... + ... | 2.067547782609E12 | -| test.c:558:14:560:32 | ... + ... | 2.9729207539701335E18 | -| test.c:558:14:566:28 | ... + ... | 7.070613623498497E37 | -| test.c:558:14:567:43 | ... > ... | 1.0 | -| test.c:558:14:577:47 | ... ? ... : ... | 2.4554070280512497E56 | -| test.c:558:18:558:31 | (...) | 1437897.0 | -| test.c:558:19:558:20 | ip | 1437897.0 | -| test.c:558:19:558:25 | ... * ... | 1437897.0 | -| test.c:558:19:558:30 | ... + ... | 1437897.0 | -| test.c:558:24:558:25 | 14 | 1.0 | -| test.c:558:24:558:25 | (unsigned int)... | 1.0 | -| test.c:558:29:558:30 | 32 | 1.0 | -| test.c:558:29:558:30 | (unsigned int)... | 1.0 | -| test.c:559:15:559:32 | (...) | 1437897.0 | -| test.c:559:16:559:16 | 2 | 1.0 | -| test.c:559:16:559:16 | (unsigned int)... | 1.0 | -| test.c:559:16:559:21 | ... * ... | 1437897.0 | -| test.c:559:16:559:26 | ... * ... | 1437897.0 | -| test.c:559:16:559:31 | ... + ... | 1437897.0 | -| test.c:559:20:559:21 | ip | 1437897.0 | -| test.c:559:25:559:26 | 14 | 1.0 | -| test.c:559:25:559:26 | (unsigned int)... | 1.0 | -| test.c:559:30:559:31 | 32 | 1.0 | -| test.c:559:30:559:31 | (unsigned int)... | 1.0 | -| test.c:560:15:560:15 | 2 | 1.0 | -| test.c:560:15:560:15 | (unsigned int)... | 1.0 | -| test.c:560:15:560:32 | ... * ... | 1437897.0 | -| test.c:560:19:560:32 | (...) | 1437897.0 | -| test.c:560:20:560:21 | ip | 1437897.0 | -| test.c:560:20:560:26 | ... * ... | 1437897.0 | -| test.c:560:20:560:31 | ... + ... | 1437897.0 | -| test.c:560:25:560:26 | 14 | 1.0 | -| test.c:560:25:560:26 | (unsigned int)... | 1.0 | -| test.c:560:30:560:31 | 64 | 1.0 | -| test.c:560:30:560:31 | (unsigned int)... | 1.0 | -| test.c:561:15:566:28 | (...) | 2.3783390842343084E19 | -| test.c:561:16:561:27 | (...) | 1437897.0 | -| test.c:561:16:561:32 | ... * ... | 1437897.0 | -| test.c:561:16:562:65 | ... > ... | 1.0 | -| test.c:561:16:566:27 | ... ? ... : ... | 2.3783390842343084E19 | -| test.c:561:17:561:17 | 2 | 1.0 | -| test.c:561:17:561:17 | (unsigned int)... | 1.0 | -| test.c:561:17:561:22 | ... * ... | 1437897.0 | -| test.c:561:17:561:26 | ... + ... | 1437897.0 | -| test.c:561:21:561:22 | ip | 1437897.0 | -| test.c:561:26:561:26 | 1 | 1.0 | -| test.c:561:26:561:26 | (unsigned int)... | 1.0 | -| test.c:561:31:561:32 | 14 | 1.0 | -| test.c:561:31:561:32 | (unsigned int)... | 1.0 | -| test.c:562:15:562:65 | (...) | 2.067547782609E12 | -| test.c:562:16:562:17 | 14 | 1.0 | -| test.c:562:16:562:17 | (unsigned int)... | 1.0 | -| test.c:562:16:562:28 | ... * ... | 1437897.0 | -| test.c:562:16:562:38 | ... > ... | 1.0 | -| test.c:562:16:562:64 | ... ? ... : ... | 2.067547782609E12 | -| test.c:562:21:562:28 | (...) | 1437897.0 | -| test.c:562:22:562:22 | 2 | 1.0 | -| test.c:562:22:562:22 | (unsigned int)... | 1.0 | -| test.c:562:22:562:27 | ... * ... | 1437897.0 | -| test.c:562:26:562:27 | ip | 1437897.0 | -| test.c:562:32:562:33 | 17 | 1.0 | -| test.c:562:32:562:33 | (unsigned int)... | 1.0 | -| test.c:562:32:562:38 | ... * ... | 1437897.0 | -| test.c:562:37:562:38 | ip | 1437897.0 | -| test.c:562:42:562:43 | 17 | 1.0 | -| test.c:562:42:562:43 | (unsigned int)... | 1.0 | -| test.c:562:42:562:54 | ... * ... | 1437897.0 | -| test.c:562:47:562:54 | (...) | 1437897.0 | -| test.c:562:48:562:48 | 2 | 1.0 | -| test.c:562:48:562:48 | (unsigned int)... | 1.0 | -| test.c:562:48:562:53 | ... * ... | 1437897.0 | -| test.c:562:52:562:53 | ip | 1437897.0 | -| test.c:562:58:562:59 | 17 | 1.0 | -| test.c:562:58:562:59 | (unsigned int)... | 1.0 | -| test.c:562:58:562:64 | ... * ... | 1437897.0 | -| test.c:562:63:562:64 | ip | 1437897.0 | -| test.c:563:19:563:30 | (...) | 2875795.0 | -| test.c:563:19:563:35 | ... * ... | 2875795.0 | -| test.c:563:20:563:20 | 2 | 1.0 | -| test.c:563:20:563:20 | (unsigned int)... | 1.0 | -| test.c:563:20:563:25 | ... * ... | 2875795.0 | -| test.c:563:20:563:29 | ... + ... | 2875795.0 | -| test.c:563:24:563:25 | ip | 2875795.0 | -| test.c:563:29:563:29 | 1 | 1.0 | -| test.c:563:29:563:29 | (unsigned int)... | 1.0 | -| test.c:563:34:563:35 | 14 | 1.0 | -| test.c:563:34:563:35 | (unsigned int)... | 1.0 | -| test.c:564:19:564:20 | 14 | 1.0 | -| test.c:564:19:564:20 | (unsigned int)... | 1.0 | -| test.c:564:19:564:31 | ... * ... | 2875795.0 | -| test.c:564:19:564:41 | ... > ... | 1.0 | -| test.c:564:19:566:27 | ... ? ... : ... | 8.270196882025E12 | -| test.c:564:24:564:31 | (...) | 2875795.0 | -| test.c:564:25:564:25 | 2 | 1.0 | -| test.c:564:25:564:25 | (unsigned int)... | 1.0 | -| test.c:564:25:564:30 | ... * ... | 2875795.0 | -| test.c:564:29:564:30 | ip | 2875795.0 | -| test.c:564:35:564:36 | 17 | 1.0 | -| test.c:564:35:564:36 | (unsigned int)... | 1.0 | -| test.c:564:35:564:41 | ... * ... | 2875795.0 | -| test.c:564:40:564:41 | ip | 2875795.0 | -| test.c:565:21:565:22 | 14 | 1.0 | -| test.c:565:21:565:22 | (unsigned int)... | 1.0 | -| test.c:565:21:565:33 | ... * ... | 2875795.0 | -| test.c:565:26:565:33 | (...) | 2875795.0 | -| test.c:565:27:565:27 | 2 | 1.0 | -| test.c:565:27:565:27 | (unsigned int)... | 1.0 | -| test.c:565:27:565:32 | ... * ... | 2875795.0 | -| test.c:565:31:565:32 | ip | 2875795.0 | -| test.c:566:21:566:22 | 14 | 1.0 | -| test.c:566:21:566:22 | (unsigned int)... | 1.0 | -| test.c:566:21:566:27 | ... * ... | 2875795.0 | -| test.c:566:26:566:27 | ip | 2875795.0 | -| test.c:567:13:567:13 | 2 | 1.0 | -| test.c:567:13:567:13 | (unsigned int)... | 1.0 | -| test.c:567:13:567:18 | ... * ... | 8627385.0 | -| test.c:567:13:567:23 | ... * ... | 8627385.0 | -| test.c:567:13:567:43 | ... + ... | 7.4431771938225E13 | -| test.c:567:17:567:18 | ip | 8627385.0 | -| test.c:567:22:567:23 | 14 | 1.0 | -| test.c:567:22:567:23 | (unsigned int)... | 1.0 | -| test.c:567:27:567:38 | (...) | 8627385.0 | -| test.c:567:27:567:43 | ... * ... | 8627385.0 | -| test.c:567:28:567:28 | 2 | 1.0 | -| test.c:567:28:567:28 | (unsigned int)... | 1.0 | -| test.c:567:28:567:33 | ... * ... | 8627385.0 | -| test.c:567:28:567:37 | ... + ... | 8627385.0 | -| test.c:567:32:567:33 | ip | 8627385.0 | -| test.c:567:37:567:37 | 1 | 1.0 | -| test.c:567:37:567:37 | (unsigned int)... | 1.0 | -| test.c:567:42:567:43 | 17 | 1.0 | -| test.c:567:42:567:43 | (unsigned int)... | 1.0 | -| test.c:568:17:568:17 | 4 | 1.0 | -| test.c:568:17:568:17 | (unsigned int)... | 1.0 | -| test.c:568:17:568:34 | ... * ... | 8627385.0 | -| test.c:568:17:569:34 | ... + ... | 7.4431771938225E13 | -| test.c:568:17:570:34 | ... + ... | 6.421515527432633E20 | -| test.c:568:17:576:30 | ... + ... | 3.298869507082441E42 | -| test.c:568:21:568:34 | (...) | 8627385.0 | -| test.c:568:22:568:23 | ip | 8627385.0 | -| test.c:568:22:568:28 | ... * ... | 8627385.0 | -| test.c:568:22:568:33 | ... + ... | 8627385.0 | -| test.c:568:27:568:28 | 14 | 1.0 | -| test.c:568:27:568:28 | (unsigned int)... | 1.0 | -| test.c:568:32:568:33 | 32 | 1.0 | -| test.c:568:32:568:33 | (unsigned int)... | 1.0 | -| test.c:569:17:569:34 | (...) | 8627385.0 | -| test.c:569:18:569:18 | 2 | 1.0 | -| test.c:569:18:569:18 | (unsigned int)... | 1.0 | -| test.c:569:18:569:23 | ... * ... | 8627385.0 | -| test.c:569:18:569:28 | ... * ... | 8627385.0 | -| test.c:569:18:569:33 | ... + ... | 8627385.0 | -| test.c:569:22:569:23 | ip | 8627385.0 | -| test.c:569:27:569:28 | 14 | 1.0 | -| test.c:569:27:569:28 | (unsigned int)... | 1.0 | -| test.c:569:32:569:33 | 32 | 1.0 | -| test.c:569:32:569:33 | (unsigned int)... | 1.0 | -| test.c:570:17:570:17 | 2 | 1.0 | -| test.c:570:17:570:17 | (unsigned int)... | 1.0 | -| test.c:570:17:570:34 | ... * ... | 8627385.0 | -| test.c:570:21:570:34 | (...) | 8627385.0 | -| test.c:570:22:570:23 | ip | 8627385.0 | -| test.c:570:22:570:28 | ... * ... | 8627385.0 | -| test.c:570:22:570:33 | ... + ... | 8627385.0 | -| test.c:570:27:570:28 | 14 | 1.0 | -| test.c:570:27:570:28 | (unsigned int)... | 1.0 | -| test.c:570:32:570:33 | 64 | 1.0 | -| test.c:570:32:570:33 | (unsigned int)... | 1.0 | -| test.c:571:17:576:30 | (...) | 5.137213315127421E21 | -| test.c:571:18:571:29 | (...) | 8627385.0 | -| test.c:571:18:571:34 | ... * ... | 8627385.0 | -| test.c:571:18:572:67 | ... > ... | 1.0 | -| test.c:571:18:576:29 | ... ? ... : ... | 5.137213315127421E21 | -| test.c:571:19:571:19 | 2 | 1.0 | -| test.c:571:19:571:19 | (unsigned int)... | 1.0 | -| test.c:571:19:571:24 | ... * ... | 8627385.0 | -| test.c:571:19:571:28 | ... + ... | 8627385.0 | -| test.c:571:23:571:24 | ip | 8627385.0 | -| test.c:571:28:571:28 | 1 | 1.0 | -| test.c:571:28:571:28 | (unsigned int)... | 1.0 | -| test.c:571:33:571:34 | 14 | 1.0 | -| test.c:571:33:571:34 | (unsigned int)... | 1.0 | -| test.c:572:17:572:67 | (...) | 7.4431771938225E13 | -| test.c:572:18:572:19 | 14 | 1.0 | -| test.c:572:18:572:19 | (unsigned int)... | 1.0 | -| test.c:572:18:572:30 | ... * ... | 8627385.0 | -| test.c:572:18:572:40 | ... > ... | 1.0 | -| test.c:572:18:572:66 | ... ? ... : ... | 7.4431771938225E13 | -| test.c:572:23:572:30 | (...) | 8627385.0 | -| test.c:572:24:572:24 | 2 | 1.0 | -| test.c:572:24:572:24 | (unsigned int)... | 1.0 | -| test.c:572:24:572:29 | ... * ... | 8627385.0 | -| test.c:572:28:572:29 | ip | 8627385.0 | -| test.c:572:34:572:35 | 17 | 1.0 | -| test.c:572:34:572:35 | (unsigned int)... | 1.0 | -| test.c:572:34:572:40 | ... * ... | 8627385.0 | -| test.c:572:39:572:40 | ip | 8627385.0 | -| test.c:572:44:572:45 | 17 | 1.0 | -| test.c:572:44:572:45 | (unsigned int)... | 1.0 | -| test.c:572:44:572:56 | ... * ... | 8627385.0 | -| test.c:572:49:572:56 | (...) | 8627385.0 | -| test.c:572:50:572:50 | 2 | 1.0 | -| test.c:572:50:572:50 | (unsigned int)... | 1.0 | -| test.c:572:50:572:55 | ... * ... | 8627385.0 | -| test.c:572:54:572:55 | ip | 8627385.0 | -| test.c:572:60:572:61 | 17 | 1.0 | -| test.c:572:60:572:61 | (unsigned int)... | 1.0 | -| test.c:572:60:572:66 | ... * ... | 8627385.0 | -| test.c:572:65:572:66 | ip | 8627385.0 | -| test.c:573:21:573:32 | (...) | 1.7254771E7 | -| test.c:573:21:573:37 | ... * ... | 1.7254771E7 | -| test.c:573:22:573:22 | 2 | 1.0 | -| test.c:573:22:573:22 | (unsigned int)... | 1.0 | -| test.c:573:22:573:27 | ... * ... | 1.7254771E7 | -| test.c:573:22:573:31 | ... + ... | 1.7254771E7 | -| test.c:573:26:573:27 | ip | 1.7254771E7 | -| test.c:573:31:573:31 | 1 | 1.0 | -| test.c:573:31:573:31 | (unsigned int)... | 1.0 | -| test.c:573:36:573:37 | 14 | 1.0 | -| test.c:573:36:573:37 | (unsigned int)... | 1.0 | -| test.c:574:21:574:22 | 14 | 1.0 | -| test.c:574:21:574:22 | (unsigned int)... | 1.0 | -| test.c:574:21:574:33 | ... * ... | 1.7254771E7 | -| test.c:574:21:574:43 | ... > ... | 1.0 | -| test.c:574:21:576:29 | ... ? ... : ... | 2.97727122262441E14 | -| test.c:574:26:574:33 | (...) | 1.7254771E7 | -| test.c:574:27:574:27 | 2 | 1.0 | -| test.c:574:27:574:27 | (unsigned int)... | 1.0 | -| test.c:574:27:574:32 | ... * ... | 1.7254771E7 | -| test.c:574:31:574:32 | ip | 1.7254771E7 | -| test.c:574:37:574:38 | 17 | 1.0 | -| test.c:574:37:574:38 | (unsigned int)... | 1.0 | -| test.c:574:37:574:43 | ... * ... | 1.7254771E7 | -| test.c:574:42:574:43 | ip | 1.7254771E7 | -| test.c:575:23:575:24 | 14 | 1.0 | -| test.c:575:23:575:24 | (unsigned int)... | 1.0 | -| test.c:575:23:575:35 | ... * ... | 1.7254771E7 | -| test.c:575:28:575:35 | (...) | 1.7254771E7 | -| test.c:575:29:575:29 | 2 | 1.0 | -| test.c:575:29:575:29 | (unsigned int)... | 1.0 | -| test.c:575:29:575:34 | ... * ... | 1.7254771E7 | -| test.c:575:33:575:34 | ip | 1.7254771E7 | -| test.c:576:23:576:24 | 14 | 1.0 | -| test.c:576:23:576:24 | (unsigned int)... | 1.0 | -| test.c:576:23:576:29 | ... * ... | 1.7254771E7 | -| test.c:576:28:576:29 | ip | 1.7254771E7 | -| test.c:577:17:577:17 | 2 | 1.0 | -| test.c:577:17:577:17 | (unsigned int)... | 1.0 | -| test.c:577:17:577:22 | ... * ... | 8627385.0 | -| test.c:577:17:577:27 | ... * ... | 8627385.0 | -| test.c:577:17:577:47 | ... + ... | 7.4431771938225E13 | -| test.c:577:21:577:22 | ip | 8627385.0 | -| test.c:577:26:577:27 | 14 | 1.0 | -| test.c:577:26:577:27 | (unsigned int)... | 1.0 | -| test.c:577:31:577:42 | (...) | 8627385.0 | -| test.c:577:31:577:47 | ... * ... | 8627385.0 | -| test.c:577:32:577:32 | 2 | 1.0 | -| test.c:577:32:577:32 | (unsigned int)... | 1.0 | -| test.c:577:32:577:37 | ... * ... | 8627385.0 | -| test.c:577:32:577:41 | ... + ... | 8627385.0 | -| test.c:577:36:577:37 | ip | 8627385.0 | -| test.c:577:41:577:41 | 1 | 1.0 | -| test.c:577:41:577:41 | (unsigned int)... | 1.0 | -| test.c:577:46:577:47 | 17 | 1.0 | -| test.c:577:46:577:47 | (unsigned int)... | 1.0 | -| test.c:578:11:599:30 | (...) | 6.08636382738973E71 | -| test.c:578:12:578:12 | 4 | 1.0 | -| test.c:578:12:578:12 | (unsigned int)... | 1.0 | -| test.c:578:12:578:29 | ... * ... | 6.0391698E7 | -| test.c:578:12:579:30 | ... + ... | 3.647157187323204E15 | -| test.c:578:12:580:30 | ... + ... | 2.2025801541535236E23 | -| test.c:578:12:586:26 | ... + ... | 3.881087564774641E47 | -| test.c:578:12:587:61 | ... > ... | 1.0 | -| test.c:578:12:599:29 | ... ? ... : ... | 6.08636382738973E71 | -| test.c:578:16:578:29 | (...) | 6.0391698E7 | -| test.c:578:17:578:18 | ip | 6.0391698E7 | -| test.c:578:17:578:23 | ... * ... | 6.0391698E7 | -| test.c:578:17:578:28 | ... + ... | 6.0391698E7 | -| test.c:578:22:578:23 | 14 | 1.0 | -| test.c:578:22:578:23 | (unsigned int)... | 1.0 | -| test.c:578:27:578:28 | 32 | 1.0 | -| test.c:578:27:578:28 | (unsigned int)... | 1.0 | -| test.c:579:13:579:30 | (...) | 6.0391698E7 | -| test.c:579:14:579:14 | 2 | 1.0 | -| test.c:579:14:579:14 | (unsigned int)... | 1.0 | -| test.c:579:14:579:19 | ... * ... | 6.0391698E7 | -| test.c:579:14:579:24 | ... * ... | 6.0391698E7 | -| test.c:579:14:579:29 | ... + ... | 6.0391698E7 | -| test.c:579:18:579:19 | ip | 6.0391698E7 | -| test.c:579:23:579:24 | 14 | 1.0 | -| test.c:579:23:579:24 | (unsigned int)... | 1.0 | -| test.c:579:28:579:29 | 32 | 1.0 | -| test.c:579:28:579:29 | (unsigned int)... | 1.0 | -| test.c:580:13:580:13 | 2 | 1.0 | -| test.c:580:13:580:13 | (unsigned int)... | 1.0 | -| test.c:580:13:580:30 | ... * ... | 6.0391698E7 | -| test.c:580:17:580:30 | (...) | 6.0391698E7 | -| test.c:580:18:580:19 | ip | 6.0391698E7 | -| test.c:580:18:580:24 | ... * ... | 6.0391698E7 | -| test.c:580:18:580:29 | ... + ... | 6.0391698E7 | -| test.c:580:23:580:24 | 14 | 1.0 | -| test.c:580:23:580:24 | (unsigned int)... | 1.0 | -| test.c:580:28:580:29 | 64 | 1.0 | -| test.c:580:28:580:29 | (unsigned int)... | 1.0 | -| test.c:581:13:586:26 | (...) | 1.7620641670887053E24 | -| test.c:581:14:581:25 | (...) | 6.0391698E7 | -| test.c:581:14:581:30 | ... * ... | 6.0391698E7 | -| test.c:581:14:582:63 | ... > ... | 1.0 | -| test.c:581:14:586:25 | ... ? ... : ... | 1.7620641670887053E24 | -| test.c:581:15:581:15 | 2 | 1.0 | -| test.c:581:15:581:15 | (unsigned int)... | 1.0 | -| test.c:581:15:581:20 | ... * ... | 6.0391698E7 | -| test.c:581:15:581:24 | ... + ... | 6.0391698E7 | -| test.c:581:19:581:20 | ip | 6.0391698E7 | -| test.c:581:24:581:24 | 1 | 1.0 | -| test.c:581:24:581:24 | (unsigned int)... | 1.0 | -| test.c:581:29:581:30 | 14 | 1.0 | -| test.c:581:29:581:30 | (unsigned int)... | 1.0 | -| test.c:582:13:582:63 | (...) | 3.647157187323204E15 | -| test.c:582:14:582:15 | 14 | 1.0 | -| test.c:582:14:582:15 | (unsigned int)... | 1.0 | -| test.c:582:14:582:26 | ... * ... | 6.0391698E7 | -| test.c:582:14:582:36 | ... > ... | 1.0 | -| test.c:582:14:582:62 | ... ? ... : ... | 3.647157187323204E15 | -| test.c:582:19:582:26 | (...) | 6.0391698E7 | -| test.c:582:20:582:20 | 2 | 1.0 | -| test.c:582:20:582:20 | (unsigned int)... | 1.0 | -| test.c:582:20:582:25 | ... * ... | 6.0391698E7 | -| test.c:582:24:582:25 | ip | 6.0391698E7 | -| test.c:582:30:582:31 | 17 | 1.0 | -| test.c:582:30:582:31 | (unsigned int)... | 1.0 | -| test.c:582:30:582:36 | ... * ... | 6.0391698E7 | -| test.c:582:35:582:36 | ip | 6.0391698E7 | -| test.c:582:40:582:41 | 17 | 1.0 | -| test.c:582:40:582:41 | (unsigned int)... | 1.0 | -| test.c:582:40:582:52 | ... * ... | 6.0391698E7 | -| test.c:582:45:582:52 | (...) | 6.0391698E7 | -| test.c:582:46:582:46 | 2 | 1.0 | -| test.c:582:46:582:46 | (unsigned int)... | 1.0 | -| test.c:582:46:582:51 | ... * ... | 6.0391698E7 | -| test.c:582:50:582:51 | ip | 6.0391698E7 | -| test.c:582:56:582:57 | 17 | 1.0 | -| test.c:582:56:582:57 | (unsigned int)... | 1.0 | -| test.c:582:56:582:62 | ... * ... | 6.0391698E7 | -| test.c:582:61:582:62 | ip | 6.0391698E7 | -| test.c:583:17:583:28 | (...) | 1.20783397E8 | -| test.c:583:17:583:33 | ... * ... | 1.20783397E8 | -| test.c:583:18:583:18 | 2 | 1.0 | -| test.c:583:18:583:18 | (unsigned int)... | 1.0 | -| test.c:583:18:583:23 | ... * ... | 1.20783397E8 | -| test.c:583:18:583:27 | ... + ... | 1.20783397E8 | -| test.c:583:22:583:23 | ip | 1.20783397E8 | -| test.c:583:27:583:27 | 1 | 1.0 | -| test.c:583:27:583:27 | (unsigned int)... | 1.0 | -| test.c:583:32:583:33 | 14 | 1.0 | -| test.c:583:32:583:33 | (unsigned int)... | 1.0 | -| test.c:584:17:584:18 | 14 | 1.0 | -| test.c:584:17:584:18 | (unsigned int)... | 1.0 | -| test.c:584:17:584:29 | ... * ... | 1.20783397E8 | -| test.c:584:17:584:39 | ... > ... | 1.0 | -| test.c:584:17:586:25 | ... ? ... : ... | 1.4588628990859608E16 | -| test.c:584:22:584:29 | (...) | 1.20783397E8 | -| test.c:584:23:584:23 | 2 | 1.0 | -| test.c:584:23:584:23 | (unsigned int)... | 1.0 | -| test.c:584:23:584:28 | ... * ... | 1.20783397E8 | -| test.c:584:27:584:28 | ip | 1.20783397E8 | -| test.c:584:33:584:34 | 17 | 1.0 | -| test.c:584:33:584:34 | (unsigned int)... | 1.0 | -| test.c:584:33:584:39 | ... * ... | 1.20783397E8 | -| test.c:584:38:584:39 | ip | 1.20783397E8 | -| test.c:585:19:585:20 | 14 | 1.0 | -| test.c:585:19:585:20 | (unsigned int)... | 1.0 | -| test.c:585:19:585:31 | ... * ... | 1.20783397E8 | -| test.c:585:24:585:31 | (...) | 1.20783397E8 | -| test.c:585:25:585:25 | 2 | 1.0 | -| test.c:585:25:585:25 | (unsigned int)... | 1.0 | -| test.c:585:25:585:30 | ... * ... | 1.20783397E8 | -| test.c:585:29:585:30 | ip | 1.20783397E8 | -| test.c:586:19:586:20 | 14 | 1.0 | -| test.c:586:19:586:20 | (unsigned int)... | 1.0 | -| test.c:586:19:586:25 | ... * ... | 1.20783397E8 | -| test.c:586:24:586:25 | ip | 1.20783397E8 | -| test.c:587:11:587:61 | (...) | 1.3129766091773648E17 | -| test.c:587:12:587:13 | 14 | 1.0 | -| test.c:587:12:587:13 | (unsigned int)... | 1.0 | -| test.c:587:12:587:18 | ... * ... | 3.62350191E8 | -| test.c:587:12:587:34 | ... > ... | 1.0 | -| test.c:587:12:587:60 | ... ? ... : ... | 1.3129766091773648E17 | -| test.c:587:17:587:18 | ip | 3.62350191E8 | -| test.c:587:22:587:29 | (...) | 3.62350191E8 | -| test.c:587:22:587:34 | ... * ... | 3.62350191E8 | -| test.c:587:23:587:24 | ip | 3.62350191E8 | -| test.c:587:23:587:28 | ... + ... | 3.62350191E8 | -| test.c:587:28:587:28 | 1 | 1.0 | -| test.c:587:28:587:28 | (unsigned int)... | 1.0 | -| test.c:587:33:587:34 | 17 | 1.0 | -| test.c:587:33:587:34 | (unsigned int)... | 1.0 | -| test.c:587:38:587:39 | 17 | 1.0 | -| test.c:587:38:587:39 | (unsigned int)... | 1.0 | -| test.c:587:38:587:44 | ... * ... | 3.62350191E8 | -| test.c:587:43:587:44 | ip | 3.62350191E8 | -| test.c:587:48:587:55 | (...) | 3.62350191E8 | -| test.c:587:48:587:60 | ... * ... | 3.62350191E8 | -| test.c:587:49:587:50 | ip | 3.62350191E8 | -| test.c:587:49:587:54 | ... + ... | 3.62350191E8 | -| test.c:587:54:587:54 | 1 | 1.0 | -| test.c:587:54:587:54 | (unsigned int)... | 1.0 | -| test.c:587:59:587:60 | 17 | 1.0 | -| test.c:587:59:587:60 | (unsigned int)... | 1.0 | -| test.c:588:15:588:15 | 4 | 1.0 | -| test.c:588:15:588:15 | (unsigned int)... | 1.0 | -| test.c:588:15:588:32 | ... * ... | 7.24700382E8 | -| test.c:588:15:589:32 | ... + ... | 5.251906436709459E17 | -| test.c:588:15:590:32 | ... + ... | 3.806058600911604E26 | -| test.c:588:15:596:28 | ... + ... | 1.1588865682845433E54 | -| test.c:588:19:588:32 | (...) | 7.24700382E8 | -| test.c:588:20:588:21 | ip | 7.24700382E8 | -| test.c:588:20:588:26 | ... * ... | 7.24700382E8 | -| test.c:588:20:588:31 | ... + ... | 7.24700382E8 | -| test.c:588:25:588:26 | 14 | 1.0 | -| test.c:588:25:588:26 | (unsigned int)... | 1.0 | -| test.c:588:30:588:31 | 32 | 1.0 | -| test.c:588:30:588:31 | (unsigned int)... | 1.0 | -| test.c:589:15:589:32 | (...) | 7.24700382E8 | -| test.c:589:16:589:16 | 2 | 1.0 | -| test.c:589:16:589:16 | (unsigned int)... | 1.0 | -| test.c:589:16:589:21 | ... * ... | 7.24700382E8 | -| test.c:589:16:589:26 | ... * ... | 7.24700382E8 | -| test.c:589:16:589:31 | ... + ... | 7.24700382E8 | -| test.c:589:20:589:21 | ip | 7.24700382E8 | -| test.c:589:25:589:26 | 14 | 1.0 | -| test.c:589:25:589:26 | (unsigned int)... | 1.0 | -| test.c:589:30:589:31 | 32 | 1.0 | -| test.c:589:30:589:31 | (unsigned int)... | 1.0 | -| test.c:590:15:590:15 | 2 | 1.0 | -| test.c:590:15:590:15 | (unsigned int)... | 1.0 | -| test.c:590:15:590:32 | ... * ... | 7.24700382E8 | -| test.c:590:19:590:32 | (...) | 7.24700382E8 | -| test.c:590:20:590:21 | ip | 7.24700382E8 | -| test.c:590:20:590:26 | ... * ... | 7.24700382E8 | -| test.c:590:20:590:31 | ... + ... | 7.24700382E8 | -| test.c:590:25:590:26 | 14 | 1.0 | -| test.c:590:25:590:26 | (unsigned int)... | 1.0 | -| test.c:590:30:590:31 | 64 | 1.0 | -| test.c:590:30:590:31 | (unsigned int)... | 1.0 | -| test.c:591:15:596:28 | (...) | 3.044846887031571E27 | -| test.c:591:16:591:27 | (...) | 7.24700382E8 | -| test.c:591:16:591:32 | ... * ... | 7.24700382E8 | -| test.c:591:16:592:65 | ... > ... | 1.0 | -| test.c:591:16:596:27 | ... ? ... : ... | 3.044846887031571E27 | -| test.c:591:17:591:17 | 2 | 1.0 | -| test.c:591:17:591:17 | (unsigned int)... | 1.0 | -| test.c:591:17:591:22 | ... * ... | 7.24700382E8 | -| test.c:591:17:591:26 | ... + ... | 7.24700382E8 | -| test.c:591:21:591:22 | ip | 7.24700382E8 | -| test.c:591:26:591:26 | 1 | 1.0 | -| test.c:591:26:591:26 | (unsigned int)... | 1.0 | -| test.c:591:31:591:32 | 14 | 1.0 | -| test.c:591:31:591:32 | (unsigned int)... | 1.0 | -| test.c:592:15:592:65 | (...) | 5.251906436709459E17 | -| test.c:592:16:592:17 | 14 | 1.0 | -| test.c:592:16:592:17 | (unsigned int)... | 1.0 | -| test.c:592:16:592:28 | ... * ... | 7.24700382E8 | -| test.c:592:16:592:38 | ... > ... | 1.0 | -| test.c:592:16:592:64 | ... ? ... : ... | 5.251906436709459E17 | -| test.c:592:21:592:28 | (...) | 7.24700382E8 | -| test.c:592:22:592:22 | 2 | 1.0 | -| test.c:592:22:592:22 | (unsigned int)... | 1.0 | -| test.c:592:22:592:27 | ... * ... | 7.24700382E8 | -| test.c:592:26:592:27 | ip | 7.24700382E8 | -| test.c:592:32:592:33 | 17 | 1.0 | -| test.c:592:32:592:33 | (unsigned int)... | 1.0 | -| test.c:592:32:592:38 | ... * ... | 7.24700382E8 | -| test.c:592:37:592:38 | ip | 7.24700382E8 | -| test.c:592:42:592:43 | 17 | 1.0 | -| test.c:592:42:592:43 | (unsigned int)... | 1.0 | -| test.c:592:42:592:54 | ... * ... | 7.24700382E8 | -| test.c:592:47:592:54 | (...) | 7.24700382E8 | -| test.c:592:48:592:48 | 2 | 1.0 | -| test.c:592:48:592:48 | (unsigned int)... | 1.0 | -| test.c:592:48:592:53 | ... * ... | 7.24700382E8 | -| test.c:592:52:592:53 | ip | 7.24700382E8 | -| test.c:592:58:592:59 | 17 | 1.0 | -| test.c:592:58:592:59 | (unsigned int)... | 1.0 | -| test.c:592:58:592:64 | ... * ... | 7.24700382E8 | -| test.c:592:63:592:64 | ip | 7.24700382E8 | -| test.c:593:19:593:30 | (...) | 1.449400765E9 | -| test.c:593:19:593:35 | ... * ... | 1.449400765E9 | -| test.c:593:20:593:20 | 2 | 1.0 | -| test.c:593:20:593:20 | (unsigned int)... | 1.0 | -| test.c:593:20:593:25 | ... * ... | 1.449400765E9 | -| test.c:593:20:593:29 | ... + ... | 1.449400765E9 | -| test.c:593:24:593:25 | ip | 1.449400765E9 | -| test.c:593:29:593:29 | 1 | 1.0 | -| test.c:593:29:593:29 | (unsigned int)... | 1.0 | -| test.c:593:34:593:35 | 14 | 1.0 | -| test.c:593:34:593:35 | (unsigned int)... | 1.0 | -| test.c:594:19:594:20 | 14 | 1.0 | -| test.c:594:19:594:20 | (unsigned int)... | 1.0 | -| test.c:594:19:594:31 | ... * ... | 1.449400765E9 | -| test.c:594:19:594:41 | ... > ... | 1.0 | -| test.c:594:19:596:27 | ... ? ... : ... | 2.1007625775825853E18 | -| test.c:594:24:594:31 | (...) | 1.449400765E9 | -| test.c:594:25:594:25 | 2 | 1.0 | -| test.c:594:25:594:25 | (unsigned int)... | 1.0 | -| test.c:594:25:594:30 | ... * ... | 1.449400765E9 | -| test.c:594:29:594:30 | ip | 1.449400765E9 | -| test.c:594:35:594:36 | 17 | 1.0 | -| test.c:594:35:594:36 | (unsigned int)... | 1.0 | -| test.c:594:35:594:41 | ... * ... | 1.449400765E9 | -| test.c:594:40:594:41 | ip | 1.449400765E9 | -| test.c:595:21:595:22 | 14 | 1.0 | -| test.c:595:21:595:22 | (unsigned int)... | 1.0 | -| test.c:595:21:595:33 | ... * ... | 1.449400765E9 | -| test.c:595:26:595:33 | (...) | 1.449400765E9 | -| test.c:595:27:595:27 | 2 | 1.0 | -| test.c:595:27:595:27 | (unsigned int)... | 1.0 | -| test.c:595:27:595:32 | ... * ... | 1.449400765E9 | -| test.c:595:31:595:32 | ip | 1.449400765E9 | -| test.c:596:21:596:22 | 14 | 1.0 | -| test.c:596:21:596:22 | (unsigned int)... | 1.0 | -| test.c:596:21:596:27 | ... * ... | 1.449400765E9 | -| test.c:596:26:596:27 | ip | 1.449400765E9 | -| test.c:597:15:597:16 | 14 | 1.0 | -| test.c:597:15:597:16 | (unsigned int)... | 1.0 | -| test.c:597:15:597:21 | ... * ... | 7.24700382E8 | -| test.c:597:15:597:37 | ... > ... | 1.0 | -| test.c:597:15:599:29 | ... ? ... : ... | 5.251906436709459E17 | -| test.c:597:20:597:21 | ip | 7.24700382E8 | -| test.c:597:25:597:32 | (...) | 7.24700382E8 | -| test.c:597:25:597:37 | ... * ... | 7.24700382E8 | -| test.c:597:26:597:27 | ip | 7.24700382E8 | -| test.c:597:26:597:31 | ... + ... | 7.24700382E8 | -| test.c:597:31:597:31 | 1 | 1.0 | -| test.c:597:31:597:31 | (unsigned int)... | 1.0 | -| test.c:597:36:597:37 | 17 | 1.0 | -| test.c:597:36:597:37 | (unsigned int)... | 1.0 | -| test.c:598:17:598:18 | 14 | 1.0 | -| test.c:598:17:598:18 | (unsigned int)... | 1.0 | -| test.c:598:17:598:23 | ... * ... | 7.24700382E8 | -| test.c:598:22:598:23 | ip | 7.24700382E8 | -| test.c:599:17:599:24 | (...) | 7.24700382E8 | -| test.c:599:17:599:29 | ... * ... | 7.24700382E8 | -| test.c:599:18:599:19 | ip | 7.24700382E8 | -| test.c:599:18:599:23 | ... + ... | 7.24700382E8 | -| test.c:599:23:599:23 | 1 | 1.0 | -| test.c:599:23:599:23 | (unsigned int)... | 1.0 | -| test.c:599:28:599:29 | 14 | 1.0 | -| test.c:599:28:599:29 | (unsigned int)... | 1.0 | -| test.c:600:11:600:11 | 2 | 1.0 | -| test.c:600:11:600:11 | (unsigned int)... | 1.0 | -| test.c:600:11:600:28 | ... * ... | 5.797603059E9 | -| test.c:600:11:620:46 | ... + ... | 9.943431528813442E94 | -| test.c:600:15:600:28 | (...) | 5.797603059E9 | -| test.c:600:16:600:17 | ip | 5.797603059E9 | -| test.c:600:16:600:22 | ... * ... | 5.797603059E9 | -| test.c:600:16:600:27 | ... + ... | 5.797603059E9 | -| test.c:600:21:600:22 | 14 | 1.0 | -| test.c:600:21:600:22 | (unsigned int)... | 1.0 | -| test.c:600:26:600:27 | 32 | 1.0 | -| test.c:600:26:600:27 | (unsigned int)... | 1.0 | -| test.c:601:11:620:46 | (...) | 1.715093535659983E85 | -| test.c:601:12:601:12 | 4 | 1.0 | -| test.c:601:12:601:12 | (unsigned int)... | 1.0 | -| test.c:601:12:601:29 | ... * ... | 5.797603059E9 | -| test.c:601:12:602:30 | ... + ... | 3.361220122972616E19 | -| test.c:601:12:603:30 | ... + ... | 1.9487020066918396E29 | -| test.c:601:12:609:26 | ... + ... | 3.0379516094938436E59 | -| test.c:601:12:610:41 | ... > ... | 1.0 | -| test.c:601:12:620:45 | ... ? ... : ... | 1.715093535659983E85 | -| test.c:601:16:601:29 | (...) | 5.797603059E9 | -| test.c:601:17:601:18 | ip | 5.797603059E9 | -| test.c:601:17:601:23 | ... * ... | 5.797603059E9 | -| test.c:601:17:601:28 | ... + ... | 5.797603059E9 | -| test.c:601:22:601:23 | 14 | 1.0 | -| test.c:601:22:601:23 | (unsigned int)... | 1.0 | -| test.c:601:27:601:28 | 32 | 1.0 | -| test.c:601:27:601:28 | (unsigned int)... | 1.0 | -| test.c:602:13:602:30 | (...) | 5.797603059E9 | -| test.c:602:14:602:14 | 2 | 1.0 | -| test.c:602:14:602:14 | (unsigned int)... | 1.0 | -| test.c:602:14:602:19 | ... * ... | 5.797603059E9 | -| test.c:602:14:602:24 | ... * ... | 5.797603059E9 | -| test.c:602:14:602:29 | ... + ... | 5.797603059E9 | -| test.c:602:18:602:19 | ip | 5.797603059E9 | -| test.c:602:23:602:24 | 14 | 1.0 | -| test.c:602:23:602:24 | (unsigned int)... | 1.0 | -| test.c:602:28:602:29 | 32 | 1.0 | -| test.c:602:28:602:29 | (unsigned int)... | 1.0 | -| test.c:603:13:603:13 | 2 | 1.0 | -| test.c:603:13:603:13 | (unsigned int)... | 1.0 | -| test.c:603:13:603:30 | ... * ... | 5.797603059E9 | -| test.c:603:17:603:30 | (...) | 5.797603059E9 | -| test.c:603:18:603:19 | ip | 5.797603059E9 | -| test.c:603:18:603:24 | ... * ... | 5.797603059E9 | -| test.c:603:18:603:29 | ... + ... | 5.797603059E9 | -| test.c:603:23:603:24 | 14 | 1.0 | -| test.c:603:23:603:24 | (unsigned int)... | 1.0 | -| test.c:603:28:603:29 | 64 | 1.0 | -| test.c:603:28:603:29 | (unsigned int)... | 1.0 | -| test.c:604:13:609:26 | (...) | 1.558961605756818E30 | -| test.c:604:14:604:25 | (...) | 5.797603059E9 | -| test.c:604:14:604:30 | ... * ... | 5.797603059E9 | -| test.c:604:14:605:63 | ... > ... | 1.0 | -| test.c:604:14:609:25 | ... ? ... : ... | 1.558961605756818E30 | -| test.c:604:15:604:15 | 2 | 1.0 | -| test.c:604:15:604:15 | (unsigned int)... | 1.0 | -| test.c:604:15:604:20 | ... * ... | 5.797603059E9 | -| test.c:604:15:604:24 | ... + ... | 5.797603059E9 | -| test.c:604:19:604:20 | ip | 5.797603059E9 | -| test.c:604:24:604:24 | 1 | 1.0 | -| test.c:604:24:604:24 | (unsigned int)... | 1.0 | -| test.c:604:29:604:30 | 14 | 1.0 | -| test.c:604:29:604:30 | (unsigned int)... | 1.0 | -| test.c:605:13:605:63 | (...) | 3.361220122972616E19 | -| test.c:605:14:605:15 | 14 | 1.0 | -| test.c:605:14:605:15 | (unsigned int)... | 1.0 | -| test.c:605:14:605:26 | ... * ... | 5.797603059E9 | -| test.c:605:14:605:36 | ... > ... | 1.0 | -| test.c:605:14:605:62 | ... ? ... : ... | 3.361220122972616E19 | -| test.c:605:19:605:26 | (...) | 5.797603059E9 | -| test.c:605:20:605:20 | 2 | 1.0 | -| test.c:605:20:605:20 | (unsigned int)... | 1.0 | -| test.c:605:20:605:25 | ... * ... | 5.797603059E9 | -| test.c:605:24:605:25 | ip | 5.797603059E9 | -| test.c:605:30:605:31 | 17 | 1.0 | -| test.c:605:30:605:31 | (unsigned int)... | 1.0 | -| test.c:605:30:605:36 | ... * ... | 5.797603059E9 | -| test.c:605:35:605:36 | ip | 5.797603059E9 | -| test.c:605:40:605:41 | 17 | 1.0 | -| test.c:605:40:605:41 | (unsigned int)... | 1.0 | -| test.c:605:40:605:52 | ... * ... | 5.797603059E9 | -| test.c:605:45:605:52 | (...) | 5.797603059E9 | -| test.c:605:46:605:46 | 2 | 1.0 | -| test.c:605:46:605:46 | (unsigned int)... | 1.0 | -| test.c:605:46:605:51 | ... * ... | 5.797603059E9 | -| test.c:605:50:605:51 | ip | 5.797603059E9 | -| test.c:605:56:605:57 | 17 | 1.0 | -| test.c:605:56:605:57 | (unsigned int)... | 1.0 | -| test.c:605:56:605:62 | ... * ... | 5.797603059E9 | -| test.c:605:61:605:62 | ip | 5.797603059E9 | -| test.c:606:17:606:28 | (...) | 1.1595206119E10 | -| test.c:606:17:606:33 | ... * ... | 1.1595206119E10 | -| test.c:606:18:606:18 | 2 | 1.0 | -| test.c:606:18:606:18 | (unsigned int)... | 1.0 | -| test.c:606:18:606:23 | ... * ... | 1.1595206119E10 | -| test.c:606:18:606:27 | ... + ... | 1.1595206119E10 | -| test.c:606:22:606:23 | ip | 1.1595206119E10 | -| test.c:606:27:606:27 | 1 | 1.0 | -| test.c:606:27:606:27 | (unsigned int)... | 1.0 | -| test.c:606:32:606:33 | 14 | 1.0 | -| test.c:606:32:606:33 | (unsigned int)... | 1.0 | -| test.c:607:17:607:18 | 14 | 1.0 | -| test.c:607:17:607:18 | (unsigned int)... | 1.0 | -| test.c:607:17:607:29 | ... * ... | 1.1595206119E10 | -| test.c:607:17:607:39 | ... > ... | 1.0 | -| test.c:607:17:609:25 | ... ? ... : ... | 1.3444880494209504E20 | -| test.c:607:22:607:29 | (...) | 1.1595206119E10 | -| test.c:607:23:607:23 | 2 | 1.0 | -| test.c:607:23:607:23 | (unsigned int)... | 1.0 | -| test.c:607:23:607:28 | ... * ... | 1.1595206119E10 | -| test.c:607:27:607:28 | ip | 1.1595206119E10 | -| test.c:607:33:607:34 | 17 | 1.0 | -| test.c:607:33:607:34 | (unsigned int)... | 1.0 | -| test.c:607:33:607:39 | ... * ... | 1.1595206119E10 | -| test.c:607:38:607:39 | ip | 1.1595206119E10 | -| test.c:608:19:608:20 | 14 | 1.0 | -| test.c:608:19:608:20 | (unsigned int)... | 1.0 | -| test.c:608:19:608:31 | ... * ... | 1.1595206119E10 | -| test.c:608:24:608:31 | (...) | 1.1595206119E10 | -| test.c:608:25:608:25 | 2 | 1.0 | -| test.c:608:25:608:25 | (unsigned int)... | 1.0 | -| test.c:608:25:608:30 | ... * ... | 1.1595206119E10 | -| test.c:608:29:608:30 | ip | 1.1595206119E10 | -| test.c:609:19:609:20 | 14 | 1.0 | -| test.c:609:19:609:20 | (unsigned int)... | 1.0 | -| test.c:609:19:609:25 | ... * ... | 1.1595206119E10 | -| test.c:609:24:609:25 | ip | 1.1595206119E10 | -| test.c:610:11:610:11 | 2 | 1.0 | -| test.c:610:11:610:11 | (unsigned int)... | 1.0 | -| test.c:610:11:610:16 | ... * ... | 3.4785618357E10 | -| test.c:610:11:610:21 | ... * ... | 3.4785618357E10 | -| test.c:610:11:610:41 | ... + ... | 1.2100392444788552E21 | -| test.c:610:15:610:16 | ip | 3.4785618357E10 | -| test.c:610:20:610:21 | 14 | 1.0 | -| test.c:610:20:610:21 | (unsigned int)... | 1.0 | -| test.c:610:25:610:36 | (...) | 3.4785618357E10 | -| test.c:610:25:610:41 | ... * ... | 3.4785618357E10 | -| test.c:610:26:610:26 | 2 | 1.0 | -| test.c:610:26:610:26 | (unsigned int)... | 1.0 | -| test.c:610:26:610:31 | ... * ... | 3.4785618357E10 | -| test.c:610:26:610:35 | ... + ... | 3.4785618357E10 | -| test.c:610:30:610:31 | ip | 3.4785618357E10 | -| test.c:610:35:610:35 | 1 | 1.0 | -| test.c:610:35:610:35 | (unsigned int)... | 1.0 | -| test.c:610:40:610:41 | 17 | 1.0 | -| test.c:610:40:610:41 | (unsigned int)... | 1.0 | -| test.c:611:15:611:15 | 4 | 1.0 | -| test.c:611:15:611:15 | (unsigned int)... | 1.0 | -| test.c:611:15:611:32 | ... * ... | 3.4785618357E10 | -| test.c:611:15:612:32 | ... + ... | 1.2100392444788552E21 | -| test.c:611:15:613:32 | ... + ... | 4.209196335543408E31 | -| test.c:611:15:619:28 | ... + ... | 1.417386703353284E64 | -| test.c:611:19:611:32 | (...) | 3.4785618357E10 | -| test.c:611:20:611:21 | ip | 3.4785618357E10 | -| test.c:611:20:611:26 | ... * ... | 3.4785618357E10 | -| test.c:611:20:611:31 | ... + ... | 3.4785618357E10 | -| test.c:611:25:611:26 | 14 | 1.0 | -| test.c:611:25:611:26 | (unsigned int)... | 1.0 | -| test.c:611:30:611:31 | 32 | 1.0 | -| test.c:611:30:611:31 | (unsigned int)... | 1.0 | -| test.c:612:15:612:32 | (...) | 3.4785618357E10 | -| test.c:612:16:612:16 | 2 | 1.0 | -| test.c:612:16:612:16 | (unsigned int)... | 1.0 | -| test.c:612:16:612:21 | ... * ... | 3.4785618357E10 | -| test.c:612:16:612:26 | ... * ... | 3.4785618357E10 | -| test.c:612:16:612:31 | ... + ... | 3.4785618357E10 | -| test.c:612:20:612:21 | ip | 3.4785618357E10 | -| test.c:612:25:612:26 | 14 | 1.0 | -| test.c:612:25:612:26 | (unsigned int)... | 1.0 | -| test.c:612:30:612:31 | 32 | 1.0 | -| test.c:612:30:612:31 | (unsigned int)... | 1.0 | -| test.c:613:15:613:15 | 2 | 1.0 | -| test.c:613:15:613:15 | (unsigned int)... | 1.0 | -| test.c:613:15:613:32 | ... * ... | 3.4785618357E10 | -| test.c:613:19:613:32 | (...) | 3.4785618357E10 | -| test.c:613:20:613:21 | ip | 3.4785618357E10 | -| test.c:613:20:613:26 | ... * ... | 3.4785618357E10 | -| test.c:613:20:613:31 | ... + ... | 3.4785618357E10 | -| test.c:613:25:613:26 | 14 | 1.0 | -| test.c:613:25:613:26 | (unsigned int)... | 1.0 | -| test.c:613:30:613:31 | 64 | 1.0 | -| test.c:613:30:613:31 | (unsigned int)... | 1.0 | -| test.c:614:15:619:28 | (...) | 3.367357068579931E32 | -| test.c:614:16:614:27 | (...) | 3.4785618357E10 | -| test.c:614:16:614:32 | ... * ... | 3.4785618357E10 | -| test.c:614:16:615:65 | ... > ... | 1.0 | -| test.c:614:16:619:27 | ... ? ... : ... | 3.367357068579931E32 | -| test.c:614:17:614:17 | 2 | 1.0 | -| test.c:614:17:614:17 | (unsigned int)... | 1.0 | -| test.c:614:17:614:22 | ... * ... | 3.4785618357E10 | -| test.c:614:17:614:26 | ... + ... | 3.4785618357E10 | -| test.c:614:21:614:22 | ip | 3.4785618357E10 | -| test.c:614:26:614:26 | 1 | 1.0 | -| test.c:614:26:614:26 | (unsigned int)... | 1.0 | -| test.c:614:31:614:32 | 14 | 1.0 | -| test.c:614:31:614:32 | (unsigned int)... | 1.0 | -| test.c:615:15:615:65 | (...) | 1.2100392444788552E21 | -| test.c:615:16:615:17 | 14 | 1.0 | -| test.c:615:16:615:17 | (unsigned int)... | 1.0 | -| test.c:615:16:615:28 | ... * ... | 3.4785618357E10 | -| test.c:615:16:615:38 | ... > ... | 1.0 | -| test.c:615:16:615:64 | ... ? ... : ... | 1.2100392444788552E21 | -| test.c:615:21:615:28 | (...) | 3.4785618357E10 | -| test.c:615:22:615:22 | 2 | 1.0 | -| test.c:615:22:615:22 | (unsigned int)... | 1.0 | -| test.c:615:22:615:27 | ... * ... | 3.4785618357E10 | -| test.c:615:26:615:27 | ip | 3.4785618357E10 | -| test.c:615:32:615:33 | 17 | 1.0 | -| test.c:615:32:615:33 | (unsigned int)... | 1.0 | -| test.c:615:32:615:38 | ... * ... | 3.4785618357E10 | -| test.c:615:37:615:38 | ip | 3.4785618357E10 | -| test.c:615:42:615:43 | 17 | 1.0 | -| test.c:615:42:615:43 | (unsigned int)... | 1.0 | -| test.c:615:42:615:54 | ... * ... | 3.4785618357E10 | -| test.c:615:47:615:54 | (...) | 3.4785618357E10 | -| test.c:615:48:615:48 | 2 | 1.0 | -| test.c:615:48:615:48 | (unsigned int)... | 1.0 | -| test.c:615:48:615:53 | ... * ... | 3.4785618357E10 | -| test.c:615:52:615:53 | ip | 3.4785618357E10 | -| test.c:615:58:615:59 | 17 | 1.0 | -| test.c:615:58:615:59 | (unsigned int)... | 1.0 | -| test.c:615:58:615:64 | ... * ... | 3.4785618357E10 | -| test.c:615:63:615:64 | ip | 3.4785618357E10 | -| test.c:616:19:616:30 | (...) | 6.9571236715E10 | -| test.c:616:19:616:35 | ... * ... | 6.9571236715E10 | -| test.c:616:20:616:20 | 2 | 1.0 | -| test.c:616:20:616:20 | (unsigned int)... | 1.0 | -| test.c:616:20:616:25 | ... * ... | 6.9571236715E10 | -| test.c:616:20:616:29 | ... + ... | 6.9571236715E10 | -| test.c:616:24:616:25 | ip | 6.9571236715E10 | -| test.c:616:29:616:29 | 1 | 1.0 | -| test.c:616:29:616:29 | (unsigned int)... | 1.0 | -| test.c:616:34:616:35 | 14 | 1.0 | -| test.c:616:34:616:35 | (unsigned int)... | 1.0 | -| test.c:617:19:617:20 | 14 | 1.0 | -| test.c:617:19:617:20 | (unsigned int)... | 1.0 | -| test.c:617:19:617:31 | ... * ... | 6.9571236715E10 | -| test.c:617:19:617:41 | ... > ... | 1.0 | -| test.c:617:19:619:27 | ... ? ... : ... | 4.840156978054564E21 | -| test.c:617:24:617:31 | (...) | 6.9571236715E10 | -| test.c:617:25:617:25 | 2 | 1.0 | -| test.c:617:25:617:25 | (unsigned int)... | 1.0 | -| test.c:617:25:617:30 | ... * ... | 6.9571236715E10 | -| test.c:617:29:617:30 | ip | 6.9571236715E10 | -| test.c:617:35:617:36 | 17 | 1.0 | -| test.c:617:35:617:36 | (unsigned int)... | 1.0 | -| test.c:617:35:617:41 | ... * ... | 6.9571236715E10 | -| test.c:617:40:617:41 | ip | 6.9571236715E10 | -| test.c:618:21:618:22 | 14 | 1.0 | -| test.c:618:21:618:22 | (unsigned int)... | 1.0 | -| test.c:618:21:618:33 | ... * ... | 6.9571236715E10 | -| test.c:618:26:618:33 | (...) | 6.9571236715E10 | -| test.c:618:27:618:27 | 2 | 1.0 | -| test.c:618:27:618:27 | (unsigned int)... | 1.0 | -| test.c:618:27:618:32 | ... * ... | 6.9571236715E10 | -| test.c:618:31:618:32 | ip | 6.9571236715E10 | -| test.c:619:21:619:22 | 14 | 1.0 | -| test.c:619:21:619:22 | (unsigned int)... | 1.0 | -| test.c:619:21:619:27 | ... * ... | 6.9571236715E10 | -| test.c:619:26:619:27 | ip | 6.9571236715E10 | -| test.c:620:15:620:15 | 2 | 1.0 | -| test.c:620:15:620:15 | (unsigned int)... | 1.0 | -| test.c:620:15:620:20 | ... * ... | 3.4785618357E10 | -| test.c:620:15:620:25 | ... * ... | 3.4785618357E10 | -| test.c:620:15:620:45 | ... + ... | 1.2100392444788552E21 | -| test.c:620:19:620:20 | ip | 3.4785618357E10 | -| test.c:620:24:620:25 | 14 | 1.0 | -| test.c:620:24:620:25 | (unsigned int)... | 1.0 | -| test.c:620:29:620:40 | (...) | 3.4785618357E10 | -| test.c:620:29:620:45 | ... * ... | 3.4785618357E10 | -| test.c:620:30:620:30 | 2 | 1.0 | -| test.c:620:30:620:30 | (unsigned int)... | 1.0 | -| test.c:620:30:620:35 | ... * ... | 3.4785618357E10 | -| test.c:620:30:620:39 | ... + ... | 3.4785618357E10 | -| test.c:620:34:620:35 | ip | 3.4785618357E10 | -| test.c:620:39:620:39 | 1 | 1.0 | -| test.c:620:39:620:39 | (unsigned int)... | 1.0 | -| test.c:620:44:620:45 | 17 | 1.0 | -| test.c:620:44:620:45 | (unsigned int)... | 1.0 | -| test.c:621:11:621:11 | 4 | 1.0 | -| test.c:621:11:621:11 | (unsigned int)... | 1.0 | -| test.c:621:11:621:28 | ... * ... | 5.797603059E9 | -| test.c:621:11:622:32 | ... + ... | 3.361220122972616E19 | -| test.c:621:11:623:32 | ... + ... | 1.9487020066918396E29 | -| test.c:621:11:629:28 | ... + ... | 3.0379516094938436E59 | -| test.c:621:11:630:63 | ... > ... | 1.0 | -| test.c:621:11:642:27 | ... ? ... : ... | 4.390639451194891E87 | -| test.c:621:15:621:28 | (...) | 5.797603059E9 | -| test.c:621:16:621:17 | ip | 5.797603059E9 | -| test.c:621:16:621:22 | ... * ... | 5.797603059E9 | -| test.c:621:16:621:27 | ... + ... | 5.797603059E9 | -| test.c:621:21:621:22 | 14 | 1.0 | -| test.c:621:21:621:22 | (unsigned int)... | 1.0 | -| test.c:621:26:621:27 | 32 | 1.0 | -| test.c:621:26:621:27 | (unsigned int)... | 1.0 | -| test.c:622:15:622:32 | (...) | 5.797603059E9 | -| test.c:622:16:622:16 | 2 | 1.0 | -| test.c:622:16:622:16 | (unsigned int)... | 1.0 | -| test.c:622:16:622:21 | ... * ... | 5.797603059E9 | -| test.c:622:16:622:26 | ... * ... | 5.797603059E9 | -| test.c:622:16:622:31 | ... + ... | 5.797603059E9 | -| test.c:622:20:622:21 | ip | 5.797603059E9 | -| test.c:622:25:622:26 | 14 | 1.0 | -| test.c:622:25:622:26 | (unsigned int)... | 1.0 | -| test.c:622:30:622:31 | 32 | 1.0 | -| test.c:622:30:622:31 | (unsigned int)... | 1.0 | -| test.c:623:15:623:15 | 2 | 1.0 | -| test.c:623:15:623:15 | (unsigned int)... | 1.0 | -| test.c:623:15:623:32 | ... * ... | 5.797603059E9 | -| test.c:623:19:623:32 | (...) | 5.797603059E9 | -| test.c:623:20:623:21 | ip | 5.797603059E9 | -| test.c:623:20:623:26 | ... * ... | 5.797603059E9 | -| test.c:623:20:623:31 | ... + ... | 5.797603059E9 | -| test.c:623:25:623:26 | 14 | 1.0 | -| test.c:623:25:623:26 | (unsigned int)... | 1.0 | -| test.c:623:30:623:31 | 64 | 1.0 | -| test.c:623:30:623:31 | (unsigned int)... | 1.0 | -| test.c:624:15:629:28 | (...) | 1.558961605756818E30 | -| test.c:624:16:624:27 | (...) | 5.797603059E9 | -| test.c:624:16:624:32 | ... * ... | 5.797603059E9 | -| test.c:624:16:625:65 | ... > ... | 1.0 | -| test.c:624:16:629:27 | ... ? ... : ... | 1.558961605756818E30 | -| test.c:624:17:624:17 | 2 | 1.0 | -| test.c:624:17:624:17 | (unsigned int)... | 1.0 | -| test.c:624:17:624:22 | ... * ... | 5.797603059E9 | -| test.c:624:17:624:26 | ... + ... | 5.797603059E9 | -| test.c:624:21:624:22 | ip | 5.797603059E9 | -| test.c:624:26:624:26 | 1 | 1.0 | -| test.c:624:26:624:26 | (unsigned int)... | 1.0 | -| test.c:624:31:624:32 | 14 | 1.0 | -| test.c:624:31:624:32 | (unsigned int)... | 1.0 | -| test.c:625:15:625:65 | (...) | 3.361220122972616E19 | -| test.c:625:16:625:17 | 14 | 1.0 | -| test.c:625:16:625:17 | (unsigned int)... | 1.0 | -| test.c:625:16:625:28 | ... * ... | 5.797603059E9 | -| test.c:625:16:625:38 | ... > ... | 1.0 | -| test.c:625:16:625:64 | ... ? ... : ... | 3.361220122972616E19 | -| test.c:625:21:625:28 | (...) | 5.797603059E9 | -| test.c:625:22:625:22 | 2 | 1.0 | -| test.c:625:22:625:22 | (unsigned int)... | 1.0 | -| test.c:625:22:625:27 | ... * ... | 5.797603059E9 | -| test.c:625:26:625:27 | ip | 5.797603059E9 | -| test.c:625:32:625:33 | 17 | 1.0 | -| test.c:625:32:625:33 | (unsigned int)... | 1.0 | -| test.c:625:32:625:38 | ... * ... | 5.797603059E9 | -| test.c:625:37:625:38 | ip | 5.797603059E9 | -| test.c:625:42:625:43 | 17 | 1.0 | -| test.c:625:42:625:43 | (unsigned int)... | 1.0 | -| test.c:625:42:625:54 | ... * ... | 5.797603059E9 | -| test.c:625:47:625:54 | (...) | 5.797603059E9 | -| test.c:625:48:625:48 | 2 | 1.0 | -| test.c:625:48:625:48 | (unsigned int)... | 1.0 | -| test.c:625:48:625:53 | ... * ... | 5.797603059E9 | -| test.c:625:52:625:53 | ip | 5.797603059E9 | -| test.c:625:58:625:59 | 17 | 1.0 | -| test.c:625:58:625:59 | (unsigned int)... | 1.0 | -| test.c:625:58:625:64 | ... * ... | 5.797603059E9 | -| test.c:625:63:625:64 | ip | 5.797603059E9 | -| test.c:626:19:626:30 | (...) | 1.1595206119E10 | -| test.c:626:19:626:35 | ... * ... | 1.1595206119E10 | -| test.c:626:20:626:20 | 2 | 1.0 | -| test.c:626:20:626:20 | (unsigned int)... | 1.0 | -| test.c:626:20:626:25 | ... * ... | 1.1595206119E10 | -| test.c:626:20:626:29 | ... + ... | 1.1595206119E10 | -| test.c:626:24:626:25 | ip | 1.1595206119E10 | -| test.c:626:29:626:29 | 1 | 1.0 | -| test.c:626:29:626:29 | (unsigned int)... | 1.0 | -| test.c:626:34:626:35 | 14 | 1.0 | -| test.c:626:34:626:35 | (unsigned int)... | 1.0 | -| test.c:627:19:627:20 | 14 | 1.0 | -| test.c:627:19:627:20 | (unsigned int)... | 1.0 | -| test.c:627:19:627:31 | ... * ... | 1.1595206119E10 | -| test.c:627:19:627:41 | ... > ... | 1.0 | -| test.c:627:19:629:27 | ... ? ... : ... | 1.3444880494209504E20 | -| test.c:627:24:627:31 | (...) | 1.1595206119E10 | -| test.c:627:25:627:25 | 2 | 1.0 | -| test.c:627:25:627:25 | (unsigned int)... | 1.0 | -| test.c:627:25:627:30 | ... * ... | 1.1595206119E10 | -| test.c:627:29:627:30 | ip | 1.1595206119E10 | -| test.c:627:35:627:36 | 17 | 1.0 | -| test.c:627:35:627:36 | (unsigned int)... | 1.0 | -| test.c:627:35:627:41 | ... * ... | 1.1595206119E10 | -| test.c:627:40:627:41 | ip | 1.1595206119E10 | -| test.c:628:21:628:22 | 14 | 1.0 | -| test.c:628:21:628:22 | (unsigned int)... | 1.0 | -| test.c:628:21:628:33 | ... * ... | 1.1595206119E10 | -| test.c:628:26:628:33 | (...) | 1.1595206119E10 | -| test.c:628:27:628:27 | 2 | 1.0 | -| test.c:628:27:628:27 | (unsigned int)... | 1.0 | -| test.c:628:27:628:32 | ... * ... | 1.1595206119E10 | -| test.c:628:31:628:32 | ip | 1.1595206119E10 | -| test.c:629:21:629:22 | 14 | 1.0 | -| test.c:629:21:629:22 | (unsigned int)... | 1.0 | -| test.c:629:21:629:27 | ... * ... | 1.1595206119E10 | -| test.c:629:26:629:27 | ip | 1.1595206119E10 | -| test.c:630:13:630:63 | (...) | 1.2100392444788552E21 | -| test.c:630:14:630:15 | 14 | 1.0 | -| test.c:630:14:630:15 | (unsigned int)... | 1.0 | -| test.c:630:14:630:20 | ... * ... | 3.4785618357E10 | -| test.c:630:14:630:36 | ... > ... | 1.0 | -| test.c:630:14:630:62 | ... ? ... : ... | 1.2100392444788552E21 | -| test.c:630:19:630:20 | ip | 3.4785618357E10 | -| test.c:630:24:630:31 | (...) | 3.4785618357E10 | -| test.c:630:24:630:36 | ... * ... | 3.4785618357E10 | -| test.c:630:25:630:26 | ip | 3.4785618357E10 | -| test.c:630:25:630:30 | ... + ... | 3.4785618357E10 | -| test.c:630:30:630:30 | 1 | 1.0 | -| test.c:630:30:630:30 | (unsigned int)... | 1.0 | -| test.c:630:35:630:36 | 17 | 1.0 | -| test.c:630:35:630:36 | (unsigned int)... | 1.0 | -| test.c:630:40:630:41 | 17 | 1.0 | -| test.c:630:40:630:41 | (unsigned int)... | 1.0 | -| test.c:630:40:630:46 | ... * ... | 3.4785618357E10 | -| test.c:630:45:630:46 | ip | 3.4785618357E10 | -| test.c:630:50:630:57 | (...) | 3.4785618357E10 | -| test.c:630:50:630:62 | ... * ... | 3.4785618357E10 | -| test.c:630:51:630:52 | ip | 3.4785618357E10 | -| test.c:630:51:630:56 | ... + ... | 3.4785618357E10 | -| test.c:630:56:630:56 | 1 | 1.0 | -| test.c:630:56:630:56 | (unsigned int)... | 1.0 | -| test.c:630:61:630:62 | 17 | 1.0 | -| test.c:630:61:630:62 | (unsigned int)... | 1.0 | -| test.c:631:13:631:13 | 4 | 1.0 | -| test.c:631:13:631:13 | (unsigned int)... | 1.0 | -| test.c:631:13:631:30 | ... * ... | 6.9571236714E10 | -| test.c:631:13:632:30 | ... + ... | 4.840156977915421E21 | -| test.c:631:13:633:30 | ... + ... | 3.3673570684347266E32 | -| test.c:631:13:639:26 | ... + ... | 9.071274901265435E65 | -| test.c:631:17:631:30 | (...) | 6.9571236714E10 | -| test.c:631:18:631:19 | ip | 6.9571236714E10 | -| test.c:631:18:631:24 | ... * ... | 6.9571236714E10 | -| test.c:631:18:631:29 | ... + ... | 6.9571236714E10 | -| test.c:631:23:631:24 | 14 | 1.0 | -| test.c:631:23:631:24 | (unsigned int)... | 1.0 | -| test.c:631:28:631:29 | 32 | 1.0 | -| test.c:631:28:631:29 | (unsigned int)... | 1.0 | -| test.c:632:13:632:30 | (...) | 6.9571236714E10 | -| test.c:632:14:632:14 | 2 | 1.0 | -| test.c:632:14:632:14 | (unsigned int)... | 1.0 | -| test.c:632:14:632:19 | ... * ... | 6.9571236714E10 | -| test.c:632:14:632:24 | ... * ... | 6.9571236714E10 | -| test.c:632:14:632:29 | ... + ... | 6.9571236714E10 | -| test.c:632:18:632:19 | ip | 6.9571236714E10 | -| test.c:632:23:632:24 | 14 | 1.0 | -| test.c:632:23:632:24 | (unsigned int)... | 1.0 | -| test.c:632:28:632:29 | 32 | 1.0 | -| test.c:632:28:632:29 | (unsigned int)... | 1.0 | -| test.c:633:13:633:13 | 2 | 1.0 | -| test.c:633:13:633:13 | (unsigned int)... | 1.0 | -| test.c:633:13:633:30 | ... * ... | 6.9571236714E10 | -| test.c:633:17:633:30 | (...) | 6.9571236714E10 | -| test.c:633:18:633:19 | ip | 6.9571236714E10 | -| test.c:633:18:633:24 | ... * ... | 6.9571236714E10 | -| test.c:633:18:633:29 | ... + ... | 6.9571236714E10 | -| test.c:633:23:633:24 | 14 | 1.0 | -| test.c:633:23:633:24 | (unsigned int)... | 1.0 | -| test.c:633:28:633:29 | 64 | 1.0 | -| test.c:633:28:633:29 | (unsigned int)... | 1.0 | -| test.c:634:13:639:26 | (...) | 2.693885654805863E33 | -| test.c:634:14:634:25 | (...) | 6.9571236714E10 | -| test.c:634:14:634:30 | ... * ... | 6.9571236714E10 | -| test.c:634:14:635:63 | ... > ... | 1.0 | -| test.c:634:14:639:25 | ... ? ... : ... | 2.693885654805863E33 | -| test.c:634:15:634:15 | 2 | 1.0 | -| test.c:634:15:634:15 | (unsigned int)... | 1.0 | -| test.c:634:15:634:20 | ... * ... | 6.9571236714E10 | -| test.c:634:15:634:24 | ... + ... | 6.9571236714E10 | -| test.c:634:19:634:20 | ip | 6.9571236714E10 | -| test.c:634:24:634:24 | 1 | 1.0 | -| test.c:634:24:634:24 | (unsigned int)... | 1.0 | -| test.c:634:29:634:30 | 14 | 1.0 | -| test.c:634:29:634:30 | (unsigned int)... | 1.0 | -| test.c:635:13:635:63 | (...) | 4.840156977915421E21 | -| test.c:635:14:635:15 | 14 | 1.0 | -| test.c:635:14:635:15 | (unsigned int)... | 1.0 | -| test.c:635:14:635:26 | ... * ... | 6.9571236714E10 | -| test.c:635:14:635:36 | ... > ... | 1.0 | -| test.c:635:14:635:62 | ... ? ... : ... | 4.840156977915421E21 | -| test.c:635:19:635:26 | (...) | 6.9571236714E10 | -| test.c:635:20:635:20 | 2 | 1.0 | -| test.c:635:20:635:20 | (unsigned int)... | 1.0 | -| test.c:635:20:635:25 | ... * ... | 6.9571236714E10 | -| test.c:635:24:635:25 | ip | 6.9571236714E10 | -| test.c:635:30:635:31 | 17 | 1.0 | -| test.c:635:30:635:31 | (unsigned int)... | 1.0 | -| test.c:635:30:635:36 | ... * ... | 6.9571236714E10 | -| test.c:635:35:635:36 | ip | 6.9571236714E10 | -| test.c:635:40:635:41 | 17 | 1.0 | -| test.c:635:40:635:41 | (unsigned int)... | 1.0 | -| test.c:635:40:635:52 | ... * ... | 6.9571236714E10 | -| test.c:635:45:635:52 | (...) | 6.9571236714E10 | -| test.c:635:46:635:46 | 2 | 1.0 | -| test.c:635:46:635:46 | (unsigned int)... | 1.0 | -| test.c:635:46:635:51 | ... * ... | 6.9571236714E10 | -| test.c:635:50:635:51 | ip | 6.9571236714E10 | -| test.c:635:56:635:57 | 17 | 1.0 | -| test.c:635:56:635:57 | (unsigned int)... | 1.0 | -| test.c:635:56:635:62 | ... * ... | 6.9571236714E10 | -| test.c:635:61:635:62 | ip | 6.9571236714E10 | -| test.c:636:17:636:28 | (...) | 1.39142473429E11 | -| test.c:636:17:636:33 | ... * ... | 1.39142473429E11 | -| test.c:636:18:636:18 | 2 | 1.0 | -| test.c:636:18:636:18 | (unsigned int)... | 1.0 | -| test.c:636:18:636:23 | ... * ... | 1.39142473429E11 | -| test.c:636:18:636:27 | ... + ... | 1.39142473429E11 | -| test.c:636:22:636:23 | ip | 1.39142473429E11 | -| test.c:636:27:636:27 | 1 | 1.0 | -| test.c:636:27:636:27 | (unsigned int)... | 1.0 | -| test.c:636:32:636:33 | 14 | 1.0 | -| test.c:636:32:636:33 | (unsigned int)... | 1.0 | -| test.c:637:17:637:18 | 14 | 1.0 | -| test.c:637:17:637:18 | (unsigned int)... | 1.0 | -| test.c:637:17:637:29 | ... * ... | 1.39142473429E11 | -| test.c:637:17:637:39 | ... > ... | 1.0 | -| test.c:637:17:639:25 | ... ? ... : ... | 1.936062791193997E22 | -| test.c:637:22:637:29 | (...) | 1.39142473429E11 | -| test.c:637:23:637:23 | 2 | 1.0 | -| test.c:637:23:637:23 | (unsigned int)... | 1.0 | -| test.c:637:23:637:28 | ... * ... | 1.39142473429E11 | -| test.c:637:27:637:28 | ip | 1.39142473429E11 | -| test.c:637:33:637:34 | 17 | 1.0 | -| test.c:637:33:637:34 | (unsigned int)... | 1.0 | -| test.c:637:33:637:39 | ... * ... | 1.39142473429E11 | -| test.c:637:38:637:39 | ip | 1.39142473429E11 | -| test.c:638:19:638:20 | 14 | 1.0 | -| test.c:638:19:638:20 | (unsigned int)... | 1.0 | -| test.c:638:19:638:31 | ... * ... | 1.39142473429E11 | -| test.c:638:24:638:31 | (...) | 1.39142473429E11 | -| test.c:638:25:638:25 | 2 | 1.0 | -| test.c:638:25:638:25 | (unsigned int)... | 1.0 | -| test.c:638:25:638:30 | ... * ... | 1.39142473429E11 | -| test.c:638:29:638:30 | ip | 1.39142473429E11 | -| test.c:639:19:639:20 | 14 | 1.0 | -| test.c:639:19:639:20 | (unsigned int)... | 1.0 | -| test.c:639:19:639:25 | ... * ... | 1.39142473429E11 | -| test.c:639:24:639:25 | ip | 1.39142473429E11 | -| test.c:640:13:640:14 | 14 | 1.0 | -| test.c:640:13:640:14 | (unsigned int)... | 1.0 | -| test.c:640:13:640:19 | ... * ... | 6.9571236714E10 | -| test.c:640:13:640:35 | ... > ... | 1.0 | -| test.c:640:13:642:27 | ... ? ... : ... | 4.840156977915421E21 | -| test.c:640:18:640:19 | ip | 6.9571236714E10 | -| test.c:640:23:640:30 | (...) | 6.9571236714E10 | -| test.c:640:23:640:35 | ... * ... | 6.9571236714E10 | -| test.c:640:24:640:25 | ip | 6.9571236714E10 | -| test.c:640:24:640:29 | ... + ... | 6.9571236714E10 | -| test.c:640:29:640:29 | 1 | 1.0 | -| test.c:640:29:640:29 | (unsigned int)... | 1.0 | -| test.c:640:34:640:35 | 17 | 1.0 | -| test.c:640:34:640:35 | (unsigned int)... | 1.0 | -| test.c:641:15:641:16 | 14 | 1.0 | -| test.c:641:15:641:16 | (unsigned int)... | 1.0 | -| test.c:641:15:641:21 | ... * ... | 6.9571236714E10 | -| test.c:641:20:641:21 | ip | 6.9571236714E10 | -| test.c:642:15:642:22 | (...) | 6.9571236714E10 | -| test.c:642:15:642:27 | ... * ... | 6.9571236714E10 | -| test.c:642:16:642:17 | ip | 6.9571236714E10 | -| test.c:642:16:642:21 | ... + ... | 6.9571236714E10 | -| test.c:642:21:642:21 | 1 | 1.0 | -| test.c:642:21:642:21 | (unsigned int)... | 1.0 | -| test.c:642:26:642:27 | 14 | 1.0 | -| test.c:642:26:642:27 | (unsigned int)... | 1.0 | -| test.c:643:10:643:23 | special_number | 1.297918419127476E201 | -| test.c:650:10:650:11 | 0 | 1.0 | -| test.c:651:7:651:8 | c1 | 1.0 | -| test.c:651:13:651:13 | x | 1.0 | -| test.c:651:13:651:23 | ... += ... | 1.0 | -| test.c:651:18:651:23 | 748596 | 1.0 | -| test.c:652:7:652:8 | c2 | 1.0 | -| test.c:652:13:652:13 | x | 2.0 | -| test.c:652:13:652:25 | ... += ... | 2.0 | -| test.c:652:18:652:25 | 84652395 | 1.0 | -| test.c:653:7:653:8 | c3 | 1.0 | -| test.c:653:13:653:13 | x | 4.0 | -| test.c:653:13:653:24 | ... += ... | 4.0 | -| test.c:653:18:653:24 | 3675895 | 1.0 | -| test.c:654:7:654:8 | c4 | 1.0 | -| test.c:654:13:654:13 | x | 8.0 | -| test.c:654:13:654:22 | ... += ... | 8.0 | -| test.c:654:18:654:22 | 98634 | 1.0 | -| test.c:655:7:655:8 | c5 | 1.0 | -| test.c:655:13:655:13 | x | 16.0 | -| test.c:655:13:655:24 | ... += ... | 16.0 | -| test.c:655:18:655:24 | 7834985 | 1.0 | -| test.c:656:7:656:8 | c1 | 2.0 | -| test.c:656:7:656:14 | ... && ... | 1.0 | -| test.c:656:13:656:14 | c2 | 2.0 | -| test.c:656:19:656:19 | x | 32.0 | -| test.c:656:19:656:32 | ... += ... | 32.0 | -| test.c:656:24:656:32 | 938457398 | 1.0 | -| test.c:657:7:657:8 | c1 | 3.0 | -| test.c:657:7:657:14 | ... && ... | 1.0 | -| test.c:657:13:657:14 | c3 | 2.0 | -| test.c:657:19:657:19 | x | 64.0 | -| test.c:657:19:657:31 | ... += ... | 64.0 | -| test.c:657:24:657:31 | 73895648 | 1.0 | -| test.c:658:7:658:8 | c1 | 4.0 | -| test.c:658:7:658:14 | ... && ... | 1.0 | -| test.c:658:13:658:14 | c4 | 2.0 | -| test.c:658:19:658:19 | x | 128.0 | -| test.c:658:19:658:31 | ... += ... | 128.0 | -| test.c:658:24:658:31 | 12345432 | 1.0 | -| test.c:659:7:659:8 | c1 | 5.0 | -| test.c:659:7:659:14 | ... && ... | 1.0 | -| test.c:659:13:659:14 | c5 | 2.0 | -| test.c:659:19:659:19 | x | 256.0 | -| test.c:659:19:659:28 | ... += ... | 256.0 | -| test.c:659:24:659:28 | 38847 | 1.0 | -| test.c:660:7:660:8 | c2 | 5.0 | -| test.c:660:7:660:14 | ... && ... | 1.0 | -| test.c:660:13:660:14 | c3 | 5.0 | -| test.c:660:19:660:19 | x | 512.0 | -| test.c:660:19:660:26 | ... += ... | 512.0 | -| test.c:660:24:660:26 | 234 | 1.0 | -| test.c:662:11:662:11 | x | 1024.0 | -| test.c:662:11:662:15 | ... + ... | 1048576.0 | -| test.c:662:11:662:19 | ... + ... | 1.073741824E9 | -| test.c:662:11:662:23 | ... + ... | 1.099511627776E12 | -| test.c:662:11:662:27 | ... + ... | 1.125899906842624E15 | -| test.c:662:11:662:31 | ... + ... | 1.152921504606847E18 | -| test.c:662:11:662:35 | ... + ... | 1.1805916207174113E21 | -| test.c:662:11:662:39 | ... + ... | 1.2089258196146292E24 | -| test.c:662:11:662:43 | ... + ... | 1.2379400392853803E27 | -| test.c:662:11:662:47 | ... + ... | 1.2676506002282294E30 | -| test.c:662:11:662:51 | ... + ... | 1.298074214633707E33 | -| test.c:662:11:662:55 | ... + ... | 1.329227995784916E36 | -| test.c:662:15:662:15 | x | 1024.0 | -| test.c:662:19:662:19 | x | 1024.0 | -| test.c:662:23:662:23 | x | 1024.0 | -| test.c:662:27:662:27 | x | 1024.0 | -| test.c:662:31:662:31 | x | 1024.0 | -| test.c:662:35:662:35 | x | 1024.0 | -| test.c:662:39:662:39 | x | 1024.0 | -| test.c:662:43:662:43 | x | 1024.0 | -| test.c:662:47:662:47 | x | 1024.0 | -| test.c:662:51:662:51 | x | 1024.0 | -| test.c:662:55:662:55 | x | 1024.0 | -| test.c:663:10:663:10 | y | 1.329227995784916E36 | -| test.c:668:20:668:20 | x | 1.0 | -| test.c:668:20:668:26 | ... < ... | 1.0 | -| test.c:668:20:668:36 | ... ? ... : ... | 1.0 | -| test.c:668:24:668:26 | 100 | 1.0 | -| test.c:668:24:668:26 | (unsigned int)... | 1.0 | -| test.c:668:30:668:30 | x | 1.0 | -| test.c:668:34:668:36 | 100 | 1.0 | -| test.c:668:34:668:36 | (unsigned int)... | 1.0 | -| test.c:671:3:671:4 | y1 | 1.0 | -| test.c:671:9:671:11 | ++ ... | 1.0 | -| test.c:671:11:671:11 | y | 1.0 | -| test.c:672:3:672:4 | y2 | 1.0 | -| test.c:672:19:672:19 | 3 | 1.0 | -| test.c:672:19:672:19 | (unsigned int)... | 1.0 | -| test.c:681:3:681:3 | i | 1.0 | -| test.c:681:3:681:8 | ... = ... | 1.0 | -| test.c:681:7:681:8 | 10 | 1.0 | -| test.c:682:7:682:7 | i | 1.0 | -| test.c:684:3:684:3 | i | 1.0 | -| test.c:684:3:684:8 | ... = ... | 1.0 | -| test.c:684:7:684:8 | 10 | 1.0 | -| test.c:685:3:685:3 | i | 1.0 | -| test.c:685:3:685:9 | ... += ... | 1.0 | -| test.c:685:8:685:9 | 10 | 1.0 | -| test.c:686:7:686:7 | i | 1.0 | -| test.c:688:3:688:3 | i | 1.0 | -| test.c:688:3:688:8 | ... = ... | 1.0 | -| test.c:688:7:688:8 | 40 | 1.0 | -| test.c:689:3:689:3 | i | 1.0 | -| test.c:689:3:689:9 | ... -= ... | 1.0 | -| test.c:689:8:689:9 | 10 | 1.0 | -| test.c:690:7:690:7 | i | 1.0 | -| test.c:692:3:692:3 | i | 1.0 | -| test.c:692:3:692:12 | ... = ... | 1.0 | -| test.c:692:7:692:7 | j | 1.0 | -| test.c:692:7:692:12 | ... = ... | 1.0 | -| test.c:692:11:692:12 | 40 | 1.0 | -| test.c:693:7:693:7 | i | 1.0 | -| test.c:695:3:695:3 | i | 1.0 | -| test.c:695:3:695:15 | ... = ... | 1.0 | -| test.c:695:7:695:15 | (...) | 1.0 | -| test.c:695:8:695:8 | j | 1.0 | -| test.c:695:8:695:14 | ... += ... | 1.0 | -| test.c:695:13:695:14 | 10 | 1.0 | -| test.c:696:7:696:7 | i | 1.0 | -| test.c:698:3:698:3 | i | 1.0 | -| test.c:698:3:698:20 | ... = ... | 1.0 | -| test.c:698:7:698:8 | 20 | 1.0 | -| test.c:698:7:698:20 | ... + ... | 1.0 | -| test.c:698:12:698:20 | (...) | 1.0 | -| test.c:698:13:698:13 | j | 1.0 | -| test.c:698:13:698:19 | ... -= ... | 1.0 | -| test.c:698:18:698:19 | 10 | 1.0 | -| test.c:699:7:699:7 | i | 1.0 | -| test.c:704:14:704:15 | 0 | 1.0 | -| test.c:706:7:706:7 | 3 | 1.0 | -| test.c:706:7:706:7 | (unsigned int)... | 1.0 | -| test.c:706:7:706:12 | ... <= ... | 1.0 | -| test.c:706:7:706:23 | ... && ... | 1.0 | -| test.c:706:7:706:33 | ... && ... | 1.0 | -| test.c:706:7:706:44 | ... && ... | 1.0 | -| test.c:706:12:706:12 | a | 1.0 | -| test.c:706:17:706:17 | a | 1.0 | -| test.c:706:17:706:23 | ... <= ... | 1.0 | -| test.c:706:22:706:23 | 11 | 1.0 | -| test.c:706:22:706:23 | (unsigned int)... | 1.0 | -| test.c:706:28:706:28 | 5 | 1.0 | -| test.c:706:28:706:28 | (unsigned int)... | 1.0 | -| test.c:706:28:706:33 | ... <= ... | 1.0 | -| test.c:706:33:706:33 | b | 1.0 | -| test.c:706:38:706:38 | b | 1.0 | -| test.c:706:38:706:44 | ... <= ... | 1.0 | -| test.c:706:43:706:44 | 23 | 1.0 | -| test.c:706:43:706:44 | (unsigned int)... | 1.0 | -| test.c:707:13:707:13 | a | 1.0 | -| test.c:707:13:707:15 | (int)... | 1.0 | -| test.c:707:13:707:15 | ... * ... | 1.0 | -| test.c:707:15:707:15 | b | 1.0 | -| test.c:708:5:708:9 | total | 1.0 | -| test.c:708:5:708:14 | ... += ... | 1.0 | -| test.c:708:14:708:14 | r | 1.0 | -| test.c:710:7:710:7 | 3 | 1.0 | -| test.c:710:7:710:7 | (unsigned int)... | 1.0 | -| test.c:710:7:710:12 | ... <= ... | 1.0 | -| test.c:710:7:710:23 | ... && ... | 1.0 | -| test.c:710:7:710:33 | ... && ... | 1.0 | -| test.c:710:7:710:44 | ... && ... | 1.0 | -| test.c:710:12:710:12 | a | 2.0 | -| test.c:710:17:710:17 | a | 2.0 | -| test.c:710:17:710:23 | ... <= ... | 1.0 | -| test.c:710:22:710:23 | 11 | 1.0 | -| test.c:710:22:710:23 | (unsigned int)... | 1.0 | -| test.c:710:28:710:28 | 0 | 1.0 | -| test.c:710:28:710:28 | (unsigned int)... | 1.0 | -| test.c:710:28:710:33 | ... <= ... | 1.0 | -| test.c:710:33:710:33 | b | 3.0 | -| test.c:710:38:710:38 | b | 3.0 | -| test.c:710:38:710:44 | ... <= ... | 1.0 | -| test.c:710:43:710:44 | 23 | 1.0 | -| test.c:710:43:710:44 | (unsigned int)... | 1.0 | -| test.c:711:13:711:13 | a | 2.0 | -| test.c:711:13:711:15 | (int)... | 6.0 | -| test.c:711:13:711:15 | ... * ... | 6.0 | -| test.c:711:15:711:15 | b | 3.0 | -| test.c:712:5:712:9 | total | 2.0 | -| test.c:712:5:712:14 | ... += ... | 12.0 | -| test.c:712:14:712:14 | r | 6.0 | -| test.c:714:7:714:7 | 3 | 1.0 | -| test.c:714:7:714:7 | (unsigned int)... | 1.0 | -| test.c:714:7:714:12 | ... <= ... | 1.0 | -| test.c:714:7:714:23 | ... && ... | 1.0 | -| test.c:714:7:714:34 | ... && ... | 1.0 | -| test.c:714:7:714:45 | ... && ... | 1.0 | -| test.c:714:12:714:12 | a | 3.0 | -| test.c:714:17:714:17 | a | 3.0 | -| test.c:714:17:714:23 | ... <= ... | 1.0 | -| test.c:714:22:714:23 | 11 | 1.0 | -| test.c:714:22:714:23 | (unsigned int)... | 1.0 | -| test.c:714:28:714:29 | 13 | 1.0 | -| test.c:714:28:714:29 | (unsigned int)... | 1.0 | -| test.c:714:28:714:34 | ... <= ... | 1.0 | -| test.c:714:34:714:34 | b | 7.0 | -| test.c:714:39:714:39 | b | 7.0 | -| test.c:714:39:714:45 | ... <= ... | 1.0 | -| test.c:714:44:714:45 | 23 | 1.0 | -| test.c:714:44:714:45 | (unsigned int)... | 1.0 | -| test.c:715:13:715:13 | a | 3.0 | -| test.c:715:13:715:15 | (int)... | 21.0 | -| test.c:715:13:715:15 | ... * ... | 21.0 | -| test.c:715:15:715:15 | b | 7.0 | -| test.c:716:5:716:9 | total | 14.0 | -| test.c:716:5:716:14 | ... += ... | 294.0 | -| test.c:716:14:716:14 | r | 21.0 | -| test.c:719:10:719:14 | total | 308.0 | -| test.c:723:14:723:15 | 0 | 1.0 | -| test.c:725:7:725:7 | 5 | 1.0 | -| test.c:725:7:725:7 | (unsigned int)... | 1.0 | -| test.c:725:7:725:12 | ... <= ... | 1.0 | -| test.c:725:7:725:23 | ... && ... | 1.0 | -| test.c:725:12:725:12 | b | 1.0 | -| test.c:725:17:725:17 | b | 1.0 | -| test.c:725:17:725:23 | ... <= ... | 1.0 | -| test.c:725:22:725:23 | 23 | 1.0 | -| test.c:725:22:725:23 | (unsigned int)... | 1.0 | -| test.c:726:13:726:14 | 11 | 1.0 | -| test.c:726:13:726:14 | (unsigned int)... | 1.0 | -| test.c:726:13:726:16 | (int)... | 1.0 | -| test.c:726:13:726:16 | ... * ... | 1.0 | -| test.c:726:16:726:16 | b | 1.0 | -| test.c:727:5:727:9 | total | 1.0 | -| test.c:727:5:727:14 | ... += ... | 1.0 | -| test.c:727:14:727:14 | r | 1.0 | -| test.c:729:7:729:7 | 0 | 1.0 | -| test.c:729:7:729:7 | (unsigned int)... | 1.0 | -| test.c:729:7:729:12 | ... <= ... | 1.0 | -| test.c:729:7:729:23 | ... && ... | 1.0 | -| test.c:729:12:729:12 | b | 2.0 | -| test.c:729:17:729:17 | b | 2.0 | -| test.c:729:17:729:23 | ... <= ... | 1.0 | -| test.c:729:22:729:23 | 23 | 1.0 | -| test.c:729:22:729:23 | (unsigned int)... | 1.0 | -| test.c:730:13:730:14 | 11 | 1.0 | -| test.c:730:13:730:14 | (unsigned int)... | 1.0 | -| test.c:730:13:730:16 | (int)... | 2.0 | -| test.c:730:13:730:16 | ... * ... | 2.0 | -| test.c:730:16:730:16 | b | 2.0 | -| test.c:731:5:731:9 | total | 2.0 | -| test.c:731:5:731:14 | ... += ... | 4.0 | -| test.c:731:14:731:14 | r | 2.0 | -| test.c:733:7:733:8 | 13 | 1.0 | -| test.c:733:7:733:8 | (unsigned int)... | 1.0 | -| test.c:733:7:733:13 | ... <= ... | 1.0 | -| test.c:733:7:733:24 | ... && ... | 1.0 | -| test.c:733:13:733:13 | b | 3.0 | -| test.c:733:18:733:18 | b | 3.0 | -| test.c:733:18:733:24 | ... <= ... | 1.0 | -| test.c:733:23:733:24 | 23 | 1.0 | -| test.c:733:23:733:24 | (unsigned int)... | 1.0 | -| test.c:734:13:734:14 | 11 | 1.0 | -| test.c:734:13:734:14 | (unsigned int)... | 1.0 | -| test.c:734:13:734:16 | (int)... | 3.0 | -| test.c:734:13:734:16 | ... * ... | 3.0 | -| test.c:734:16:734:16 | b | 3.0 | -| test.c:735:5:735:9 | total | 6.0 | -| test.c:735:5:735:14 | ... += ... | 18.0 | -| test.c:735:14:735:14 | r | 3.0 | -| test.c:738:10:738:14 | total | 24.0 | -| test.c:743:3:743:3 | x | 1.0 | -| test.c:743:3:743:22 | ... = ... | 1.0 | -| test.c:743:7:743:7 | y | 1.0 | -| test.c:743:7:743:22 | ... = ... | 1.0 | -| test.c:743:11:743:22 | 1000000003 | 1.0 | -| test.c:744:3:744:4 | xy | 1.0 | -| test.c:744:3:744:12 | ... = ... | 1.0 | -| test.c:744:8:744:8 | x | 1.0 | -| test.c:744:8:744:12 | ... * ... | 1.0 | -| test.c:744:12:744:12 | y | 1.0 | -| test.c:745:10:745:11 | xy | 1.0 | -| test.c:750:3:750:3 | x | 1.0 | -| test.c:750:3:750:14 | ... = ... | 1.0 | -| test.c:750:7:750:14 | 274177 | 1.0 | -| test.c:751:3:751:3 | y | 1.0 | -| test.c:751:3:751:22 | ... = ... | 1.0 | -| test.c:751:7:751:22 | 67280421310721 | 1.0 | -| test.c:752:3:752:4 | xy | 1.0 | -| test.c:752:3:752:12 | ... = ... | 1.0 | -| test.c:752:8:752:8 | x | 1.0 | -| test.c:752:8:752:12 | ... * ... | 1.0 | -| test.c:752:12:752:12 | y | 1.0 | -| test.c:753:10:753:11 | xy | 1.0 | -| test.c:757:7:757:8 | ui | 1.0 | -| test.c:757:7:757:14 | ... >= ... | 1.0 | -| test.c:757:13:757:14 | 10 | 1.0 | -| test.c:757:13:757:14 | (unsigned int)... | 1.0 | -| test.c:758:28:758:44 | (unsigned long)... | 1.0 | -| test.c:758:28:758:49 | ... * ... | 1.0 | -| test.c:758:43:758:44 | ui | 1.0 | -| test.c:758:48:758:49 | (unsigned long)... | 1.0 | -| test.c:758:48:758:49 | ui | 1.0 | -| test.c:759:12:759:17 | result | 1.0 | -| test.c:761:7:761:8 | ul | 1.0 | -| test.c:761:7:761:14 | ... >= ... | 1.0 | -| test.c:761:13:761:14 | 10 | 1.0 | -| test.c:761:13:761:14 | (unsigned long)... | 1.0 | -| test.c:762:28:762:29 | ul | 1.0 | -| test.c:762:28:762:34 | ... * ... | 1.0 | -| test.c:762:33:762:34 | ul | 1.0 | -| test.c:763:12:763:17 | result | 1.0 | -| test.c:765:10:765:10 | 0 | 1.0 | -| test.c:765:10:765:10 | (unsigned long)... | 1.0 | -| test.c:769:7:769:8 | ui | 1.0 | -| test.c:769:7:769:14 | ... <= ... | 1.0 | -| test.c:769:7:769:25 | ... && ... | 1.0 | -| test.c:769:13:769:14 | 10 | 1.0 | -| test.c:769:13:769:14 | (unsigned int)... | 1.0 | -| test.c:769:19:769:20 | ui | 1.0 | -| test.c:769:19:769:25 | ... >= ... | 1.0 | -| test.c:769:25:769:25 | 2 | 1.0 | -| test.c:769:25:769:25 | (unsigned int)... | 1.0 | -| test.c:770:5:770:6 | ui | 1.0 | -| test.c:770:5:770:16 | ... *= ... | 1.0 | -| test.c:770:11:770:12 | ui | 1.0 | -| test.c:770:11:770:16 | ... + ... | 1.0 | -| test.c:770:16:770:16 | 0 | 1.0 | -| test.c:770:16:770:16 | (unsigned int)... | 1.0 | -| test.c:771:12:771:13 | (unsigned long)... | 1.0 | -| test.c:771:12:771:13 | ui | 1.0 | -| test.c:774:26:774:27 | 10 | 1.0 | -| test.c:774:26:774:27 | (unsigned int)... | 1.0 | -| test.c:775:3:775:9 | uiconst | 1.0 | -| test.c:775:3:775:14 | ... *= ... | 1.0 | -| test.c:775:14:775:14 | 4 | 1.0 | -| test.c:775:14:775:14 | (unsigned int)... | 1.0 | -| test.c:777:27:777:28 | 10 | 1.0 | -| test.c:777:27:777:28 | (unsigned long)... | 1.0 | -| test.c:778:3:778:9 | ulconst | 1.0 | -| test.c:778:3:778:14 | ... *= ... | 1.0 | -| test.c:778:14:778:14 | 4 | 1.0 | -| test.c:778:14:778:14 | (unsigned long)... | 1.0 | -| test.c:779:10:779:16 | (unsigned long)... | 1.0 | -| test.c:779:10:779:16 | uiconst | 1.0 | -| test.c:779:10:779:26 | ... + ... | 1.0 | -| test.c:779:20:779:26 | ulconst | 1.0 | -| test.c:783:7:783:7 | i | 1.0 | -| test.c:783:7:783:13 | ... >= ... | 1.0 | -| test.c:783:7:783:23 | ... && ... | 1.0 | -| test.c:783:12:783:13 | - ... | 1.0 | -| test.c:783:13:783:13 | 1 | 1.0 | -| test.c:783:18:783:18 | i | 1.0 | -| test.c:783:18:783:23 | ... <= ... | 1.0 | -| test.c:783:23:783:23 | 2 | 1.0 | -| test.c:784:5:784:5 | i | 1.0 | -| test.c:784:5:784:13 | ... = ... | 1.0 | -| test.c:784:9:784:9 | 5 | 1.0 | -| test.c:784:9:784:13 | ... * ... | 1.0 | -| test.c:784:13:784:13 | i | 1.0 | -| test.c:785:9:785:9 | i | 1.0 | -| test.c:787:5:787:5 | i | 1.0 | -| test.c:787:5:787:14 | ... = ... | 1.0 | -| test.c:787:9:787:9 | i | 1.0 | -| test.c:787:9:787:14 | ... * ... | 1.0 | -| test.c:787:13:787:14 | - ... | 1.0 | -| test.c:787:14:787:14 | 3 | 1.0 | -| test.c:788:9:788:9 | i | 1.0 | -| test.c:790:5:790:5 | i | 1.0 | -| test.c:790:5:790:10 | ... *= ... | 1.0 | -| test.c:790:10:790:10 | 7 | 1.0 | -| test.c:791:9:791:9 | i | 1.0 | -| test.c:793:5:793:5 | i | 1.0 | -| test.c:793:5:793:12 | ... *= ... | 1.0 | -| test.c:793:10:793:12 | - ... | 1.0 | -| test.c:793:11:793:12 | 11 | 1.0 | -| test.c:794:9:794:9 | i | 1.0 | -| test.c:796:7:796:7 | i | 2.0 | -| test.c:796:7:796:13 | ... == ... | 1.0 | -| test.c:796:12:796:13 | - ... | 1.0 | -| test.c:796:13:796:13 | 1 | 1.0 | -| test.c:797:5:797:5 | i | 1.0 | -| test.c:797:5:797:27 | ... = ... | 2.0 | -| test.c:797:9:797:9 | i | 2.0 | -| test.c:797:9:797:27 | ... * ... | 2.0 | -| test.c:797:13:797:27 | (int)... | 1.0 | -| test.c:797:18:797:27 | 4294967295 | 1.0 | -| test.c:798:9:798:9 | i | 2.0 | -| test.c:800:3:800:3 | i | 1.0 | -| test.c:800:3:800:12 | ... = ... | 4.0 | -| test.c:800:7:800:7 | i | 4.0 | -| test.c:800:7:800:12 | ... * ... | 4.0 | -| test.c:800:11:800:12 | - ... | 1.0 | -| test.c:800:12:800:12 | 1 | 1.0 | -| test.c:801:10:801:10 | i | 4.0 | -| test.c:803:20:803:20 | 1 | 1.0 | -| test.c:803:20:803:20 | (signed char)... | 1.0 | -| test.c:804:3:804:3 | i | 1.0 | -| test.c:804:3:804:17 | ... = ... | 1.0 | -| test.c:804:7:804:17 | (...) | 1.0 | -| test.c:804:7:804:17 | (int)... | 1.0 | -| test.c:804:8:804:11 | * ... | 1.0 | -| test.c:804:8:804:16 | ... *= ... | 1.0 | -| test.c:804:10:804:11 | sc | 1.0 | -| test.c:804:16:804:16 | 2 | 1.0 | -| test.c:806:7:806:7 | i | 1.0 | -| test.c:808:10:808:10 | 0 | 1.0 | -| test.c:813:7:813:7 | (int)... | 1.0 | -| test.c:813:7:813:7 | n | 1.0 | -| test.c:815:7:815:7 | n | 1.0 | -| test.c:815:7:815:11 | ... > ... | 1.0 | -| test.c:815:11:815:11 | 0 | 1.0 | -| test.c:815:11:815:11 | (unsigned int)... | 1.0 | -| test.c:816:9:816:9 | (int)... | 1.0 | -| test.c:816:9:816:9 | n | 1.0 | -| test.c:819:7:819:7 | n | 2.0 | -| test.c:819:7:819:12 | ... != ... | 1.0 | -| test.c:819:12:819:12 | 0 | 1.0 | -| test.c:819:12:819:12 | (unsigned int)... | 1.0 | -| test.c:820:9:820:9 | (int)... | 2.0 | -| test.c:820:9:820:9 | n | 2.0 | -| test.c:822:9:822:9 | (int)... | 2.0 | -| test.c:822:9:822:9 | n | 2.0 | -| test.c:825:7:825:8 | ! ... | 1.0 | -| test.c:825:8:825:8 | n | 4.0 | -| test.c:826:9:826:9 | (int)... | 4.0 | -| test.c:826:9:826:9 | n | 4.0 | -| test.c:828:9:828:9 | (int)... | 4.0 | -| test.c:828:9:828:9 | n | 4.0 | -| test.c:831:10:831:10 | n | 13.0 | -| test.c:831:10:831:15 | ... != ... | 1.0 | -| test.c:831:15:831:15 | 0 | 1.0 | -| test.c:831:15:831:15 | (unsigned int)... | 1.0 | -| test.c:832:5:832:5 | n | 13.0 | -| test.c:832:5:832:7 | ... -- | 13.0 | -| test.c:835:7:835:7 | (int)... | 13.0 | -| test.c:835:7:835:7 | n | 13.0 | -| test.c:839:7:839:7 | (int)... | 1.0 | -| test.c:839:7:839:7 | n | 1.0 | -| test.c:839:7:839:11 | ... < ... | 1.0 | -| test.c:839:11:839:11 | 0 | 1.0 | -| test.c:842:7:842:7 | (int)... | 1.0 | -| test.c:842:7:842:7 | n | 1.0 | -| test.c:842:7:842:12 | ... == ... | 1.0 | -| test.c:842:12:842:12 | 0 | 1.0 | -| test.c:843:9:843:9 | (int)... | 1.0 | -| test.c:843:9:843:9 | n | 1.0 | -| test.c:845:9:845:9 | (int)... | 1.0 | -| test.c:845:9:845:9 | n | 1.0 | -| test.c:848:7:848:7 | n | 2.0 | -| test.c:849:9:849:9 | (int)... | 2.0 | -| test.c:849:9:849:9 | n | 2.0 | -| test.c:851:9:851:9 | (int)... | 2.0 | -| test.c:851:9:851:9 | n | 2.0 | -| test.c:854:10:854:10 | (int)... | 13.0 | -| test.c:854:10:854:10 | n | 12.0 | -| test.c:854:10:854:15 | ... != ... | 1.0 | -| test.c:854:15:854:15 | 0 | 1.0 | -| test.c:855:5:855:5 | n | 12.0 | -| test.c:855:5:855:7 | ... -- | 12.0 | -| test.c:858:7:858:7 | (int)... | 12.0 | -| test.c:858:7:858:7 | n | 12.0 | -| test.c:862:7:862:7 | (int)... | 1.0 | -| test.c:862:7:862:7 | n | 1.0 | -| test.c:862:7:862:12 | ... != ... | 1.0 | -| test.c:862:12:862:12 | 0 | 1.0 | -| test.c:863:9:863:9 | (int)... | 1.0 | -| test.c:863:9:863:9 | n | 1.0 | -| test.c:863:9:863:14 | ... >= ... | 1.0 | -| test.c:863:14:863:14 | 0 | 1.0 | -| test.c:864:11:864:11 | (int)... | 1.0 | -| test.c:864:11:864:11 | n | 1.0 | -| test.c:868:7:868:7 | (int)... | 2.0 | -| test.c:868:7:868:7 | n | 2.0 | -| test.c:868:7:868:12 | ... >= ... | 1.0 | -| test.c:868:12:868:12 | 5 | 1.0 | -| test.c:869:9:869:9 | 2 | 1.0 | -| test.c:869:9:869:13 | ... * ... | 2.0 | -| test.c:869:9:869:18 | ... - ... | 2.0 | -| test.c:869:9:869:23 | ... == ... | 1.0 | -| test.c:869:13:869:13 | (int)... | 2.0 | -| test.c:869:13:869:13 | n | 2.0 | -| test.c:869:17:869:18 | 10 | 1.0 | -| test.c:869:23:869:23 | 0 | 1.0 | -| test.c:872:9:872:9 | (int)... | 2.0 | -| test.c:872:9:872:9 | n | 2.0 | -| test.c:875:7:875:7 | (int)... | 3.0 | -| test.c:875:7:875:7 | n | 3.0 | -| test.c:875:7:875:17 | ... != ... | 1.0 | -| test.c:875:7:875:32 | ... && ... | 1.0 | -| test.c:875:12:875:17 | - ... | 1.0 | -| test.c:875:13:875:17 | 32768 | 1.0 | -| test.c:875:22:875:22 | (int)... | 3.0 | -| test.c:875:22:875:22 | n | 3.0 | -| test.c:875:22:875:32 | ... != ... | 1.0 | -| test.c:875:27:875:32 | - ... | 1.0 | -| test.c:875:28:875:32 | 32767 | 1.0 | -| test.c:876:9:876:9 | (int)... | 3.0 | -| test.c:876:9:876:9 | n | 3.0 | -| test.c:879:7:879:7 | (int)... | 4.0 | -| test.c:879:7:879:7 | n | 4.0 | -| test.c:879:7:879:12 | ... >= ... | 1.0 | -| test.c:879:12:879:12 | 0 | 1.0 | -| test.c:880:5:880:5 | n | 4.0 | -| test.c:880:5:880:14 | ... ? ... : ... | 16.0 | -| test.c:880:10:880:10 | (int)... | 4.0 | -| test.c:880:10:880:10 | n | 4.0 | -| test.c:880:14:880:14 | (int)... | 4.0 | -| test.c:880:14:880:14 | n | 4.0 | -| test.c:881:5:881:6 | ! ... | 1.0 | -| test.c:881:5:881:14 | ... ? ... : ... | 64.0 | -| test.c:881:6:881:6 | n | 8.0 | -| test.c:881:10:881:10 | (int)... | 8.0 | -| test.c:881:10:881:10 | n | 8.0 | -| test.c:881:14:881:14 | (int)... | 8.0 | -| test.c:881:14:881:14 | n | 8.0 | -| test.c:892:7:892:8 | (unsigned long)... | 1.0 | -| test.c:892:7:892:8 | ss | 1.0 | -| test.c:892:7:892:22 | ... < ... | 1.0 | -| test.c:892:12:892:22 | sizeof(int) | 1.0 | -| test.c:893:9:893:10 | (int)... | 1.0 | -| test.c:893:9:893:10 | ss | 1.0 | -| test.c:896:7:896:8 | (int)... | 2.0 | -| test.c:896:7:896:8 | ss | 2.0 | -| test.c:896:7:896:17 | ... < ... | 1.0 | -| test.c:896:12:896:17 | 32769 | 1.0 | -| test.c:897:9:897:10 | (int)... | 2.0 | -| test.c:897:9:897:10 | ss | 2.0 | -| test.c:900:7:900:15 | (int)... | 1.0 | -| test.c:900:7:900:15 | (short)... | 1.0 | -| test.c:900:7:900:20 | ... >= ... | 1.0 | -| test.c:900:14:900:15 | us | 1.0 | -| test.c:900:20:900:20 | 0 | 1.0 | -| test.c:901:9:901:10 | (int)... | 1.0 | -| test.c:901:9:901:10 | us | 1.0 | -| test.c:904:7:904:15 | (int)... | 2.0 | -| test.c:904:7:904:15 | (short)... | 2.0 | -| test.c:904:7:904:21 | ... >= ... | 1.0 | -| test.c:904:14:904:15 | us | 2.0 | -| test.c:904:20:904:21 | - ... | 1.0 | -| test.c:904:21:904:21 | 1 | 1.0 | -| test.c:905:9:905:10 | (int)... | 2.0 | -| test.c:905:9:905:10 | us | 2.0 | -| test.c:908:7:908:8 | (unsigned long)... | 3.0 | -| test.c:908:7:908:8 | ss | 3.0 | -| test.c:908:7:908:23 | ... >= ... | 1.0 | -| test.c:908:13:908:23 | sizeof(int) | 1.0 | -| test.c:909:9:909:10 | (int)... | 3.0 | -| test.c:909:9:909:10 | ss | 3.0 | -| test.c:912:7:912:8 | (int)... | 4.0 | -| test.c:912:7:912:8 | ss | 4.0 | -| test.c:912:7:912:12 | (unsigned long)... | 4.0 | -| test.c:912:7:912:12 | ... + ... | 4.0 | -| test.c:912:7:912:26 | ... < ... | 1.0 | -| test.c:912:12:912:12 | 1 | 1.0 | -| test.c:912:16:912:26 | sizeof(int) | 1.0 | -| test.c:913:9:913:10 | (int)... | 4.0 | -| test.c:913:9:913:10 | ss | 4.0 | -| test.c:919:8:919:8 | s | 1.0 | -| test.c:919:8:919:12 | ... = ... | 1.0 | -| test.c:919:12:919:12 | 0 | 1.0 | -| test.c:919:15:919:15 | s | 13.0 | -| test.c:919:15:919:20 | ... < ... | 1.0 | -| test.c:919:19:919:20 | 10 | 1.0 | -| test.c:919:23:919:23 | s | 13.0 | -| test.c:919:23:919:25 | ... ++ | 13.0 | -| test.c:920:18:920:18 | s | 13.0 | -| test.c:920:18:920:22 | ... + ... | 13.0 | -| test.c:920:22:920:22 | s | 13.0 | -| test.c:921:9:921:14 | result | 13.0 | -| test.c:926:10:926:11 | 0 | 1.0 | -| test.c:927:7:927:7 | i | 1.0 | -| test.c:927:7:927:11 | ... < ... | 1.0 | -| test.c:927:11:927:11 | 0 | 1.0 | -| test.c:928:9:928:9 | i | 1.0 | -| test.c:931:20:931:20 | 0 | 1.0 | -| test.c:931:20:931:20 | (unsigned int)... | 1.0 | -| test.c:932:7:932:7 | u | 1.0 | -| test.c:932:7:932:11 | ... < ... | 1.0 | -| test.c:932:11:932:11 | 0 | 1.0 | -| test.c:932:11:932:11 | (unsigned int)... | 1.0 | -| test.c:933:9:933:9 | (int)... | 1.0 | -| test.c:933:9:933:9 | u | 1.0 | -| test.c:938:12:938:12 | s | 1.0 | -| test.c:938:12:938:16 | ... % ... | 1.0 | -| test.c:938:16:938:16 | 5 | 1.0 | -| test.c:939:7:939:8 | s2 | 1.0 | -| test.c:944:7:944:7 | x | 1.0 | -| test.c:945:9:945:9 | y | 1.0 | -| test.c:945:9:945:14 | ... != ... | 1.0 | -| test.c:945:14:945:14 | 0 | 1.0 | -| test.c:946:12:946:12 | 0 | 1.0 | -| test.c:949:7:949:7 | y | 2.0 | -| test.c:958:7:958:7 | x | 1.0 | -| test.c:958:7:958:13 | ... >= ... | 1.0 | -| test.c:958:12:958:13 | 10 | 1.0 | -| test.c:963:7:963:7 | x | 13.0 | -| test.c:968:16:968:26 | 2147483647 | 1.0 | -| test.c:969:16:969:19 | 256 | 1.0 | -| test.c:970:7:970:13 | (...) | 1.0 | -| test.c:970:7:970:20 | ... <= ... | 1.0 | -| test.c:970:8:970:8 | x | 1.0 | -| test.c:970:8:970:12 | ... + ... | 1.0 | -| test.c:970:12:970:12 | y | 1.0 | -| test.c:970:18:970:20 | 512 | 1.0 | -| test.c:971:9:971:9 | x | 1.0 | -| test.c:972:9:972:9 | y | 1.0 | -| test.cpp:9:11:9:12 | - ... | 1.0 | -| test.cpp:9:12:9:12 | 1 | 1.0 | -| test.cpp:10:7:10:7 | (bool)... | 1.0 | -| test.cpp:10:7:10:7 | b | 1.0 | -| test.cpp:11:5:11:5 | x | 1.0 | -| test.cpp:11:5:11:14 | ... = ... | 1.0 | -| test.cpp:11:12:11:12 | call to operator[] | 1.0 | -| test.cpp:11:12:11:14 | (reference dereference) | 1.0 | -| test.cpp:11:13:11:13 | 3 | 1.0 | -| test.cpp:13:10:13:10 | x | 2.0 | -| test.cpp:18:12:18:31 | (int)... | 1.0 | -| test.cpp:18:12:18:31 | static_cast... | 1.0 | -| test.cpp:18:30:18:30 | x | 1.0 | -| test.cpp:19:10:19:11 | x0 | 1.0 | -| test.cpp:27:7:27:7 | y | 1.0 | -| test.cpp:27:7:27:12 | ... == ... | 1.0 | -| test.cpp:27:12:27:12 | 0 | 1.0 | -| test.cpp:28:5:28:5 | x | 1.0 | -| test.cpp:28:5:28:9 | ... = ... | 1.0 | -| test.cpp:28:9:28:9 | 0 | 1.0 | -| test.cpp:30:7:30:7 | y | 2.0 | -| test.cpp:30:7:30:13 | ... == ... | 1.0 | -| test.cpp:30:12:30:13 | - ... | 1.0 | -| test.cpp:30:13:30:13 | 1 | 1.0 | -| test.cpp:31:5:31:5 | x | 1.0 | -| test.cpp:31:5:31:10 | ... = ... | 1.0 | -| test.cpp:31:9:31:10 | - ... | 1.0 | -| test.cpp:31:10:31:10 | 1 | 1.0 | -| test.cpp:33:7:33:7 | y | 4.0 | -| test.cpp:33:7:33:12 | ... == ... | 1.0 | -| test.cpp:33:12:33:12 | 1 | 1.0 | -| test.cpp:34:5:34:5 | x | 1.0 | -| test.cpp:34:5:34:9 | ... = ... | 1.0 | -| test.cpp:34:9:34:9 | 1 | 1.0 | -| test.cpp:36:7:36:7 | y | 8.0 | -| test.cpp:36:7:36:15 | ... == ... | 1.0 | -| test.cpp:36:12:36:15 | - ... | 1.0 | -| test.cpp:36:13:36:15 | 128 | 1.0 | -| test.cpp:37:5:37:5 | x | 1.0 | -| test.cpp:37:5:37:12 | ... = ... | 1.0 | -| test.cpp:37:9:37:12 | - ... | 1.0 | -| test.cpp:37:10:37:12 | 128 | 1.0 | -| test.cpp:39:7:39:7 | y | 16.0 | -| test.cpp:39:7:39:14 | ... == ... | 1.0 | -| test.cpp:39:12:39:14 | 128 | 1.0 | -| test.cpp:40:5:40:5 | x | 1.0 | -| test.cpp:40:5:40:11 | ... = ... | 1.0 | -| test.cpp:40:9:40:11 | 128 | 1.0 | -| test.cpp:42:7:42:7 | y | 32.0 | -| test.cpp:42:7:42:16 | ... == ... | 1.0 | -| test.cpp:42:12:42:16 | - ... | 1.0 | -| test.cpp:42:13:42:16 | 1024 | 1.0 | -| test.cpp:43:5:43:5 | x | 1.0 | -| test.cpp:43:5:43:13 | ... = ... | 1.0 | -| test.cpp:43:9:43:13 | - ... | 1.0 | -| test.cpp:43:10:43:13 | 1024 | 1.0 | -| test.cpp:45:7:45:7 | y | 64.0 | -| test.cpp:45:7:45:15 | ... == ... | 1.0 | -| test.cpp:45:12:45:15 | 1024 | 1.0 | -| test.cpp:46:5:46:5 | x | 1.0 | -| test.cpp:46:5:46:12 | ... = ... | 1.0 | -| test.cpp:46:9:46:12 | 1024 | 1.0 | -| test.cpp:49:10:49:11 | 0 | 1.0 | -| test.cpp:51:7:51:7 | x | 8.0 | -| test.cpp:51:7:51:12 | ... == ... | 1.0 | -| test.cpp:51:12:51:12 | 0 | 1.0 | -| test.cpp:52:15:52:21 | (bool)... | 1.0 | -| test.cpp:52:21:52:21 | x | 8.0 | -| test.cpp:53:5:53:5 | t | 1.0 | -| test.cpp:53:5:53:16 | ... += ... | 8.0 | -| test.cpp:53:10:53:16 | (int)... | 8.0 | -| test.cpp:53:15:53:16 | xb | 8.0 | -| test.cpp:56:7:56:7 | x | 16.0 | -| test.cpp:56:7:56:11 | ... > ... | 1.0 | -| test.cpp:56:11:56:11 | 0 | 1.0 | -| test.cpp:57:15:57:21 | (bool)... | 1.0 | -| test.cpp:57:21:57:21 | x | 16.0 | -| test.cpp:58:5:58:5 | t | 9.0 | -| test.cpp:58:5:58:16 | ... += ... | 144.0 | -| test.cpp:58:10:58:16 | (int)... | 16.0 | -| test.cpp:58:15:58:16 | xb | 16.0 | -| test.cpp:61:7:61:7 | x | 17.0 | -| test.cpp:61:7:61:11 | ... < ... | 1.0 | -| test.cpp:61:11:61:11 | 0 | 1.0 | -| test.cpp:62:15:62:21 | (bool)... | 1.0 | -| test.cpp:62:21:62:21 | x | 17.0 | -| test.cpp:63:5:63:5 | t | 153.0 | -| test.cpp:63:5:63:16 | ... += ... | 2601.0 | -| test.cpp:63:10:63:16 | (int)... | 17.0 | -| test.cpp:63:15:63:16 | xb | 17.0 | -| test.cpp:66:13:66:19 | (bool)... | 1.0 | -| test.cpp:66:19:66:19 | x | 18.0 | -| test.cpp:67:3:67:3 | t | 2754.0 | -| test.cpp:67:3:67:14 | ... += ... | 49572.0 | -| test.cpp:67:8:67:14 | (int)... | 18.0 | -| test.cpp:67:13:67:14 | xb | 18.0 | -| test.cpp:69:10:69:10 | b | 1.0 | -| test.cpp:69:10:69:21 | ... \|\| ... | 1.0 | -| test.cpp:69:15:69:21 | (bool)... | 1.0 | -| test.cpp:69:21:69:21 | t | 49572.0 | -| test.cpp:74:30:74:30 | (int)... | 1.0 | -| test.cpp:74:30:74:30 | c | 1.0 | -| test.cpp:74:30:74:34 | (unsigned short)... | 1.0 | -| test.cpp:74:30:74:34 | ... + ... | 1.0 | -| test.cpp:74:34:74:34 | (int)... | 1.0 | -| test.cpp:74:34:74:34 | c | 1.0 | -| test.cpp:75:7:75:30 | (int)... | 1.0 | -| test.cpp:75:7:75:30 | (unsigned char)... | 1.0 | -| test.cpp:75:7:75:35 | ... == ... | 1.0 | -| test.cpp:75:22:75:30 | c_times_2 | 1.0 | -| test.cpp:75:35:75:35 | 0 | 1.0 | -| test.cpp:77:5:77:13 | c_times_2 | 1.0 | -| test.cpp:79:3:79:11 | c_times_2 | 1.0 | -| test.cpp:83:16:83:22 | (reference dereference) | 1.0 | -| test.cpp:83:16:83:22 | (reference to) | 1.0 | -| test.cpp:83:16:83:22 | aliased | 1.0 | -| test.cpp:85:7:85:7 | (reference dereference) | 1.0 | -| test.cpp:85:7:85:7 | i | 1.0 | -| test.cpp:85:7:85:12 | ... >= ... | 1.0 | -| test.cpp:85:12:85:12 | 2 | 1.0 | -| test.cpp:86:12:86:12 | (reference dereference) | 1.0 | -| test.cpp:86:12:86:12 | i | 1.0 | -| test.cpp:88:7:88:8 | (reference dereference) | 1.0 | -| test.cpp:88:7:88:8 | ci | 1.0 | -| test.cpp:88:7:88:13 | ... >= ... | 1.0 | -| test.cpp:88:13:88:13 | 2 | 1.0 | -| test.cpp:89:12:89:13 | (reference dereference) | 1.0 | -| test.cpp:89:12:89:13 | ci | 1.0 | -| test.cpp:91:7:91:13 | (reference dereference) | 1.0 | -| test.cpp:91:7:91:13 | aliased | 1.0 | -| test.cpp:91:7:91:18 | ... >= ... | 1.0 | -| test.cpp:91:18:91:18 | 2 | 1.0 | -| test.cpp:92:12:92:18 | (reference dereference) | 1.0 | -| test.cpp:92:12:92:18 | aliased | 1.0 | -| test.cpp:94:7:94:11 | (reference dereference) | 1.0 | -| test.cpp:94:7:94:11 | alias | 1.0 | -| test.cpp:94:7:94:16 | ... >= ... | 1.0 | -| test.cpp:94:16:94:16 | 2 | 1.0 | -| test.cpp:95:12:95:16 | (reference dereference) | 1.0 | -| test.cpp:95:12:95:16 | alias | 1.0 | -| test.cpp:97:10:97:10 | (reference dereference) | 13.0 | -| test.cpp:97:10:97:19 | ... <= ... | 1.0 | -| test.cpp:97:15:97:19 | 12345 | 1.0 | -| test.cpp:97:22:97:22 | (reference dereference) | 13.0 | -| test.cpp:97:22:97:24 | ... ++ | 13.0 | -| test.cpp:98:5:98:5 | (reference dereference) | 1.0 | -| test.cpp:98:5:98:5 | i | 1.0 | -| test.cpp:98:5:98:9 | ... = ... | 13.0 | -| test.cpp:98:9:98:9 | (reference dereference) | 13.0 | -| test.cpp:99:5:99:5 | (reference dereference) | 13.0 | -| test.cpp:102:10:102:10 | 0 | 1.0 | -| test.cpp:106:7:106:7 | (int)... | 1.0 | -| test.cpp:106:7:106:7 | n | 1.0 | -| test.cpp:106:7:106:11 | ... < ... | 1.0 | -| test.cpp:106:11:106:11 | 0 | 1.0 | -| test.cpp:109:7:109:7 | (bool)... | 1.0 | -| test.cpp:109:7:109:7 | n | 1.0 | -| test.cpp:110:5:110:5 | n | 1.0 | -| test.cpp:112:5:112:5 | n | 1.0 | -| test.cpp:115:7:115:8 | ! ... | 1.0 | -| test.cpp:115:8:115:8 | (bool)... | 1.0 | -| test.cpp:115:8:115:8 | n | 2.0 | -| test.cpp:116:5:116:5 | n | 2.0 | -| test.cpp:118:5:118:5 | n | 2.0 | -| test.cpp:121:3:121:3 | (bool)... | 1.0 | -| test.cpp:121:3:121:3 | n | 4.0 | -| test.cpp:121:3:121:12 | ... ? ... : ... | 16.0 | -| test.cpp:121:8:121:8 | n | 4.0 | -| test.cpp:121:12:121:12 | n | 4.0 | -| test.cpp:122:3:122:4 | ! ... | 1.0 | -| test.cpp:122:3:122:12 | ... ? ... : ... | 64.0 | -| test.cpp:122:4:122:4 | (bool)... | 1.0 | -| test.cpp:122:4:122:4 | n | 8.0 | -| test.cpp:122:8:122:8 | n | 8.0 | -| test.cpp:122:12:122:12 | n | 8.0 | +| inline_assembly.c:9:20:9:20 | 0 | 1.0 | -1.0 | -1.0 | +| inline_assembly.c:9:20:9:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| inline_assembly.c:10:3:10:3 | y | 1.0 | -1.0 | -1.0 | +| inline_assembly.c:10:3:10:7 | ... = ... | 1.0 | 1.0 | 1.0 | +| inline_assembly.c:10:7:10:7 | 1 | 1.0 | -1.0 | -1.0 | +| inline_assembly.c:10:7:10:7 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| inline_assembly.c:12:3:12:8 | call to printf | 1.0 | -1.0 | -1.0 | +| inline_assembly.c:12:29:12:29 | x | 1.0 | 1.0 | 1.0 | +| inline_assembly.c:12:32:12:32 | y | 1.0 | 1.0 | 1.0 | +| inline_assembly.c:16:25:16:25 | x | 1.0 | 1.0 | 1.0 | +| inline_assembly.c:16:35:16:35 | y | 1.0 | 1.0 | 1.0 | +| inline_assembly.c:21:3:21:8 | call to printf | 1.0 | -1.0 | -1.0 | +| inline_assembly.c:21:29:21:29 | x | 1.0 | 1.0 | 1.0 | +| inline_assembly.c:21:32:21:32 | y | 1.0 | 1.0 | 1.0 | +| inline_assembly.c:23:10:23:10 | 0 | 1.0 | -1.0 | -1.0 | +| minmax.c:16:9:16:10 | 1 | 1.0 | -1.0 | -1.0 | +| minmax.c:16:16:16:17 | 2 | 1.0 | -1.0 | -1.0 | +| minmax.c:16:23:16:24 | 3 | 1.0 | -1.0 | -1.0 | +| minmax.c:18:2:18:7 | call to printf | 1.0 | -1.0 | -1.0 | +| minmax.c:18:37:18:37 | x | 1.0 | 1.0 | 1.0 | +| minmax.c:18:40:18:40 | y | 1.0 | 1.0 | 1.0 | +| minmax.c:18:43:18:43 | z | 1.0 | 1.0 | 1.0 | +| minmax.c:20:2:20:2 | z | 1.0 | -1.0 | -1.0 | +| minmax.c:20:2:24:3 | ... = ... | 2.0 | 2.0 | 2.0 | +| minmax.c:20:6:24:3 | (statement expression) | 2.0 | 2.0 | 2.0 | +| minmax.c:21:10:21:11 | 0 | 1.0 | -1.0 | -1.0 | +| minmax.c:22:7:22:14 | ... != ... | 1.0 | -1.0 | -1.0 | +| minmax.c:22:8:22:8 | x | 1.0 | 1.0 | 1.0 | +| minmax.c:22:14:22:14 | y | 1.0 | 1.0 | 1.0 | +| minmax.c:22:18:22:18 | t | 1.0 | -1.0 | -1.0 | +| minmax.c:22:18:22:22 | ... = ... | 1.0 | 1.0 | 1.0 | +| minmax.c:22:22:22:22 | x | 1.0 | 1.0 | 1.0 | +| minmax.c:23:3:23:3 | t | 2.0 | 2.0 | 2.0 | +| minmax.c:26:2:26:7 | call to printf | 1.0 | -1.0 | -1.0 | +| minmax.c:26:37:26:37 | x | 1.0 | 1.0 | 1.0 | +| minmax.c:26:40:26:40 | y | 1.0 | 1.0 | 1.0 | +| minmax.c:26:43:26:43 | z | 2.0 | 2.0 | 2.0 | +| test.c:6:14:6:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:8:5:8:9 | count | 1.0 | -1.0 | -1.0 | +| test.c:8:5:8:19 | ... = ... | 13.0 | 5.0 | 10.0 | +| test.c:8:13:8:17 | count | 13.0 | 4.0 | 10.0 | +| test.c:8:13:8:19 | ... + ... | 13.0 | 4.0 | 10.0 | +| test.c:8:19:8:19 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:10:10:10:14 | count | 13.0 | 4.0 | 10.0 | +| test.c:14:14:14:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:16:5:16:9 | count | 1.0 | -1.0 | -1.0 | +| test.c:16:5:16:26 | ... = ... | 13.0 | 1.0 | 1.0 | +| test.c:16:13:16:21 | (...) | 13.0 | 1.0 | 2.0 | +| test.c:16:13:16:26 | ... % ... | 13.0 | 1.0 | 1.0 | +| test.c:16:14:16:18 | count | 13.0 | 1.0 | 2.0 | +| test.c:16:14:16:20 | ... + ... | 13.0 | 1.0 | 2.0 | +| test.c:16:20:16:20 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:16:25:16:26 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:18:10:18:14 | count | 13.0 | 1.0 | 2.0 | +| test.c:22:14:22:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:24:5:24:9 | count | 13.0 | 1.0 | 2.0 | +| test.c:24:5:24:11 | ... ++ | 13.0 | 1.0 | 2.0 | +| test.c:25:5:25:9 | count | 1.0 | -1.0 | -1.0 | +| test.c:25:5:25:22 | ... = ... | 13.0 | 1.0 | 1.0 | +| test.c:25:13:25:17 | count | 13.0 | 1.0 | 2.0 | +| test.c:25:13:25:22 | ... % ... | 13.0 | 1.0 | 1.0 | +| test.c:25:21:25:22 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:27:10:27:14 | count | 13.0 | 1.0 | 2.0 | +| test.c:31:10:31:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:32:14:32:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:33:8:33:8 | i | 1.0 | -1.0 | -1.0 | +| test.c:33:8:33:12 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:33:12:33:12 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:33:15:33:15 | i | 13.0 | 3.0 | 3.0 | +| test.c:33:15:33:19 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:33:19:33:19 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:33:22:33:22 | i | 1.0 | -1.0 | -1.0 | +| test.c:33:22:33:28 | ... = ... | 13.0 | 3.0 | 2.0 | +| test.c:33:26:33:26 | i | 13.0 | 3.0 | 2.0 | +| test.c:33:26:33:28 | ... + ... | 13.0 | 3.0 | 2.0 | +| test.c:33:28:33:28 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:34:5:34:9 | total | 13.0 | 4.0 | 10.0 | +| test.c:34:5:34:14 | ... += ... | 13.0 | 8.0 | 18.0 | +| test.c:34:14:34:14 | i | 13.0 | 3.0 | 2.0 | +| test.c:36:10:36:14 | total | 13.0 | 4.0 | 10.0 | +| test.c:36:10:36:18 | ... + ... | 13.0 | 4.0 | 26.0 | +| test.c:36:18:36:18 | i | 7.0 | 1.0 | 3.0 | +| test.c:40:10:40:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:41:14:41:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:42:8:42:8 | i | 1.0 | -1.0 | -1.0 | +| test.c:42:8:42:12 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:42:12:42:12 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:42:15:42:15 | i | 13.0 | 3.0 | 3.0 | +| test.c:42:15:42:19 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:42:19:42:19 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:42:22:42:22 | i | 13.0 | 3.0 | 2.0 | +| test.c:42:22:42:24 | ... ++ | 13.0 | 3.0 | 2.0 | +| test.c:43:5:43:9 | total | 13.0 | 4.0 | 10.0 | +| test.c:43:5:43:14 | ... += ... | 13.0 | 8.0 | 18.0 | +| test.c:43:14:43:14 | i | 13.0 | 3.0 | 2.0 | +| test.c:45:10:45:14 | total | 13.0 | 4.0 | 10.0 | +| test.c:45:10:45:18 | ... + ... | 13.0 | 4.0 | 26.0 | +| test.c:45:18:45:18 | i | 7.0 | 1.0 | 3.0 | +| test.c:49:10:49:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:50:14:50:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:51:8:51:8 | i | 1.0 | -1.0 | -1.0 | +| test.c:51:8:51:12 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:51:12:51:12 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:51:15:51:15 | i | 13.0 | 3.0 | 3.0 | +| test.c:51:15:51:17 | ... + ... | 13.0 | 3.0 | 3.0 | +| test.c:51:15:51:21 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:51:17:51:17 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:51:21:51:21 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:51:24:51:24 | i | 1.0 | -1.0 | -1.0 | +| test.c:51:24:51:30 | ... = ... | 13.0 | 3.0 | 2.0 | +| test.c:51:28:51:28 | i | 13.0 | 3.0 | 2.0 | +| test.c:51:28:51:30 | ... + ... | 13.0 | 3.0 | 2.0 | +| test.c:51:30:51:30 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:52:5:52:9 | total | 13.0 | 4.0 | 10.0 | +| test.c:52:5:52:14 | ... += ... | 13.0 | 8.0 | 18.0 | +| test.c:52:14:52:14 | i | 13.0 | 3.0 | 2.0 | +| test.c:54:10:54:14 | total | 13.0 | 4.0 | 10.0 | +| test.c:54:10:54:18 | ... + ... | 13.0 | 4.0 | 26.0 | +| test.c:54:18:54:18 | i | 7.0 | 1.0 | 3.0 | +| test.c:58:7:58:7 | i | 1.0 | 1.0 | 1.0 | +| test.c:58:7:58:11 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:58:11:58:11 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:59:9:59:9 | i | 1.0 | 1.0 | 1.0 | +| test.c:59:9:59:13 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:59:13:59:13 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:60:14:60:14 | i | 1.0 | 1.0 | 1.0 | +| test.c:63:10:63:10 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:67:7:67:11 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:67:7:67:15 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:67:7:67:25 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:67:8:67:11 | 1000 | 1.0 | -1.0 | -1.0 | +| test.c:67:15:67:15 | y | 1.0 | 1.0 | 1.0 | +| test.c:67:20:67:20 | y | 1.0 | 1.0 | 1.0 | +| test.c:67:20:67:25 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:67:24:67:25 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:68:9:68:9 | x | 1.0 | 1.0 | 1.0 | +| test.c:68:9:68:15 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:68:13:68:13 | y | 1.0 | 1.0 | 1.0 | +| test.c:68:13:68:15 | ... - ... | 1.0 | 1.0 | 1.0 | +| test.c:68:15:68:15 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:69:14:69:14 | x | 1.0 | 1.0 | 1.0 | +| test.c:72:10:72:10 | y | 1.0 | 3.0 | 3.0 | +| test.c:76:7:76:7 | y | 1.0 | 1.0 | 1.0 | +| test.c:76:7:76:12 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.c:76:12:76:12 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:77:9:77:9 | x | 1.0 | 1.0 | 1.0 | +| test.c:77:9:77:13 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:77:13:77:13 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:78:14:78:14 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:81:9:81:9 | x | 1.0 | 1.0 | 1.0 | +| test.c:81:9:81:13 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:81:13:81:13 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:82:14:82:14 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:85:10:85:10 | x | 1.0 | 1.0 | 1.0 | +| test.c:89:7:89:7 | y | 1.0 | 1.0 | 1.0 | +| test.c:89:7:89:11 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:89:11:89:11 | 7 | 1.0 | -1.0 | -1.0 | +| test.c:90:9:90:9 | x | 1.0 | 1.0 | 1.0 | +| test.c:90:9:90:13 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:90:13:90:13 | y | 1.0 | 1.0 | 1.0 | +| test.c:91:14:91:14 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:93:12:93:12 | x | 1.0 | 1.0 | 1.0 | +| test.c:95:10:95:10 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:100:3:100:3 | c | 1.0 | -1.0 | -1.0 | +| test.c:100:3:100:8 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:100:7:100:8 | * ... | 1.0 | -1.0 | -1.0 | +| test.c:101:7:101:7 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:101:7:101:7 | c | 1.0 | 1.0 | 1.0 | +| test.c:101:7:101:15 | ... != ... | 1.0 | -1.0 | -1.0 | +| test.c:101:12:101:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:102:5:102:8 | * ... | 1.0 | -1.0 | -1.0 | +| test.c:102:5:102:15 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:102:12:102:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:102:12:102:15 | (char)... | 1.0 | 1.0 | 1.0 | +| test.c:104:7:104:7 | (int)... | 2.0 | 2.0 | 2.0 | +| test.c:104:7:104:7 | c | 2.0 | 2.0 | 2.0 | +| test.c:104:7:104:14 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.c:104:12:104:14 | 58 | 1.0 | -1.0 | -1.0 | +| test.c:105:5:105:5 | c | 1.0 | -1.0 | -1.0 | +| test.c:105:5:105:10 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:105:9:105:10 | * ... | 1.0 | -1.0 | -1.0 | +| test.c:106:9:106:9 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:106:9:106:9 | c | 1.0 | 1.0 | 1.0 | +| test.c:106:9:106:17 | ... != ... | 1.0 | -1.0 | -1.0 | +| test.c:106:14:106:17 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:107:7:107:10 | * ... | 1.0 | -1.0 | -1.0 | +| test.c:107:7:107:17 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:107:14:107:17 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:107:14:107:17 | (char)... | 1.0 | 1.0 | 1.0 | +| test.c:109:9:109:9 | (int)... | 2.0 | 2.0 | 2.0 | +| test.c:109:9:109:9 | c | 2.0 | 2.0 | 2.0 | +| test.c:109:9:109:16 | ... != ... | 1.0 | -1.0 | -1.0 | +| test.c:109:14:109:16 | 44 | 1.0 | -1.0 | -1.0 | +| test.c:110:14:110:14 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:112:10:112:10 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:118:24:118:24 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:118:24:118:24 | (size_type)... | 1.0 | 1.0 | 1.0 | +| test.c:119:10:119:10 | n | 1.0 | -1.0 | -1.0 | +| test.c:119:10:119:12 | ... ++ | 1.0 | 1.0 | 1.0 | +| test.c:123:22:123:22 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:123:22:123:22 | (size_type)... | 1.0 | 1.0 | 1.0 | +| test.c:124:11:124:15 | Start | 13.0 | 1.0 | 2.0 | +| test.c:124:11:124:36 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:124:20:124:32 | call to test12_helper | 1.0 | -1.0 | -1.0 | +| test.c:124:20:124:36 | ... - ... | 1.0 | 1.0 | 1.0 | +| test.c:124:36:124:36 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:124:36:124:36 | (unsigned long long)... | 1.0 | 1.0 | 1.0 | +| test.c:126:31:126:43 | call to test12_helper | 1.0 | -1.0 | -1.0 | +| test.c:127:6:127:10 | Start | 13.0 | 1.0 | 2.0 | +| test.c:127:6:127:24 | ... += ... | 13.0 | 1.0 | 2.0 | +| test.c:127:15:127:20 | Length | 1.0 | 1.0 | 1.0 | +| test.c:127:15:127:24 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:127:24:127:24 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:127:24:127:24 | (unsigned long long)... | 1.0 | 1.0 | 1.0 | +| test.c:130:11:130:11 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:135:22:135:22 | (unsigned char)... | 1.0 | 1.0 | 1.0 | +| test.c:135:22:135:22 | c | 1.0 | 1.0 | 1.0 | +| test.c:136:20:136:20 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:136:20:136:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:137:20:137:20 | x | 1.0 | 1.0 | 1.0 | +| test.c:137:20:137:22 | ... - ... | 1.0 | 1.0 | 1.0 | +| test.c:137:22:137:22 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:137:22:137:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:138:11:138:11 | i | 1.0 | 1.0 | 1.0 | +| test.c:138:11:138:13 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:138:13:138:13 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:139:10:139:41 | (double)... | 1.0 | 1.0 | 1.0 | +| test.c:139:10:139:41 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:139:18:139:41 | (...) | 1.0 | 1.0 | 1.0 | +| test.c:139:19:139:19 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:139:19:139:19 | c | 1.0 | 1.0 | 1.0 | +| test.c:139:19:139:23 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:139:19:139:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:139:19:139:28 | ... + ... | 1.0 | 1.0 | 2.0 | +| test.c:139:19:139:32 | ... + ... | 1.0 | 1.0 | 2.0 | +| test.c:139:19:139:36 | ... + ... | 1.0 | 1.0 | 2.0 | +| test.c:139:19:139:40 | ... + ... | 1.0 | 1.0 | 2.0 | +| test.c:139:23:139:23 | i | 1.0 | 1.0 | 1.0 | +| test.c:139:27:139:28 | (int)... | 1.0 | 1.0 | 2.0 | +| test.c:139:27:139:28 | uc | 1.0 | 1.0 | 2.0 | +| test.c:139:32:139:32 | x | 1.0 | 1.0 | 1.0 | +| test.c:139:36:139:36 | y | 1.0 | 1.0 | 1.0 | +| test.c:139:40:139:40 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:139:40:139:40 | z | 1.0 | 1.0 | 1.0 | +| test.c:144:12:144:23 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:144:17:144:23 | (char)... | 1.0 | 1.0 | 1.0 | +| test.c:144:23:144:23 | x | 1.0 | 1.0 | 1.0 | +| test.c:145:12:145:32 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:145:17:145:32 | (unsigned char)... | 1.0 | 1.0 | 1.0 | +| test.c:145:32:145:32 | x | 1.0 | 1.0 | 1.0 | +| test.c:146:12:146:33 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:146:17:146:33 | (unsigned short)... | 1.0 | 1.0 | 1.0 | +| test.c:146:33:146:33 | x | 1.0 | 1.0 | 1.0 | +| test.c:147:12:147:31 | (int)... | 1.0 | 1.0 | 2.0 | +| test.c:147:17:147:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:147:31:147:31 | x | 1.0 | 1.0 | 1.0 | +| test.c:148:13:148:13 | (char)... | 1.0 | 1.0 | 1.0 | +| test.c:148:13:148:13 | x | 1.0 | 1.0 | 1.0 | +| test.c:149:23:149:23 | (unsigned short)... | 1.0 | 1.0 | 1.0 | +| test.c:149:23:149:23 | x | 1.0 | 1.0 | 1.0 | +| test.c:150:10:150:11 | x0 | 1.0 | 1.0 | 1.0 | +| test.c:150:10:150:16 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:150:10:150:21 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:150:10:150:26 | ... + ... | 1.0 | 2.0 | 1.0 | +| test.c:150:10:150:31 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:150:10:150:36 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:150:15:150:16 | x1 | 1.0 | 1.0 | 1.0 | +| test.c:150:20:150:21 | x2 | 1.0 | 1.0 | 1.0 | +| test.c:150:25:150:26 | x3 | 1.0 | 2.0 | 1.0 | +| test.c:150:30:150:31 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:150:30:150:31 | c0 | 1.0 | 1.0 | 1.0 | +| test.c:150:35:150:36 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:150:35:150:36 | s0 | 1.0 | 1.0 | 1.0 | +| test.c:154:10:154:31 | (...) | 1.0 | 1.0 | 1.0 | +| test.c:154:10:154:40 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:154:11:154:11 | x | 1.0 | 1.0 | 1.0 | +| test.c:154:11:154:15 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:154:11:154:30 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:154:15:154:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:154:15:154:15 | (long long)... | 1.0 | 1.0 | 1.0 | +| test.c:154:20:154:20 | x | 1.0 | 1.0 | 1.0 | +| test.c:154:20:154:30 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.c:154:25:154:30 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:154:25:154:30 | (long long)... | 1.0 | 1.0 | 1.0 | +| test.c:154:30:154:30 | x | 1.0 | 1.0 | 1.0 | +| test.c:154:35:154:35 | x | 1.0 | 1.0 | 1.0 | +| test.c:154:39:154:40 | (long long)... | 1.0 | 1.0 | 1.0 | +| test.c:154:39:154:40 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:154:40:154:40 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:159:14:159:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:161:7:161:7 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:161:7:161:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:161:7:161:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:161:12:161:12 | a | 1.0 | 1.0 | 1.0 | +| test.c:161:17:161:17 | a | 1.0 | 1.0 | 1.0 | +| test.c:161:17:161:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:161:22:161:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:162:13:162:14 | + ... | 1.0 | 1.0 | 1.0 | +| test.c:162:14:162:14 | a | 1.0 | 1.0 | 1.0 | +| test.c:163:13:163:14 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:163:14:163:14 | a | 1.0 | 1.0 | 1.0 | +| test.c:164:5:164:9 | total | 1.0 | 1.0 | 1.0 | +| test.c:164:5:164:16 | ... += ... | 1.0 | 1.0 | 1.0 | +| test.c:164:14:164:14 | b | 1.0 | 1.0 | 1.0 | +| test.c:164:14:164:16 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:164:16:164:16 | c | 1.0 | 1.0 | 1.0 | +| test.c:166:7:166:7 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:166:7:166:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:166:7:166:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:166:12:166:12 | a | 2.0 | 3.0 | 3.0 | +| test.c:166:17:166:17 | a | 1.5 | 3.0 | 3.0 | +| test.c:166:17:166:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:166:22:166:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:167:13:167:14 | + ... | 1.25 | 3.0 | 2.0 | +| test.c:167:14:167:14 | a | 1.25 | 3.0 | 2.0 | +| test.c:168:13:168:14 | - ... | 1.25 | 2.0 | 3.0 | +| test.c:168:14:168:14 | a | 1.25 | 3.0 | 2.0 | +| test.c:169:5:169:9 | total | 2.0 | 2.0 | 2.0 | +| test.c:169:5:169:16 | ... += ... | 3.125 | 10.0 | 10.0 | +| test.c:169:14:169:14 | b | 1.25 | 3.0 | 2.0 | +| test.c:169:14:169:16 | ... + ... | 1.5625 | 5.0 | 5.0 | +| test.c:169:16:169:16 | c | 1.25 | 2.0 | 3.0 | +| test.c:171:7:171:8 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:171:7:171:13 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:171:7:171:24 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:171:8:171:8 | 7 | 1.0 | -1.0 | -1.0 | +| test.c:171:13:171:13 | a | 2.75 | 4.0 | 4.0 | +| test.c:171:18:171:18 | a | 1.875 | 4.0 | 4.0 | +| test.c:171:18:171:24 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:171:23:171:24 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:172:13:172:14 | + ... | 1.4375 | 4.0 | 3.0 | +| test.c:172:14:172:14 | a | 1.4375 | 4.0 | 3.0 | +| test.c:173:13:173:14 | - ... | 1.4375 | 3.0 | 4.0 | +| test.c:173:14:173:14 | a | 1.4375 | 4.0 | 3.0 | +| test.c:174:5:174:9 | total | 5.125 | 11.0 | 11.0 | +| test.c:174:5:174:16 | ... += ... | 10.59033203125 | 47.0 | 47.0 | +| test.c:174:14:174:14 | b | 1.4375 | 4.0 | 3.0 | +| test.c:174:14:174:16 | ... + ... | 2.06640625 | 10.0 | 10.0 | +| test.c:174:16:174:16 | c | 1.4375 | 3.0 | 4.0 | +| test.c:176:7:176:8 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:176:7:176:13 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:176:7:176:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:176:8:176:8 | 7 | 1.0 | -1.0 | -1.0 | +| test.c:176:13:176:13 | a | 3.3125 | 5.0 | 5.0 | +| test.c:176:18:176:18 | a | 2.15625 | 4.0 | 5.0 | +| test.c:176:18:176:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:176:23:176:23 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:177:13:177:14 | + ... | 1.578125 | 4.0 | 3.0 | +| test.c:177:14:177:14 | a | 1.578125 | 4.0 | 3.0 | +| test.c:178:13:178:14 | - ... | 1.578125 | 3.0 | 4.0 | +| test.c:178:14:178:14 | a | 1.578125 | 4.0 | 3.0 | +| test.c:179:5:179:9 | total | 15.71533203125 | 47.0 | 47.0 | +| test.c:179:5:179:16 | ... += ... | 39.138696789741516 | 80.0 | 80.0 | +| test.c:179:14:179:14 | b | 1.578125 | 4.0 | 3.0 | +| test.c:179:14:179:16 | ... + ... | 2.490478515625 | 10.0 | 10.0 | +| test.c:179:16:179:16 | c | 1.578125 | 3.0 | 4.0 | +| test.c:181:7:181:8 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:181:7:181:13 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:181:7:181:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:181:8:181:8 | 7 | 1.0 | -1.0 | -1.0 | +| test.c:181:13:181:13 | a | 3.734375 | 6.0 | 6.0 | +| test.c:181:18:181:18 | a | 2.3671875 | 5.0 | 6.0 | +| test.c:181:18:181:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:181:23:181:23 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:182:13:182:14 | + ... | 1.68359375 | 5.0 | 3.0 | +| test.c:182:14:182:14 | a | 1.68359375 | 5.0 | 3.0 | +| test.c:183:13:183:14 | - ... | 1.68359375 | 3.0 | 5.0 | +| test.c:183:14:183:14 | a | 1.68359375 | 5.0 | 3.0 | +| test.c:184:5:184:9 | total | 54.854028820991516 | 80.0 | 80.0 | +| test.c:184:5:184:16 | ... += ... | 155.4830817843049 | 111.0 | 111.0 | +| test.c:184:14:184:14 | b | 1.68359375 | 5.0 | 3.0 | +| test.c:184:14:184:16 | ... + ... | 2.8344879150390625 | 13.0 | 13.0 | +| test.c:184:16:184:16 | c | 1.68359375 | 3.0 | 5.0 | +| test.c:186:7:186:8 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:186:7:186:13 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:186:7:186:24 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:186:8:186:8 | 7 | 1.0 | -1.0 | -1.0 | +| test.c:186:13:186:13 | a | 4.05078125 | 7.0 | 7.0 | +| test.c:186:18:186:18 | a | 2.525390625 | 6.0 | 7.0 | +| test.c:186:18:186:24 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:186:23:186:24 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:186:24:186:24 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:187:13:187:14 | + ... | 1.7626953125 | 6.0 | 2.0 | +| test.c:187:14:187:14 | a | 1.7626953125 | 6.0 | 2.0 | +| test.c:188:13:188:14 | - ... | 1.7626953125 | 2.0 | 6.0 | +| test.c:188:14:188:14 | a | 1.7626953125 | 6.0 | 2.0 | +| test.c:189:5:189:9 | total | 210.3371106052964 | 111.0 | 111.0 | +| test.c:189:5:189:16 | ... += ... | 653.5373351858337 | 137.0 | 137.0 | +| test.c:189:14:189:14 | b | 1.7626953125 | 6.0 | 2.0 | +| test.c:189:14:189:16 | ... + ... | 3.1070947647094727 | 12.0 | 12.0 | +| test.c:189:16:189:16 | c | 1.7626953125 | 2.0 | 6.0 | +| test.c:192:10:192:14 | total | 863.8744457911301 | 137.0 | 137.0 | +| test.c:198:14:198:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:200:7:200:7 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:200:7:200:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:200:7:200:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:200:7:200:33 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:200:7:200:44 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:200:12:200:12 | a | 1.0 | 1.0 | 1.0 | +| test.c:200:17:200:17 | a | 1.0 | 1.0 | 1.0 | +| test.c:200:17:200:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:200:22:200:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:200:28:200:28 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:200:28:200:33 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:200:33:200:33 | b | 1.0 | 1.0 | 1.0 | +| test.c:200:38:200:38 | b | 1.0 | 1.0 | 1.0 | +| test.c:200:38:200:44 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:200:43:200:44 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:201:13:201:13 | a | 1.0 | 1.0 | 1.0 | +| test.c:201:13:201:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:201:15:201:15 | b | 1.0 | 1.0 | 1.0 | +| test.c:202:5:202:9 | total | 1.0 | 1.0 | 1.0 | +| test.c:202:5:202:14 | ... += ... | 1.0 | 1.0 | 1.0 | +| test.c:202:14:202:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:204:7:204:7 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:204:7:204:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:204:7:204:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:204:7:204:33 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:204:7:204:44 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:204:12:204:12 | a | 2.0 | 3.0 | 3.0 | +| test.c:204:17:204:17 | a | 1.5 | 2.0 | 3.0 | +| test.c:204:17:204:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:204:22:204:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:204:28:204:28 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:204:28:204:33 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:204:33:204:33 | b | 3.0 | 3.0 | 3.0 | +| test.c:204:38:204:38 | b | 2.0 | 3.0 | 3.0 | +| test.c:204:38:204:44 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:204:43:204:44 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:205:13:205:13 | a | 1.25 | 2.0 | 2.0 | +| test.c:205:13:205:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:205:15:205:15 | b | 1.5 | 3.0 | 2.0 | +| test.c:206:5:206:9 | total | 2.0 | 2.0 | 2.0 | +| test.c:206:5:206:14 | ... += ... | 2.0 | 2.0 | 2.0 | +| test.c:206:14:206:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:208:7:208:7 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:208:7:208:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:208:7:208:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:208:7:208:35 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:208:7:208:46 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:208:12:208:12 | a | 2.75 | 3.0 | 3.0 | +| test.c:208:17:208:17 | a | 1.875 | 2.0 | 3.0 | +| test.c:208:17:208:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:208:22:208:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:208:28:208:30 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:208:28:208:35 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:208:29:208:30 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:208:35:208:35 | b | 6.5 | 4.0 | 4.0 | +| test.c:208:40:208:40 | b | 3.75 | 4.0 | 4.0 | +| test.c:208:40:208:46 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:208:45:208:46 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:209:13:209:13 | a | 1.4375 | 2.0 | 2.0 | +| test.c:209:13:209:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:209:15:209:15 | b | 2.375 | 4.0 | 3.0 | +| test.c:210:5:210:9 | total | 4.0 | 2.0 | 2.0 | +| test.c:210:5:210:14 | ... += ... | 4.0 | 2.0 | 2.0 | +| test.c:210:14:210:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:212:7:212:7 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:212:7:212:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:212:7:212:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:212:7:212:35 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:212:7:212:45 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:212:12:212:12 | a | 3.3125 | 3.0 | 3.0 | +| test.c:212:17:212:17 | a | 2.15625 | 2.0 | 3.0 | +| test.c:212:17:212:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:212:22:212:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:212:28:212:30 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:212:28:212:35 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:212:29:212:30 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:212:35:212:35 | b | 12.625 | 5.0 | 5.0 | +| test.c:212:40:212:40 | b | 6.8125 | 4.0 | 5.0 | +| test.c:212:40:212:45 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:212:45:212:45 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:213:13:213:13 | a | 1.578125 | 2.0 | 2.0 | +| test.c:213:13:213:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:213:15:213:15 | b | 3.90625 | 4.0 | 3.0 | +| test.c:214:5:214:9 | total | 8.0 | 2.0 | 2.0 | +| test.c:214:5:214:14 | ... += ... | 8.0 | 2.0 | 2.0 | +| test.c:214:14:214:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:216:7:216:7 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:216:7:216:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:216:7:216:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:216:7:216:35 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:216:7:216:46 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:216:12:216:12 | a | 3.734375 | 3.0 | 3.0 | +| test.c:216:17:216:17 | a | 2.3671875 | 2.0 | 3.0 | +| test.c:216:17:216:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:216:22:216:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:216:28:216:30 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:216:28:216:35 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:216:29:216:30 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:216:35:216:35 | b | 23.34375 | 6.0 | 6.0 | +| test.c:216:40:216:40 | b | 12.171875 | 5.0 | 6.0 | +| test.c:216:40:216:46 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:216:45:216:46 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:216:46:216:46 | 7 | 1.0 | -1.0 | -1.0 | +| test.c:217:13:217:13 | a | 1.68359375 | 2.0 | 2.0 | +| test.c:217:13:217:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:217:15:217:15 | b | 6.5859375 | 5.0 | 2.0 | +| test.c:218:5:218:9 | total | 16.0 | 2.0 | 2.0 | +| test.c:218:5:218:14 | ... += ... | 16.0 | 2.0 | 2.0 | +| test.c:218:14:218:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:221:10:221:14 | total | 32.0 | 2.0 | 2.0 | +| test.c:226:14:226:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:228:7:228:7 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:228:7:228:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:228:7:228:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:228:7:228:33 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:228:7:228:44 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:228:12:228:12 | a | 1.0 | 1.0 | 1.0 | +| test.c:228:17:228:17 | a | 1.0 | 1.0 | 1.0 | +| test.c:228:17:228:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:228:22:228:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:228:28:228:28 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:228:28:228:33 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:228:33:228:33 | b | 1.0 | 1.0 | 1.0 | +| test.c:228:38:228:38 | b | 1.0 | 1.0 | 1.0 | +| test.c:228:38:228:44 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:228:43:228:44 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:229:13:229:13 | a | 1.0 | 1.0 | 1.0 | +| test.c:229:13:229:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:229:15:229:15 | b | 1.0 | 1.0 | 1.0 | +| test.c:230:5:230:9 | total | 1.0 | 1.0 | 1.0 | +| test.c:230:5:230:14 | ... += ... | 1.0 | 1.0 | 1.0 | +| test.c:230:14:230:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:232:7:232:7 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:232:7:232:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:232:7:232:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:232:7:232:33 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:232:7:232:44 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:232:12:232:12 | a | 2.0 | 3.0 | 3.0 | +| test.c:232:17:232:17 | a | 1.5 | 2.0 | 3.0 | +| test.c:232:17:232:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:232:22:232:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:232:28:232:28 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:232:28:232:33 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:232:33:232:33 | b | 3.0 | 3.0 | 3.0 | +| test.c:232:38:232:38 | b | 2.0 | 3.0 | 3.0 | +| test.c:232:38:232:44 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:232:43:232:44 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:233:13:233:13 | a | 1.25 | 2.0 | 2.0 | +| test.c:233:13:233:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:233:15:233:15 | b | 1.5 | 3.0 | 2.0 | +| test.c:234:5:234:9 | total | 2.0 | 2.0 | 2.0 | +| test.c:234:5:234:14 | ... += ... | 2.0 | 2.0 | 2.0 | +| test.c:234:14:234:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:236:7:236:7 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:236:7:236:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:236:7:236:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:236:7:236:35 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:236:7:236:46 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:236:12:236:12 | a | 2.75 | 3.0 | 3.0 | +| test.c:236:17:236:17 | a | 1.875 | 2.0 | 3.0 | +| test.c:236:17:236:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:236:22:236:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:236:28:236:30 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:236:28:236:35 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:236:29:236:30 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:236:35:236:35 | b | 6.5 | 4.0 | 4.0 | +| test.c:236:40:236:40 | b | 3.75 | 4.0 | 4.0 | +| test.c:236:40:236:46 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:236:45:236:46 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:237:13:237:13 | a | 1.4375 | 2.0 | 2.0 | +| test.c:237:13:237:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:237:15:237:15 | b | 2.375 | 4.0 | 3.0 | +| test.c:238:5:238:9 | total | 4.0 | 2.0 | 2.0 | +| test.c:238:5:238:14 | ... += ... | 4.0 | 2.0 | 2.0 | +| test.c:238:14:238:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:240:7:240:7 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:240:7:240:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:240:7:240:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:240:7:240:35 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:240:7:240:45 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:240:12:240:12 | a | 3.3125 | 3.0 | 3.0 | +| test.c:240:17:240:17 | a | 2.15625 | 2.0 | 3.0 | +| test.c:240:17:240:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:240:22:240:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:240:28:240:30 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:240:28:240:35 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:240:29:240:30 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:240:35:240:35 | b | 12.625 | 5.0 | 5.0 | +| test.c:240:40:240:40 | b | 6.8125 | 4.0 | 5.0 | +| test.c:240:40:240:45 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:240:45:240:45 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:241:13:241:13 | a | 1.578125 | 2.0 | 2.0 | +| test.c:241:13:241:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:241:15:241:15 | b | 3.90625 | 4.0 | 3.0 | +| test.c:242:5:242:9 | total | 8.0 | 2.0 | 2.0 | +| test.c:242:5:242:14 | ... += ... | 8.0 | 2.0 | 2.0 | +| test.c:242:14:242:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:244:7:244:7 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:244:7:244:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:244:7:244:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:244:7:244:35 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:244:7:244:46 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:244:12:244:12 | a | 3.734375 | 3.0 | 3.0 | +| test.c:244:17:244:17 | a | 2.3671875 | 2.0 | 3.0 | +| test.c:244:17:244:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:244:22:244:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:244:28:244:30 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:244:28:244:35 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:244:29:244:30 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:244:35:244:35 | b | 23.34375 | 6.0 | 6.0 | +| test.c:244:40:244:40 | b | 12.171875 | 5.0 | 6.0 | +| test.c:244:40:244:46 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:244:45:244:46 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:244:46:244:46 | 7 | 1.0 | -1.0 | -1.0 | +| test.c:245:13:245:13 | a | 1.68359375 | 2.0 | 2.0 | +| test.c:245:13:245:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:245:15:245:15 | b | 6.5859375 | 5.0 | 2.0 | +| test.c:246:5:246:9 | total | 16.0 | 2.0 | 2.0 | +| test.c:246:5:246:14 | ... += ... | 16.0 | 2.0 | 2.0 | +| test.c:246:14:246:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:249:10:249:14 | total | 32.0 | 2.0 | 2.0 | +| test.c:254:14:254:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:256:7:256:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:256:7:256:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:256:7:256:25 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:256:7:256:35 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:256:7:256:46 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:256:8:256:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:256:14:256:14 | a | 1.0 | 1.0 | 1.0 | +| test.c:256:19:256:19 | a | 1.0 | 1.0 | 1.0 | +| test.c:256:19:256:25 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:256:24:256:25 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:256:30:256:30 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:256:30:256:35 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:256:35:256:35 | b | 1.0 | 1.0 | 1.0 | +| test.c:256:40:256:40 | b | 1.0 | 1.0 | 1.0 | +| test.c:256:40:256:46 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:256:45:256:46 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:257:13:257:13 | a | 1.0 | 1.0 | 1.0 | +| test.c:257:13:257:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:257:15:257:15 | b | 1.0 | 1.0 | 1.0 | +| test.c:258:5:258:9 | total | 1.0 | 1.0 | 1.0 | +| test.c:258:5:258:14 | ... += ... | 1.0 | 1.0 | 1.0 | +| test.c:258:14:258:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:260:7:260:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:260:7:260:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:260:7:260:25 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:260:7:260:35 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:260:7:260:46 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:260:8:260:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:260:14:260:14 | a | 2.0 | 3.0 | 3.0 | +| test.c:260:19:260:19 | a | 1.5 | 2.0 | 3.0 | +| test.c:260:19:260:25 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:260:24:260:25 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:260:30:260:30 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:260:30:260:35 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:260:35:260:35 | b | 3.0 | 3.0 | 3.0 | +| test.c:260:40:260:40 | b | 2.0 | 3.0 | 3.0 | +| test.c:260:40:260:46 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:260:45:260:46 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:261:13:261:13 | a | 1.25 | 2.0 | 2.0 | +| test.c:261:13:261:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:261:15:261:15 | b | 1.5 | 3.0 | 2.0 | +| test.c:262:5:262:9 | total | 2.0 | 2.0 | 2.0 | +| test.c:262:5:262:14 | ... += ... | 2.0 | 2.0 | 2.0 | +| test.c:262:14:262:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:264:7:264:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:264:7:264:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:264:7:264:25 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:264:7:264:37 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:264:7:264:48 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:264:8:264:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:264:14:264:14 | a | 2.75 | 3.0 | 3.0 | +| test.c:264:19:264:19 | a | 1.875 | 2.0 | 3.0 | +| test.c:264:19:264:25 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:264:24:264:25 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:264:30:264:32 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:264:30:264:37 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:264:31:264:32 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:264:37:264:37 | b | 6.5 | 4.0 | 4.0 | +| test.c:264:42:264:42 | b | 3.75 | 4.0 | 4.0 | +| test.c:264:42:264:48 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:264:47:264:48 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:265:13:265:13 | a | 1.4375 | 2.0 | 2.0 | +| test.c:265:13:265:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:265:15:265:15 | b | 2.375 | 4.0 | 3.0 | +| test.c:266:5:266:9 | total | 4.0 | 2.0 | 2.0 | +| test.c:266:5:266:14 | ... += ... | 4.0 | 2.0 | 2.0 | +| test.c:266:14:266:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:268:7:268:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:268:7:268:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:268:7:268:25 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:268:7:268:37 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:268:7:268:47 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:268:8:268:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:268:14:268:14 | a | 3.3125 | 3.0 | 3.0 | +| test.c:268:19:268:19 | a | 2.15625 | 2.0 | 3.0 | +| test.c:268:19:268:25 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:268:24:268:25 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:268:30:268:32 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:268:30:268:37 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:268:31:268:32 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:268:37:268:37 | b | 12.625 | 5.0 | 5.0 | +| test.c:268:42:268:42 | b | 6.8125 | 4.0 | 5.0 | +| test.c:268:42:268:47 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:268:47:268:47 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:269:13:269:13 | a | 1.578125 | 2.0 | 2.0 | +| test.c:269:13:269:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:269:15:269:15 | b | 3.90625 | 4.0 | 3.0 | +| test.c:270:5:270:9 | total | 8.0 | 2.0 | 2.0 | +| test.c:270:5:270:14 | ... += ... | 8.0 | 2.0 | 2.0 | +| test.c:270:14:270:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:272:7:272:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:272:7:272:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:272:7:272:25 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:272:7:272:37 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:272:7:272:48 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:272:8:272:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:272:14:272:14 | a | 3.734375 | 3.0 | 3.0 | +| test.c:272:19:272:19 | a | 2.3671875 | 2.0 | 3.0 | +| test.c:272:19:272:25 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:272:24:272:25 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:272:30:272:32 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:272:30:272:37 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:272:31:272:32 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:272:37:272:37 | b | 23.34375 | 6.0 | 6.0 | +| test.c:272:42:272:42 | b | 12.171875 | 5.0 | 6.0 | +| test.c:272:42:272:48 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:272:47:272:48 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:272:48:272:48 | 7 | 1.0 | -1.0 | -1.0 | +| test.c:273:13:273:13 | a | 1.68359375 | 2.0 | 2.0 | +| test.c:273:13:273:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:273:15:273:15 | b | 6.5859375 | 5.0 | 2.0 | +| test.c:274:5:274:9 | total | 16.0 | 2.0 | 2.0 | +| test.c:274:5:274:14 | ... += ... | 16.0 | 2.0 | 2.0 | +| test.c:274:14:274:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:277:10:277:14 | total | 32.0 | 2.0 | 2.0 | +| test.c:282:14:282:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:284:7:284:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:284:7:284:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:284:7:284:24 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:284:7:284:34 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:284:7:284:45 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:284:8:284:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:284:14:284:14 | a | 1.0 | 1.0 | 1.0 | +| test.c:284:19:284:19 | a | 1.0 | 1.0 | 1.0 | +| test.c:284:19:284:24 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:284:24:284:24 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:284:29:284:29 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:284:29:284:34 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:284:34:284:34 | b | 1.0 | 1.0 | 1.0 | +| test.c:284:39:284:39 | b | 1.0 | 1.0 | 1.0 | +| test.c:284:39:284:45 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:284:44:284:45 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:285:13:285:13 | a | 1.0 | 1.0 | 1.0 | +| test.c:285:13:285:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:285:15:285:15 | b | 1.0 | 1.0 | 1.0 | +| test.c:286:5:286:9 | total | 1.0 | 1.0 | 1.0 | +| test.c:286:5:286:14 | ... += ... | 1.0 | 1.0 | 1.0 | +| test.c:286:14:286:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:288:7:288:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:288:7:288:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:288:7:288:24 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:288:7:288:34 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:288:7:288:45 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:288:8:288:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:288:14:288:14 | a | 2.0 | 3.0 | 3.0 | +| test.c:288:19:288:19 | a | 1.5 | 2.0 | 3.0 | +| test.c:288:19:288:24 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:288:24:288:24 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:288:29:288:29 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:288:29:288:34 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:288:34:288:34 | b | 3.0 | 3.0 | 3.0 | +| test.c:288:39:288:39 | b | 2.0 | 3.0 | 3.0 | +| test.c:288:39:288:45 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:288:44:288:45 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:289:13:289:13 | a | 1.25 | 2.0 | 2.0 | +| test.c:289:13:289:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:289:15:289:15 | b | 1.5 | 3.0 | 2.0 | +| test.c:290:5:290:9 | total | 2.0 | 2.0 | 2.0 | +| test.c:290:5:290:14 | ... += ... | 2.0 | 2.0 | 2.0 | +| test.c:290:14:290:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:292:7:292:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:292:7:292:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:292:7:292:24 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:292:7:292:36 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:292:7:292:47 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:292:8:292:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:292:14:292:14 | a | 2.75 | 3.0 | 3.0 | +| test.c:292:19:292:19 | a | 1.875 | 2.0 | 3.0 | +| test.c:292:19:292:24 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:292:24:292:24 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:292:29:292:31 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:292:29:292:36 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:292:30:292:31 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:292:36:292:36 | b | 6.5 | 4.0 | 4.0 | +| test.c:292:41:292:41 | b | 3.75 | 4.0 | 4.0 | +| test.c:292:41:292:47 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:292:46:292:47 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:293:13:293:13 | a | 1.4375 | 2.0 | 2.0 | +| test.c:293:13:293:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:293:15:293:15 | b | 2.375 | 4.0 | 3.0 | +| test.c:294:5:294:9 | total | 4.0 | 2.0 | 2.0 | +| test.c:294:5:294:14 | ... += ... | 4.0 | 2.0 | 2.0 | +| test.c:294:14:294:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:296:7:296:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:296:7:296:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:296:7:296:24 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:296:7:296:36 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:296:7:296:46 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:296:8:296:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:296:14:296:14 | a | 3.3125 | 3.0 | 3.0 | +| test.c:296:19:296:19 | a | 2.15625 | 2.0 | 3.0 | +| test.c:296:19:296:24 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:296:24:296:24 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:296:29:296:31 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:296:29:296:36 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:296:30:296:31 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:296:36:296:36 | b | 12.625 | 5.0 | 5.0 | +| test.c:296:41:296:41 | b | 6.8125 | 4.0 | 5.0 | +| test.c:296:41:296:46 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:296:46:296:46 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:297:13:297:13 | a | 1.578125 | 2.0 | 2.0 | +| test.c:297:13:297:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:297:15:297:15 | b | 3.90625 | 4.0 | 3.0 | +| test.c:298:5:298:9 | total | 8.0 | 2.0 | 2.0 | +| test.c:298:5:298:14 | ... += ... | 8.0 | 2.0 | 2.0 | +| test.c:298:14:298:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:300:7:300:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:300:7:300:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:300:7:300:24 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:300:7:300:36 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:300:7:300:47 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:300:8:300:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:300:14:300:14 | a | 3.734375 | 3.0 | 3.0 | +| test.c:300:19:300:19 | a | 2.3671875 | 2.0 | 3.0 | +| test.c:300:19:300:24 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:300:24:300:24 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:300:29:300:31 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:300:29:300:36 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:300:30:300:31 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:300:36:300:36 | b | 23.34375 | 6.0 | 6.0 | +| test.c:300:41:300:41 | b | 12.171875 | 5.0 | 6.0 | +| test.c:300:41:300:47 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:300:46:300:47 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:300:47:300:47 | 7 | 1.0 | -1.0 | -1.0 | +| test.c:301:13:301:13 | a | 1.68359375 | 2.0 | 2.0 | +| test.c:301:13:301:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:301:15:301:15 | b | 6.5859375 | 5.0 | 2.0 | +| test.c:302:5:302:9 | total | 16.0 | 2.0 | 2.0 | +| test.c:302:5:302:14 | ... += ... | 16.0 | 2.0 | 2.0 | +| test.c:302:14:302:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:305:10:305:14 | total | 32.0 | 2.0 | 2.0 | +| test.c:310:14:310:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:312:7:312:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:312:7:312:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:312:7:312:25 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:312:7:312:35 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:312:7:312:46 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:312:8:312:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:312:14:312:14 | a | 1.0 | 1.0 | 1.0 | +| test.c:312:19:312:19 | a | 1.0 | 1.0 | 1.0 | +| test.c:312:19:312:25 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:312:24:312:25 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:312:25:312:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:312:30:312:30 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:312:30:312:35 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:312:35:312:35 | b | 1.0 | 1.0 | 1.0 | +| test.c:312:40:312:40 | b | 1.0 | 1.0 | 1.0 | +| test.c:312:40:312:46 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:312:45:312:46 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:313:13:313:13 | a | 1.0 | 1.0 | 1.0 | +| test.c:313:13:313:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:313:15:313:15 | b | 1.0 | 1.0 | 1.0 | +| test.c:314:5:314:9 | total | 1.0 | 1.0 | 1.0 | +| test.c:314:5:314:14 | ... += ... | 1.0 | 1.0 | 1.0 | +| test.c:314:14:314:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:316:7:316:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:316:7:316:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:316:7:316:25 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:316:7:316:35 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:316:7:316:46 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:316:8:316:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:316:14:316:14 | a | 2.0 | 3.0 | 3.0 | +| test.c:316:19:316:19 | a | 1.5 | 2.0 | 3.0 | +| test.c:316:19:316:25 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:316:24:316:25 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:316:25:316:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:316:30:316:30 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:316:30:316:35 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:316:35:316:35 | b | 3.0 | 3.0 | 3.0 | +| test.c:316:40:316:40 | b | 2.0 | 3.0 | 3.0 | +| test.c:316:40:316:46 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:316:45:316:46 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:317:13:317:13 | a | 1.25 | 2.0 | 2.0 | +| test.c:317:13:317:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:317:15:317:15 | b | 1.5 | 3.0 | 2.0 | +| test.c:318:5:318:9 | total | 2.0 | 2.0 | 2.0 | +| test.c:318:5:318:14 | ... += ... | 2.0 | 2.0 | 2.0 | +| test.c:318:14:318:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:320:7:320:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:320:7:320:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:320:7:320:25 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:320:7:320:37 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:320:7:320:48 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:320:8:320:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:320:14:320:14 | a | 2.75 | 3.0 | 3.0 | +| test.c:320:19:320:19 | a | 1.875 | 2.0 | 3.0 | +| test.c:320:19:320:25 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:320:24:320:25 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:320:25:320:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:320:30:320:32 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:320:30:320:37 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:320:31:320:32 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:320:37:320:37 | b | 6.5 | 4.0 | 4.0 | +| test.c:320:42:320:42 | b | 3.75 | 4.0 | 4.0 | +| test.c:320:42:320:48 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:320:47:320:48 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:321:13:321:13 | a | 1.4375 | 2.0 | 2.0 | +| test.c:321:13:321:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:321:15:321:15 | b | 2.375 | 4.0 | 3.0 | +| test.c:322:5:322:9 | total | 4.0 | 2.0 | 2.0 | +| test.c:322:5:322:14 | ... += ... | 4.0 | 2.0 | 2.0 | +| test.c:322:14:322:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:324:7:324:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:324:7:324:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:324:7:324:25 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:324:7:324:37 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:324:7:324:47 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:324:8:324:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:324:14:324:14 | a | 3.3125 | 3.0 | 3.0 | +| test.c:324:19:324:19 | a | 2.15625 | 2.0 | 3.0 | +| test.c:324:19:324:25 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:324:24:324:25 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:324:25:324:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:324:30:324:32 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:324:30:324:37 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:324:31:324:32 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:324:37:324:37 | b | 12.625 | 5.0 | 5.0 | +| test.c:324:42:324:42 | b | 6.8125 | 4.0 | 5.0 | +| test.c:324:42:324:47 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:324:47:324:47 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:325:13:325:13 | a | 1.578125 | 2.0 | 2.0 | +| test.c:325:13:325:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:325:15:325:15 | b | 3.90625 | 4.0 | 3.0 | +| test.c:326:5:326:9 | total | 8.0 | 2.0 | 2.0 | +| test.c:326:5:326:14 | ... += ... | 8.0 | 2.0 | 2.0 | +| test.c:326:14:326:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:328:7:328:9 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:328:7:328:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:328:7:328:25 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:328:7:328:37 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:328:7:328:48 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:328:8:328:9 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:328:14:328:14 | a | 3.734375 | 3.0 | 3.0 | +| test.c:328:19:328:19 | a | 2.3671875 | 2.0 | 3.0 | +| test.c:328:19:328:25 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:328:24:328:25 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:328:25:328:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:328:30:328:32 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:328:30:328:37 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:328:31:328:32 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:328:37:328:37 | b | 23.34375 | 6.0 | 6.0 | +| test.c:328:42:328:42 | b | 12.171875 | 5.0 | 6.0 | +| test.c:328:42:328:48 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:328:47:328:48 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:328:48:328:48 | 7 | 1.0 | -1.0 | -1.0 | +| test.c:329:13:329:13 | a | 1.68359375 | 2.0 | 2.0 | +| test.c:329:13:329:15 | ... * ... | 1.0 | -1.0 | -1.0 | +| test.c:329:15:329:15 | b | 6.5859375 | 5.0 | 2.0 | +| test.c:330:5:330:9 | total | 16.0 | 2.0 | 2.0 | +| test.c:330:5:330:14 | ... += ... | 16.0 | 2.0 | 2.0 | +| test.c:330:14:330:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:333:10:333:14 | total | 32.0 | 2.0 | 2.0 | +| test.c:339:28:339:43 | 9007199254740992 | 1.0 | -1.0 | -1.0 | +| test.c:339:28:339:47 | (unsigned long long)... | 1.0 | 1.0 | 1.0 | +| test.c:339:28:339:47 | ... - ... | 1.0 | 1.0 | 1.0 | +| test.c:339:47:339:47 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:339:47:339:47 | (long)... | 1.0 | 1.0 | 1.0 | +| test.c:341:32:341:34 | odd | 1.0 | 1.0 | 1.0 | +| test.c:341:32:341:39 | ... >> ... | 1.0 | 1.0 | 1.0 | +| test.c:341:39:341:39 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:343:10:343:16 | shifted | 1.0 | 1.0 | 1.0 | +| test.c:348:22:348:32 | (...) | 1.0 | 1.0 | 1.0 | +| test.c:348:22:348:36 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:348:22:348:44 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:348:23:348:23 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:348:23:348:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:348:23:348:27 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:348:23:348:31 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:348:27:348:27 | e | 1.0 | 1.0 | 1.0 | +| test.c:348:31:348:31 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:348:31:348:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:348:36:348:36 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:348:36:348:36 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:348:40:348:40 | e | 1.0 | 1.0 | 1.0 | +| test.c:348:44:348:44 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:348:44:348:44 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:349:20:349:30 | (...) | 2.0 | 2.0 | 1.0 | +| test.c:349:20:349:35 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:349:20:349:43 | (signed int)... | 1.5 | 1.0 | 1.0 | +| test.c:349:20:349:43 | ... ? ... : ... | 1.5 | 1.0 | 1.0 | +| test.c:349:21:349:21 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:349:21:349:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:349:21:349:25 | ... * ... | 2.0 | 1.0 | 2.0 | +| test.c:349:21:349:29 | ... + ... | 2.0 | 1.0 | 2.0 | +| test.c:349:25:349:25 | e | 2.0 | 1.0 | 2.0 | +| test.c:349:29:349:29 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:349:29:349:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:349:35:349:35 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:349:35:349:35 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:349:39:349:39 | e | 1.5 | 1.0 | 1.0 | +| test.c:349:43:349:43 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:349:43:349:43 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:350:22:350:32 | (...) | 3.0 | 1.0 | 1.0 | +| test.c:350:22:350:36 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:350:22:350:44 | ... ? ... : ... | 2.0 | 1.0 | 1.0 | +| test.c:350:23:350:23 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:350:23:350:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:350:23:350:27 | ... * ... | 3.0 | 1.0 | 2.0 | +| test.c:350:23:350:31 | ... + ... | 3.0 | 1.0 | 1.0 | +| test.c:350:27:350:27 | e | 3.0 | 1.0 | 2.0 | +| test.c:350:31:350:31 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:350:31:350:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:350:36:350:36 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:350:36:350:36 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:350:40:350:40 | e | 2.0 | 1.0 | 1.0 | +| test.c:350:44:350:44 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:350:44:350:44 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:351:22:351:32 | (...) | 4.0 | 2.0 | 2.0 | +| test.c:351:22:351:36 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:351:22:351:44 | ... ? ... : ... | 2.5 | 1.0 | 2.0 | +| test.c:351:23:351:23 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:351:23:351:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:351:23:351:27 | ... * ... | 4.0 | 1.0 | 2.0 | +| test.c:351:23:351:31 | ... + ... | 4.0 | 1.0 | 2.0 | +| test.c:351:27:351:27 | e | 4.0 | 1.0 | 2.0 | +| test.c:351:31:351:31 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:351:31:351:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:351:36:351:36 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:351:36:351:36 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:351:40:351:40 | e | 2.5 | 1.0 | 2.0 | +| test.c:351:44:351:44 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:351:44:351:44 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:352:22:352:32 | (...) | 5.0 | 2.0 | 2.0 | +| test.c:352:22:352:37 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:352:22:352:45 | ... ? ... : ... | 3.0 | 1.0 | 2.0 | +| test.c:352:23:352:23 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:352:23:352:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:352:23:352:27 | ... * ... | 5.0 | 1.0 | 3.0 | +| test.c:352:23:352:31 | ... + ... | 5.0 | 1.0 | 3.0 | +| test.c:352:27:352:27 | e | 5.0 | 1.0 | 3.0 | +| test.c:352:31:352:31 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:352:31:352:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:352:36:352:37 | 16 | 1.0 | -1.0 | -1.0 | +| test.c:352:36:352:37 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:352:41:352:41 | e | 3.0 | 1.0 | 2.0 | +| test.c:352:45:352:45 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:352:45:352:45 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:354:10:354:12 | bi1 | 1.0 | 1.0 | 1.0 | +| test.c:354:10:354:18 | ... + ... | 1.5 | 1.0 | 1.0 | +| test.c:354:10:354:24 | ... + ... | 3.0 | 1.0 | 1.0 | +| test.c:354:10:354:30 | ... + ... | 7.5 | 1.0 | 2.0 | +| test.c:354:10:354:36 | ... + ... | 22.5 | 1.0 | 2.0 | +| test.c:354:16:354:18 | (unsigned int)... | 1.5 | 1.0 | 1.0 | +| test.c:354:16:354:18 | bi2 | 1.5 | 1.0 | 1.0 | +| test.c:354:22:354:24 | bi3 | 2.0 | 1.0 | 1.0 | +| test.c:354:28:354:30 | bi4 | 2.5 | 1.0 | 2.0 | +| test.c:354:34:354:36 | bi5 | 3.0 | 1.0 | 2.0 | +| test.c:358:13:358:14 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:359:7:359:7 | x | 1.0 | 1.0 | 1.0 | +| test.c:359:7:359:11 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:359:11:359:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:360:12:360:13 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:360:13:360:13 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:363:10:363:10 | i | 13.0 | 3.0 | 4.0 | +| test.c:363:10:363:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:363:14:363:14 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:364:5:364:5 | i | 13.0 | 3.0 | 3.0 | +| test.c:364:5:364:7 | ... ++ | 13.0 | 3.0 | 3.0 | +| test.c:366:3:366:3 | d | 1.0 | -1.0 | -1.0 | +| test.c:366:3:366:7 | ... = ... | 7.0 | 1.0 | 4.0 | +| test.c:366:7:366:7 | i | 7.0 | 1.0 | 4.0 | +| test.c:367:7:367:7 | x | 1.0 | 1.0 | 1.0 | +| test.c:367:7:367:11 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:367:11:367:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:368:9:368:9 | d | 7.0 | 1.0 | 4.0 | +| test.c:368:9:368:14 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:368:13:368:14 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:368:14:368:14 | x | 1.0 | 1.0 | 1.0 | +| test.c:369:14:369:14 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:372:10:372:10 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:378:3:378:4 | y1 | 1.0 | -1.0 | -1.0 | +| test.c:378:3:378:23 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:378:8:378:8 | x | 1.0 | 1.0 | 1.0 | +| test.c:378:8:378:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:378:8:378:23 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:378:12:378:14 | 100 | 1.0 | -1.0 | -1.0 | +| test.c:378:12:378:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:378:18:378:18 | x | 1.0 | 1.0 | 1.0 | +| test.c:378:22:378:23 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:378:22:378:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:379:3:379:4 | y2 | 1.0 | -1.0 | -1.0 | +| test.c:379:3:379:24 | ... = ... | 1.5 | 2.0 | 1.0 | +| test.c:379:8:379:8 | x | 2.0 | 2.0 | 2.0 | +| test.c:379:8:379:15 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:379:8:379:24 | ... ? ... : ... | 1.5 | 2.0 | 1.0 | +| test.c:379:13:379:15 | 100 | 1.0 | -1.0 | -1.0 | +| test.c:379:13:379:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:379:19:379:20 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:379:19:379:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:379:24:379:24 | x | 1.5 | 2.0 | 1.0 | +| test.c:380:3:380:4 | y3 | 1.0 | -1.0 | -1.0 | +| test.c:380:3:380:8 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:380:8:380:8 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:380:8:380:8 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:381:3:381:4 | y4 | 1.0 | -1.0 | -1.0 | +| test.c:381:3:381:8 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:381:8:381:8 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:381:8:381:8 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:382:3:382:4 | y5 | 1.0 | -1.0 | -1.0 | +| test.c:382:3:382:8 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:382:8:382:8 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:382:8:382:8 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:383:3:383:4 | y6 | 1.0 | -1.0 | -1.0 | +| test.c:383:3:383:8 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:383:8:383:8 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:383:8:383:8 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:384:3:384:4 | y7 | 1.0 | -1.0 | -1.0 | +| test.c:384:3:384:8 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:384:8:384:8 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:384:8:384:8 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:385:3:385:4 | y8 | 1.0 | -1.0 | -1.0 | +| test.c:385:3:385:8 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:385:8:385:8 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:385:8:385:8 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:386:7:386:7 | x | 3.0 | 2.0 | 2.0 | +| test.c:386:7:386:13 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:386:11:386:13 | 300 | 1.0 | -1.0 | -1.0 | +| test.c:386:11:386:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:387:5:387:6 | y3 | 1.0 | -1.0 | -1.0 | +| test.c:387:5:387:15 | ... = ... | 2.0 | 3.0 | 3.0 | +| test.c:387:10:387:10 | x | 2.0 | 2.0 | 2.0 | +| test.c:387:10:387:15 | ... ? ... : ... | 2.0 | 3.0 | 3.0 | +| test.c:387:15:387:15 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:387:15:387:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:388:5:388:6 | y4 | 1.0 | -1.0 | -1.0 | +| test.c:388:5:388:17 | ... = ... | 2.0 | 3.0 | 3.0 | +| test.c:388:10:388:10 | x | 2.0 | 2.0 | 2.0 | +| test.c:388:10:388:17 | ... ? ... : ... | 2.0 | 3.0 | 3.0 | +| test.c:388:15:388:17 | 500 | 1.0 | -1.0 | -1.0 | +| test.c:388:15:388:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:389:5:389:6 | y5 | 1.0 | -1.0 | -1.0 | +| test.c:389:5:389:21 | ... = ... | 2.0 | 2.0 | 2.0 | +| test.c:389:10:389:14 | (...) | 2.0 | 2.0 | 2.0 | +| test.c:389:10:389:21 | ... ? ... : ... | 2.0 | 2.0 | 2.0 | +| test.c:389:11:389:11 | x | 2.0 | 2.0 | 2.0 | +| test.c:389:11:389:13 | ... + ... | 2.0 | 2.0 | 2.0 | +| test.c:389:13:389:13 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:389:13:389:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:389:19:389:21 | 500 | 1.0 | -1.0 | -1.0 | +| test.c:389:19:389:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:390:5:390:6 | y6 | 1.0 | -1.0 | -1.0 | +| test.c:390:5:390:36 | ... = ... | 2.0 | 4.0 | 3.0 | +| test.c:390:10:390:31 | (...) | 2.0 | 3.0 | 2.0 | +| test.c:390:10:390:36 | (unsigned int)... | 2.0 | 4.0 | 3.0 | +| test.c:390:10:390:36 | ... ? ... : ... | 2.0 | 4.0 | 3.0 | +| test.c:390:11:390:30 | (unsigned char)... | 2.0 | 2.0 | 2.0 | +| test.c:390:26:390:30 | (...) | 2.0 | 2.0 | 2.0 | +| test.c:390:27:390:27 | x | 2.0 | 2.0 | 2.0 | +| test.c:390:27:390:29 | ... + ... | 2.0 | 2.0 | 2.0 | +| test.c:390:29:390:29 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:390:29:390:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:390:36:390:36 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:391:5:391:6 | y7 | 1.0 | -1.0 | -1.0 | +| test.c:391:5:391:38 | ... = ... | 2.0 | 4.0 | 3.0 | +| test.c:391:10:391:31 | (...) | 2.0 | 3.0 | 2.0 | +| test.c:391:10:391:38 | (unsigned int)... | 2.0 | 4.0 | 3.0 | +| test.c:391:10:391:38 | ... ? ... : ... | 2.0 | 4.0 | 3.0 | +| test.c:391:11:391:30 | (unsigned char)... | 2.0 | 2.0 | 2.0 | +| test.c:391:26:391:30 | (...) | 2.0 | 2.0 | 2.0 | +| test.c:391:27:391:27 | x | 2.0 | 2.0 | 2.0 | +| test.c:391:27:391:29 | ... + ... | 2.0 | 2.0 | 2.0 | +| test.c:391:29:391:29 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:391:29:391:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:391:36:391:38 | 500 | 1.0 | -1.0 | -1.0 | +| test.c:392:5:392:6 | y8 | 1.0 | -1.0 | -1.0 | +| test.c:392:5:392:39 | ... = ... | 2.0 | 2.0 | 2.0 | +| test.c:392:10:392:32 | (...) | 2.0 | 2.0 | 2.0 | +| test.c:392:10:392:39 | (unsigned int)... | 2.0 | 2.0 | 2.0 | +| test.c:392:10:392:39 | ... ? ... : ... | 2.0 | 2.0 | 2.0 | +| test.c:392:11:392:31 | (unsigned short)... | 2.0 | 2.0 | 2.0 | +| test.c:392:27:392:31 | (...) | 2.0 | 2.0 | 2.0 | +| test.c:392:28:392:28 | x | 2.0 | 2.0 | 2.0 | +| test.c:392:28:392:30 | ... + ... | 2.0 | 2.0 | 2.0 | +| test.c:392:30:392:30 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:392:30:392:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:392:37:392:39 | 500 | 1.0 | -1.0 | -1.0 | +| test.c:394:10:394:11 | y1 | 1.0 | 1.0 | 1.0 | +| test.c:394:10:394:16 | ... + ... | 1.5 | 2.0 | 1.0 | +| test.c:394:10:394:21 | ... + ... | 4.5 | 6.0 | 4.0 | +| test.c:394:10:394:26 | ... + ... | 13.5 | 16.0 | 13.0 | +| test.c:394:10:394:31 | ... + ... | 40.5 | 40.0 | 33.0 | +| test.c:394:10:394:36 | ... + ... | 121.5 | 88.0 | 102.0 | +| test.c:394:10:394:41 | ... + ... | 364.5 | 186.0 | 214.0 | +| test.c:394:10:394:46 | ... + ... | 1093.5 | 265.0 | 276.0 | +| test.c:394:15:394:16 | y2 | 1.5 | 2.0 | 1.0 | +| test.c:394:20:394:21 | y3 | 3.0 | 3.0 | 4.0 | +| test.c:394:25:394:26 | y4 | 3.0 | 3.0 | 4.0 | +| test.c:394:30:394:31 | y5 | 3.0 | 3.0 | 3.0 | +| test.c:394:35:394:36 | y6 | 3.0 | 4.0 | 4.0 | +| test.c:394:40:394:41 | y7 | 3.0 | 4.0 | 4.0 | +| test.c:394:45:394:46 | y8 | 3.0 | 3.0 | 3.0 | +| test.c:400:3:400:4 | y1 | 1.0 | -1.0 | -1.0 | +| test.c:400:3:400:24 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:400:8:400:8 | x | 1.0 | 1.0 | 1.0 | +| test.c:400:8:400:14 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:400:8:400:24 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:400:12:400:14 | 100 | 1.0 | -1.0 | -1.0 | +| test.c:400:12:400:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:400:18:400:18 | x | 1.0 | 1.0 | 1.0 | +| test.c:400:22:400:24 | 110 | 1.0 | -1.0 | -1.0 | +| test.c:400:22:400:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:401:3:401:4 | y2 | 1.0 | -1.0 | -1.0 | +| test.c:401:3:401:25 | ... = ... | 1.5 | 1.0 | 2.0 | +| test.c:401:8:401:8 | x | 2.0 | 2.0 | 2.0 | +| test.c:401:8:401:15 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:401:8:401:25 | ... ? ... : ... | 1.5 | 1.0 | 2.0 | +| test.c:401:13:401:15 | 100 | 1.0 | -1.0 | -1.0 | +| test.c:401:13:401:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:401:19:401:21 | 110 | 1.0 | -1.0 | -1.0 | +| test.c:401:19:401:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:401:25:401:25 | x | 1.5 | 1.0 | 2.0 | +| test.c:402:3:402:4 | y3 | 1.0 | -1.0 | -1.0 | +| test.c:402:3:402:11 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:402:8:402:11 | 1000 | 1.0 | -1.0 | -1.0 | +| test.c:402:8:402:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:403:3:403:4 | y4 | 1.0 | -1.0 | -1.0 | +| test.c:403:3:403:11 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:403:8:403:11 | 1000 | 1.0 | -1.0 | -1.0 | +| test.c:403:8:403:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:404:3:404:4 | y5 | 1.0 | -1.0 | -1.0 | +| test.c:404:3:404:11 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:404:8:404:11 | 1000 | 1.0 | -1.0 | -1.0 | +| test.c:404:8:404:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:405:7:405:7 | x | 3.0 | 2.0 | 2.0 | +| test.c:405:7:405:14 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:405:12:405:14 | 300 | 1.0 | -1.0 | -1.0 | +| test.c:405:12:405:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:406:5:406:6 | y3 | 1.0 | -1.0 | -1.0 | +| test.c:406:5:406:21 | ... = ... | 2.0 | 2.0 | 3.0 | +| test.c:406:10:406:16 | (...) | 2.0 | 1.0 | 2.0 | +| test.c:406:10:406:21 | ... ? ... : ... | 2.0 | 2.0 | 3.0 | +| test.c:406:11:406:11 | x | 2.0 | 1.0 | 2.0 | +| test.c:406:11:406:15 | ... - ... | 2.0 | 1.0 | 2.0 | +| test.c:406:13:406:15 | 300 | 1.0 | -1.0 | -1.0 | +| test.c:406:13:406:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:406:21:406:21 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:406:21:406:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:407:5:407:6 | y4 | 1.0 | -1.0 | -1.0 | +| test.c:407:5:407:21 | ... = ... | 2.0 | 1.0 | 2.0 | +| test.c:407:10:407:16 | (...) | 2.0 | 1.0 | 2.0 | +| test.c:407:10:407:21 | ... ? ... : ... | 2.0 | 1.0 | 2.0 | +| test.c:407:11:407:11 | x | 2.0 | 1.0 | 2.0 | +| test.c:407:11:407:15 | ... - ... | 2.0 | 1.0 | 2.0 | +| test.c:407:13:407:15 | 200 | 1.0 | -1.0 | -1.0 | +| test.c:407:13:407:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:407:21:407:21 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:407:21:407:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:408:5:408:6 | y5 | 1.0 | -1.0 | -1.0 | +| test.c:408:5:408:38 | ... = ... | 2.0 | 2.0 | 2.0 | +| test.c:408:10:408:33 | (...) | 2.0 | 1.0 | 1.0 | +| test.c:408:10:408:38 | (unsigned int)... | 2.0 | 2.0 | 2.0 | +| test.c:408:10:408:38 | ... ? ... : ... | 2.0 | 2.0 | 2.0 | +| test.c:408:11:408:32 | (unsigned char)... | 2.0 | 1.0 | 2.0 | +| test.c:408:26:408:32 | (...) | 2.0 | 1.0 | 2.0 | +| test.c:408:27:408:27 | x | 2.0 | 1.0 | 2.0 | +| test.c:408:27:408:31 | ... - ... | 2.0 | 1.0 | 2.0 | +| test.c:408:29:408:31 | 200 | 1.0 | -1.0 | -1.0 | +| test.c:408:29:408:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:408:38:408:38 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:410:10:410:11 | y1 | 1.0 | 1.0 | 1.0 | +| test.c:410:10:410:16 | ... + ... | 1.5 | 1.0 | 2.0 | +| test.c:410:10:410:21 | ... + ... | 4.5 | 3.0 | 4.0 | +| test.c:410:10:410:26 | ... + ... | 13.5 | 2.0 | 3.0 | +| test.c:410:10:410:31 | ... + ... | 40.5 | 3.0 | 3.0 | +| test.c:410:15:410:16 | y2 | 1.5 | 1.0 | 2.0 | +| test.c:410:20:410:21 | y3 | 3.0 | 3.0 | 4.0 | +| test.c:410:25:410:26 | y4 | 3.0 | 2.0 | 3.0 | +| test.c:410:30:410:31 | y5 | 3.0 | 3.0 | 3.0 | +| test.c:415:14:415:14 | m | 1.0 | 1.0 | 1.0 | +| test.c:415:14:415:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:415:18:415:18 | n | 1.0 | 1.0 | 1.0 | +| test.c:415:18:415:95 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:415:22:415:22 | o | 1.0 | 1.0 | 1.0 | +| test.c:415:22:415:82 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:415:26:415:26 | p | 1.0 | 1.0 | 1.0 | +| test.c:415:26:415:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:415:30:415:30 | q | 1.0 | 1.0 | 1.0 | +| test.c:415:30:415:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:415:34:415:43 | 0.4743882700000000008 | 1.0 | -1.0 | -1.0 | +| test.c:415:47:415:56 | 0.1433388700000000071 | 1.0 | -1.0 | -1.0 | +| test.c:415:60:415:69 | 0.3527920299999999787 | 1.0 | -1.0 | -1.0 | +| test.c:415:73:415:82 | 0.3920645799999999959 | 1.0 | -1.0 | -1.0 | +| test.c:415:86:415:95 | 0.2154022499999999896 | 1.0 | -1.0 | -1.0 | +| test.c:415:99:415:108 | 0.4049680500000000238 | 1.0 | -1.0 | -1.0 | +| test.c:416:14:416:14 | m | 2.0 | 1.0 | 1.0 | +| test.c:416:14:416:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:416:18:416:18 | n | 3.0 | 1.0 | 1.0 | +| test.c:416:18:416:95 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:416:22:416:22 | o | 3.0 | 1.0 | 1.0 | +| test.c:416:22:416:82 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:416:26:416:26 | p | 3.0 | 1.0 | 1.0 | +| test.c:416:26:416:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:416:30:416:30 | q | 3.0 | 1.0 | 1.0 | +| test.c:416:30:416:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:416:34:416:43 | 0.3418334800000000229 | 1.0 | -1.0 | -1.0 | +| test.c:416:47:416:56 | 0.3533464000000000049 | 1.0 | -1.0 | -1.0 | +| test.c:416:60:416:69 | 0.2224785300000000077 | 1.0 | -1.0 | -1.0 | +| test.c:416:73:416:82 | 0.326618929999999974 | 1.0 | -1.0 | -1.0 | +| test.c:416:86:416:95 | 0.5927046500000000551 | 1.0 | -1.0 | -1.0 | +| test.c:416:99:416:108 | 0.5297741000000000255 | 1.0 | -1.0 | -1.0 | +| test.c:417:14:417:14 | m | 3.5 | 1.0 | 1.0 | +| test.c:417:14:417:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:417:18:417:18 | n | 8.0 | 1.0 | 1.0 | +| test.c:417:18:417:95 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:417:22:417:22 | o | 8.0 | 1.0 | 1.0 | +| test.c:417:22:417:82 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:417:26:417:26 | p | 8.0 | 1.0 | 1.0 | +| test.c:417:26:417:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:417:30:417:30 | q | 8.0 | 1.0 | 1.0 | +| test.c:417:30:417:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:417:34:417:43 | 0.774296030000000024 | 1.0 | -1.0 | -1.0 | +| test.c:417:47:417:56 | 0.3147808400000000062 | 1.0 | -1.0 | -1.0 | +| test.c:417:60:417:69 | 0.3123551399999999756 | 1.0 | -1.0 | -1.0 | +| test.c:417:73:417:82 | 0.05121255999999999725 | 1.0 | -1.0 | -1.0 | +| test.c:417:86:417:95 | 0.7931074500000000471 | 1.0 | -1.0 | -1.0 | +| test.c:417:99:417:108 | 0.6798145100000000385 | 1.0 | -1.0 | -1.0 | +| test.c:418:14:418:14 | m | 5.75 | 1.0 | 1.0 | +| test.c:418:14:418:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:418:18:418:18 | n | 20.5 | 1.0 | 1.0 | +| test.c:418:18:418:95 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:418:22:418:22 | o | 20.5 | 1.0 | 1.0 | +| test.c:418:22:418:82 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:418:26:418:26 | p | 20.5 | 1.0 | 1.0 | +| test.c:418:26:418:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:418:30:418:30 | q | 20.5 | 1.0 | 1.0 | +| test.c:418:30:418:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:418:34:418:43 | 0.4472955599999999809 | 1.0 | -1.0 | -1.0 | +| test.c:418:47:418:56 | 0.8059920200000000312 | 1.0 | -1.0 | -1.0 | +| test.c:418:60:418:69 | 0.9899726199999999698 | 1.0 | -1.0 | -1.0 | +| test.c:418:73:418:82 | 0.5995273199999999747 | 1.0 | -1.0 | -1.0 | +| test.c:418:86:418:95 | 0.3697694799999999837 | 1.0 | -1.0 | -1.0 | +| test.c:418:99:418:108 | 0.8386683499999999514 | 1.0 | -1.0 | -1.0 | +| test.c:419:14:419:14 | m | 9.125 | 1.0 | 1.0 | +| test.c:419:14:419:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:419:18:419:18 | n | 51.75 | 1.0 | 1.0 | +| test.c:419:18:419:95 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:419:22:419:22 | o | 51.75 | 1.0 | 1.0 | +| test.c:419:22:419:82 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:419:26:419:26 | p | 51.75 | 1.0 | 1.0 | +| test.c:419:26:419:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:419:30:419:30 | q | 51.75 | 1.0 | 1.0 | +| test.c:419:30:419:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:419:34:419:43 | 0.4931182800000000199 | 1.0 | -1.0 | -1.0 | +| test.c:419:47:419:56 | 0.9038991100000000056 | 1.0 | -1.0 | -1.0 | +| test.c:419:60:419:69 | 0.1059771199999999941 | 1.0 | -1.0 | -1.0 | +| test.c:419:73:419:82 | 0.2177842600000000073 | 1.0 | -1.0 | -1.0 | +| test.c:419:86:419:95 | 0.7248596600000000167 | 1.0 | -1.0 | -1.0 | +| test.c:419:99:419:108 | 0.6873487400000000136 | 1.0 | -1.0 | -1.0 | +| test.c:420:14:420:14 | m | 14.1875 | 1.0 | 1.0 | +| test.c:420:14:420:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:420:18:420:18 | n | 129.875 | 1.0 | 1.0 | +| test.c:420:18:420:95 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:420:22:420:22 | o | 129.875 | 1.0 | 1.0 | +| test.c:420:22:420:82 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:420:26:420:26 | p | 129.875 | 1.0 | 1.0 | +| test.c:420:26:420:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:420:30:420:30 | q | 129.875 | 1.0 | 1.0 | +| test.c:420:30:420:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:420:34:420:43 | 0.4745284799999999747 | 1.0 | -1.0 | -1.0 | +| test.c:420:47:420:56 | 0.107866500000000004 | 1.0 | -1.0 | -1.0 | +| test.c:420:60:420:69 | 0.1188457599999999947 | 1.0 | -1.0 | -1.0 | +| test.c:420:73:420:82 | 0.7616405200000000431 | 1.0 | -1.0 | -1.0 | +| test.c:420:86:420:95 | 0.3480889200000000239 | 1.0 | -1.0 | -1.0 | +| test.c:420:99:420:108 | 0.584408649999999974 | 1.0 | -1.0 | -1.0 | +| test.c:421:14:421:14 | m | 21.78125 | 1.0 | 1.0 | +| test.c:421:14:421:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:421:18:421:18 | n | 325.1875 | 1.0 | 1.0 | +| test.c:421:18:421:95 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:421:22:421:22 | o | 325.1875 | 1.0 | 1.0 | +| test.c:421:22:421:82 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:421:26:421:26 | p | 325.1875 | 1.0 | 1.0 | +| test.c:421:26:421:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:421:30:421:30 | q | 325.1875 | 1.0 | 1.0 | +| test.c:421:30:421:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:421:34:421:43 | 0.02524326 | 1.0 | -1.0 | -1.0 | +| test.c:421:47:421:56 | 0.8290504600000000446 | 1.0 | -1.0 | -1.0 | +| test.c:421:60:421:69 | 0.95823075000000002 | 1.0 | -1.0 | -1.0 | +| test.c:421:73:421:82 | 0.1251655799999999985 | 1.0 | -1.0 | -1.0 | +| test.c:421:86:421:95 | 0.8523517900000000536 | 1.0 | -1.0 | -1.0 | +| test.c:421:99:421:108 | 0.3623238400000000081 | 1.0 | -1.0 | -1.0 | +| test.c:422:14:422:14 | m | 33.171875 | 1.0 | 1.0 | +| test.c:422:14:422:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:422:18:422:18 | n | 813.46875 | 1.0 | 1.0 | +| test.c:422:18:422:95 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:422:22:422:22 | o | 813.46875 | 1.0 | 1.0 | +| test.c:422:22:422:82 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:422:26:422:26 | p | 813.46875 | 1.0 | 1.0 | +| test.c:422:26:422:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:422:30:422:30 | q | 813.46875 | 1.0 | 1.0 | +| test.c:422:30:422:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:422:34:422:43 | 0.3870862600000000153 | 1.0 | -1.0 | -1.0 | +| test.c:422:47:422:56 | 0.3287604399999999871 | 1.0 | -1.0 | -1.0 | +| test.c:422:60:422:69 | 0.1496348500000000137 | 1.0 | -1.0 | -1.0 | +| test.c:422:73:422:82 | 0.4504110800000000192 | 1.0 | -1.0 | -1.0 | +| test.c:422:86:422:95 | 0.4864090899999999884 | 1.0 | -1.0 | -1.0 | +| test.c:422:99:422:108 | 0.8433127200000000157 | 1.0 | -1.0 | -1.0 | +| test.c:423:14:423:14 | m | 50.2578125 | 1.0 | 1.0 | +| test.c:423:14:423:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:423:18:423:18 | n | 2034.171875 | 1.0 | 1.0 | +| test.c:423:18:423:95 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:423:22:423:22 | o | 2034.171875 | 1.0 | 1.0 | +| test.c:423:22:423:82 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:423:26:423:26 | p | 2034.171875 | 1.0 | 1.0 | +| test.c:423:26:423:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:423:30:423:30 | q | 2034.171875 | 1.0 | 1.0 | +| test.c:423:30:423:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:423:34:423:43 | 0.1575506299999999971 | 1.0 | -1.0 | -1.0 | +| test.c:423:47:423:56 | 0.7708683299999999905 | 1.0 | -1.0 | -1.0 | +| test.c:423:60:423:69 | 0.2642848099999999811 | 1.0 | -1.0 | -1.0 | +| test.c:423:73:423:82 | 0.1480050800000000111 | 1.0 | -1.0 | -1.0 | +| test.c:423:86:423:95 | 0.374281430000000026 | 1.0 | -1.0 | -1.0 | +| test.c:423:99:423:108 | 0.05328182000000000057 | 1.0 | -1.0 | -1.0 | +| test.c:424:14:424:14 | m | 75.88671875 | 1.0 | 1.0 | +| test.c:424:14:424:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:424:18:424:18 | n | 5085.9296875 | 1.0 | 1.0 | +| test.c:424:18:424:95 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:424:22:424:22 | o | 5085.9296875 | 1.0 | 1.0 | +| test.c:424:22:424:82 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:424:26:424:26 | p | 5085.9296875 | 1.0 | 1.0 | +| test.c:424:26:424:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:424:30:424:30 | q | 5085.9296875 | 1.0 | 1.0 | +| test.c:424:30:424:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:424:34:424:43 | 0.4173653600000000186 | 1.0 | -1.0 | -1.0 | +| test.c:424:47:424:56 | 0.7682662799999999681 | 1.0 | -1.0 | -1.0 | +| test.c:424:60:424:69 | 0.2764323799999999776 | 1.0 | -1.0 | -1.0 | +| test.c:424:73:424:82 | 0.5567927400000000082 | 1.0 | -1.0 | -1.0 | +| test.c:424:86:424:95 | 0.3946885700000000163 | 1.0 | -1.0 | -1.0 | +| test.c:424:99:424:108 | 0.6907214400000000198 | 1.0 | -1.0 | -1.0 | +| test.c:425:14:425:14 | m | 114.330078125 | 1.0 | 1.0 | +| test.c:425:14:425:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:425:18:425:18 | n | 12715.32421875 | 1.0 | 1.0 | +| test.c:425:18:425:95 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:425:22:425:22 | o | 12715.32421875 | 1.0 | 1.0 | +| test.c:425:22:425:82 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:425:26:425:26 | p | 12715.32421875 | 1.0 | 1.0 | +| test.c:425:26:425:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:425:30:425:30 | q | 12715.32421875 | 1.0 | 1.0 | +| test.c:425:30:425:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:425:34:425:43 | 0.8895534499999999678 | 1.0 | -1.0 | -1.0 | +| test.c:425:47:425:56 | 0.2990482400000000207 | 1.0 | -1.0 | -1.0 | +| test.c:425:60:425:69 | 0.7624258299999999711 | 1.0 | -1.0 | -1.0 | +| test.c:425:73:425:82 | 0.2051910999999999874 | 1.0 | -1.0 | -1.0 | +| test.c:425:86:425:95 | 0.8874555899999999609 | 1.0 | -1.0 | -1.0 | +| test.c:425:99:425:108 | 0.8137279800000000174 | 1.0 | -1.0 | -1.0 | +| test.c:426:14:426:14 | m | 171.9951171875 | 1.0 | 1.0 | +| test.c:426:14:426:108 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:426:18:426:18 | n | 31788.810546875 | 1.0 | 1.0 | +| test.c:426:18:426:95 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:426:22:426:22 | o | 31788.810546875 | 1.0 | 1.0 | +| test.c:426:22:426:82 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:426:26:426:26 | p | 31788.810546875 | 1.0 | 1.0 | +| test.c:426:26:426:69 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:426:30:426:30 | q | 31788.810546875 | 1.0 | 1.0 | +| test.c:426:30:426:56 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:426:34:426:43 | 0.4218627600000000033 | 1.0 | -1.0 | -1.0 | +| test.c:426:47:426:56 | 0.5384335799999999672 | 1.0 | -1.0 | -1.0 | +| test.c:426:60:426:69 | 0.4499667900000000054 | 1.0 | -1.0 | -1.0 | +| test.c:426:73:426:82 | 0.1320411400000000013 | 1.0 | -1.0 | -1.0 | +| test.c:426:86:426:95 | 0.5203124099999999475 | 1.0 | -1.0 | -1.0 | +| test.c:426:99:426:108 | 0.4276264699999999808 | 1.0 | -1.0 | -1.0 | +| test.c:432:19:432:19 | a | 1.0 | 1.0 | 1.0 | +| test.c:432:19:432:23 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:432:19:432:27 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:432:19:432:31 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:432:19:432:35 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:432:19:432:39 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:432:19:432:43 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:432:19:432:47 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:432:19:432:51 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:432:19:432:55 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:432:19:432:59 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:432:19:432:63 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:432:23:432:23 | b | 1.0 | 1.0 | 1.0 | +| test.c:432:27:432:27 | c | 1.0 | 1.0 | 1.0 | +| test.c:432:31:432:31 | d | 1.0 | 1.0 | 1.0 | +| test.c:432:35:432:35 | e | 1.0 | 1.0 | 1.0 | +| test.c:432:39:432:39 | f | 1.0 | 1.0 | 1.0 | +| test.c:432:43:432:43 | g | 1.0 | 1.0 | 1.0 | +| test.c:432:47:432:47 | h | 1.0 | 1.0 | 1.0 | +| test.c:432:51:432:51 | i | 1.0 | 1.0 | 1.0 | +| test.c:432:55:432:55 | j | 1.0 | 1.0 | 1.0 | +| test.c:432:59:432:59 | k | 1.0 | 1.0 | 1.0 | +| test.c:432:63:432:63 | l | 1.0 | 1.0 | 1.0 | +| test.c:434:10:434:15 | output | 1.0 | 1.0 | 1.0 | +| test.c:441:7:441:9 | rhs | 1.0 | 1.0 | 1.0 | +| test.c:441:7:441:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:441:13:441:14 | 12 | 1.0 | -1.0 | -1.0 | +| test.c:441:13:441:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:441:19:441:21 | rhs | 1.0 | 1.0 | 1.0 | +| test.c:441:19:441:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:441:26:441:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:442:7:442:9 | rhs | 2.0 | 2.0 | 2.0 | +| test.c:442:7:442:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:442:13:442:14 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:442:13:442:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:442:19:442:21 | rhs | 1.5 | 2.0 | 2.0 | +| test.c:442:19:442:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:442:26:442:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:443:7:443:9 | rhs | 3.0 | 3.0 | 3.0 | +| test.c:443:7:443:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:443:13:443:14 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:443:13:443:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:443:19:443:21 | rhs | 2.0 | 3.0 | 3.0 | +| test.c:443:19:443:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:443:26:443:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:444:7:444:9 | rhs | 4.0 | 4.0 | 4.0 | +| test.c:444:7:444:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:444:13:444:14 | 15 | 1.0 | -1.0 | -1.0 | +| test.c:444:13:444:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:444:19:444:21 | rhs | 2.5 | 4.0 | 4.0 | +| test.c:444:19:444:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:444:26:444:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:445:7:445:9 | rhs | 5.0 | 5.0 | 5.0 | +| test.c:445:7:445:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:445:13:445:14 | 16 | 1.0 | -1.0 | -1.0 | +| test.c:445:13:445:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:445:19:445:21 | rhs | 3.0 | 5.0 | 5.0 | +| test.c:445:19:445:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:445:26:445:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:446:10:446:12 | (int)... | 6.0 | 6.0 | 6.0 | +| test.c:446:10:446:12 | rhs | 6.0 | 6.0 | 6.0 | +| test.c:452:7:452:9 | rhs | 1.0 | 1.0 | 1.0 | +| test.c:452:7:452:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:452:13:452:14 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:452:13:452:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:452:19:452:21 | rhs | 1.0 | 1.0 | 1.0 | +| test.c:452:19:452:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:452:26:452:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:452:38:452:40 | rhs | 1.0 | 1.0 | 1.0 | +| test.c:452:38:452:45 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:452:45:452:45 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:453:7:453:9 | rhs | 2.0 | 2.0 | 2.0 | +| test.c:453:7:453:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:453:13:453:14 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:453:13:453:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:453:19:453:21 | rhs | 1.5 | 2.0 | 2.0 | +| test.c:453:19:453:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:453:26:453:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:453:38:453:40 | rhs | 1.5 | 1.0 | 2.0 | +| test.c:453:38:453:45 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:453:45:453:45 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:454:7:454:9 | rhs | 3.0 | 3.0 | 3.0 | +| test.c:454:7:454:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:454:13:454:14 | 12 | 1.0 | -1.0 | -1.0 | +| test.c:454:13:454:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:454:19:454:21 | rhs | 2.0 | 3.0 | 3.0 | +| test.c:454:19:454:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:454:26:454:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:454:38:454:40 | rhs | 2.0 | 1.0 | 3.0 | +| test.c:454:38:454:45 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:454:45:454:45 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:455:7:455:9 | rhs | 4.0 | 4.0 | 4.0 | +| test.c:455:7:455:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:455:13:455:14 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:455:13:455:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:455:19:455:21 | rhs | 2.5 | 4.0 | 4.0 | +| test.c:455:19:455:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:455:26:455:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:455:38:455:40 | rhs | 2.5 | 1.0 | 4.0 | +| test.c:455:38:455:45 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:455:45:455:45 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:456:7:456:9 | rhs | 5.0 | 5.0 | 5.0 | +| test.c:456:7:456:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:456:13:456:14 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:456:13:456:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:456:19:456:21 | rhs | 3.0 | 5.0 | 5.0 | +| test.c:456:19:456:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:456:26:456:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:456:38:456:40 | rhs | 3.0 | 1.0 | 5.0 | +| test.c:456:38:456:45 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:456:45:456:45 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:457:7:457:9 | rhs | 6.0 | 6.0 | 6.0 | +| test.c:457:7:457:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:457:13:457:14 | 15 | 1.0 | -1.0 | -1.0 | +| test.c:457:13:457:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:457:19:457:21 | rhs | 3.5 | 6.0 | 6.0 | +| test.c:457:19:457:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:457:26:457:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:457:38:457:40 | rhs | 3.5 | 1.0 | 6.0 | +| test.c:457:38:457:45 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:457:45:457:45 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:458:7:458:9 | rhs | 7.0 | 7.0 | 7.0 | +| test.c:458:7:458:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:458:13:458:14 | 16 | 1.0 | -1.0 | -1.0 | +| test.c:458:13:458:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:458:19:458:21 | rhs | 4.0 | 7.0 | 7.0 | +| test.c:458:19:458:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:458:26:458:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:458:38:458:40 | rhs | 4.0 | 1.0 | 7.0 | +| test.c:458:38:458:45 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:458:45:458:45 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:459:7:459:9 | rhs | 8.0 | 8.0 | 8.0 | +| test.c:459:7:459:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:459:13:459:14 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:459:13:459:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:459:19:459:21 | rhs | 4.5 | 8.0 | 8.0 | +| test.c:459:19:459:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:459:26:459:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:459:38:459:40 | rhs | 4.5 | 1.0 | 8.0 | +| test.c:459:38:459:45 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:459:45:459:45 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:460:7:460:9 | rhs | 9.0 | 9.0 | 9.0 | +| test.c:460:7:460:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:460:13:460:14 | 18 | 1.0 | -1.0 | -1.0 | +| test.c:460:13:460:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:460:19:460:21 | rhs | 5.0 | 9.0 | 9.0 | +| test.c:460:19:460:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:460:26:460:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:460:38:460:40 | rhs | 5.0 | 1.0 | 9.0 | +| test.c:460:38:460:45 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:460:45:460:45 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:461:7:461:9 | rhs | 10.0 | 10.0 | 10.0 | +| test.c:461:7:461:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:461:13:461:14 | 19 | 1.0 | -1.0 | -1.0 | +| test.c:461:13:461:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:461:19:461:21 | rhs | 5.5 | 10.0 | 10.0 | +| test.c:461:19:461:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:461:26:461:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:461:38:461:40 | rhs | 5.5 | 1.0 | 10.0 | +| test.c:461:38:461:45 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:461:45:461:45 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:462:7:462:9 | rhs | 11.0 | 11.0 | 11.0 | +| test.c:462:7:462:14 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:462:13:462:14 | 20 | 1.0 | -1.0 | -1.0 | +| test.c:462:13:462:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:462:19:462:21 | rhs | 6.0 | 11.0 | 11.0 | +| test.c:462:19:462:26 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:462:26:462:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:462:38:462:40 | rhs | 6.0 | 1.0 | 11.0 | +| test.c:462:38:462:45 | ... << ... | 1.0 | -1.0 | -1.0 | +| test.c:462:45:462:45 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:463:10:463:12 | (int)... | 12.0 | 12.0 | 12.0 | +| test.c:463:10:463:12 | rhs | 12.0 | 12.0 | 12.0 | +| test.c:467:7:467:7 | a | 1.0 | 1.0 | 1.0 | +| test.c:467:7:467:13 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.c:467:12:467:13 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:468:9:468:9 | b | 1.0 | 1.0 | 1.0 | +| test.c:468:9:468:15 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.c:468:14:468:15 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:469:7:469:7 | a | 1.0 | 1.0 | 1.0 | +| test.c:469:7:469:12 | ... += ... | 1.0 | 1.0 | 1.0 | +| test.c:469:12:469:12 | b | 1.0 | 1.0 | 1.0 | +| test.c:471:9:471:9 | a | 2.0 | 2.0 | 2.0 | +| test.c:471:9:471:15 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.c:471:14:471:15 | 18 | 1.0 | -1.0 | -1.0 | +| test.c:472:7:472:7 | b | 1.0 | -1.0 | -1.0 | +| test.c:472:7:472:12 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:472:11:472:12 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:477:11:477:11 | a | 3.5 | 4.0 | 4.0 | +| test.c:477:11:477:15 | ... + ... | 14.0 | 12.0 | 12.0 | +| test.c:477:15:477:15 | b | 4.0 | 3.0 | 3.0 | +| test.c:478:10:478:10 | a | 3.5 | 4.0 | 4.0 | +| test.c:478:10:478:14 | ... + ... | 14.0 | 12.0 | 12.0 | +| test.c:478:14:478:14 | b | 4.0 | 3.0 | 3.0 | +| test.c:485:4:487:50 | (...) | 1.0 | 1.0 | 1.0 | +| test.c:485:4:570:26 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:485:4:659:27 | ... ? ... : ... | 1.4542272872758854E125 | 1.0 | 1.0 | +| test.c:485:5:485:6 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:485:5:485:6 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:485:5:485:11 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:485:5:485:55 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:485:5:487:49 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:485:10:485:11 | ip | 1.0 | 1.0 | 1.0 | +| test.c:485:15:485:26 | (...) | 1.0 | 1.0 | 1.0 | +| test.c:485:15:485:31 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:485:15:485:55 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:485:16:485:16 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:485:16:485:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:485:16:485:21 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:485:16:485:25 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:485:20:485:21 | ip | 1.0 | 1.0 | 1.0 | +| test.c:485:25:485:25 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:485:25:485:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:485:30:485:31 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:485:30:485:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:485:35:485:50 | (...) | 1.0 | 1.0 | 1.0 | +| test.c:485:35:485:55 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:485:36:485:36 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:485:36:485:36 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:485:36:485:41 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:485:36:485:45 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:485:36:485:49 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:485:40:485:41 | ip | 1.0 | 1.0 | 1.0 | +| test.c:485:45:485:45 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:485:45:485:45 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:485:49:485:49 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:485:49:485:49 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:485:54:485:55 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:485:54:485:55 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:486:9:486:10 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:486:9:486:10 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:486:9:486:15 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:486:14:486:15 | ip | 1.0 | 1.0 | 1.0 | +| test.c:487:9:487:20 | (...) | 1.0 | 1.0 | 1.0 | +| test.c:487:9:487:25 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:487:9:487:49 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:487:10:487:10 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:487:10:487:10 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:487:10:487:15 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:487:10:487:19 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:487:14:487:15 | ip | 1.0 | 1.0 | 1.0 | +| test.c:487:19:487:19 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:487:19:487:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:487:24:487:25 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:487:24:487:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:487:29:487:44 | (...) | 1.0 | 1.0 | 1.0 | +| test.c:487:29:487:49 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:487:30:487:30 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:487:30:487:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:487:30:487:35 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:487:30:487:39 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:487:30:487:43 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:487:34:487:35 | ip | 1.0 | 1.0 | 1.0 | +| test.c:487:39:487:39 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:487:39:487:39 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:487:43:487:43 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:487:43:487:43 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:487:48:487:49 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:487:48:487:49 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:488:5:570:26 | (...) | 3.405969190536326E53 | 1.0 | 1.0 | +| test.c:488:6:488:6 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:488:6:488:6 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:488:6:488:23 | ... * ... | 2.0 | 1.0 | 1.0 | +| test.c:488:6:507:42 | ... + ... | 2.5265625E8 | 1.0 | 1.0 | +| test.c:488:6:527:24 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:488:6:570:25 | ... ? ... : ... | 3.405969190536326E53 | 1.0 | 1.0 | +| test.c:488:10:488:23 | (...) | 2.0 | 1.0 | 1.0 | +| test.c:488:11:488:12 | ip | 2.0 | 2.0 | 1.0 | +| test.c:488:11:488:17 | ... * ... | 2.0 | 2.0 | 1.0 | +| test.c:488:11:488:22 | ... + ... | 2.0 | 1.0 | 1.0 | +| test.c:488:16:488:17 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:488:16:488:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:488:21:488:22 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:488:21:488:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:489:7:507:42 | (...) | 1.26328125E8 | 1.0 | 1.0 | +| test.c:489:8:489:8 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:489:8:489:8 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:489:8:489:25 | ... * ... | 2.0 | 1.0 | 1.0 | +| test.c:489:8:490:26 | ... + ... | 4.0 | 1.0 | 1.0 | +| test.c:489:8:491:26 | ... + ... | 8.0 | 1.0 | 1.0 | +| test.c:489:8:496:22 | ... + ... | 272.25 | 1.0 | 1.0 | +| test.c:489:8:497:37 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:489:8:507:41 | ... ? ... : ... | 1.26328125E8 | 1.0 | 1.0 | +| test.c:489:12:489:25 | (...) | 2.0 | 1.0 | 1.0 | +| test.c:489:13:489:14 | ip | 2.0 | 2.0 | 1.0 | +| test.c:489:13:489:19 | ... * ... | 2.0 | 2.0 | 1.0 | +| test.c:489:13:489:24 | ... + ... | 2.0 | 1.0 | 1.0 | +| test.c:489:18:489:19 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:489:18:489:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:489:23:489:24 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:489:23:489:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:490:9:490:26 | (...) | 2.0 | 1.0 | 1.0 | +| test.c:490:10:490:10 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:490:10:490:10 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:490:10:490:15 | ... * ... | 2.0 | 2.0 | 1.0 | +| test.c:490:10:490:20 | ... * ... | 2.0 | 1.0 | 1.0 | +| test.c:490:10:490:25 | ... + ... | 2.0 | 1.0 | 1.0 | +| test.c:490:14:490:15 | ip | 2.0 | 2.0 | 1.0 | +| test.c:490:19:490:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:490:19:490:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:490:24:490:25 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:490:24:490:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:491:9:491:9 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:491:9:491:9 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:491:9:491:26 | ... * ... | 2.0 | 1.0 | 1.0 | +| test.c:491:13:491:26 | (...) | 2.0 | 1.0 | 1.0 | +| test.c:491:14:491:15 | ip | 2.0 | 2.0 | 1.0 | +| test.c:491:14:491:20 | ... * ... | 2.0 | 2.0 | 1.0 | +| test.c:491:14:491:25 | ... + ... | 2.0 | 1.0 | 1.0 | +| test.c:491:19:491:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:491:19:491:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:491:24:491:25 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:491:24:491:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:492:9:496:22 | (...) | 34.03125 | 1.0 | 1.0 | +| test.c:492:10:492:21 | (...) | 2.0 | 1.0 | 1.0 | +| test.c:492:10:492:26 | ... * ... | 2.0 | 1.0 | 1.0 | +| test.c:492:10:492:80 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:492:10:496:21 | ... ? ... : ... | 34.03125 | 1.0 | 1.0 | +| test.c:492:11:492:11 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:492:11:492:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:492:11:492:16 | ... * ... | 2.0 | 2.0 | 1.0 | +| test.c:492:11:492:20 | ... + ... | 2.0 | 1.0 | 1.0 | +| test.c:492:15:492:16 | ip | 2.0 | 2.0 | 1.0 | +| test.c:492:20:492:20 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:492:20:492:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:492:25:492:26 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:492:25:492:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:492:30:492:80 | (...) | 2.25 | 1.0 | 1.0 | +| test.c:492:31:492:32 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:492:31:492:32 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:492:31:492:43 | ... * ... | 2.0 | 1.0 | 1.0 | +| test.c:492:31:492:53 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:492:31:492:79 | ... ? ... : ... | 2.25 | 1.0 | 1.0 | +| test.c:492:36:492:43 | (...) | 2.0 | 1.0 | 1.0 | +| test.c:492:37:492:37 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:492:37:492:37 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:492:37:492:42 | ... * ... | 2.0 | 2.0 | 1.0 | +| test.c:492:41:492:42 | ip | 2.0 | 2.0 | 1.0 | +| test.c:492:47:492:48 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:492:47:492:48 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:492:47:492:53 | ... * ... | 2.0 | 2.0 | 1.0 | +| test.c:492:52:492:53 | ip | 2.0 | 2.0 | 1.0 | +| test.c:492:57:492:58 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:492:57:492:58 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:492:57:492:69 | ... * ... | 1.5 | 1.0 | 1.0 | +| test.c:492:62:492:69 | (...) | 1.5 | 1.0 | 1.0 | +| test.c:492:63:492:63 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:492:63:492:63 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:492:63:492:68 | ... * ... | 1.5 | 2.0 | 1.0 | +| test.c:492:67:492:68 | ip | 1.5 | 2.0 | 2.0 | +| test.c:492:73:492:74 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:492:73:492:74 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:492:73:492:79 | ... * ... | 1.5 | 2.0 | 1.0 | +| test.c:492:78:492:79 | ip | 1.5 | 2.0 | 2.0 | +| test.c:493:13:493:24 | (...) | 4.5 | 1.0 | 1.0 | +| test.c:493:13:493:29 | ... * ... | 4.5 | 1.0 | 1.0 | +| test.c:493:14:493:14 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:493:14:493:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:493:14:493:19 | ... * ... | 4.5 | 2.0 | 1.0 | +| test.c:493:14:493:23 | ... + ... | 4.5 | 1.0 | 1.0 | +| test.c:493:18:493:19 | ip | 4.5 | 2.0 | 4.0 | +| test.c:493:23:493:23 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:493:23:493:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:493:28:493:29 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:493:28:493:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:494:13:494:14 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:494:13:494:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:494:13:494:25 | ... * ... | 4.5 | 1.0 | 1.0 | +| test.c:494:13:494:35 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:494:13:496:21 | ... ? ... : ... | 7.5625 | 1.0 | 1.0 | +| test.c:494:18:494:25 | (...) | 4.5 | 1.0 | 1.0 | +| test.c:494:19:494:19 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:494:19:494:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:494:19:494:24 | ... * ... | 4.5 | 2.0 | 1.0 | +| test.c:494:23:494:24 | ip | 4.5 | 2.0 | 4.0 | +| test.c:494:29:494:30 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:494:29:494:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:494:29:494:35 | ... * ... | 4.5 | 2.0 | 1.0 | +| test.c:494:34:494:35 | ip | 4.5 | 2.0 | 4.0 | +| test.c:495:15:495:16 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:495:15:495:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:495:15:495:27 | ... * ... | 2.75 | 1.0 | 1.0 | +| test.c:495:20:495:27 | (...) | 2.75 | 1.0 | 1.0 | +| test.c:495:21:495:21 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:495:21:495:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:495:21:495:26 | ... * ... | 2.75 | 2.0 | 1.0 | +| test.c:495:25:495:26 | ip | 2.75 | 2.0 | 2.0 | +| test.c:496:15:496:16 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:496:15:496:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:496:15:496:21 | ... * ... | 2.75 | 2.0 | 1.0 | +| test.c:496:20:496:21 | ip | 2.75 | 2.0 | 2.0 | +| test.c:497:7:497:7 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:497:7:497:7 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:497:7:497:12 | ... * ... | 10.0 | 2.0 | 1.0 | +| test.c:497:7:497:17 | ... * ... | 10.0 | 1.0 | 1.0 | +| test.c:497:7:497:37 | ... + ... | 100.0 | 1.0 | 1.0 | +| test.c:497:11:497:12 | ip | 10.0 | 2.0 | 5.0 | +| test.c:497:16:497:17 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:497:16:497:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:497:21:497:32 | (...) | 10.0 | 1.0 | 1.0 | +| test.c:497:21:497:37 | ... * ... | 10.0 | 1.0 | 1.0 | +| test.c:497:22:497:22 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:497:22:497:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:497:22:497:27 | ... * ... | 10.0 | 2.0 | 1.0 | +| test.c:497:22:497:31 | ... + ... | 10.0 | 1.0 | 1.0 | +| test.c:497:26:497:27 | ip | 10.0 | 2.0 | 5.0 | +| test.c:497:31:497:31 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:497:31:497:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:497:36:497:37 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:497:36:497:37 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:498:11:498:11 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:498:11:498:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:498:11:498:28 | ... * ... | 10.0 | 1.0 | 1.0 | +| test.c:498:11:499:28 | ... + ... | 100.0 | 1.0 | 1.0 | +| test.c:498:11:500:28 | ... + ... | 1000.0 | 1.0 | 1.0 | +| test.c:498:11:506:24 | ... + ... | 1263281.25 | 1.0 | 1.0 | +| test.c:498:15:498:28 | (...) | 10.0 | 1.0 | 1.0 | +| test.c:498:16:498:17 | ip | 10.0 | 2.0 | 5.0 | +| test.c:498:16:498:22 | ... * ... | 10.0 | 2.0 | 1.0 | +| test.c:498:16:498:27 | ... + ... | 10.0 | 1.0 | 1.0 | +| test.c:498:21:498:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:498:21:498:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:498:26:498:27 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:498:26:498:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:499:11:499:28 | (...) | 10.0 | 1.0 | 1.0 | +| test.c:499:12:499:12 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:499:12:499:12 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:499:12:499:17 | ... * ... | 10.0 | 2.0 | 1.0 | +| test.c:499:12:499:22 | ... * ... | 10.0 | 1.0 | 1.0 | +| test.c:499:12:499:27 | ... + ... | 10.0 | 1.0 | 1.0 | +| test.c:499:16:499:17 | ip | 10.0 | 2.0 | 5.0 | +| test.c:499:21:499:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:499:21:499:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:499:26:499:27 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:499:26:499:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:500:11:500:11 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:500:11:500:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:500:11:500:28 | ... * ... | 10.0 | 1.0 | 1.0 | +| test.c:500:15:500:28 | (...) | 10.0 | 1.0 | 1.0 | +| test.c:500:16:500:17 | ip | 10.0 | 2.0 | 5.0 | +| test.c:500:16:500:22 | ... * ... | 10.0 | 2.0 | 1.0 | +| test.c:500:16:500:27 | ... + ... | 10.0 | 1.0 | 1.0 | +| test.c:500:21:500:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:500:21:500:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:500:26:500:27 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:500:26:500:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:501:11:506:24 | (...) | 1263.28125 | 1.0 | 1.0 | +| test.c:501:12:501:23 | (...) | 10.0 | 1.0 | 1.0 | +| test.c:501:12:501:28 | ... * ... | 10.0 | 1.0 | 1.0 | +| test.c:501:12:502:61 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:501:12:506:23 | ... ? ... : ... | 1263.28125 | 1.0 | 1.0 | +| test.c:501:13:501:13 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:501:13:501:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:501:13:501:18 | ... * ... | 10.0 | 2.0 | 1.0 | +| test.c:501:13:501:22 | ... + ... | 10.0 | 1.0 | 1.0 | +| test.c:501:17:501:18 | ip | 10.0 | 2.0 | 5.0 | +| test.c:501:22:501:22 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:501:22:501:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:501:27:501:28 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:501:27:501:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:502:11:502:61 | (...) | 30.25 | 1.0 | 1.0 | +| test.c:502:12:502:13 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:502:12:502:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:502:12:502:24 | ... * ... | 10.0 | 1.0 | 1.0 | +| test.c:502:12:502:34 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:502:12:502:60 | ... ? ... : ... | 30.25 | 1.0 | 1.0 | +| test.c:502:17:502:24 | (...) | 10.0 | 1.0 | 1.0 | +| test.c:502:18:502:18 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:502:18:502:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:502:18:502:23 | ... * ... | 10.0 | 2.0 | 1.0 | +| test.c:502:22:502:23 | ip | 10.0 | 2.0 | 5.0 | +| test.c:502:28:502:29 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:502:28:502:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:502:28:502:34 | ... * ... | 10.0 | 2.0 | 1.0 | +| test.c:502:33:502:34 | ip | 10.0 | 2.0 | 5.0 | +| test.c:502:38:502:39 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:502:38:502:39 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:502:38:502:50 | ... * ... | 5.5 | 1.0 | 1.0 | +| test.c:502:43:502:50 | (...) | 5.5 | 1.0 | 1.0 | +| test.c:502:44:502:44 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:502:44:502:44 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:502:44:502:49 | ... * ... | 5.5 | 2.0 | 1.0 | +| test.c:502:48:502:49 | ip | 5.5 | 2.0 | 2.0 | +| test.c:502:54:502:55 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:502:54:502:55 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:502:54:502:60 | ... * ... | 5.5 | 2.0 | 1.0 | +| test.c:502:59:502:60 | ip | 5.5 | 2.0 | 2.0 | +| test.c:503:15:503:26 | (...) | 16.5 | 1.0 | 1.0 | +| test.c:503:15:503:31 | ... * ... | 16.5 | 1.0 | 1.0 | +| test.c:503:16:503:16 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:503:16:503:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:503:16:503:21 | ... * ... | 16.5 | 2.0 | 1.0 | +| test.c:503:16:503:25 | ... + ... | 16.5 | 1.0 | 1.0 | +| test.c:503:20:503:21 | ip | 16.5 | 2.0 | 4.0 | +| test.c:503:25:503:25 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:503:25:503:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:503:30:503:31 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:503:30:503:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:504:15:504:16 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:504:15:504:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:504:15:504:27 | ... * ... | 16.5 | 1.0 | 1.0 | +| test.c:504:15:504:37 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:504:15:506:23 | ... ? ... : ... | 76.5625 | 1.0 | 1.0 | +| test.c:504:20:504:27 | (...) | 16.5 | 1.0 | 1.0 | +| test.c:504:21:504:21 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:504:21:504:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:504:21:504:26 | ... * ... | 16.5 | 2.0 | 1.0 | +| test.c:504:25:504:26 | ip | 16.5 | 2.0 | 4.0 | +| test.c:504:31:504:32 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:504:31:504:32 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:504:31:504:37 | ... * ... | 16.5 | 2.0 | 1.0 | +| test.c:504:36:504:37 | ip | 16.5 | 2.0 | 4.0 | +| test.c:505:17:505:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:505:17:505:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:505:17:505:29 | ... * ... | 8.75 | 1.0 | 1.0 | +| test.c:505:22:505:29 | (...) | 8.75 | 1.0 | 1.0 | +| test.c:505:23:505:23 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:505:23:505:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:505:23:505:28 | ... * ... | 8.75 | 2.0 | 1.0 | +| test.c:505:27:505:28 | ip | 8.75 | 2.0 | 2.0 | +| test.c:506:17:506:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:506:17:506:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:506:17:506:23 | ... * ... | 8.75 | 2.0 | 1.0 | +| test.c:506:22:506:23 | ip | 8.75 | 2.0 | 2.0 | +| test.c:507:11:507:11 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:507:11:507:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:507:11:507:16 | ... * ... | 10.0 | 2.0 | 1.0 | +| test.c:507:11:507:21 | ... * ... | 10.0 | 1.0 | 1.0 | +| test.c:507:11:507:41 | ... + ... | 100.0 | 1.0 | 1.0 | +| test.c:507:15:507:16 | ip | 10.0 | 2.0 | 5.0 | +| test.c:507:20:507:21 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:507:20:507:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:507:25:507:36 | (...) | 10.0 | 1.0 | 1.0 | +| test.c:507:25:507:41 | ... * ... | 10.0 | 1.0 | 1.0 | +| test.c:507:26:507:26 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:507:26:507:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:507:26:507:31 | ... * ... | 10.0 | 2.0 | 1.0 | +| test.c:507:26:507:35 | ... + ... | 10.0 | 1.0 | 1.0 | +| test.c:507:30:507:31 | ip | 10.0 | 2.0 | 5.0 | +| test.c:507:35:507:35 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:507:35:507:35 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:507:40:507:41 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:507:40:507:41 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:508:5:527:24 | (...) | 2.7409234531663296E16 | 1.0 | 1.0 | +| test.c:508:6:508:6 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:508:6:508:6 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:508:6:508:23 | ... * ... | 44.0 | 1.0 | 1.0 | +| test.c:508:6:509:24 | ... + ... | 1936.0 | 1.0 | 1.0 | +| test.c:508:6:510:24 | ... + ... | 85184.0 | 1.0 | 1.0 | +| test.c:508:6:515:20 | ... + ... | 6.74501553E9 | 1.0 | 1.0 | +| test.c:508:6:516:55 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:508:6:527:23 | ... ? ... : ... | 2.7409234531663296E16 | 1.0 | 1.0 | +| test.c:508:10:508:23 | (...) | 44.0 | 1.0 | 1.0 | +| test.c:508:11:508:12 | ip | 44.0 | 2.0 | 5.0 | +| test.c:508:11:508:17 | ... * ... | 44.0 | 2.0 | 1.0 | +| test.c:508:11:508:22 | ... + ... | 44.0 | 1.0 | 1.0 | +| test.c:508:16:508:17 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:508:16:508:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:508:21:508:22 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:508:21:508:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:509:7:509:24 | (...) | 44.0 | 1.0 | 1.0 | +| test.c:509:8:509:8 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:509:8:509:8 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:509:8:509:13 | ... * ... | 44.0 | 2.0 | 1.0 | +| test.c:509:8:509:18 | ... * ... | 44.0 | 1.0 | 1.0 | +| test.c:509:8:509:23 | ... + ... | 44.0 | 1.0 | 1.0 | +| test.c:509:12:509:13 | ip | 44.0 | 2.0 | 5.0 | +| test.c:509:17:509:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:509:17:509:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:509:22:509:23 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:509:22:509:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:510:7:510:7 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:510:7:510:7 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:510:7:510:24 | ... * ... | 44.0 | 1.0 | 1.0 | +| test.c:510:11:510:24 | (...) | 44.0 | 1.0 | 1.0 | +| test.c:510:12:510:13 | ip | 44.0 | 2.0 | 5.0 | +| test.c:510:12:510:18 | ... * ... | 44.0 | 2.0 | 1.0 | +| test.c:510:12:510:23 | ... + ... | 44.0 | 1.0 | 1.0 | +| test.c:510:17:510:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:510:17:510:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:510:22:510:23 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:510:22:510:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:511:7:515:20 | (...) | 79181.71875 | 1.0 | 1.0 | +| test.c:511:8:511:19 | (...) | 44.0 | 1.0 | 1.0 | +| test.c:511:8:511:24 | ... * ... | 44.0 | 1.0 | 1.0 | +| test.c:511:8:511:78 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:511:8:515:19 | ... ? ... : ... | 79181.71875 | 1.0 | 1.0 | +| test.c:511:9:511:9 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:511:9:511:9 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:511:9:511:14 | ... * ... | 44.0 | 2.0 | 1.0 | +| test.c:511:9:511:18 | ... + ... | 44.0 | 1.0 | 1.0 | +| test.c:511:13:511:14 | ip | 44.0 | 2.0 | 5.0 | +| test.c:511:18:511:18 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:511:18:511:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:511:23:511:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:511:23:511:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:511:28:511:78 | (...) | 506.25 | 1.0 | 1.0 | +| test.c:511:29:511:30 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:511:29:511:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:511:29:511:41 | ... * ... | 44.0 | 1.0 | 1.0 | +| test.c:511:29:511:51 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:511:29:511:77 | ... ? ... : ... | 506.25 | 1.0 | 1.0 | +| test.c:511:34:511:41 | (...) | 44.0 | 1.0 | 1.0 | +| test.c:511:35:511:35 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:511:35:511:35 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:511:35:511:40 | ... * ... | 44.0 | 2.0 | 1.0 | +| test.c:511:39:511:40 | ip | 44.0 | 2.0 | 5.0 | +| test.c:511:45:511:46 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:511:45:511:46 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:511:45:511:51 | ... * ... | 44.0 | 2.0 | 1.0 | +| test.c:511:50:511:51 | ip | 44.0 | 2.0 | 5.0 | +| test.c:511:55:511:56 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:511:55:511:56 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:511:55:511:67 | ... * ... | 22.5 | 1.0 | 1.0 | +| test.c:511:60:511:67 | (...) | 22.5 | 1.0 | 1.0 | +| test.c:511:61:511:61 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:511:61:511:61 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:511:61:511:66 | ... * ... | 22.5 | 2.0 | 1.0 | +| test.c:511:65:511:66 | ip | 22.5 | 2.0 | 2.0 | +| test.c:511:71:511:72 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:511:71:511:72 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:511:71:511:77 | ... * ... | 22.5 | 2.0 | 1.0 | +| test.c:511:76:511:77 | ip | 22.5 | 2.0 | 2.0 | +| test.c:512:11:512:22 | (...) | 67.5 | 1.0 | 1.0 | +| test.c:512:11:512:27 | ... * ... | 67.5 | 1.0 | 1.0 | +| test.c:512:12:512:12 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:512:12:512:12 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:512:12:512:17 | ... * ... | 67.5 | 2.0 | 1.0 | +| test.c:512:12:512:21 | ... + ... | 67.5 | 1.0 | 1.0 | +| test.c:512:16:512:17 | ip | 67.5 | 2.0 | 4.0 | +| test.c:512:21:512:21 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:512:21:512:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:512:26:512:27 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:512:26:512:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:513:11:513:12 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:513:11:513:12 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:513:11:513:23 | ... * ... | 67.5 | 1.0 | 1.0 | +| test.c:513:11:513:33 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:513:11:515:19 | ... ? ... : ... | 1173.0625 | 1.0 | 1.0 | +| test.c:513:16:513:23 | (...) | 67.5 | 1.0 | 1.0 | +| test.c:513:17:513:17 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:513:17:513:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:513:17:513:22 | ... * ... | 67.5 | 2.0 | 1.0 | +| test.c:513:21:513:22 | ip | 67.5 | 2.0 | 4.0 | +| test.c:513:27:513:28 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:513:27:513:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:513:27:513:33 | ... * ... | 67.5 | 2.0 | 1.0 | +| test.c:513:32:513:33 | ip | 67.5 | 2.0 | 4.0 | +| test.c:514:13:514:14 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:514:13:514:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:514:13:514:25 | ... * ... | 34.25 | 1.0 | 1.0 | +| test.c:514:18:514:25 | (...) | 34.25 | 1.0 | 1.0 | +| test.c:514:19:514:19 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:514:19:514:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:514:19:514:24 | ... * ... | 34.25 | 2.0 | 1.0 | +| test.c:514:23:514:24 | ip | 34.25 | 2.0 | 2.0 | +| test.c:515:13:515:14 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:515:13:515:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:515:13:515:19 | ... * ... | 34.25 | 2.0 | 1.0 | +| test.c:515:18:515:19 | ip | 34.25 | 2.0 | 2.0 | +| test.c:516:5:516:55 | (...) | 4692.25 | 1.0 | 1.0 | +| test.c:516:6:516:7 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:516:6:516:7 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:516:6:516:12 | ... * ... | 136.0 | 2.0 | 1.0 | +| test.c:516:6:516:28 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:516:6:516:54 | ... ? ... : ... | 4692.25 | 1.0 | 1.0 | +| test.c:516:11:516:12 | ip | 136.0 | 2.0 | 5.0 | +| test.c:516:16:516:23 | (...) | 136.0 | 1.0 | 1.0 | +| test.c:516:16:516:28 | ... * ... | 136.0 | 1.0 | 1.0 | +| test.c:516:17:516:18 | ip | 136.0 | 2.0 | 5.0 | +| test.c:516:17:516:22 | ... + ... | 136.0 | 2.0 | 1.0 | +| test.c:516:22:516:22 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:516:22:516:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:516:27:516:28 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:516:27:516:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:516:32:516:33 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:516:32:516:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:516:32:516:38 | ... * ... | 68.5 | 2.0 | 1.0 | +| test.c:516:37:516:38 | ip | 68.5 | 2.0 | 2.0 | +| test.c:516:42:516:49 | (...) | 68.5 | 1.0 | 1.0 | +| test.c:516:42:516:54 | ... * ... | 68.5 | 1.0 | 1.0 | +| test.c:516:43:516:44 | ip | 68.5 | 2.0 | 2.0 | +| test.c:516:43:516:48 | ... + ... | 68.5 | 2.0 | 1.0 | +| test.c:516:48:516:48 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:516:48:516:48 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:516:53:516:54 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:516:53:516:54 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:517:9:517:9 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:517:9:517:9 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:517:9:517:26 | ... * ... | 137.0 | 1.0 | 1.0 | +| test.c:517:9:518:26 | ... + ... | 18769.0 | 1.0 | 1.0 | +| test.c:517:9:519:26 | ... + ... | 2571353.0 | 1.0 | 1.0 | +| test.c:517:9:524:22 | ... + ... | 5.757033087936E12 | 1.0 | 1.0 | +| test.c:517:13:517:26 | (...) | 137.0 | 1.0 | 1.0 | +| test.c:517:14:517:15 | ip | 137.0 | 2.0 | 3.0 | +| test.c:517:14:517:20 | ... * ... | 137.0 | 2.0 | 1.0 | +| test.c:517:14:517:25 | ... + ... | 137.0 | 1.0 | 1.0 | +| test.c:517:19:517:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:517:19:517:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:517:24:517:25 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:517:24:517:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:518:9:518:26 | (...) | 137.0 | 1.0 | 1.0 | +| test.c:518:10:518:10 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:518:10:518:10 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:518:10:518:15 | ... * ... | 137.0 | 2.0 | 1.0 | +| test.c:518:10:518:20 | ... * ... | 137.0 | 1.0 | 1.0 | +| test.c:518:10:518:25 | ... + ... | 137.0 | 1.0 | 1.0 | +| test.c:518:14:518:15 | ip | 137.0 | 2.0 | 3.0 | +| test.c:518:19:518:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:518:19:518:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:518:24:518:25 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:518:24:518:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:519:9:519:9 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:519:9:519:9 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:519:9:519:26 | ... * ... | 137.0 | 1.0 | 1.0 | +| test.c:519:13:519:26 | (...) | 137.0 | 1.0 | 1.0 | +| test.c:519:14:519:15 | ip | 137.0 | 2.0 | 3.0 | +| test.c:519:14:519:20 | ... * ... | 137.0 | 2.0 | 1.0 | +| test.c:519:14:519:25 | ... + ... | 137.0 | 1.0 | 1.0 | +| test.c:519:19:519:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:519:19:519:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:519:24:519:25 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:519:24:519:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:520:9:524:22 | (...) | 2238912.0 | 1.0 | 1.0 | +| test.c:520:10:520:21 | (...) | 137.0 | 1.0 | 1.0 | +| test.c:520:10:520:26 | ... * ... | 137.0 | 1.0 | 1.0 | +| test.c:520:10:520:80 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:520:10:524:21 | ... ? ... : ... | 2238912.0 | 1.0 | 1.0 | +| test.c:520:11:520:11 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:520:11:520:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:520:11:520:16 | ... * ... | 137.0 | 2.0 | 1.0 | +| test.c:520:11:520:20 | ... + ... | 137.0 | 1.0 | 1.0 | +| test.c:520:15:520:16 | ip | 137.0 | 2.0 | 3.0 | +| test.c:520:20:520:20 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:520:20:520:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:520:25:520:26 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:520:25:520:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:520:30:520:80 | (...) | 4761.0 | 1.0 | 1.0 | +| test.c:520:31:520:32 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:520:31:520:32 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:520:31:520:43 | ... * ... | 137.0 | 1.0 | 1.0 | +| test.c:520:31:520:53 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:520:31:520:79 | ... ? ... : ... | 4761.0 | 1.0 | 1.0 | +| test.c:520:36:520:43 | (...) | 137.0 | 1.0 | 1.0 | +| test.c:520:37:520:37 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:520:37:520:37 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:520:37:520:42 | ... * ... | 137.0 | 2.0 | 1.0 | +| test.c:520:41:520:42 | ip | 137.0 | 2.0 | 3.0 | +| test.c:520:47:520:48 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:520:47:520:48 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:520:47:520:53 | ... * ... | 137.0 | 2.0 | 1.0 | +| test.c:520:52:520:53 | ip | 137.0 | 2.0 | 3.0 | +| test.c:520:57:520:58 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:520:57:520:58 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:520:57:520:69 | ... * ... | 69.0 | 1.0 | 1.0 | +| test.c:520:62:520:69 | (...) | 69.0 | 1.0 | 1.0 | +| test.c:520:63:520:63 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:520:63:520:63 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:520:63:520:68 | ... * ... | 69.0 | 2.0 | 1.0 | +| test.c:520:67:520:68 | ip | 69.0 | 2.0 | 2.0 | +| test.c:520:73:520:74 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:520:73:520:74 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:520:73:520:79 | ... * ... | 69.0 | 2.0 | 1.0 | +| test.c:520:78:520:79 | ip | 69.0 | 2.0 | 2.0 | +| test.c:521:13:521:24 | (...) | 207.0 | 1.0 | 1.0 | +| test.c:521:13:521:29 | ... * ... | 207.0 | 1.0 | 1.0 | +| test.c:521:14:521:14 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:521:14:521:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:521:14:521:19 | ... * ... | 207.0 | 2.0 | 1.0 | +| test.c:521:14:521:23 | ... + ... | 207.0 | 1.0 | 1.0 | +| test.c:521:18:521:19 | ip | 207.0 | 2.0 | 4.0 | +| test.c:521:23:521:23 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:521:23:521:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:521:28:521:29 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:521:28:521:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:522:13:522:14 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:522:13:522:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:522:13:522:25 | ... * ... | 207.0 | 1.0 | 1.0 | +| test.c:522:13:522:35 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:522:13:524:21 | ... ? ... : ... | 10816.0 | 1.0 | 1.0 | +| test.c:522:18:522:25 | (...) | 207.0 | 1.0 | 1.0 | +| test.c:522:19:522:19 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:522:19:522:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:522:19:522:24 | ... * ... | 207.0 | 2.0 | 1.0 | +| test.c:522:23:522:24 | ip | 207.0 | 2.0 | 4.0 | +| test.c:522:29:522:30 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:522:29:522:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:522:29:522:35 | ... * ... | 207.0 | 2.0 | 1.0 | +| test.c:522:34:522:35 | ip | 207.0 | 2.0 | 4.0 | +| test.c:523:15:523:16 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:523:15:523:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:523:15:523:27 | ... * ... | 104.0 | 1.0 | 1.0 | +| test.c:523:20:523:27 | (...) | 104.0 | 1.0 | 1.0 | +| test.c:523:21:523:21 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:523:21:523:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:523:21:523:26 | ... * ... | 104.0 | 2.0 | 1.0 | +| test.c:523:25:523:26 | ip | 104.0 | 2.0 | 2.0 | +| test.c:524:15:524:16 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:524:15:524:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:524:15:524:21 | ... * ... | 104.0 | 2.0 | 1.0 | +| test.c:524:20:524:21 | ip | 104.0 | 2.0 | 2.0 | +| test.c:525:9:525:10 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:525:9:525:10 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:525:9:525:15 | ... * ... | 137.0 | 2.0 | 1.0 | +| test.c:525:9:525:31 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:525:9:527:23 | ... ? ... : ... | 4761.0 | 1.0 | 1.0 | +| test.c:525:14:525:15 | ip | 137.0 | 2.0 | 3.0 | +| test.c:525:19:525:26 | (...) | 137.0 | 1.0 | 1.0 | +| test.c:525:19:525:31 | ... * ... | 137.0 | 1.0 | 1.0 | +| test.c:525:20:525:21 | ip | 137.0 | 2.0 | 3.0 | +| test.c:525:20:525:25 | ... + ... | 137.0 | 2.0 | 1.0 | +| test.c:525:25:525:25 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:525:25:525:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:525:30:525:31 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:525:30:525:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:526:11:526:12 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:526:11:526:12 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:526:11:526:17 | ... * ... | 69.0 | 2.0 | 1.0 | +| test.c:526:16:526:17 | ip | 69.0 | 2.0 | 2.0 | +| test.c:527:11:527:18 | (...) | 69.0 | 1.0 | 1.0 | +| test.c:527:11:527:23 | ... * ... | 69.0 | 1.0 | 1.0 | +| test.c:527:12:527:13 | ip | 69.0 | 2.0 | 2.0 | +| test.c:527:12:527:17 | ... + ... | 69.0 | 2.0 | 1.0 | +| test.c:527:17:527:17 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:527:17:527:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:527:22:527:23 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:527:22:527:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:528:9:528:9 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:528:9:528:9 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:528:9:528:26 | ... * ... | 553.0 | 1.0 | 1.0 | +| test.c:528:9:548:44 | ... + ... | 2.7365793897006286E28 | 1.0 | 1.0 | +| test.c:528:13:528:26 | (...) | 553.0 | 1.0 | 1.0 | +| test.c:528:14:528:15 | ip | 553.0 | 2.0 | 7.0 | +| test.c:528:14:528:20 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:528:14:528:25 | ... + ... | 553.0 | 1.0 | 1.0 | +| test.c:528:19:528:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:528:19:528:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:528:24:528:25 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:528:24:528:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:529:9:548:44 | (...) | 4.948606491321209E25 | 1.0 | 1.0 | +| test.c:529:10:529:10 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:529:10:529:10 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:529:10:529:27 | ... * ... | 553.0 | 1.0 | 1.0 | +| test.c:529:10:530:28 | ... + ... | 305809.0 | 1.0 | 1.0 | +| test.c:529:10:531:28 | ... + ... | 1.69112377E8 | 1.0 | 1.0 | +| test.c:529:10:537:24 | ... + ... | 2.431997246822707E16 | 1.0 | 1.0 | +| test.c:529:10:538:39 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:529:10:548:43 | ... ? ... : ... | 4.948606491321209E25 | 1.0 | 1.0 | +| test.c:529:14:529:27 | (...) | 553.0 | 1.0 | 1.0 | +| test.c:529:15:529:16 | ip | 553.0 | 2.0 | 7.0 | +| test.c:529:15:529:21 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:529:15:529:26 | ... + ... | 553.0 | 1.0 | 1.0 | +| test.c:529:20:529:21 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:529:20:529:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:529:25:529:26 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:529:25:529:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:530:11:530:28 | (...) | 553.0 | 1.0 | 1.0 | +| test.c:530:12:530:12 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:530:12:530:12 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:530:12:530:17 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:530:12:530:22 | ... * ... | 553.0 | 1.0 | 1.0 | +| test.c:530:12:530:27 | ... + ... | 553.0 | 1.0 | 1.0 | +| test.c:530:16:530:17 | ip | 553.0 | 2.0 | 7.0 | +| test.c:530:21:530:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:530:21:530:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:530:26:530:27 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:530:26:530:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:531:11:531:11 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:531:11:531:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:531:11:531:28 | ... * ... | 553.0 | 1.0 | 1.0 | +| test.c:531:15:531:28 | (...) | 553.0 | 1.0 | 1.0 | +| test.c:531:16:531:17 | ip | 553.0 | 2.0 | 7.0 | +| test.c:531:16:531:22 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:531:16:531:27 | ... + ... | 553.0 | 1.0 | 1.0 | +| test.c:531:21:531:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:531:21:531:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:531:26:531:27 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:531:26:531:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:532:11:537:24 | (...) | 1.43809536E8 | 1.0 | 1.0 | +| test.c:532:12:532:23 | (...) | 553.0 | 1.0 | 1.0 | +| test.c:532:12:532:28 | ... * ... | 553.0 | 1.0 | 1.0 | +| test.c:532:12:533:61 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:532:12:537:23 | ... ? ... : ... | 1.43809536E8 | 1.0 | 1.0 | +| test.c:532:13:532:13 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:532:13:532:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:532:13:532:18 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:532:13:532:22 | ... + ... | 553.0 | 1.0 | 1.0 | +| test.c:532:17:532:18 | ip | 553.0 | 2.0 | 7.0 | +| test.c:532:22:532:22 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:532:22:532:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:532:27:532:28 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:532:27:532:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:533:11:533:61 | (...) | 76729.0 | 1.0 | 1.0 | +| test.c:533:12:533:13 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:533:12:533:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:533:12:533:24 | ... * ... | 553.0 | 1.0 | 1.0 | +| test.c:533:12:533:34 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:533:12:533:60 | ... ? ... : ... | 76729.0 | 1.0 | 1.0 | +| test.c:533:17:533:24 | (...) | 553.0 | 1.0 | 1.0 | +| test.c:533:18:533:18 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:533:18:533:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:533:18:533:23 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:533:22:533:23 | ip | 553.0 | 2.0 | 7.0 | +| test.c:533:28:533:29 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:533:28:533:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:533:28:533:34 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:533:33:533:34 | ip | 553.0 | 2.0 | 7.0 | +| test.c:533:38:533:39 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:533:38:533:39 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:533:38:533:50 | ... * ... | 277.0 | 1.0 | 1.0 | +| test.c:533:43:533:50 | (...) | 277.0 | 1.0 | 1.0 | +| test.c:533:44:533:44 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:533:44:533:44 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:533:44:533:49 | ... * ... | 277.0 | 2.0 | 1.0 | +| test.c:533:48:533:49 | ip | 277.0 | 2.0 | 2.0 | +| test.c:533:54:533:55 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:533:54:533:55 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:533:54:533:60 | ... * ... | 277.0 | 2.0 | 1.0 | +| test.c:533:59:533:60 | ip | 277.0 | 2.0 | 2.0 | +| test.c:534:15:534:26 | (...) | 831.0 | 1.0 | 1.0 | +| test.c:534:15:534:31 | ... * ... | 831.0 | 1.0 | 1.0 | +| test.c:534:16:534:16 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:534:16:534:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:534:16:534:21 | ... * ... | 831.0 | 2.0 | 1.0 | +| test.c:534:16:534:25 | ... + ... | 831.0 | 1.0 | 1.0 | +| test.c:534:20:534:21 | ip | 831.0 | 2.0 | 4.0 | +| test.c:534:25:534:25 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:534:25:534:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:534:30:534:31 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:534:30:534:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:535:15:535:16 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:535:15:535:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:535:15:535:27 | ... * ... | 831.0 | 1.0 | 1.0 | +| test.c:535:15:535:37 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:535:15:537:23 | ... ? ... : ... | 173056.0 | 1.0 | 1.0 | +| test.c:535:20:535:27 | (...) | 831.0 | 1.0 | 1.0 | +| test.c:535:21:535:21 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:535:21:535:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:535:21:535:26 | ... * ... | 831.0 | 2.0 | 1.0 | +| test.c:535:25:535:26 | ip | 831.0 | 2.0 | 4.0 | +| test.c:535:31:535:32 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:535:31:535:32 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:535:31:535:37 | ... * ... | 831.0 | 2.0 | 1.0 | +| test.c:535:36:535:37 | ip | 831.0 | 2.0 | 4.0 | +| test.c:536:17:536:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:536:17:536:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:536:17:536:29 | ... * ... | 416.0 | 1.0 | 1.0 | +| test.c:536:22:536:29 | (...) | 416.0 | 1.0 | 1.0 | +| test.c:536:23:536:23 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:536:23:536:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:536:23:536:28 | ... * ... | 416.0 | 2.0 | 1.0 | +| test.c:536:27:536:28 | ip | 416.0 | 2.0 | 2.0 | +| test.c:537:17:537:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:537:17:537:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:537:17:537:23 | ... * ... | 416.0 | 2.0 | 1.0 | +| test.c:537:22:537:23 | ip | 416.0 | 2.0 | 2.0 | +| test.c:538:9:538:9 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:538:9:538:9 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:538:9:538:14 | ... * ... | 1663.0 | 2.0 | 1.0 | +| test.c:538:9:538:19 | ... * ... | 1663.0 | 1.0 | 1.0 | +| test.c:538:9:538:39 | ... + ... | 2765569.0 | 1.0 | 1.0 | +| test.c:538:13:538:14 | ip | 1663.0 | 2.0 | 4.0 | +| test.c:538:18:538:19 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:538:18:538:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:538:23:538:34 | (...) | 1663.0 | 1.0 | 1.0 | +| test.c:538:23:538:39 | ... * ... | 1663.0 | 1.0 | 1.0 | +| test.c:538:24:538:24 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:538:24:538:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:538:24:538:29 | ... * ... | 1663.0 | 2.0 | 1.0 | +| test.c:538:24:538:33 | ... + ... | 1663.0 | 1.0 | 1.0 | +| test.c:538:28:538:29 | ip | 1663.0 | 2.0 | 4.0 | +| test.c:538:33:538:33 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:538:33:538:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:538:38:538:39 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:538:38:538:39 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:539:13:539:13 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:539:13:539:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:539:13:539:30 | ... * ... | 1663.0 | 1.0 | 1.0 | +| test.c:539:13:540:30 | ... + ... | 2765569.0 | 1.0 | 1.0 | +| test.c:539:13:541:30 | ... + ... | 4.599141247E9 | 1.0 | 1.0 | +| test.c:539:13:547:26 | ... + ... | 1.7893628730005324E19 | 1.0 | 1.0 | +| test.c:539:17:539:30 | (...) | 1663.0 | 1.0 | 1.0 | +| test.c:539:18:539:19 | ip | 1663.0 | 2.0 | 4.0 | +| test.c:539:18:539:24 | ... * ... | 1663.0 | 2.0 | 1.0 | +| test.c:539:18:539:29 | ... + ... | 1663.0 | 1.0 | 1.0 | +| test.c:539:23:539:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:539:23:539:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:539:28:539:29 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:539:28:539:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:540:13:540:30 | (...) | 1663.0 | 1.0 | 1.0 | +| test.c:540:14:540:14 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:540:14:540:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:540:14:540:19 | ... * ... | 1663.0 | 2.0 | 1.0 | +| test.c:540:14:540:24 | ... * ... | 1663.0 | 1.0 | 1.0 | +| test.c:540:14:540:29 | ... + ... | 1663.0 | 1.0 | 1.0 | +| test.c:540:18:540:19 | ip | 1663.0 | 2.0 | 4.0 | +| test.c:540:23:540:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:540:23:540:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:540:28:540:29 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:540:28:540:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:541:13:541:13 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:541:13:541:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:541:13:541:30 | ... * ... | 1663.0 | 1.0 | 1.0 | +| test.c:541:17:541:30 | (...) | 1663.0 | 1.0 | 1.0 | +| test.c:541:18:541:19 | ip | 1663.0 | 2.0 | 4.0 | +| test.c:541:18:541:24 | ... * ... | 1663.0 | 2.0 | 1.0 | +| test.c:541:18:541:29 | ... + ... | 1663.0 | 1.0 | 1.0 | +| test.c:541:23:541:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:541:23:541:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:541:28:541:29 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:541:28:541:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:542:13:547:26 | (...) | 3.890645616E9 | 1.0 | 1.0 | +| test.c:542:14:542:25 | (...) | 1663.0 | 1.0 | 1.0 | +| test.c:542:14:542:30 | ... * ... | 1663.0 | 1.0 | 1.0 | +| test.c:542:14:543:63 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:542:14:547:25 | ... ? ... : ... | 3.890645616E9 | 1.0 | 1.0 | +| test.c:542:15:542:15 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:542:15:542:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:542:15:542:20 | ... * ... | 1663.0 | 2.0 | 1.0 | +| test.c:542:15:542:24 | ... + ... | 1663.0 | 1.0 | 1.0 | +| test.c:542:19:542:20 | ip | 1663.0 | 2.0 | 4.0 | +| test.c:542:24:542:24 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:542:24:542:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:542:29:542:30 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:542:29:542:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:543:13:543:63 | (...) | 692224.0 | 1.0 | 1.0 | +| test.c:543:14:543:15 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:543:14:543:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:543:14:543:26 | ... * ... | 1663.0 | 1.0 | 1.0 | +| test.c:543:14:543:36 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:543:14:543:62 | ... ? ... : ... | 692224.0 | 1.0 | 1.0 | +| test.c:543:19:543:26 | (...) | 1663.0 | 1.0 | 1.0 | +| test.c:543:20:543:20 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:543:20:543:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:543:20:543:25 | ... * ... | 1663.0 | 2.0 | 1.0 | +| test.c:543:24:543:25 | ip | 1663.0 | 2.0 | 4.0 | +| test.c:543:30:543:31 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:543:30:543:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:543:30:543:36 | ... * ... | 1663.0 | 2.0 | 1.0 | +| test.c:543:35:543:36 | ip | 1663.0 | 2.0 | 4.0 | +| test.c:543:40:543:41 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:543:40:543:41 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:543:40:543:52 | ... * ... | 832.0 | 1.0 | 1.0 | +| test.c:543:45:543:52 | (...) | 832.0 | 1.0 | 1.0 | +| test.c:543:46:543:46 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:543:46:543:46 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:543:46:543:51 | ... * ... | 832.0 | 2.0 | 1.0 | +| test.c:543:50:543:51 | ip | 832.0 | 2.0 | 2.0 | +| test.c:543:56:543:57 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:543:56:543:57 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:543:56:543:62 | ... * ... | 832.0 | 2.0 | 1.0 | +| test.c:543:61:543:62 | ip | 832.0 | 2.0 | 2.0 | +| test.c:544:17:544:28 | (...) | 2496.0 | 1.0 | 1.0 | +| test.c:544:17:544:33 | ... * ... | 2496.0 | 1.0 | 1.0 | +| test.c:544:18:544:18 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:544:18:544:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:544:18:544:23 | ... * ... | 2496.0 | 2.0 | 1.0 | +| test.c:544:18:544:27 | ... + ... | 2496.0 | 1.0 | 1.0 | +| test.c:544:22:544:23 | ip | 2496.0 | 2.0 | 4.0 | +| test.c:544:27:544:27 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:544:27:544:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:544:32:544:33 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:544:32:544:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:545:17:545:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:545:17:545:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:545:17:545:29 | ... * ... | 2496.0 | 1.0 | 1.0 | +| test.c:545:17:545:39 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:545:17:547:25 | ... ? ... : ... | 1558752.25 | 1.0 | 1.0 | +| test.c:545:22:545:29 | (...) | 2496.0 | 1.0 | 1.0 | +| test.c:545:23:545:23 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:545:23:545:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:545:23:545:28 | ... * ... | 2496.0 | 2.0 | 1.0 | +| test.c:545:27:545:28 | ip | 2496.0 | 2.0 | 4.0 | +| test.c:545:33:545:34 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:545:33:545:34 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:545:33:545:39 | ... * ... | 2496.0 | 2.0 | 1.0 | +| test.c:545:38:545:39 | ip | 2496.0 | 2.0 | 4.0 | +| test.c:546:19:546:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:546:19:546:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:546:19:546:31 | ... * ... | 1248.5 | 1.0 | 1.0 | +| test.c:546:24:546:31 | (...) | 1248.5 | 1.0 | 1.0 | +| test.c:546:25:546:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:546:25:546:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:546:25:546:30 | ... * ... | 1248.5 | 2.0 | 1.0 | +| test.c:546:29:546:30 | ip | 1248.5 | 2.0 | 2.0 | +| test.c:547:19:547:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:547:19:547:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:547:19:547:25 | ... * ... | 1248.5 | 2.0 | 1.0 | +| test.c:547:24:547:25 | ip | 1248.5 | 2.0 | 2.0 | +| test.c:548:13:548:13 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:548:13:548:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:548:13:548:18 | ... * ... | 1663.0 | 2.0 | 1.0 | +| test.c:548:13:548:23 | ... * ... | 1663.0 | 1.0 | 1.0 | +| test.c:548:13:548:43 | ... + ... | 2765569.0 | 1.0 | 1.0 | +| test.c:548:17:548:18 | ip | 1663.0 | 2.0 | 4.0 | +| test.c:548:22:548:23 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:548:22:548:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:548:27:548:38 | (...) | 1663.0 | 1.0 | 1.0 | +| test.c:548:27:548:43 | ... * ... | 1663.0 | 1.0 | 1.0 | +| test.c:548:28:548:28 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:548:28:548:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:548:28:548:33 | ... * ... | 1663.0 | 2.0 | 1.0 | +| test.c:548:28:548:37 | ... + ... | 1663.0 | 1.0 | 1.0 | +| test.c:548:32:548:33 | ip | 1663.0 | 2.0 | 4.0 | +| test.c:548:37:548:37 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:548:37:548:37 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:548:42:548:43 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:548:42:548:43 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:549:9:549:9 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:549:9:549:9 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:549:9:549:26 | ... * ... | 553.0 | 1.0 | 1.0 | +| test.c:549:9:550:30 | ... + ... | 305809.0 | 1.0 | 1.0 | +| test.c:549:9:551:30 | ... + ... | 1.69112377E8 | 1.0 | 1.0 | +| test.c:549:9:557:26 | ... + ... | 2.431997246822707E16 | 1.0 | 1.0 | +| test.c:549:9:558:61 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:549:9:570:25 | ... ? ... : ... | 1.2446082154075297E25 | 1.0 | 1.0 | +| test.c:549:13:549:26 | (...) | 553.0 | 1.0 | 1.0 | +| test.c:549:14:549:15 | ip | 553.0 | 2.0 | 7.0 | +| test.c:549:14:549:20 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:549:14:549:25 | ... + ... | 553.0 | 1.0 | 1.0 | +| test.c:549:19:549:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:549:19:549:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:549:24:549:25 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:549:24:549:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:550:13:550:30 | (...) | 553.0 | 1.0 | 1.0 | +| test.c:550:14:550:14 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:550:14:550:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:550:14:550:19 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:550:14:550:24 | ... * ... | 553.0 | 1.0 | 1.0 | +| test.c:550:14:550:29 | ... + ... | 553.0 | 1.0 | 1.0 | +| test.c:550:18:550:19 | ip | 553.0 | 2.0 | 7.0 | +| test.c:550:23:550:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:550:23:550:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:550:28:550:29 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:550:28:550:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:551:13:551:13 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:551:13:551:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:551:13:551:30 | ... * ... | 553.0 | 1.0 | 1.0 | +| test.c:551:17:551:30 | (...) | 553.0 | 1.0 | 1.0 | +| test.c:551:18:551:19 | ip | 553.0 | 2.0 | 7.0 | +| test.c:551:18:551:24 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:551:18:551:29 | ... + ... | 553.0 | 1.0 | 1.0 | +| test.c:551:23:551:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:551:23:551:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:551:28:551:29 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:551:28:551:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:552:13:557:26 | (...) | 1.43809536E8 | 1.0 | 1.0 | +| test.c:552:14:552:25 | (...) | 553.0 | 1.0 | 1.0 | +| test.c:552:14:552:30 | ... * ... | 553.0 | 1.0 | 1.0 | +| test.c:552:14:553:63 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:552:14:557:25 | ... ? ... : ... | 1.43809536E8 | 1.0 | 1.0 | +| test.c:552:15:552:15 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:552:15:552:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:552:15:552:20 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:552:15:552:24 | ... + ... | 553.0 | 1.0 | 1.0 | +| test.c:552:19:552:20 | ip | 553.0 | 2.0 | 7.0 | +| test.c:552:24:552:24 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:552:24:552:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:552:29:552:30 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:552:29:552:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:553:13:553:63 | (...) | 76729.0 | 1.0 | 1.0 | +| test.c:553:14:553:15 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:553:14:553:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:553:14:553:26 | ... * ... | 553.0 | 1.0 | 1.0 | +| test.c:553:14:553:36 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:553:14:553:62 | ... ? ... : ... | 76729.0 | 1.0 | 1.0 | +| test.c:553:19:553:26 | (...) | 553.0 | 1.0 | 1.0 | +| test.c:553:20:553:20 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:553:20:553:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:553:20:553:25 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:553:24:553:25 | ip | 553.0 | 2.0 | 7.0 | +| test.c:553:30:553:31 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:553:30:553:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:553:30:553:36 | ... * ... | 553.0 | 2.0 | 1.0 | +| test.c:553:35:553:36 | ip | 553.0 | 2.0 | 7.0 | +| test.c:553:40:553:41 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:553:40:553:41 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:553:40:553:52 | ... * ... | 277.0 | 1.0 | 1.0 | +| test.c:553:45:553:52 | (...) | 277.0 | 1.0 | 1.0 | +| test.c:553:46:553:46 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:553:46:553:46 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:553:46:553:51 | ... * ... | 277.0 | 2.0 | 1.0 | +| test.c:553:50:553:51 | ip | 277.0 | 2.0 | 2.0 | +| test.c:553:56:553:57 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:553:56:553:57 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:553:56:553:62 | ... * ... | 277.0 | 2.0 | 1.0 | +| test.c:553:61:553:62 | ip | 277.0 | 2.0 | 2.0 | +| test.c:554:17:554:28 | (...) | 831.0 | 1.0 | 1.0 | +| test.c:554:17:554:33 | ... * ... | 831.0 | 1.0 | 1.0 | +| test.c:554:18:554:18 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:554:18:554:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:554:18:554:23 | ... * ... | 831.0 | 2.0 | 1.0 | +| test.c:554:18:554:27 | ... + ... | 831.0 | 1.0 | 1.0 | +| test.c:554:22:554:23 | ip | 831.0 | 2.0 | 4.0 | +| test.c:554:27:554:27 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:554:27:554:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:554:32:554:33 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:554:32:554:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:555:17:555:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:555:17:555:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:555:17:555:29 | ... * ... | 831.0 | 1.0 | 1.0 | +| test.c:555:17:555:39 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:555:17:557:25 | ... ? ... : ... | 173056.0 | 1.0 | 1.0 | +| test.c:555:22:555:29 | (...) | 831.0 | 1.0 | 1.0 | +| test.c:555:23:555:23 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:555:23:555:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:555:23:555:28 | ... * ... | 831.0 | 2.0 | 1.0 | +| test.c:555:27:555:28 | ip | 831.0 | 2.0 | 4.0 | +| test.c:555:33:555:34 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:555:33:555:34 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:555:33:555:39 | ... * ... | 831.0 | 2.0 | 1.0 | +| test.c:555:38:555:39 | ip | 831.0 | 2.0 | 4.0 | +| test.c:556:19:556:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:556:19:556:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:556:19:556:31 | ... * ... | 416.0 | 1.0 | 1.0 | +| test.c:556:24:556:31 | (...) | 416.0 | 1.0 | 1.0 | +| test.c:556:25:556:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:556:25:556:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:556:25:556:30 | ... * ... | 416.0 | 2.0 | 1.0 | +| test.c:556:29:556:30 | ip | 416.0 | 2.0 | 2.0 | +| test.c:557:19:557:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:557:19:557:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:557:19:557:25 | ... * ... | 416.0 | 2.0 | 1.0 | +| test.c:557:24:557:25 | ip | 416.0 | 2.0 | 2.0 | +| test.c:558:11:558:61 | (...) | 692224.0 | 1.0 | 1.0 | +| test.c:558:12:558:13 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:558:12:558:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:558:12:558:18 | ... * ... | 1663.0 | 2.0 | 1.0 | +| test.c:558:12:558:34 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:558:12:558:60 | ... ? ... : ... | 692224.0 | 1.0 | 1.0 | +| test.c:558:17:558:18 | ip | 1663.0 | 2.0 | 4.0 | +| test.c:558:22:558:29 | (...) | 1663.0 | 1.0 | 1.0 | +| test.c:558:22:558:34 | ... * ... | 1663.0 | 1.0 | 1.0 | +| test.c:558:23:558:24 | ip | 1663.0 | 2.0 | 4.0 | +| test.c:558:23:558:28 | ... + ... | 1663.0 | 2.0 | 1.0 | +| test.c:558:28:558:28 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:558:28:558:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:558:33:558:34 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:558:33:558:34 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:558:38:558:39 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:558:38:558:39 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:558:38:558:44 | ... * ... | 832.0 | 2.0 | 1.0 | +| test.c:558:43:558:44 | ip | 832.0 | 2.0 | 2.0 | +| test.c:558:48:558:55 | (...) | 832.0 | 1.0 | 1.0 | +| test.c:558:48:558:60 | ... * ... | 832.0 | 1.0 | 1.0 | +| test.c:558:49:558:50 | ip | 832.0 | 2.0 | 2.0 | +| test.c:558:49:558:54 | ... + ... | 832.0 | 2.0 | 1.0 | +| test.c:558:54:558:54 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:558:54:558:54 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:558:59:558:60 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:558:59:558:60 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:559:11:559:11 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:559:11:559:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:559:11:559:28 | ... * ... | 1664.0 | 1.0 | 1.0 | +| test.c:559:11:560:28 | ... + ... | 2768896.0 | 1.0 | 1.0 | +| test.c:559:11:561:28 | ... + ... | 4.607442944E9 | 1.0 | 1.0 | +| test.c:559:11:567:24 | ... + ... | 1.7958256857326223E19 | 1.0 | 1.0 | +| test.c:559:15:559:28 | (...) | 1664.0 | 1.0 | 1.0 | +| test.c:559:16:559:17 | ip | 1664.0 | 2.0 | 3.0 | +| test.c:559:16:559:22 | ... * ... | 1664.0 | 2.0 | 1.0 | +| test.c:559:16:559:27 | ... + ... | 1664.0 | 1.0 | 1.0 | +| test.c:559:21:559:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:559:21:559:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:559:26:559:27 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:559:26:559:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:560:11:560:28 | (...) | 1664.0 | 1.0 | 1.0 | +| test.c:560:12:560:12 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:560:12:560:12 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:560:12:560:17 | ... * ... | 1664.0 | 2.0 | 1.0 | +| test.c:560:12:560:22 | ... * ... | 1664.0 | 1.0 | 1.0 | +| test.c:560:12:560:27 | ... + ... | 1664.0 | 1.0 | 1.0 | +| test.c:560:16:560:17 | ip | 1664.0 | 2.0 | 3.0 | +| test.c:560:21:560:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:560:21:560:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:560:26:560:27 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:560:26:560:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:561:11:561:11 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:561:11:561:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:561:11:561:28 | ... * ... | 1664.0 | 1.0 | 1.0 | +| test.c:561:15:561:28 | (...) | 1664.0 | 1.0 | 1.0 | +| test.c:561:16:561:17 | ip | 1664.0 | 2.0 | 3.0 | +| test.c:561:16:561:22 | ... * ... | 1664.0 | 2.0 | 1.0 | +| test.c:561:16:561:27 | ... + ... | 1664.0 | 1.0 | 1.0 | +| test.c:561:21:561:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:561:21:561:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:561:26:561:27 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:561:26:561:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:562:11:567:24 | (...) | 3.89766234234375E9 | 1.0 | 1.0 | +| test.c:562:12:562:23 | (...) | 1664.0 | 1.0 | 1.0 | +| test.c:562:12:562:28 | ... * ... | 1664.0 | 1.0 | 1.0 | +| test.c:562:12:563:61 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:562:12:567:23 | ... ? ... : ... | 3.89766234234375E9 | 1.0 | 1.0 | +| test.c:562:13:562:13 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:562:13:562:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:562:13:562:18 | ... * ... | 1664.0 | 2.0 | 1.0 | +| test.c:562:13:562:22 | ... + ... | 1664.0 | 1.0 | 1.0 | +| test.c:562:17:562:18 | ip | 1664.0 | 2.0 | 3.0 | +| test.c:562:22:562:22 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:562:22:562:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:562:27:562:28 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:562:27:562:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:563:11:563:61 | (...) | 693056.25 | 1.0 | 1.0 | +| test.c:563:12:563:13 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:563:12:563:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:563:12:563:24 | ... * ... | 1664.0 | 1.0 | 1.0 | +| test.c:563:12:563:34 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:563:12:563:60 | ... ? ... : ... | 693056.25 | 1.0 | 1.0 | +| test.c:563:17:563:24 | (...) | 1664.0 | 1.0 | 1.0 | +| test.c:563:18:563:18 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:563:18:563:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:563:18:563:23 | ... * ... | 1664.0 | 2.0 | 1.0 | +| test.c:563:22:563:23 | ip | 1664.0 | 2.0 | 3.0 | +| test.c:563:28:563:29 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:563:28:563:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:563:28:563:34 | ... * ... | 1664.0 | 2.0 | 1.0 | +| test.c:563:33:563:34 | ip | 1664.0 | 2.0 | 3.0 | +| test.c:563:38:563:39 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:563:38:563:39 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:563:38:563:50 | ... * ... | 832.5 | 1.0 | 1.0 | +| test.c:563:43:563:50 | (...) | 832.5 | 1.0 | 1.0 | +| test.c:563:44:563:44 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:563:44:563:44 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:563:44:563:49 | ... * ... | 832.5 | 2.0 | 1.0 | +| test.c:563:48:563:49 | ip | 832.5 | 2.0 | 2.0 | +| test.c:563:54:563:55 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:563:54:563:55 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:563:54:563:60 | ... * ... | 832.5 | 2.0 | 1.0 | +| test.c:563:59:563:60 | ip | 832.5 | 2.0 | 2.0 | +| test.c:564:15:564:26 | (...) | 2497.5 | 1.0 | 1.0 | +| test.c:564:15:564:31 | ... * ... | 2497.5 | 1.0 | 1.0 | +| test.c:564:16:564:16 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:564:16:564:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:564:16:564:21 | ... * ... | 2497.5 | 2.0 | 1.0 | +| test.c:564:16:564:25 | ... + ... | 2497.5 | 1.0 | 1.0 | +| test.c:564:20:564:21 | ip | 2497.5 | 2.0 | 4.0 | +| test.c:564:25:564:25 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:564:25:564:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:564:30:564:31 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:564:30:564:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:565:15:565:16 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:565:15:565:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:565:15:565:27 | ... * ... | 2497.5 | 1.0 | 1.0 | +| test.c:565:15:565:37 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:565:15:567:23 | ... ? ... : ... | 1560625.5625 | 1.0 | 1.0 | +| test.c:565:20:565:27 | (...) | 2497.5 | 1.0 | 1.0 | +| test.c:565:21:565:21 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:565:21:565:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:565:21:565:26 | ... * ... | 2497.5 | 2.0 | 1.0 | +| test.c:565:25:565:26 | ip | 2497.5 | 2.0 | 4.0 | +| test.c:565:31:565:32 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:565:31:565:32 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:565:31:565:37 | ... * ... | 2497.5 | 2.0 | 1.0 | +| test.c:565:36:565:37 | ip | 2497.5 | 2.0 | 4.0 | +| test.c:566:17:566:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:566:17:566:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:566:17:566:29 | ... * ... | 1249.25 | 1.0 | 1.0 | +| test.c:566:22:566:29 | (...) | 1249.25 | 1.0 | 1.0 | +| test.c:566:23:566:23 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:566:23:566:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:566:23:566:28 | ... * ... | 1249.25 | 2.0 | 1.0 | +| test.c:566:27:566:28 | ip | 1249.25 | 2.0 | 2.0 | +| test.c:567:17:567:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:567:17:567:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:567:17:567:23 | ... * ... | 1249.25 | 2.0 | 1.0 | +| test.c:567:22:567:23 | ip | 1249.25 | 2.0 | 2.0 | +| test.c:568:11:568:12 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:568:11:568:12 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:568:11:568:17 | ... * ... | 1664.0 | 2.0 | 1.0 | +| test.c:568:11:568:33 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:568:11:570:25 | ... ? ... : ... | 693056.25 | 1.0 | 1.0 | +| test.c:568:16:568:17 | ip | 1664.0 | 2.0 | 3.0 | +| test.c:568:21:568:28 | (...) | 1664.0 | 1.0 | 1.0 | +| test.c:568:21:568:33 | ... * ... | 1664.0 | 1.0 | 1.0 | +| test.c:568:22:568:23 | ip | 1664.0 | 2.0 | 3.0 | +| test.c:568:22:568:27 | ... + ... | 1664.0 | 2.0 | 1.0 | +| test.c:568:27:568:27 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:568:27:568:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:568:32:568:33 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:568:32:568:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:569:13:569:14 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:569:13:569:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:569:13:569:19 | ... * ... | 832.5 | 2.0 | 1.0 | +| test.c:569:18:569:19 | ip | 832.5 | 2.0 | 2.0 | +| test.c:570:13:570:20 | (...) | 832.5 | 1.0 | 1.0 | +| test.c:570:13:570:25 | ... * ... | 832.5 | 1.0 | 1.0 | +| test.c:570:14:570:15 | ip | 832.5 | 2.0 | 2.0 | +| test.c:570:14:570:19 | ... + ... | 832.5 | 2.0 | 1.0 | +| test.c:570:19:570:19 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:570:19:570:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:570:24:570:25 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:570:24:570:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:571:9:571:10 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:571:9:571:10 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:571:9:571:15 | ... * ... | 13317.0 | 2.0 | 1.0 | +| test.c:571:9:571:59 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:571:9:573:51 | ... ? ... : ... | 2.95275249179E11 | 1.0 | 1.0 | +| test.c:571:14:571:15 | ip | 13317.0 | 2.0 | 6.0 | +| test.c:571:19:571:30 | (...) | 13317.0 | 1.0 | 1.0 | +| test.c:571:19:571:35 | ... * ... | 13317.0 | 1.0 | 1.0 | +| test.c:571:19:571:59 | ... + ... | 1.77342489E8 | 1.0 | 1.0 | +| test.c:571:20:571:20 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:571:20:571:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:571:20:571:25 | ... * ... | 13317.0 | 2.0 | 1.0 | +| test.c:571:20:571:29 | ... + ... | 13317.0 | 1.0 | 1.0 | +| test.c:571:24:571:25 | ip | 13317.0 | 2.0 | 6.0 | +| test.c:571:29:571:29 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:571:29:571:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:571:34:571:35 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:571:34:571:35 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:571:39:571:54 | (...) | 13317.0 | 1.0 | 1.0 | +| test.c:571:39:571:59 | ... * ... | 13317.0 | 1.0 | 1.0 | +| test.c:571:40:571:40 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:571:40:571:40 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:571:40:571:45 | ... * ... | 13317.0 | 2.0 | 1.0 | +| test.c:571:40:571:49 | ... + ... | 13317.0 | 1.0 | 1.0 | +| test.c:571:40:571:53 | ... + ... | 13317.0 | 1.0 | 1.0 | +| test.c:571:44:571:45 | ip | 13317.0 | 2.0 | 6.0 | +| test.c:571:49:571:49 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:571:49:571:49 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:571:53:571:53 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:571:53:571:53 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:571:58:571:59 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:571:58:571:59 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:572:11:572:12 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:572:11:572:12 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:572:11:572:17 | ... * ... | 6659.0 | 1.0 | 1.0 | +| test.c:572:16:572:17 | ip | 6659.0 | 1.0 | 1.0 | +| test.c:573:11:573:22 | (...) | 6659.0 | 1.0 | 1.0 | +| test.c:573:11:573:27 | ... * ... | 6659.0 | 1.0 | 1.0 | +| test.c:573:11:573:51 | ... + ... | 4.4342281E7 | 1.0 | 1.0 | +| test.c:573:12:573:12 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:573:12:573:12 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:573:12:573:17 | ... * ... | 6659.0 | 2.0 | 1.0 | +| test.c:573:12:573:21 | ... + ... | 6659.0 | 1.0 | 1.0 | +| test.c:573:16:573:17 | ip | 6659.0 | 2.0 | 1.0 | +| test.c:573:21:573:21 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:573:21:573:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:573:26:573:27 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:573:26:573:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:573:31:573:46 | (...) | 6659.0 | 1.0 | 1.0 | +| test.c:573:31:573:51 | ... * ... | 6659.0 | 1.0 | 1.0 | +| test.c:573:32:573:32 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:573:32:573:32 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:573:32:573:37 | ... * ... | 6659.0 | 2.0 | 1.0 | +| test.c:573:32:573:41 | ... + ... | 6659.0 | 1.0 | 1.0 | +| test.c:573:32:573:45 | ... + ... | 6659.0 | 1.0 | 1.0 | +| test.c:573:36:573:37 | ip | 6659.0 | 2.0 | 1.0 | +| test.c:573:41:573:41 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:573:41:573:41 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:573:45:573:45 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:573:45:573:45 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:573:50:573:51 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:573:50:573:51 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:574:9:574:9 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:574:9:574:9 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:574:9:574:26 | ... * ... | 13317.0 | 1.0 | 1.0 | +| test.c:574:9:594:48 | ... + ... | 7.298546280791731E40 | 1.0 | 1.0 | +| test.c:574:9:616:30 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:574:9:659:27 | ... ? ... : ... | 4.924988773421752E113 | 1.0 | 1.0 | +| test.c:574:13:574:26 | (...) | 13317.0 | 1.0 | 1.0 | +| test.c:574:14:574:15 | ip | 13317.0 | 2.0 | 6.0 | +| test.c:574:14:574:20 | ... * ... | 13317.0 | 2.0 | 1.0 | +| test.c:574:14:574:25 | ... + ... | 13317.0 | 1.0 | 1.0 | +| test.c:574:19:574:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:574:19:574:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:574:24:574:25 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:574:24:574:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:575:13:594:48 | (...) | 5.480623474349876E36 | 1.0 | 1.0 | +| test.c:575:14:575:14 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:575:14:575:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:575:14:575:31 | ... * ... | 13317.0 | 1.0 | 1.0 | +| test.c:575:14:576:32 | ... + ... | 1.77342489E8 | 1.0 | 1.0 | +| test.c:575:14:577:32 | ... + ... | 2.361669926013E12 | 1.0 | 1.0 | +| test.c:575:14:583:28 | ... + ... | 4.707534322240232E24 | 1.0 | 1.0 | +| test.c:575:14:584:43 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:575:14:594:47 | ... ? ... : ... | 5.480623474349876E36 | 1.0 | 1.0 | +| test.c:575:18:575:31 | (...) | 13317.0 | 1.0 | 1.0 | +| test.c:575:19:575:20 | ip | 13317.0 | 2.0 | 6.0 | +| test.c:575:19:575:25 | ... * ... | 13317.0 | 2.0 | 1.0 | +| test.c:575:19:575:30 | ... + ... | 13317.0 | 1.0 | 1.0 | +| test.c:575:24:575:25 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:575:24:575:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:575:29:575:30 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:575:29:575:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:576:15:576:32 | (...) | 13317.0 | 1.0 | 1.0 | +| test.c:576:16:576:16 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:576:16:576:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:576:16:576:21 | ... * ... | 13317.0 | 2.0 | 1.0 | +| test.c:576:16:576:26 | ... * ... | 13317.0 | 1.0 | 1.0 | +| test.c:576:16:576:31 | ... + ... | 13317.0 | 1.0 | 1.0 | +| test.c:576:20:576:21 | ip | 13317.0 | 2.0 | 6.0 | +| test.c:576:25:576:26 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:576:25:576:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:576:30:576:31 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:576:30:576:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:577:15:577:15 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:577:15:577:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:577:15:577:32 | ... * ... | 13317.0 | 1.0 | 1.0 | +| test.c:577:19:577:32 | (...) | 13317.0 | 1.0 | 1.0 | +| test.c:577:20:577:21 | ip | 13317.0 | 2.0 | 6.0 | +| test.c:577:20:577:26 | ... * ... | 13317.0 | 2.0 | 1.0 | +| test.c:577:20:577:31 | ... + ... | 13317.0 | 1.0 | 1.0 | +| test.c:577:25:577:26 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:577:25:577:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:577:30:577:31 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:577:30:577:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:578:15:583:28 | (...) | 1.993307477217E12 | 1.0 | 1.0 | +| test.c:578:16:578:27 | (...) | 13317.0 | 1.0 | 1.0 | +| test.c:578:16:578:32 | ... * ... | 13317.0 | 1.0 | 1.0 | +| test.c:578:16:579:65 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:578:16:583:27 | ... ? ... : ... | 1.993307477217E12 | 1.0 | 1.0 | +| test.c:578:17:578:17 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:578:17:578:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:578:17:578:22 | ... * ... | 13317.0 | 2.0 | 1.0 | +| test.c:578:17:578:26 | ... + ... | 13317.0 | 1.0 | 1.0 | +| test.c:578:21:578:22 | ip | 13317.0 | 2.0 | 6.0 | +| test.c:578:26:578:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:578:26:578:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:578:31:578:32 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:578:31:578:32 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:579:15:579:65 | (...) | 4.4342281E7 | 1.0 | 1.0 | +| test.c:579:16:579:17 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:579:16:579:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:579:16:579:28 | ... * ... | 13317.0 | 1.0 | 1.0 | +| test.c:579:16:579:38 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:579:16:579:64 | ... ? ... : ... | 4.4342281E7 | 1.0 | 1.0 | +| test.c:579:21:579:28 | (...) | 13317.0 | 1.0 | 1.0 | +| test.c:579:22:579:22 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:579:22:579:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:579:22:579:27 | ... * ... | 13317.0 | 2.0 | 1.0 | +| test.c:579:26:579:27 | ip | 13317.0 | 2.0 | 6.0 | +| test.c:579:32:579:33 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:579:32:579:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:579:32:579:38 | ... * ... | 13317.0 | 2.0 | 1.0 | +| test.c:579:37:579:38 | ip | 13317.0 | 2.0 | 6.0 | +| test.c:579:42:579:43 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:579:42:579:43 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:579:42:579:54 | ... * ... | 6659.0 | 1.0 | 1.0 | +| test.c:579:47:579:54 | (...) | 6659.0 | 1.0 | 1.0 | +| test.c:579:48:579:48 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:579:48:579:48 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:579:48:579:53 | ... * ... | 6659.0 | 2.0 | 1.0 | +| test.c:579:52:579:53 | ip | 6659.0 | 2.0 | 2.0 | +| test.c:579:58:579:59 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:579:58:579:59 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:579:58:579:64 | ... * ... | 6659.0 | 2.0 | 1.0 | +| test.c:579:63:579:64 | ip | 6659.0 | 2.0 | 2.0 | +| test.c:580:19:580:30 | (...) | 19977.0 | 1.0 | 1.0 | +| test.c:580:19:580:35 | ... * ... | 19977.0 | 1.0 | 1.0 | +| test.c:580:20:580:20 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:580:20:580:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:580:20:580:25 | ... * ... | 19977.0 | 2.0 | 1.0 | +| test.c:580:20:580:29 | ... + ... | 19977.0 | 1.0 | 1.0 | +| test.c:580:24:580:25 | ip | 19977.0 | 2.0 | 4.0 | +| test.c:580:29:580:29 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:580:29:580:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:580:34:580:35 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:580:34:580:35 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:581:19:581:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:581:19:581:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:581:19:581:31 | ... * ... | 19977.0 | 1.0 | 1.0 | +| test.c:581:19:581:41 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:581:19:583:27 | ... ? ... : ... | 9.9780121E7 | 1.0 | 1.0 | +| test.c:581:24:581:31 | (...) | 19977.0 | 1.0 | 1.0 | +| test.c:581:25:581:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:581:25:581:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:581:25:581:30 | ... * ... | 19977.0 | 2.0 | 1.0 | +| test.c:581:29:581:30 | ip | 19977.0 | 2.0 | 4.0 | +| test.c:581:35:581:36 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:581:35:581:36 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:581:35:581:41 | ... * ... | 19977.0 | 2.0 | 1.0 | +| test.c:581:40:581:41 | ip | 19977.0 | 2.0 | 4.0 | +| test.c:582:21:582:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:582:21:582:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:582:21:582:33 | ... * ... | 9989.0 | 1.0 | 1.0 | +| test.c:582:26:582:33 | (...) | 9989.0 | 1.0 | 1.0 | +| test.c:582:27:582:27 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:582:27:582:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:582:27:582:32 | ... * ... | 9989.0 | 2.0 | 1.0 | +| test.c:582:31:582:32 | ip | 9989.0 | 2.0 | 2.0 | +| test.c:583:21:583:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:583:21:583:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:583:21:583:27 | ... * ... | 9989.0 | 2.0 | 1.0 | +| test.c:583:26:583:27 | ip | 9989.0 | 2.0 | 2.0 | +| test.c:584:13:584:13 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:584:13:584:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:584:13:584:18 | ... * ... | 39955.0 | 2.0 | 1.0 | +| test.c:584:13:584:23 | ... * ... | 39955.0 | 1.0 | 1.0 | +| test.c:584:13:584:43 | ... + ... | 1.596402025E9 | 1.0 | 1.0 | +| test.c:584:17:584:18 | ip | 39955.0 | 2.0 | 4.0 | +| test.c:584:22:584:23 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:584:22:584:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:584:27:584:38 | (...) | 39955.0 | 1.0 | 1.0 | +| test.c:584:27:584:43 | ... * ... | 39955.0 | 1.0 | 1.0 | +| test.c:584:28:584:28 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:584:28:584:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:584:28:584:33 | ... * ... | 39955.0 | 2.0 | 1.0 | +| test.c:584:28:584:37 | ... + ... | 39955.0 | 1.0 | 1.0 | +| test.c:584:32:584:33 | ip | 39955.0 | 2.0 | 4.0 | +| test.c:584:37:584:37 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:584:37:584:37 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:584:42:584:43 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:584:42:584:43 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:585:17:585:17 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:585:17:585:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:585:17:585:34 | ... * ... | 39955.0 | 1.0 | 1.0 | +| test.c:585:17:586:34 | ... + ... | 1.596402025E9 | 1.0 | 1.0 | +| test.c:585:17:587:34 | ... + ... | 6.3784242908875E13 | 1.0 | 1.0 | +| test.c:585:17:593:30 | ... + ... | 3.433109823542022E27 | 1.0 | 1.0 | +| test.c:585:21:585:34 | (...) | 39955.0 | 1.0 | 1.0 | +| test.c:585:22:585:23 | ip | 39955.0 | 2.0 | 4.0 | +| test.c:585:22:585:28 | ... * ... | 39955.0 | 2.0 | 1.0 | +| test.c:585:22:585:33 | ... + ... | 39955.0 | 1.0 | 1.0 | +| test.c:585:27:585:28 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:585:27:585:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:585:32:585:33 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:585:32:585:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:586:17:586:34 | (...) | 39955.0 | 1.0 | 1.0 | +| test.c:586:18:586:18 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:586:18:586:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:586:18:586:23 | ... * ... | 39955.0 | 2.0 | 1.0 | +| test.c:586:18:586:28 | ... * ... | 39955.0 | 1.0 | 1.0 | +| test.c:586:18:586:33 | ... + ... | 39955.0 | 1.0 | 1.0 | +| test.c:586:22:586:23 | ip | 39955.0 | 2.0 | 4.0 | +| test.c:586:27:586:28 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:586:27:586:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:586:32:586:33 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:586:32:586:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:587:17:587:17 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:587:17:587:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:587:17:587:34 | ... * ... | 39955.0 | 1.0 | 1.0 | +| test.c:587:21:587:34 | (...) | 39955.0 | 1.0 | 1.0 | +| test.c:587:22:587:23 | ip | 39955.0 | 2.0 | 4.0 | +| test.c:587:22:587:28 | ... * ... | 39955.0 | 2.0 | 1.0 | +| test.c:587:22:587:33 | ... + ... | 39955.0 | 1.0 | 1.0 | +| test.c:587:27:587:28 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:587:27:587:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:587:32:587:33 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:587:32:587:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:588:17:593:30 | (...) | 5.38237920052875E13 | 1.0 | 1.0 | +| test.c:588:18:588:29 | (...) | 39955.0 | 1.0 | 1.0 | +| test.c:588:18:588:34 | ... * ... | 39955.0 | 1.0 | 1.0 | +| test.c:588:18:589:67 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:588:18:593:29 | ... ? ... : ... | 5.38237920052875E13 | 1.0 | 1.0 | +| test.c:588:19:588:19 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:588:19:588:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:588:19:588:24 | ... * ... | 39955.0 | 2.0 | 1.0 | +| test.c:588:19:588:28 | ... + ... | 39955.0 | 1.0 | 1.0 | +| test.c:588:23:588:24 | ip | 39955.0 | 2.0 | 4.0 | +| test.c:588:28:588:28 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:588:28:588:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:588:33:588:34 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:588:33:588:34 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:589:17:589:67 | (...) | 3.99120484E8 | 1.0 | 1.0 | +| test.c:589:18:589:19 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:589:18:589:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:589:18:589:30 | ... * ... | 39955.0 | 1.0 | 1.0 | +| test.c:589:18:589:40 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:589:18:589:66 | ... ? ... : ... | 3.99120484E8 | 1.0 | 1.0 | +| test.c:589:23:589:30 | (...) | 39955.0 | 1.0 | 1.0 | +| test.c:589:24:589:24 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:589:24:589:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:589:24:589:29 | ... * ... | 39955.0 | 2.0 | 1.0 | +| test.c:589:28:589:29 | ip | 39955.0 | 2.0 | 4.0 | +| test.c:589:34:589:35 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:589:34:589:35 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:589:34:589:40 | ... * ... | 39955.0 | 2.0 | 1.0 | +| test.c:589:39:589:40 | ip | 39955.0 | 2.0 | 4.0 | +| test.c:589:44:589:45 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:589:44:589:45 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:589:44:589:56 | ... * ... | 19978.0 | 1.0 | 1.0 | +| test.c:589:49:589:56 | (...) | 19978.0 | 1.0 | 1.0 | +| test.c:589:50:589:50 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:589:50:589:50 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:589:50:589:55 | ... * ... | 19978.0 | 2.0 | 1.0 | +| test.c:589:54:589:55 | ip | 19978.0 | 2.0 | 2.0 | +| test.c:589:60:589:61 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:589:60:589:61 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:589:60:589:66 | ... * ... | 19978.0 | 2.0 | 1.0 | +| test.c:589:65:589:66 | ip | 19978.0 | 2.0 | 2.0 | +| test.c:590:21:590:32 | (...) | 59934.0 | 1.0 | 1.0 | +| test.c:590:21:590:37 | ... * ... | 59934.0 | 1.0 | 1.0 | +| test.c:590:22:590:22 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:590:22:590:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:590:22:590:27 | ... * ... | 59934.0 | 2.0 | 1.0 | +| test.c:590:22:590:31 | ... + ... | 59934.0 | 1.0 | 1.0 | +| test.c:590:26:590:27 | ip | 59934.0 | 2.0 | 4.0 | +| test.c:590:31:590:31 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:590:31:590:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:590:36:590:37 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:590:36:590:37 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:591:21:591:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:591:21:591:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:591:21:591:33 | ... * ... | 59934.0 | 1.0 | 1.0 | +| test.c:591:21:591:43 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:591:21:593:29 | ... ? ... : ... | 8.9805105625E8 | 1.0 | 1.0 | +| test.c:591:26:591:33 | (...) | 59934.0 | 1.0 | 1.0 | +| test.c:591:27:591:27 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:591:27:591:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:591:27:591:32 | ... * ... | 59934.0 | 2.0 | 1.0 | +| test.c:591:31:591:32 | ip | 59934.0 | 2.0 | 4.0 | +| test.c:591:37:591:38 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:591:37:591:38 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:591:37:591:43 | ... * ... | 59934.0 | 2.0 | 1.0 | +| test.c:591:42:591:43 | ip | 59934.0 | 2.0 | 4.0 | +| test.c:592:23:592:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:592:23:592:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:592:23:592:35 | ... * ... | 29967.5 | 1.0 | 1.0 | +| test.c:592:28:592:35 | (...) | 29967.5 | 1.0 | 1.0 | +| test.c:592:29:592:29 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:592:29:592:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:592:29:592:34 | ... * ... | 29967.5 | 2.0 | 1.0 | +| test.c:592:33:592:34 | ip | 29967.5 | 2.0 | 2.0 | +| test.c:593:23:593:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:593:23:593:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:593:23:593:29 | ... * ... | 29967.5 | 2.0 | 1.0 | +| test.c:593:28:593:29 | ip | 29967.5 | 2.0 | 2.0 | +| test.c:594:17:594:17 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:594:17:594:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:594:17:594:22 | ... * ... | 39955.0 | 2.0 | 1.0 | +| test.c:594:17:594:27 | ... * ... | 39955.0 | 1.0 | 1.0 | +| test.c:594:17:594:47 | ... + ... | 1.596402025E9 | 1.0 | 1.0 | +| test.c:594:21:594:22 | ip | 39955.0 | 2.0 | 4.0 | +| test.c:594:26:594:27 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:594:26:594:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:594:31:594:42 | (...) | 39955.0 | 1.0 | 1.0 | +| test.c:594:31:594:47 | ... * ... | 39955.0 | 1.0 | 1.0 | +| test.c:594:32:594:32 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:594:32:594:32 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:594:32:594:37 | ... * ... | 39955.0 | 2.0 | 1.0 | +| test.c:594:32:594:41 | ... + ... | 39955.0 | 1.0 | 1.0 | +| test.c:594:36:594:37 | ip | 39955.0 | 2.0 | 4.0 | +| test.c:594:41:594:41 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:594:41:594:41 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:594:46:594:47 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:594:46:594:47 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:595:11:616:30 | (...) | 5.8925295069020155E44 | 1.0 | 1.0 | +| test.c:595:12:595:12 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:595:12:595:12 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:595:12:595:29 | ... * ... | 159824.0 | 1.0 | 1.0 | +| test.c:595:12:596:30 | ... + ... | 2.5543710976E10 | 1.0 | 1.0 | +| test.c:595:12:597:30 | ... + ... | 4.082498063028224E15 | 1.0 | 1.0 | +| test.c:595:12:603:26 | ... + ... | 1.406298571419582E31 | 1.0 | 1.0 | +| test.c:595:12:604:61 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:595:12:616:29 | ... ? ... : ... | 5.8925295069020155E44 | 1.0 | 1.0 | +| test.c:595:16:595:29 | (...) | 159824.0 | 1.0 | 1.0 | +| test.c:595:17:595:18 | ip | 159824.0 | 2.0 | 4.0 | +| test.c:595:17:595:23 | ... * ... | 159824.0 | 2.0 | 1.0 | +| test.c:595:17:595:28 | ... + ... | 159824.0 | 1.0 | 1.0 | +| test.c:595:22:595:23 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:595:22:595:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:595:27:595:28 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:595:27:595:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:596:13:596:30 | (...) | 159824.0 | 1.0 | 1.0 | +| test.c:596:14:596:14 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:596:14:596:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:596:14:596:19 | ... * ... | 159824.0 | 2.0 | 1.0 | +| test.c:596:14:596:24 | ... * ... | 159824.0 | 1.0 | 1.0 | +| test.c:596:14:596:29 | ... + ... | 159824.0 | 1.0 | 1.0 | +| test.c:596:18:596:19 | ip | 159824.0 | 2.0 | 4.0 | +| test.c:596:23:596:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:596:23:596:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:596:28:596:29 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:596:28:596:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:597:13:597:13 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:597:13:597:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:597:13:597:30 | ... * ... | 159824.0 | 1.0 | 1.0 | +| test.c:597:17:597:30 | (...) | 159824.0 | 1.0 | 1.0 | +| test.c:597:18:597:19 | ip | 159824.0 | 2.0 | 4.0 | +| test.c:597:18:597:24 | ... * ... | 159824.0 | 2.0 | 1.0 | +| test.c:597:18:597:29 | ... + ... | 159824.0 | 1.0 | 1.0 | +| test.c:597:23:597:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:597:23:597:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:597:28:597:29 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:597:28:597:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:598:13:603:26 | (...) | 3.444701135697415E15 | 1.0 | 1.0 | +| test.c:598:14:598:25 | (...) | 159824.0 | 1.0 | 1.0 | +| test.c:598:14:598:30 | ... * ... | 159824.0 | 1.0 | 1.0 | +| test.c:598:14:599:63 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:598:14:603:25 | ... ? ... : ... | 3.444701135697415E15 | 1.0 | 1.0 | +| test.c:598:15:598:15 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:598:15:598:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:598:15:598:20 | ... * ... | 159824.0 | 2.0 | 1.0 | +| test.c:598:15:598:24 | ... + ... | 159824.0 | 1.0 | 1.0 | +| test.c:598:19:598:20 | ip | 159824.0 | 2.0 | 4.0 | +| test.c:598:24:598:24 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:598:24:598:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:598:29:598:30 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:598:29:598:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:599:13:599:63 | (...) | 6.38600765625E9 | 1.0 | 1.0 | +| test.c:599:14:599:15 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:599:14:599:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:599:14:599:26 | ... * ... | 159824.0 | 1.0 | 1.0 | +| test.c:599:14:599:36 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:599:14:599:62 | ... ? ... : ... | 6.38600765625E9 | 1.0 | 1.0 | +| test.c:599:19:599:26 | (...) | 159824.0 | 1.0 | 1.0 | +| test.c:599:20:599:20 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:599:20:599:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:599:20:599:25 | ... * ... | 159824.0 | 2.0 | 1.0 | +| test.c:599:24:599:25 | ip | 159824.0 | 2.0 | 4.0 | +| test.c:599:30:599:31 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:599:30:599:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:599:30:599:36 | ... * ... | 159824.0 | 2.0 | 1.0 | +| test.c:599:35:599:36 | ip | 159824.0 | 2.0 | 4.0 | +| test.c:599:40:599:41 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:599:40:599:41 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:599:40:599:52 | ... * ... | 79912.5 | 1.0 | 1.0 | +| test.c:599:45:599:52 | (...) | 79912.5 | 1.0 | 1.0 | +| test.c:599:46:599:46 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:599:46:599:46 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:599:46:599:51 | ... * ... | 79912.5 | 2.0 | 1.0 | +| test.c:599:50:599:51 | ip | 79912.5 | 2.0 | 2.0 | +| test.c:599:56:599:57 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:599:56:599:57 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:599:56:599:62 | ... * ... | 79912.5 | 2.0 | 1.0 | +| test.c:599:61:599:62 | ip | 79912.5 | 2.0 | 2.0 | +| test.c:600:17:600:28 | (...) | 239737.5 | 1.0 | 1.0 | +| test.c:600:17:600:33 | ... * ... | 239737.5 | 1.0 | 1.0 | +| test.c:600:18:600:18 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:600:18:600:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:600:18:600:23 | ... * ... | 239737.5 | 2.0 | 1.0 | +| test.c:600:18:600:27 | ... + ... | 239737.5 | 1.0 | 1.0 | +| test.c:600:22:600:23 | ip | 239737.5 | 2.0 | 4.0 | +| test.c:600:27:600:27 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:600:27:600:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:600:32:600:33 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:600:32:600:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:601:17:601:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:601:17:601:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:601:17:601:29 | ... * ... | 239737.5 | 1.0 | 1.0 | +| test.c:601:17:601:39 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:601:17:603:25 | ... ? ... : ... | 1.43686370955625E10 | 1.0 | 1.0 | +| test.c:601:22:601:29 | (...) | 239737.5 | 1.0 | 1.0 | +| test.c:601:23:601:23 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:601:23:601:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:601:23:601:28 | ... * ... | 239737.5 | 2.0 | 1.0 | +| test.c:601:27:601:28 | ip | 239737.5 | 2.0 | 4.0 | +| test.c:601:33:601:34 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:601:33:601:34 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:601:33:601:39 | ... * ... | 239737.5 | 2.0 | 1.0 | +| test.c:601:38:601:39 | ip | 239737.5 | 2.0 | 4.0 | +| test.c:602:19:602:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:602:19:602:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:602:19:602:31 | ... * ... | 119869.25 | 1.0 | 1.0 | +| test.c:602:24:602:31 | (...) | 119869.25 | 1.0 | 1.0 | +| test.c:602:25:602:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:602:25:602:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:602:25:602:30 | ... * ... | 119869.25 | 2.0 | 1.0 | +| test.c:602:29:602:30 | ip | 119869.25 | 2.0 | 2.0 | +| test.c:603:19:603:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:603:19:603:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:603:19:603:25 | ... * ... | 119869.25 | 2.0 | 1.0 | +| test.c:603:24:603:25 | ip | 119869.25 | 2.0 | 2.0 | +| test.c:604:11:604:61 | (...) | 5.747454838225E10 | 1.0 | 1.0 | +| test.c:604:12:604:13 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:604:12:604:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:604:12:604:18 | ... * ... | 479476.0 | 2.0 | 1.0 | +| test.c:604:12:604:34 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:604:12:604:60 | ... ? ... : ... | 5.747454838225E10 | 1.0 | 1.0 | +| test.c:604:17:604:18 | ip | 479476.0 | 2.0 | 4.0 | +| test.c:604:22:604:29 | (...) | 479476.0 | 1.0 | 1.0 | +| test.c:604:22:604:34 | ... * ... | 479476.0 | 1.0 | 1.0 | +| test.c:604:23:604:24 | ip | 479476.0 | 2.0 | 4.0 | +| test.c:604:23:604:28 | ... + ... | 479476.0 | 2.0 | 1.0 | +| test.c:604:28:604:28 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:604:28:604:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:604:33:604:34 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:604:33:604:34 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:604:38:604:39 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:604:38:604:39 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:604:38:604:44 | ... * ... | 239738.5 | 2.0 | 1.0 | +| test.c:604:43:604:44 | ip | 239738.5 | 2.0 | 2.0 | +| test.c:604:48:604:55 | (...) | 239738.5 | 1.0 | 1.0 | +| test.c:604:48:604:60 | ... * ... | 239738.5 | 1.0 | 1.0 | +| test.c:604:49:604:50 | ip | 239738.5 | 2.0 | 2.0 | +| test.c:604:49:604:54 | ... + ... | 239738.5 | 2.0 | 1.0 | +| test.c:604:54:604:54 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:604:54:604:54 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:604:59:604:60 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:604:59:604:60 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:605:15:605:15 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:605:15:605:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:605:15:605:32 | ... * ... | 479477.0 | 1.0 | 1.0 | +| test.c:605:15:606:32 | ... + ... | 2.29898193529E11 | 1.0 | 1.0 | +| test.c:605:15:607:32 | ... + ... | 1.1023089613870434E17 | 1.0 | 1.0 | +| test.c:605:15:613:28 | ... + ... | 1.0252372735148921E34 | 1.0 | 1.0 | +| test.c:605:19:605:32 | (...) | 479477.0 | 1.0 | 1.0 | +| test.c:605:20:605:21 | ip | 479477.0 | 2.0 | 3.0 | +| test.c:605:20:605:26 | ... * ... | 479477.0 | 2.0 | 1.0 | +| test.c:605:20:605:31 | ... + ... | 479477.0 | 1.0 | 1.0 | +| test.c:605:25:605:26 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:605:25:605:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:605:30:605:31 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:605:30:605:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:606:15:606:32 | (...) | 479477.0 | 1.0 | 1.0 | +| test.c:606:16:606:16 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:606:16:606:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:606:16:606:21 | ... * ... | 479477.0 | 2.0 | 1.0 | +| test.c:606:16:606:26 | ... * ... | 479477.0 | 1.0 | 1.0 | +| test.c:606:16:606:31 | ... + ... | 479477.0 | 1.0 | 1.0 | +| test.c:606:20:606:21 | ip | 479477.0 | 2.0 | 3.0 | +| test.c:606:25:606:26 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:606:25:606:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:606:30:606:31 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:606:30:606:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:607:15:607:15 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:607:15:607:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:607:15:607:32 | ... * ... | 479477.0 | 1.0 | 1.0 | +| test.c:607:19:607:32 | (...) | 479477.0 | 1.0 | 1.0 | +| test.c:607:20:607:21 | ip | 479477.0 | 2.0 | 3.0 | +| test.c:607:20:607:26 | ... * ... | 479477.0 | 2.0 | 1.0 | +| test.c:607:20:607:31 | ... + ... | 479477.0 | 1.0 | 1.0 | +| test.c:607:25:607:26 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:607:25:607:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:607:30:607:31 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:607:30:607:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:608:15:613:28 | (...) | 9.300815918477418E16 | 1.0 | 1.0 | +| test.c:608:16:608:27 | (...) | 479477.0 | 1.0 | 1.0 | +| test.c:608:16:608:32 | ... * ... | 479477.0 | 1.0 | 1.0 | +| test.c:608:16:609:65 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:608:16:613:27 | ... ? ... : ... | 9.300815918477418E16 | 1.0 | 1.0 | +| test.c:608:17:608:17 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:608:17:608:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:608:17:608:22 | ... * ... | 479477.0 | 2.0 | 1.0 | +| test.c:608:17:608:26 | ... + ... | 479477.0 | 1.0 | 1.0 | +| test.c:608:21:608:22 | ip | 479477.0 | 2.0 | 3.0 | +| test.c:608:26:608:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:608:26:608:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:608:31:608:32 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:608:31:608:32 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:609:15:609:65 | (...) | 5.7474788121E10 | 1.0 | 1.0 | +| test.c:609:16:609:17 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:609:16:609:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:609:16:609:28 | ... * ... | 479477.0 | 1.0 | 1.0 | +| test.c:609:16:609:38 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:609:16:609:64 | ... ? ... : ... | 5.7474788121E10 | 1.0 | 1.0 | +| test.c:609:21:609:28 | (...) | 479477.0 | 1.0 | 1.0 | +| test.c:609:22:609:22 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:609:22:609:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:609:22:609:27 | ... * ... | 479477.0 | 2.0 | 1.0 | +| test.c:609:26:609:27 | ip | 479477.0 | 2.0 | 3.0 | +| test.c:609:32:609:33 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:609:32:609:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:609:32:609:38 | ... * ... | 479477.0 | 2.0 | 1.0 | +| test.c:609:37:609:38 | ip | 479477.0 | 2.0 | 3.0 | +| test.c:609:42:609:43 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:609:42:609:43 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:609:42:609:54 | ... * ... | 239739.0 | 1.0 | 1.0 | +| test.c:609:47:609:54 | (...) | 239739.0 | 1.0 | 1.0 | +| test.c:609:48:609:48 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:609:48:609:48 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:609:48:609:53 | ... * ... | 239739.0 | 2.0 | 1.0 | +| test.c:609:52:609:53 | ip | 239739.0 | 2.0 | 2.0 | +| test.c:609:58:609:59 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:609:58:609:59 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:609:58:609:64 | ... * ... | 239739.0 | 2.0 | 1.0 | +| test.c:609:63:609:64 | ip | 239739.0 | 2.0 | 2.0 | +| test.c:610:19:610:30 | (...) | 719217.0 | 1.0 | 1.0 | +| test.c:610:19:610:35 | ... * ... | 719217.0 | 1.0 | 1.0 | +| test.c:610:20:610:20 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:610:20:610:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:610:20:610:25 | ... * ... | 719217.0 | 2.0 | 1.0 | +| test.c:610:20:610:29 | ... + ... | 719217.0 | 1.0 | 1.0 | +| test.c:610:24:610:25 | ip | 719217.0 | 2.0 | 4.0 | +| test.c:610:29:610:29 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:610:29:610:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:610:34:610:35 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:610:34:610:35 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:611:19:611:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:611:19:611:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:611:19:611:31 | ... * ... | 719217.0 | 1.0 | 1.0 | +| test.c:611:19:611:41 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:611:19:613:27 | ... ? ... : ... | 1.29318632881E11 | 1.0 | 1.0 | +| test.c:611:24:611:31 | (...) | 719217.0 | 1.0 | 1.0 | +| test.c:611:25:611:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:611:25:611:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:611:25:611:30 | ... * ... | 719217.0 | 2.0 | 1.0 | +| test.c:611:29:611:30 | ip | 719217.0 | 2.0 | 4.0 | +| test.c:611:35:611:36 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:611:35:611:36 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:611:35:611:41 | ... * ... | 719217.0 | 2.0 | 1.0 | +| test.c:611:40:611:41 | ip | 719217.0 | 2.0 | 4.0 | +| test.c:612:21:612:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:612:21:612:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:612:21:612:33 | ... * ... | 359609.0 | 1.0 | 1.0 | +| test.c:612:26:612:33 | (...) | 359609.0 | 1.0 | 1.0 | +| test.c:612:27:612:27 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:612:27:612:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:612:27:612:32 | ... * ... | 359609.0 | 2.0 | 1.0 | +| test.c:612:31:612:32 | ip | 359609.0 | 2.0 | 2.0 | +| test.c:613:21:613:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:613:21:613:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:613:21:613:27 | ... * ... | 359609.0 | 2.0 | 1.0 | +| test.c:613:26:613:27 | ip | 359609.0 | 2.0 | 2.0 | +| test.c:614:15:614:16 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:614:15:614:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:614:15:614:21 | ... * ... | 479477.0 | 2.0 | 1.0 | +| test.c:614:15:614:37 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:614:15:616:29 | ... ? ... : ... | 5.7474788121E10 | 1.0 | 1.0 | +| test.c:614:20:614:21 | ip | 479477.0 | 2.0 | 3.0 | +| test.c:614:25:614:32 | (...) | 479477.0 | 1.0 | 1.0 | +| test.c:614:25:614:37 | ... * ... | 479477.0 | 1.0 | 1.0 | +| test.c:614:26:614:27 | ip | 479477.0 | 2.0 | 3.0 | +| test.c:614:26:614:31 | ... + ... | 479477.0 | 2.0 | 1.0 | +| test.c:614:31:614:31 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:614:31:614:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:614:36:614:37 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:614:36:614:37 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:615:17:615:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:615:17:615:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:615:17:615:23 | ... * ... | 239739.0 | 2.0 | 1.0 | +| test.c:615:22:615:23 | ip | 239739.0 | 2.0 | 2.0 | +| test.c:616:17:616:24 | (...) | 239739.0 | 1.0 | 1.0 | +| test.c:616:17:616:29 | ... * ... | 239739.0 | 1.0 | 1.0 | +| test.c:616:18:616:19 | ip | 239739.0 | 2.0 | 2.0 | +| test.c:616:18:616:23 | ... + ... | 239739.0 | 2.0 | 1.0 | +| test.c:616:23:616:23 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:616:23:616:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:616:28:616:29 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:616:28:616:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:617:11:617:11 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:617:11:617:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:617:11:617:28 | ... * ... | 1917913.0 | 1.0 | 1.0 | +| test.c:617:11:637:46 | ... + ... | 1.9437781331005143E60 | 1.0 | 1.0 | +| test.c:617:15:617:28 | (...) | 1917913.0 | 1.0 | 1.0 | +| test.c:617:16:617:17 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:617:16:617:22 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:617:16:617:27 | ... + ... | 1917913.0 | 1.0 | 1.0 | +| test.c:617:21:617:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:617:21:617:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:617:26:617:27 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:617:26:617:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:618:11:637:46 | (...) | 1.0134860825806563E54 | 1.0 | 1.0 | +| test.c:618:12:618:12 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:618:12:618:12 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:618:12:618:29 | ... * ... | 1917913.0 | 1.0 | 1.0 | +| test.c:618:12:619:30 | ... + ... | 3.678390275569E12 | 1.0 | 1.0 | +| test.c:618:12:620:30 | ... + ... | 7.054832528587367E18 | 1.0 | 1.0 | +| test.c:618:12:626:26 | ... + ... | 4.1994090949232005E37 | 1.0 | 1.0 | +| test.c:618:12:627:41 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:618:12:637:45 | ... ? ... : ... | 1.0134860825806563E54 | 1.0 | 1.0 | +| test.c:618:16:618:29 | (...) | 1917913.0 | 1.0 | 1.0 | +| test.c:618:17:618:18 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:618:17:618:23 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:618:17:618:28 | ... + ... | 1917913.0 | 1.0 | 1.0 | +| test.c:618:22:618:23 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:618:22:618:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:618:27:618:28 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:618:27:618:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:619:13:619:30 | (...) | 1917913.0 | 1.0 | 1.0 | +| test.c:619:14:619:14 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:619:14:619:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:619:14:619:19 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:619:14:619:24 | ... * ... | 1917913.0 | 1.0 | 1.0 | +| test.c:619:14:619:29 | ... + ... | 1917913.0 | 1.0 | 1.0 | +| test.c:619:18:619:19 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:619:23:619:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:619:23:619:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:619:28:619:29 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:619:28:619:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:620:13:620:13 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:620:13:620:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:620:13:620:30 | ... * ... | 1917913.0 | 1.0 | 1.0 | +| test.c:620:17:620:30 | (...) | 1917913.0 | 1.0 | 1.0 | +| test.c:620:18:620:19 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:620:18:620:24 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:620:18:620:29 | ... + ... | 1917913.0 | 1.0 | 1.0 | +| test.c:620:23:620:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:620:23:620:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:620:28:620:29 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:620:28:620:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:621:13:626:26 | (...) | 5.952528395119925E18 | 1.0 | 1.0 | +| test.c:621:14:621:25 | (...) | 1917913.0 | 1.0 | 1.0 | +| test.c:621:14:621:30 | ... * ... | 1917913.0 | 1.0 | 1.0 | +| test.c:621:14:622:63 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:621:14:626:25 | ... ? ... : ... | 5.952528395119925E18 | 1.0 | 1.0 | +| test.c:621:15:621:15 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:621:15:621:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:621:15:621:20 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:621:15:621:24 | ... + ... | 1917913.0 | 1.0 | 1.0 | +| test.c:621:19:621:20 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:621:24:621:24 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:621:24:621:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:621:29:621:30 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:621:29:621:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:622:13:622:63 | (...) | 9.19598527849E11 | 1.0 | 1.0 | +| test.c:622:14:622:15 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:622:14:622:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:622:14:622:26 | ... * ... | 1917913.0 | 1.0 | 1.0 | +| test.c:622:14:622:36 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:622:14:622:62 | ... ? ... : ... | 9.19598527849E11 | 1.0 | 1.0 | +| test.c:622:19:622:26 | (...) | 1917913.0 | 1.0 | 1.0 | +| test.c:622:20:622:20 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:622:20:622:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:622:20:622:25 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:622:24:622:25 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:622:30:622:31 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:622:30:622:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:622:30:622:36 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:622:35:622:36 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:622:40:622:41 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:622:40:622:41 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:622:40:622:52 | ... * ... | 958957.0 | 1.0 | 1.0 | +| test.c:622:45:622:52 | (...) | 958957.0 | 1.0 | 1.0 | +| test.c:622:46:622:46 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:622:46:622:46 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:622:46:622:51 | ... * ... | 958957.0 | 2.0 | 1.0 | +| test.c:622:50:622:51 | ip | 958957.0 | 2.0 | 2.0 | +| test.c:622:56:622:57 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:622:56:622:57 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:622:56:622:62 | ... * ... | 958957.0 | 2.0 | 1.0 | +| test.c:622:61:622:62 | ip | 958957.0 | 2.0 | 2.0 | +| test.c:623:17:623:28 | (...) | 2876871.0 | 1.0 | 1.0 | +| test.c:623:17:623:33 | ... * ... | 2876871.0 | 1.0 | 1.0 | +| test.c:623:18:623:18 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:623:18:623:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:623:18:623:23 | ... * ... | 2876871.0 | 2.0 | 1.0 | +| test.c:623:18:623:27 | ... + ... | 2876871.0 | 1.0 | 1.0 | +| test.c:623:22:623:23 | ip | 2876871.0 | 2.0 | 4.0 | +| test.c:623:27:623:27 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:623:27:623:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:623:32:623:33 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:623:32:623:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:624:17:624:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:624:17:624:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:624:17:624:29 | ... * ... | 2876871.0 | 1.0 | 1.0 | +| test.c:624:17:624:39 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:624:17:626:25 | ... ? ... : ... | 2.069098126096E12 | 1.0 | 1.0 | +| test.c:624:22:624:29 | (...) | 2876871.0 | 1.0 | 1.0 | +| test.c:624:23:624:23 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:624:23:624:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:624:23:624:28 | ... * ... | 2876871.0 | 2.0 | 1.0 | +| test.c:624:27:624:28 | ip | 2876871.0 | 2.0 | 4.0 | +| test.c:624:33:624:34 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:624:33:624:34 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:624:33:624:39 | ... * ... | 2876871.0 | 2.0 | 1.0 | +| test.c:624:38:624:39 | ip | 2876871.0 | 2.0 | 4.0 | +| test.c:625:19:625:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:625:19:625:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:625:19:625:31 | ... * ... | 1438436.0 | 1.0 | 1.0 | +| test.c:625:24:625:31 | (...) | 1438436.0 | 1.0 | 1.0 | +| test.c:625:25:625:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:625:25:625:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:625:25:625:30 | ... * ... | 1438436.0 | 2.0 | 1.0 | +| test.c:625:29:625:30 | ip | 1438436.0 | 2.0 | 2.0 | +| test.c:626:19:626:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:626:19:626:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:626:19:626:25 | ... * ... | 1438436.0 | 2.0 | 1.0 | +| test.c:626:24:626:25 | ip | 1438436.0 | 2.0 | 2.0 | +| test.c:627:11:627:11 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:627:11:627:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:627:11:627:16 | ... * ... | 5753743.0 | 2.0 | 1.0 | +| test.c:627:11:627:21 | ... * ... | 5753743.0 | 1.0 | 1.0 | +| test.c:627:11:627:41 | ... + ... | 3.3105558510049E13 | 1.0 | 1.0 | +| test.c:627:15:627:16 | ip | 5753743.0 | 2.0 | 4.0 | +| test.c:627:20:627:21 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:627:20:627:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:627:25:627:36 | (...) | 5753743.0 | 1.0 | 1.0 | +| test.c:627:25:627:41 | ... * ... | 5753743.0 | 1.0 | 1.0 | +| test.c:627:26:627:26 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:627:26:627:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:627:26:627:31 | ... * ... | 5753743.0 | 2.0 | 1.0 | +| test.c:627:26:627:35 | ... + ... | 5753743.0 | 1.0 | 1.0 | +| test.c:627:30:627:31 | ip | 5753743.0 | 2.0 | 4.0 | +| test.c:627:35:627:35 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:627:35:627:35 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:627:40:627:41 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:627:40:627:41 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:628:15:628:15 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:628:15:628:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:628:15:628:32 | ... * ... | 5753743.0 | 1.0 | 1.0 | +| test.c:628:15:629:32 | ... + ... | 3.3105558510049E13 | 1.0 | 1.0 | +| test.c:628:15:630:32 | ... + ... | 1.9048087553828487E20 | 1.0 | 1.0 | +| test.c:628:15:636:28 | ... + ... | 3.0613773885524947E40 | 1.0 | 1.0 | +| test.c:628:19:628:32 | (...) | 5753743.0 | 1.0 | 1.0 | +| test.c:628:20:628:21 | ip | 5753743.0 | 2.0 | 4.0 | +| test.c:628:20:628:26 | ... * ... | 5753743.0 | 2.0 | 1.0 | +| test.c:628:20:628:31 | ... + ... | 5753743.0 | 1.0 | 1.0 | +| test.c:628:25:628:26 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:628:25:628:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:628:30:628:31 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:628:30:628:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:629:15:629:32 | (...) | 5753743.0 | 1.0 | 1.0 | +| test.c:629:16:629:16 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:629:16:629:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:629:16:629:21 | ... * ... | 5753743.0 | 2.0 | 1.0 | +| test.c:629:16:629:26 | ... * ... | 5753743.0 | 1.0 | 1.0 | +| test.c:629:16:629:31 | ... + ... | 5753743.0 | 1.0 | 1.0 | +| test.c:629:20:629:21 | ip | 5753743.0 | 2.0 | 4.0 | +| test.c:629:25:629:26 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:629:25:629:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:629:30:629:31 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:629:30:629:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:630:15:630:15 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:630:15:630:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:630:15:630:32 | ... * ... | 5753743.0 | 1.0 | 1.0 | +| test.c:630:19:630:32 | (...) | 5753743.0 | 1.0 | 1.0 | +| test.c:630:20:630:21 | ip | 5753743.0 | 2.0 | 4.0 | +| test.c:630:20:630:26 | ... * ... | 5753743.0 | 2.0 | 1.0 | +| test.c:630:20:630:31 | ... + ... | 5753743.0 | 1.0 | 1.0 | +| test.c:630:25:630:26 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:630:25:630:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:630:30:630:31 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:630:30:630:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:631:15:636:28 | (...) | 1.607183597776558E20 | 1.0 | 1.0 | +| test.c:631:16:631:27 | (...) | 5753743.0 | 1.0 | 1.0 | +| test.c:631:16:631:32 | ... * ... | 5753743.0 | 1.0 | 1.0 | +| test.c:631:16:632:65 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:631:16:636:27 | ... ? ... : ... | 1.607183597776558E20 | 1.0 | 1.0 | +| test.c:631:17:631:17 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:631:17:631:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:631:17:631:22 | ... * ... | 5753743.0 | 2.0 | 1.0 | +| test.c:631:17:631:26 | ... + ... | 5753743.0 | 1.0 | 1.0 | +| test.c:631:21:631:22 | ip | 5753743.0 | 2.0 | 4.0 | +| test.c:631:26:631:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:631:26:631:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:631:31:631:32 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:631:31:631:32 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:632:15:632:65 | (...) | 8.276392504384E12 | 1.0 | 1.0 | +| test.c:632:16:632:17 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:632:16:632:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:632:16:632:28 | ... * ... | 5753743.0 | 1.0 | 1.0 | +| test.c:632:16:632:38 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:632:16:632:64 | ... ? ... : ... | 8.276392504384E12 | 1.0 | 1.0 | +| test.c:632:21:632:28 | (...) | 5753743.0 | 1.0 | 1.0 | +| test.c:632:22:632:22 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:632:22:632:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:632:22:632:27 | ... * ... | 5753743.0 | 2.0 | 1.0 | +| test.c:632:26:632:27 | ip | 5753743.0 | 2.0 | 4.0 | +| test.c:632:32:632:33 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:632:32:632:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:632:32:632:38 | ... * ... | 5753743.0 | 2.0 | 1.0 | +| test.c:632:37:632:38 | ip | 5753743.0 | 2.0 | 4.0 | +| test.c:632:42:632:43 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:632:42:632:43 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:632:42:632:54 | ... * ... | 2876872.0 | 1.0 | 1.0 | +| test.c:632:47:632:54 | (...) | 2876872.0 | 1.0 | 1.0 | +| test.c:632:48:632:48 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:632:48:632:48 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:632:48:632:53 | ... * ... | 2876872.0 | 2.0 | 1.0 | +| test.c:632:52:632:53 | ip | 2876872.0 | 2.0 | 2.0 | +| test.c:632:58:632:59 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:632:58:632:59 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:632:58:632:64 | ... * ... | 2876872.0 | 2.0 | 1.0 | +| test.c:632:63:632:64 | ip | 2876872.0 | 2.0 | 2.0 | +| test.c:633:19:633:30 | (...) | 8630616.0 | 1.0 | 1.0 | +| test.c:633:19:633:35 | ... * ... | 8630616.0 | 1.0 | 1.0 | +| test.c:633:20:633:20 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:633:20:633:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:633:20:633:25 | ... * ... | 8630616.0 | 2.0 | 1.0 | +| test.c:633:20:633:29 | ... + ... | 8630616.0 | 1.0 | 1.0 | +| test.c:633:24:633:25 | ip | 8630616.0 | 2.0 | 4.0 | +| test.c:633:29:633:29 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:633:29:633:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:633:34:633:35 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:633:34:633:35 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:634:19:634:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:634:19:634:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:634:19:634:31 | ... * ... | 8630616.0 | 1.0 | 1.0 | +| test.c:634:19:634:41 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:634:19:636:27 | ... ? ... : ... | 1.862188745017225E13 | 1.0 | 1.0 | +| test.c:634:24:634:31 | (...) | 8630616.0 | 1.0 | 1.0 | +| test.c:634:25:634:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:634:25:634:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:634:25:634:30 | ... * ... | 8630616.0 | 2.0 | 1.0 | +| test.c:634:29:634:30 | ip | 8630616.0 | 2.0 | 4.0 | +| test.c:634:35:634:36 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:634:35:634:36 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:634:35:634:41 | ... * ... | 8630616.0 | 2.0 | 1.0 | +| test.c:634:40:634:41 | ip | 8630616.0 | 2.0 | 4.0 | +| test.c:635:21:635:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:635:21:635:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:635:21:635:33 | ... * ... | 4315308.5 | 1.0 | 1.0 | +| test.c:635:26:635:33 | (...) | 4315308.5 | 1.0 | 1.0 | +| test.c:635:27:635:27 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:635:27:635:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:635:27:635:32 | ... * ... | 4315308.5 | 2.0 | 1.0 | +| test.c:635:31:635:32 | ip | 4315308.5 | 2.0 | 2.0 | +| test.c:636:21:636:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:636:21:636:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:636:21:636:27 | ... * ... | 4315308.5 | 2.0 | 1.0 | +| test.c:636:26:636:27 | ip | 4315308.5 | 2.0 | 2.0 | +| test.c:637:15:637:15 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:637:15:637:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:637:15:637:20 | ... * ... | 5753743.0 | 2.0 | 1.0 | +| test.c:637:15:637:25 | ... * ... | 5753743.0 | 1.0 | 1.0 | +| test.c:637:15:637:45 | ... + ... | 3.3105558510049E13 | 1.0 | 1.0 | +| test.c:637:19:637:20 | ip | 5753743.0 | 2.0 | 4.0 | +| test.c:637:24:637:25 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:637:24:637:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:637:29:637:40 | (...) | 5753743.0 | 1.0 | 1.0 | +| test.c:637:29:637:45 | ... * ... | 5753743.0 | 1.0 | 1.0 | +| test.c:637:30:637:30 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:637:30:637:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:637:30:637:35 | ... * ... | 5753743.0 | 2.0 | 1.0 | +| test.c:637:30:637:39 | ... + ... | 5753743.0 | 1.0 | 1.0 | +| test.c:637:34:637:35 | ip | 5753743.0 | 2.0 | 4.0 | +| test.c:637:39:637:39 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:637:39:637:39 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:637:44:637:45 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:637:44:637:45 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:638:11:638:11 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:638:11:638:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:638:11:638:28 | ... * ... | 1917913.0 | 1.0 | 1.0 | +| test.c:638:11:639:32 | ... + ... | 3.678390275569E12 | 1.0 | 1.0 | +| test.c:638:11:640:32 | ... + ... | 7.054832528587367E18 | 1.0 | 1.0 | +| test.c:638:11:646:28 | ... + ... | 4.1994090949232005E37 | 1.0 | 1.0 | +| test.c:638:11:647:63 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:638:11:659:27 | ... ? ... : ... | 2.5337196100492797E53 | 1.0 | 1.0 | +| test.c:638:15:638:28 | (...) | 1917913.0 | 1.0 | 1.0 | +| test.c:638:16:638:17 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:638:16:638:22 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:638:16:638:27 | ... + ... | 1917913.0 | 1.0 | 1.0 | +| test.c:638:21:638:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:638:21:638:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:638:26:638:27 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:638:26:638:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:639:15:639:32 | (...) | 1917913.0 | 1.0 | 1.0 | +| test.c:639:16:639:16 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:639:16:639:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:639:16:639:21 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:639:16:639:26 | ... * ... | 1917913.0 | 1.0 | 1.0 | +| test.c:639:16:639:31 | ... + ... | 1917913.0 | 1.0 | 1.0 | +| test.c:639:20:639:21 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:639:25:639:26 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:639:25:639:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:639:30:639:31 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:639:30:639:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:640:15:640:15 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:640:15:640:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:640:15:640:32 | ... * ... | 1917913.0 | 1.0 | 1.0 | +| test.c:640:19:640:32 | (...) | 1917913.0 | 1.0 | 1.0 | +| test.c:640:20:640:21 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:640:20:640:26 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:640:20:640:31 | ... + ... | 1917913.0 | 1.0 | 1.0 | +| test.c:640:25:640:26 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:640:25:640:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:640:30:640:31 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:640:30:640:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:641:15:646:28 | (...) | 5.952528395119925E18 | 1.0 | 1.0 | +| test.c:641:16:641:27 | (...) | 1917913.0 | 1.0 | 1.0 | +| test.c:641:16:641:32 | ... * ... | 1917913.0 | 1.0 | 1.0 | +| test.c:641:16:642:65 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:641:16:646:27 | ... ? ... : ... | 5.952528395119925E18 | 1.0 | 1.0 | +| test.c:641:17:641:17 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:641:17:641:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:641:17:641:22 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:641:17:641:26 | ... + ... | 1917913.0 | 1.0 | 1.0 | +| test.c:641:21:641:22 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:641:26:641:26 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:641:26:641:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:641:31:641:32 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:641:31:641:32 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:642:15:642:65 | (...) | 9.19598527849E11 | 1.0 | 1.0 | +| test.c:642:16:642:17 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:642:16:642:17 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:642:16:642:28 | ... * ... | 1917913.0 | 1.0 | 1.0 | +| test.c:642:16:642:38 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:642:16:642:64 | ... ? ... : ... | 9.19598527849E11 | 1.0 | 1.0 | +| test.c:642:21:642:28 | (...) | 1917913.0 | 1.0 | 1.0 | +| test.c:642:22:642:22 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:642:22:642:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:642:22:642:27 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:642:26:642:27 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:642:32:642:33 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:642:32:642:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:642:32:642:38 | ... * ... | 1917913.0 | 2.0 | 1.0 | +| test.c:642:37:642:38 | ip | 1917913.0 | 2.0 | 6.0 | +| test.c:642:42:642:43 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:642:42:642:43 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:642:42:642:54 | ... * ... | 958957.0 | 1.0 | 1.0 | +| test.c:642:47:642:54 | (...) | 958957.0 | 1.0 | 1.0 | +| test.c:642:48:642:48 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:642:48:642:48 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:642:48:642:53 | ... * ... | 958957.0 | 2.0 | 1.0 | +| test.c:642:52:642:53 | ip | 958957.0 | 2.0 | 2.0 | +| test.c:642:58:642:59 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:642:58:642:59 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:642:58:642:64 | ... * ... | 958957.0 | 2.0 | 1.0 | +| test.c:642:63:642:64 | ip | 958957.0 | 2.0 | 2.0 | +| test.c:643:19:643:30 | (...) | 2876871.0 | 1.0 | 1.0 | +| test.c:643:19:643:35 | ... * ... | 2876871.0 | 1.0 | 1.0 | +| test.c:643:20:643:20 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:643:20:643:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:643:20:643:25 | ... * ... | 2876871.0 | 2.0 | 1.0 | +| test.c:643:20:643:29 | ... + ... | 2876871.0 | 1.0 | 1.0 | +| test.c:643:24:643:25 | ip | 2876871.0 | 2.0 | 4.0 | +| test.c:643:29:643:29 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:643:29:643:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:643:34:643:35 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:643:34:643:35 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:644:19:644:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:644:19:644:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:644:19:644:31 | ... * ... | 2876871.0 | 1.0 | 1.0 | +| test.c:644:19:644:41 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:644:19:646:27 | ... ? ... : ... | 2.069098126096E12 | 1.0 | 1.0 | +| test.c:644:24:644:31 | (...) | 2876871.0 | 1.0 | 1.0 | +| test.c:644:25:644:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:644:25:644:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:644:25:644:30 | ... * ... | 2876871.0 | 2.0 | 1.0 | +| test.c:644:29:644:30 | ip | 2876871.0 | 2.0 | 4.0 | +| test.c:644:35:644:36 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:644:35:644:36 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:644:35:644:41 | ... * ... | 2876871.0 | 2.0 | 1.0 | +| test.c:644:40:644:41 | ip | 2876871.0 | 2.0 | 4.0 | +| test.c:645:21:645:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:645:21:645:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:645:21:645:33 | ... * ... | 1438436.0 | 1.0 | 1.0 | +| test.c:645:26:645:33 | (...) | 1438436.0 | 1.0 | 1.0 | +| test.c:645:27:645:27 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:645:27:645:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:645:27:645:32 | ... * ... | 1438436.0 | 2.0 | 1.0 | +| test.c:645:31:645:32 | ip | 1438436.0 | 2.0 | 2.0 | +| test.c:646:21:646:22 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:646:21:646:22 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:646:21:646:27 | ... * ... | 1438436.0 | 2.0 | 1.0 | +| test.c:646:26:646:27 | ip | 1438436.0 | 2.0 | 2.0 | +| test.c:647:13:647:63 | (...) | 8.276392504384E12 | 1.0 | 1.0 | +| test.c:647:14:647:15 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:647:14:647:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:647:14:647:20 | ... * ... | 5753743.0 | 2.0 | 1.0 | +| test.c:647:14:647:36 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:647:14:647:62 | ... ? ... : ... | 8.276392504384E12 | 1.0 | 1.0 | +| test.c:647:19:647:20 | ip | 5753743.0 | 2.0 | 4.0 | +| test.c:647:24:647:31 | (...) | 5753743.0 | 1.0 | 1.0 | +| test.c:647:24:647:36 | ... * ... | 5753743.0 | 1.0 | 1.0 | +| test.c:647:25:647:26 | ip | 5753743.0 | 2.0 | 4.0 | +| test.c:647:25:647:30 | ... + ... | 5753743.0 | 2.0 | 1.0 | +| test.c:647:30:647:30 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:647:30:647:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:647:35:647:36 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:647:35:647:36 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:647:40:647:41 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:647:40:647:41 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:647:40:647:46 | ... * ... | 2876872.0 | 2.0 | 1.0 | +| test.c:647:45:647:46 | ip | 2876872.0 | 2.0 | 2.0 | +| test.c:647:50:647:57 | (...) | 2876872.0 | 1.0 | 1.0 | +| test.c:647:50:647:62 | ... * ... | 2876872.0 | 1.0 | 1.0 | +| test.c:647:51:647:52 | ip | 2876872.0 | 2.0 | 2.0 | +| test.c:647:51:647:56 | ... + ... | 2876872.0 | 2.0 | 1.0 | +| test.c:647:56:647:56 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:647:56:647:56 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:647:61:647:62 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:647:61:647:62 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:648:13:648:13 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:648:13:648:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:648:13:648:30 | ... * ... | 5753744.0 | 1.0 | 1.0 | +| test.c:648:13:649:30 | ... + ... | 3.3105570017536E13 | 1.0 | 1.0 | +| test.c:648:13:650:30 | ... + ... | 1.9048097485497765E20 | 1.0 | 1.0 | +| test.c:648:13:656:26 | ... + ... | 3.0613805809561187E40 | 1.0 | 1.0 | +| test.c:648:17:648:30 | (...) | 5753744.0 | 1.0 | 1.0 | +| test.c:648:18:648:19 | ip | 5753744.0 | 2.0 | 3.0 | +| test.c:648:18:648:24 | ... * ... | 5753744.0 | 2.0 | 1.0 | +| test.c:648:18:648:29 | ... + ... | 5753744.0 | 1.0 | 1.0 | +| test.c:648:23:648:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:648:23:648:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:648:28:648:29 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:648:28:648:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:649:13:649:30 | (...) | 5753744.0 | 1.0 | 1.0 | +| test.c:649:14:649:14 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:649:14:649:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:649:14:649:19 | ... * ... | 5753744.0 | 2.0 | 1.0 | +| test.c:649:14:649:24 | ... * ... | 5753744.0 | 1.0 | 1.0 | +| test.c:649:14:649:29 | ... + ... | 5753744.0 | 1.0 | 1.0 | +| test.c:649:18:649:19 | ip | 5753744.0 | 2.0 | 3.0 | +| test.c:649:23:649:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:649:23:649:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:649:28:649:29 | 32 | 1.0 | -1.0 | -1.0 | +| test.c:649:28:649:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:650:13:650:13 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:650:13:650:13 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:650:13:650:30 | ... * ... | 5753744.0 | 1.0 | 1.0 | +| test.c:650:17:650:30 | (...) | 5753744.0 | 1.0 | 1.0 | +| test.c:650:18:650:19 | ip | 5753744.0 | 2.0 | 3.0 | +| test.c:650:18:650:24 | ... * ... | 5753744.0 | 2.0 | 1.0 | +| test.c:650:18:650:29 | ... + ... | 5753744.0 | 1.0 | 1.0 | +| test.c:650:23:650:24 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:650:23:650:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:650:28:650:29 | 64 | 1.0 | -1.0 | -1.0 | +| test.c:650:28:650:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:651:13:656:26 | (...) | 1.6071844357615744E20 | 1.0 | 1.0 | +| test.c:651:14:651:25 | (...) | 5753744.0 | 1.0 | 1.0 | +| test.c:651:14:651:30 | ... * ... | 5753744.0 | 1.0 | 1.0 | +| test.c:651:14:652:63 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:651:14:656:25 | ... ? ... : ... | 1.6071844357615744E20 | 1.0 | 1.0 | +| test.c:651:15:651:15 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:651:15:651:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:651:15:651:20 | ... * ... | 5753744.0 | 2.0 | 1.0 | +| test.c:651:15:651:24 | ... + ... | 5753744.0 | 1.0 | 1.0 | +| test.c:651:19:651:20 | ip | 5753744.0 | 2.0 | 3.0 | +| test.c:651:24:651:24 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:651:24:651:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:651:29:651:30 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:651:29:651:30 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:652:13:652:63 | (...) | 8.27639538125625E12 | 1.0 | 1.0 | +| test.c:652:14:652:15 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:652:14:652:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:652:14:652:26 | ... * ... | 5753744.0 | 1.0 | 1.0 | +| test.c:652:14:652:36 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:652:14:652:62 | ... ? ... : ... | 8.27639538125625E12 | 1.0 | 1.0 | +| test.c:652:19:652:26 | (...) | 5753744.0 | 1.0 | 1.0 | +| test.c:652:20:652:20 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:652:20:652:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:652:20:652:25 | ... * ... | 5753744.0 | 2.0 | 1.0 | +| test.c:652:24:652:25 | ip | 5753744.0 | 2.0 | 3.0 | +| test.c:652:30:652:31 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:652:30:652:31 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:652:30:652:36 | ... * ... | 5753744.0 | 2.0 | 1.0 | +| test.c:652:35:652:36 | ip | 5753744.0 | 2.0 | 3.0 | +| test.c:652:40:652:41 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:652:40:652:41 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:652:40:652:52 | ... * ... | 2876872.5 | 1.0 | 1.0 | +| test.c:652:45:652:52 | (...) | 2876872.5 | 1.0 | 1.0 | +| test.c:652:46:652:46 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:652:46:652:46 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:652:46:652:51 | ... * ... | 2876872.5 | 2.0 | 1.0 | +| test.c:652:50:652:51 | ip | 2876872.5 | 2.0 | 2.0 | +| test.c:652:56:652:57 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:652:56:652:57 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:652:56:652:62 | ... * ... | 2876872.5 | 2.0 | 1.0 | +| test.c:652:61:652:62 | ip | 2876872.5 | 2.0 | 2.0 | +| test.c:653:17:653:28 | (...) | 8630617.5 | 1.0 | 1.0 | +| test.c:653:17:653:33 | ... * ... | 8630617.5 | 1.0 | 1.0 | +| test.c:653:18:653:18 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:653:18:653:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:653:18:653:23 | ... * ... | 8630617.5 | 2.0 | 1.0 | +| test.c:653:18:653:27 | ... + ... | 8630617.5 | 1.0 | 1.0 | +| test.c:653:22:653:23 | ip | 8630617.5 | 2.0 | 4.0 | +| test.c:653:27:653:27 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:653:27:653:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:653:32:653:33 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:653:32:653:33 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:654:17:654:18 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:654:17:654:18 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:654:17:654:29 | ... * ... | 8630617.5 | 1.0 | 1.0 | +| test.c:654:17:654:39 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:654:17:656:25 | ... ? ... : ... | 1.8621893923135562E13 | 1.0 | 1.0 | +| test.c:654:22:654:29 | (...) | 8630617.5 | 1.0 | 1.0 | +| test.c:654:23:654:23 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:654:23:654:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:654:23:654:28 | ... * ... | 8630617.5 | 2.0 | 1.0 | +| test.c:654:27:654:28 | ip | 8630617.5 | 2.0 | 4.0 | +| test.c:654:33:654:34 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:654:33:654:34 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:654:33:654:39 | ... * ... | 8630617.5 | 2.0 | 1.0 | +| test.c:654:38:654:39 | ip | 8630617.5 | 2.0 | 4.0 | +| test.c:655:19:655:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:655:19:655:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:655:19:655:31 | ... * ... | 4315309.25 | 1.0 | 1.0 | +| test.c:655:24:655:31 | (...) | 4315309.25 | 1.0 | 1.0 | +| test.c:655:25:655:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:655:25:655:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:655:25:655:30 | ... * ... | 4315309.25 | 2.0 | 1.0 | +| test.c:655:29:655:30 | ip | 4315309.25 | 2.0 | 2.0 | +| test.c:656:19:656:20 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:656:19:656:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:656:19:656:25 | ... * ... | 4315309.25 | 2.0 | 1.0 | +| test.c:656:24:656:25 | ip | 4315309.25 | 2.0 | 2.0 | +| test.c:657:13:657:14 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:657:13:657:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:657:13:657:19 | ... * ... | 5753744.0 | 2.0 | 1.0 | +| test.c:657:13:657:35 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:657:13:659:27 | ... ? ... : ... | 8.27639538125625E12 | 1.0 | 1.0 | +| test.c:657:18:657:19 | ip | 5753744.0 | 2.0 | 3.0 | +| test.c:657:23:657:30 | (...) | 5753744.0 | 1.0 | 1.0 | +| test.c:657:23:657:35 | ... * ... | 5753744.0 | 1.0 | 1.0 | +| test.c:657:24:657:25 | ip | 5753744.0 | 2.0 | 3.0 | +| test.c:657:24:657:29 | ... + ... | 5753744.0 | 2.0 | 1.0 | +| test.c:657:29:657:29 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:657:29:657:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:657:34:657:35 | 17 | 1.0 | -1.0 | -1.0 | +| test.c:657:34:657:35 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:658:15:658:16 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:658:15:658:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:658:15:658:21 | ... * ... | 2876872.5 | 2.0 | 1.0 | +| test.c:658:20:658:21 | ip | 2876872.5 | 2.0 | 2.0 | +| test.c:659:15:659:22 | (...) | 2876872.5 | 1.0 | 1.0 | +| test.c:659:15:659:27 | ... * ... | 2876872.5 | 1.0 | 1.0 | +| test.c:659:16:659:17 | ip | 2876872.5 | 2.0 | 2.0 | +| test.c:659:16:659:21 | ... + ... | 2876872.5 | 2.0 | 1.0 | +| test.c:659:21:659:21 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:659:21:659:21 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:659:26:659:27 | 14 | 1.0 | -1.0 | -1.0 | +| test.c:659:26:659:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:660:10:660:23 | special_number | 1.4542272872758854E125 | 1.0 | 1.0 | +| test.c:667:10:667:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:668:7:668:8 | c1 | 1.0 | 1.0 | 1.0 | +| test.c:668:13:668:13 | x | 1.0 | 1.0 | 1.0 | +| test.c:668:13:668:23 | ... += ... | 1.0 | 1.0 | 1.0 | +| test.c:668:18:668:23 | 748596 | 1.0 | -1.0 | -1.0 | +| test.c:669:7:669:8 | c2 | 1.0 | 1.0 | 1.0 | +| test.c:669:13:669:13 | x | 2.0 | 2.0 | 2.0 | +| test.c:669:13:669:25 | ... += ... | 2.0 | 2.0 | 2.0 | +| test.c:669:18:669:25 | 84652395 | 1.0 | -1.0 | -1.0 | +| test.c:670:7:670:8 | c3 | 1.0 | 1.0 | 1.0 | +| test.c:670:13:670:13 | x | 4.0 | 4.0 | 4.0 | +| test.c:670:13:670:24 | ... += ... | 4.0 | 4.0 | 4.0 | +| test.c:670:18:670:24 | 3675895 | 1.0 | -1.0 | -1.0 | +| test.c:671:7:671:8 | c4 | 1.0 | 1.0 | 1.0 | +| test.c:671:13:671:13 | x | 8.0 | 8.0 | 8.0 | +| test.c:671:13:671:22 | ... += ... | 8.0 | 8.0 | 8.0 | +| test.c:671:18:671:22 | 98634 | 1.0 | -1.0 | -1.0 | +| test.c:672:7:672:8 | c5 | 1.0 | 1.0 | 1.0 | +| test.c:672:13:672:13 | x | 16.0 | 16.0 | 16.0 | +| test.c:672:13:672:24 | ... += ... | 16.0 | 16.0 | 16.0 | +| test.c:672:18:672:24 | 7834985 | 1.0 | -1.0 | -1.0 | +| test.c:673:7:673:8 | c1 | 2.0 | 2.0 | 2.0 | +| test.c:673:7:673:14 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:673:13:673:14 | c2 | 2.0 | 2.0 | 2.0 | +| test.c:673:19:673:19 | x | 32.0 | 32.0 | 32.0 | +| test.c:673:19:673:32 | ... += ... | 32.0 | 32.0 | 32.0 | +| test.c:673:24:673:32 | 938457398 | 1.0 | -1.0 | -1.0 | +| test.c:674:7:674:8 | c1 | 3.5 | 3.0 | 3.0 | +| test.c:674:7:674:14 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:674:13:674:14 | c3 | 2.0 | 2.0 | 2.0 | +| test.c:674:19:674:19 | x | 64.0 | 64.0 | 64.0 | +| test.c:674:19:674:31 | ... += ... | 64.0 | 64.0 | 64.0 | +| test.c:674:24:674:31 | 73895648 | 1.0 | -1.0 | -1.0 | +| test.c:675:7:675:8 | c1 | 5.75 | 3.0 | 3.0 | +| test.c:675:7:675:14 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:675:13:675:14 | c4 | 2.0 | 2.0 | 2.0 | +| test.c:675:19:675:19 | x | 128.0 | 128.0 | 128.0 | +| test.c:675:19:675:31 | ... += ... | 128.0 | 128.0 | 128.0 | +| test.c:675:24:675:31 | 12345432 | 1.0 | -1.0 | -1.0 | +| test.c:676:7:676:8 | c1 | 9.125 | 3.0 | 3.0 | +| test.c:676:7:676:14 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:676:13:676:14 | c5 | 2.0 | 2.0 | 2.0 | +| test.c:676:19:676:19 | x | 256.0 | 256.0 | 256.0 | +| test.c:676:19:676:28 | ... += ... | 256.0 | 256.0 | 256.0 | +| test.c:676:24:676:28 | 38847 | 1.0 | -1.0 | -1.0 | +| test.c:677:7:677:8 | c2 | 5.5 | 3.0 | 3.0 | +| test.c:677:7:677:14 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:677:13:677:14 | c3 | 5.5 | 3.0 | 3.0 | +| test.c:677:19:677:19 | x | 512.0 | 512.0 | 512.0 | +| test.c:677:19:677:26 | ... += ... | 512.0 | 512.0 | 512.0 | +| test.c:677:24:677:26 | 234 | 1.0 | -1.0 | -1.0 | +| test.c:679:11:679:11 | x | 1024.0 | 1024.0 | 1024.0 | +| test.c:679:11:679:15 | ... + ... | 1048576.0 | 3.0 | 10.0 | +| test.c:679:11:679:19 | ... + ... | 1.073741824E9 | 5.0 | 14.0 | +| test.c:679:11:679:23 | ... + ... | 1.099511627776E12 | 5.0 | 14.0 | +| test.c:679:11:679:27 | ... + ... | 1.125899906842624E15 | 5.0 | 14.0 | +| test.c:679:11:679:31 | ... + ... | 1.152921504606847E18 | 5.0 | 14.0 | +| test.c:679:11:679:35 | ... + ... | 1.1805916207174113E21 | 5.0 | 14.0 | +| test.c:679:11:679:39 | ... + ... | 1.2089258196146292E24 | 5.0 | 14.0 | +| test.c:679:11:679:43 | ... + ... | 1.2379400392853803E27 | 5.0 | 14.0 | +| test.c:679:11:679:47 | ... + ... | 1.2676506002282294E30 | 5.0 | 14.0 | +| test.c:679:11:679:51 | ... + ... | 1.298074214633707E33 | 5.0 | 14.0 | +| test.c:679:11:679:55 | ... + ... | 1.329227995784916E36 | 5.0 | 14.0 | +| test.c:679:15:679:15 | x | 1024.0 | 1024.0 | 1024.0 | +| test.c:679:19:679:19 | x | 1024.0 | 1024.0 | 1024.0 | +| test.c:679:23:679:23 | x | 1024.0 | 1024.0 | 1024.0 | +| test.c:679:27:679:27 | x | 1024.0 | 1024.0 | 1024.0 | +| test.c:679:31:679:31 | x | 1024.0 | 1024.0 | 1024.0 | +| test.c:679:35:679:35 | x | 1024.0 | 1024.0 | 1024.0 | +| test.c:679:39:679:39 | x | 1024.0 | 1024.0 | 1024.0 | +| test.c:679:43:679:43 | x | 1024.0 | 1024.0 | 1024.0 | +| test.c:679:47:679:47 | x | 1024.0 | 1024.0 | 1024.0 | +| test.c:679:51:679:51 | x | 1024.0 | 1024.0 | 1024.0 | +| test.c:679:55:679:55 | x | 1024.0 | 1024.0 | 1024.0 | +| test.c:680:10:680:10 | y | 1.329227995784916E36 | 3.0 | 5.0 | +| test.c:685:20:685:20 | x | 1.0 | 1.0 | 1.0 | +| test.c:685:20:685:26 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:685:20:685:36 | ... ? ... : ... | 1.0 | 1.0 | 1.0 | +| test.c:685:24:685:26 | 100 | 1.0 | -1.0 | -1.0 | +| test.c:685:24:685:26 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:685:30:685:30 | x | 1.0 | 1.0 | 1.0 | +| test.c:685:34:685:36 | 100 | 1.0 | -1.0 | -1.0 | +| test.c:685:34:685:36 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:688:3:688:4 | y1 | 1.0 | -1.0 | -1.0 | +| test.c:688:9:688:11 | ++ ... | 1.0 | 1.0 | 1.0 | +| test.c:688:11:688:11 | y | 1.0 | 1.0 | 1.0 | +| test.c:689:3:689:4 | y2 | 1.0 | -1.0 | -1.0 | +| test.c:689:19:689:19 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:689:19:689:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:698:3:698:3 | i | 1.0 | -1.0 | -1.0 | +| test.c:698:3:698:8 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:698:7:698:8 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:699:7:699:7 | i | 1.0 | 1.0 | 1.0 | +| test.c:701:3:701:3 | i | 1.0 | -1.0 | -1.0 | +| test.c:701:3:701:8 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:701:7:701:8 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:702:3:702:3 | i | 1.0 | 1.0 | 1.0 | +| test.c:702:3:702:9 | ... += ... | 1.0 | 1.0 | 1.0 | +| test.c:702:8:702:9 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:703:7:703:7 | i | 1.0 | 1.0 | 1.0 | +| test.c:705:3:705:3 | i | 1.0 | -1.0 | -1.0 | +| test.c:705:3:705:8 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:705:7:705:8 | 40 | 1.0 | -1.0 | -1.0 | +| test.c:706:3:706:3 | i | 1.0 | 1.0 | 1.0 | +| test.c:706:3:706:9 | ... -= ... | 1.0 | 1.0 | 1.0 | +| test.c:706:8:706:9 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:707:7:707:7 | i | 1.0 | 1.0 | 1.0 | +| test.c:709:3:709:3 | i | 1.0 | -1.0 | -1.0 | +| test.c:709:3:709:12 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:709:7:709:7 | j | 1.0 | -1.0 | -1.0 | +| test.c:709:7:709:12 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:709:11:709:12 | 40 | 1.0 | -1.0 | -1.0 | +| test.c:710:7:710:7 | i | 1.0 | 1.0 | 1.0 | +| test.c:712:3:712:3 | i | 1.0 | -1.0 | -1.0 | +| test.c:712:3:712:15 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:712:7:712:15 | (...) | 1.0 | 1.0 | 1.0 | +| test.c:712:8:712:8 | j | 1.0 | 1.0 | 1.0 | +| test.c:712:8:712:14 | ... += ... | 1.0 | 1.0 | 1.0 | +| test.c:712:13:712:14 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:713:7:713:7 | i | 1.0 | 1.0 | 1.0 | +| test.c:715:3:715:3 | i | 1.0 | -1.0 | -1.0 | +| test.c:715:3:715:20 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:715:7:715:8 | 20 | 1.0 | -1.0 | -1.0 | +| test.c:715:7:715:20 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:715:12:715:20 | (...) | 1.0 | 1.0 | 1.0 | +| test.c:715:13:715:13 | j | 1.0 | 1.0 | 1.0 | +| test.c:715:13:715:19 | ... -= ... | 1.0 | 1.0 | 1.0 | +| test.c:715:18:715:19 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:716:7:716:7 | i | 1.0 | 1.0 | 1.0 | +| test.c:721:14:721:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:723:7:723:7 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:723:7:723:7 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:723:7:723:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:723:7:723:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:723:7:723:33 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:723:7:723:44 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:723:12:723:12 | a | 1.0 | 1.0 | 1.0 | +| test.c:723:17:723:17 | a | 1.0 | 1.0 | 1.0 | +| test.c:723:17:723:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:723:22:723:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:723:22:723:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:723:28:723:28 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:723:28:723:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:723:28:723:33 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:723:33:723:33 | b | 1.0 | 1.0 | 1.0 | +| test.c:723:38:723:38 | b | 1.0 | 1.0 | 1.0 | +| test.c:723:38:723:44 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:723:43:723:44 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:723:43:723:44 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:724:13:724:13 | a | 1.0 | 1.0 | 1.0 | +| test.c:724:13:724:15 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:724:13:724:15 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:724:15:724:15 | b | 1.0 | 1.0 | 1.0 | +| test.c:725:5:725:9 | total | 1.0 | 1.0 | 1.0 | +| test.c:725:5:725:14 | ... += ... | 1.0 | 1.0 | 1.0 | +| test.c:725:14:725:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:727:7:727:7 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:727:7:727:7 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:727:7:727:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:727:7:727:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:727:7:727:33 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:727:7:727:44 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:727:12:727:12 | a | 2.0 | 3.0 | 3.0 | +| test.c:727:17:727:17 | a | 1.5 | 2.0 | 3.0 | +| test.c:727:17:727:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:727:22:727:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:727:22:727:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:727:28:727:28 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:727:28:727:28 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:727:28:727:33 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:727:33:727:33 | b | 3.0 | 3.0 | 3.0 | +| test.c:727:38:727:38 | b | 2.0 | 3.0 | 3.0 | +| test.c:727:38:727:44 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:727:43:727:44 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:727:43:727:44 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:728:13:728:13 | a | 1.25 | 2.0 | 2.0 | +| test.c:728:13:728:15 | (int)... | 1.875 | 5.0 | 4.0 | +| test.c:728:13:728:15 | ... * ... | 1.875 | 5.0 | 4.0 | +| test.c:728:15:728:15 | b | 1.5 | 3.0 | 2.0 | +| test.c:729:5:729:9 | total | 2.0 | 2.0 | 2.0 | +| test.c:729:5:729:14 | ... += ... | 3.75 | 9.0 | 8.0 | +| test.c:729:14:729:14 | r | 1.875 | 5.0 | 4.0 | +| test.c:731:7:731:7 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:731:7:731:7 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:731:7:731:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:731:7:731:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:731:7:731:34 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:731:7:731:45 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:731:12:731:12 | a | 2.75 | 3.0 | 3.0 | +| test.c:731:17:731:17 | a | 1.875 | 2.0 | 3.0 | +| test.c:731:17:731:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:731:22:731:23 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:731:22:731:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:731:28:731:29 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:731:28:731:29 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:731:28:731:34 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:731:34:731:34 | b | 6.5 | 3.0 | 3.0 | +| test.c:731:39:731:39 | b | 3.75 | 2.0 | 3.0 | +| test.c:731:39:731:45 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:731:44:731:45 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:731:44:731:45 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:732:13:732:13 | a | 1.4375 | 2.0 | 2.0 | +| test.c:732:13:732:15 | (int)... | 3.4140625 | 4.0 | 4.0 | +| test.c:732:13:732:15 | ... * ... | 3.4140625 | 4.0 | 4.0 | +| test.c:732:15:732:15 | b | 2.375 | 2.0 | 2.0 | +| test.c:733:5:733:9 | total | 5.75 | 9.0 | 9.0 | +| test.c:733:5:733:14 | ... += ... | 19.630859375 | 34.0 | 24.0 | +| test.c:733:14:733:14 | r | 3.4140625 | 4.0 | 4.0 | +| test.c:736:10:736:14 | total | 25.380859375 | 39.0 | 25.0 | +| test.c:740:14:740:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:742:7:742:7 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:742:7:742:7 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:742:7:742:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:742:7:742:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:742:12:742:12 | b | 1.0 | 1.0 | 1.0 | +| test.c:742:17:742:17 | b | 1.0 | 1.0 | 1.0 | +| test.c:742:17:742:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:742:22:742:23 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:742:22:742:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:743:13:743:14 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:743:13:743:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:743:13:743:16 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:743:13:743:16 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:743:16:743:16 | b | 1.0 | 1.0 | 1.0 | +| test.c:744:5:744:9 | total | 1.0 | 1.0 | 1.0 | +| test.c:744:5:744:14 | ... += ... | 1.0 | 1.0 | 1.0 | +| test.c:744:14:744:14 | r | 1.0 | 1.0 | 1.0 | +| test.c:746:7:746:7 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:746:7:746:7 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:746:7:746:12 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:746:7:746:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:746:12:746:12 | b | 2.0 | 3.0 | 3.0 | +| test.c:746:17:746:17 | b | 1.5 | 3.0 | 3.0 | +| test.c:746:17:746:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:746:22:746:23 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:746:22:746:23 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:747:13:747:14 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:747:13:747:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:747:13:747:16 | (int)... | 1.25 | 3.0 | 2.0 | +| test.c:747:13:747:16 | ... * ... | 1.25 | 3.0 | 2.0 | +| test.c:747:16:747:16 | b | 1.25 | 3.0 | 2.0 | +| test.c:748:5:748:9 | total | 2.0 | 2.0 | 2.0 | +| test.c:748:5:748:14 | ... += ... | 2.5 | 5.0 | 4.0 | +| test.c:748:14:748:14 | r | 1.25 | 3.0 | 2.0 | +| test.c:750:7:750:8 | 13 | 1.0 | -1.0 | -1.0 | +| test.c:750:7:750:8 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:750:7:750:13 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:750:7:750:24 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:750:13:750:13 | b | 2.75 | 3.0 | 3.0 | +| test.c:750:18:750:18 | b | 1.875 | 2.0 | 3.0 | +| test.c:750:18:750:24 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:750:23:750:24 | 23 | 1.0 | -1.0 | -1.0 | +| test.c:750:23:750:24 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:751:13:751:14 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:751:13:751:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:751:13:751:16 | (int)... | 1.4375 | 2.0 | 2.0 | +| test.c:751:13:751:16 | ... * ... | 1.4375 | 2.0 | 2.0 | +| test.c:751:16:751:16 | b | 1.4375 | 2.0 | 2.0 | +| test.c:752:5:752:9 | total | 4.5 | 5.0 | 5.0 | +| test.c:752:5:752:14 | ... += ... | 6.46875 | 10.0 | 8.0 | +| test.c:752:14:752:14 | r | 1.4375 | 2.0 | 2.0 | +| test.c:755:10:755:14 | total | 10.96875 | 13.0 | 9.0 | +| test.c:760:3:760:3 | x | 1.0 | -1.0 | -1.0 | +| test.c:760:3:760:22 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:760:7:760:7 | y | 1.0 | -1.0 | -1.0 | +| test.c:760:7:760:22 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:760:11:760:22 | 1000000003 | 1.0 | -1.0 | -1.0 | +| test.c:761:3:761:4 | xy | 1.0 | -1.0 | -1.0 | +| test.c:761:3:761:12 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:761:8:761:8 | x | 1.0 | 1.0 | 1.0 | +| test.c:761:8:761:12 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:761:12:761:12 | y | 1.0 | 1.0 | 1.0 | +| test.c:762:10:762:11 | xy | 1.0 | 1.0 | 1.0 | +| test.c:767:3:767:3 | x | 1.0 | -1.0 | -1.0 | +| test.c:767:3:767:14 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:767:7:767:14 | 274177 | 1.0 | -1.0 | -1.0 | +| test.c:768:3:768:3 | y | 1.0 | -1.0 | -1.0 | +| test.c:768:3:768:22 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:768:7:768:22 | 67280421310721 | 1.0 | -1.0 | -1.0 | +| test.c:769:3:769:4 | xy | 1.0 | -1.0 | -1.0 | +| test.c:769:3:769:12 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:769:8:769:8 | x | 1.0 | 1.0 | 1.0 | +| test.c:769:8:769:12 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:769:12:769:12 | y | 1.0 | 1.0 | 1.0 | +| test.c:770:10:770:11 | xy | 1.0 | 1.0 | 1.0 | +| test.c:774:7:774:8 | ui | 1.0 | 1.0 | 1.0 | +| test.c:774:7:774:14 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:774:13:774:14 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:774:13:774:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:775:28:775:44 | (unsigned long)... | 1.0 | 1.0 | 1.0 | +| test.c:775:28:775:49 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:775:43:775:44 | ui | 1.0 | 1.0 | 1.0 | +| test.c:775:48:775:49 | (unsigned long)... | 1.0 | 1.0 | 1.0 | +| test.c:775:48:775:49 | ui | 1.0 | 1.0 | 1.0 | +| test.c:776:12:776:17 | result | 1.0 | 1.0 | 1.0 | +| test.c:778:7:778:8 | ul | 1.0 | 1.0 | 1.0 | +| test.c:778:7:778:14 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:778:13:778:14 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:778:13:778:14 | (unsigned long)... | 1.0 | 1.0 | 1.0 | +| test.c:779:28:779:29 | ul | 1.0 | 1.0 | 1.0 | +| test.c:779:28:779:34 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:779:33:779:34 | ul | 1.0 | 1.0 | 1.0 | +| test.c:780:12:780:17 | result | 1.0 | 1.0 | 1.0 | +| test.c:782:10:782:10 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:782:10:782:10 | (unsigned long)... | 1.0 | 1.0 | 1.0 | +| test.c:786:7:786:8 | ui | 1.0 | 1.0 | 1.0 | +| test.c:786:7:786:14 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:786:7:786:25 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:786:13:786:14 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:786:13:786:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:786:19:786:20 | ui | 1.0 | 1.0 | 1.0 | +| test.c:786:19:786:25 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:786:25:786:25 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:786:25:786:25 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:787:5:787:6 | ui | 1.0 | 1.0 | 1.0 | +| test.c:787:5:787:16 | ... *= ... | 1.0 | 1.0 | 1.0 | +| test.c:787:11:787:12 | ui | 1.0 | 1.0 | 1.0 | +| test.c:787:11:787:16 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:787:16:787:16 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:787:16:787:16 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:788:12:788:13 | (unsigned long)... | 1.0 | 1.0 | 1.0 | +| test.c:788:12:788:13 | ui | 1.0 | 1.0 | 1.0 | +| test.c:791:26:791:27 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:791:26:791:27 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:792:3:792:9 | uiconst | 1.0 | 1.0 | 1.0 | +| test.c:792:3:792:14 | ... *= ... | 1.0 | 1.0 | 1.0 | +| test.c:792:14:792:14 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:792:14:792:14 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:794:27:794:28 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:794:27:794:28 | (unsigned long)... | 1.0 | 1.0 | 1.0 | +| test.c:795:3:795:9 | ulconst | 1.0 | 1.0 | 1.0 | +| test.c:795:3:795:14 | ... *= ... | 1.0 | 1.0 | 1.0 | +| test.c:795:14:795:14 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:795:14:795:14 | (unsigned long)... | 1.0 | 1.0 | 1.0 | +| test.c:796:10:796:16 | (unsigned long)... | 1.0 | 1.0 | 1.0 | +| test.c:796:10:796:16 | uiconst | 1.0 | 1.0 | 1.0 | +| test.c:796:10:796:26 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:796:20:796:26 | ulconst | 1.0 | 1.0 | 1.0 | +| test.c:800:7:800:7 | i | 1.0 | 1.0 | 1.0 | +| test.c:800:7:800:13 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:800:7:800:23 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:800:12:800:13 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:800:13:800:13 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:800:18:800:18 | i | 1.0 | 1.0 | 1.0 | +| test.c:800:18:800:23 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:800:23:800:23 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:801:5:801:5 | i | 1.0 | -1.0 | -1.0 | +| test.c:801:5:801:13 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:801:9:801:9 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:801:9:801:13 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:801:13:801:13 | i | 1.0 | 1.0 | 1.0 | +| test.c:802:9:802:9 | i | 1.0 | 1.0 | 1.0 | +| test.c:804:5:804:5 | i | 1.0 | -1.0 | -1.0 | +| test.c:804:5:804:14 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:804:9:804:9 | i | 1.0 | 1.0 | 1.0 | +| test.c:804:9:804:14 | ... * ... | 1.0 | 1.0 | 1.0 | +| test.c:804:13:804:14 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:804:14:804:14 | 3 | 1.0 | -1.0 | -1.0 | +| test.c:805:9:805:9 | i | 1.0 | 1.0 | 1.0 | +| test.c:807:5:807:5 | i | 1.0 | 1.0 | 1.0 | +| test.c:807:5:807:10 | ... *= ... | 1.0 | 1.0 | 1.0 | +| test.c:807:10:807:10 | 7 | 1.0 | -1.0 | -1.0 | +| test.c:808:9:808:9 | i | 1.0 | 1.0 | 1.0 | +| test.c:810:5:810:5 | i | 1.0 | 1.0 | 1.0 | +| test.c:810:5:810:12 | ... *= ... | 1.0 | 1.0 | 1.0 | +| test.c:810:10:810:12 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:810:11:810:12 | 11 | 1.0 | -1.0 | -1.0 | +| test.c:811:9:811:9 | i | 1.0 | 1.0 | 1.0 | +| test.c:813:7:813:7 | i | 2.0 | 3.0 | 3.0 | +| test.c:813:7:813:13 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.c:813:12:813:13 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:813:13:813:13 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:814:5:814:5 | i | 1.0 | -1.0 | -1.0 | +| test.c:814:5:814:27 | ... = ... | 1.5 | 2.0 | 2.0 | +| test.c:814:9:814:9 | i | 1.5 | 2.0 | 2.0 | +| test.c:814:9:814:27 | ... * ... | 1.5 | 2.0 | 2.0 | +| test.c:814:13:814:27 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:814:18:814:27 | 4294967295 | 1.0 | -1.0 | -1.0 | +| test.c:815:9:815:9 | i | 1.5 | 2.0 | 2.0 | +| test.c:817:3:817:3 | i | 1.0 | -1.0 | -1.0 | +| test.c:817:3:817:12 | ... = ... | 3.5 | 6.0 | 5.0 | +| test.c:817:7:817:7 | i | 3.5 | 5.0 | 5.0 | +| test.c:817:7:817:12 | ... * ... | 3.5 | 5.0 | 5.0 | +| test.c:817:11:817:12 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:817:12:817:12 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:818:10:818:10 | i | 3.5 | 6.0 | 5.0 | +| test.c:820:20:820:20 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:820:20:820:20 | (signed char)... | 1.0 | 1.0 | 1.0 | +| test.c:821:3:821:3 | i | 1.0 | -1.0 | -1.0 | +| test.c:821:3:821:17 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:821:7:821:17 | (...) | 1.0 | 1.0 | 1.0 | +| test.c:821:7:821:17 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:821:8:821:11 | * ... | 1.0 | -1.0 | -1.0 | +| test.c:821:8:821:16 | ... *= ... | 1.0 | 1.0 | 1.0 | +| test.c:821:10:821:11 | sc | 1.0 | 1.0 | 1.0 | +| test.c:821:16:821:16 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:823:7:823:7 | i | 1.0 | 1.0 | 1.0 | +| test.c:825:10:825:10 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:830:7:830:7 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:830:7:830:7 | n | 1.0 | 1.0 | 1.0 | +| test.c:832:7:832:7 | n | 1.0 | 1.0 | 1.0 | +| test.c:832:7:832:11 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.c:832:11:832:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:832:11:832:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:833:9:833:9 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:833:9:833:9 | n | 1.0 | 1.0 | 1.0 | +| test.c:836:7:836:7 | n | 2.0 | 2.0 | 2.0 | +| test.c:836:7:836:12 | ... != ... | 1.0 | -1.0 | -1.0 | +| test.c:836:12:836:12 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:836:12:836:12 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:837:9:837:9 | (int)... | 2.0 | 1.0 | 1.0 | +| test.c:837:9:837:9 | n | 2.0 | 1.0 | 1.0 | +| test.c:839:9:839:9 | (int)... | 1.5 | 2.0 | 1.0 | +| test.c:839:9:839:9 | n | 1.5 | 2.0 | 1.0 | +| test.c:842:7:842:8 | ! ... | 1.0 | -1.0 | -1.0 | +| test.c:842:8:842:8 | n | 3.5 | 2.0 | 2.0 | +| test.c:843:9:843:9 | (int)... | 2.25 | 2.0 | 1.0 | +| test.c:843:9:843:9 | n | 2.25 | 2.0 | 1.0 | +| test.c:845:9:845:9 | (int)... | 3.5 | 1.0 | 1.0 | +| test.c:845:9:845:9 | n | 3.5 | 1.0 | 1.0 | +| test.c:848:10:848:10 | n | 13.0 | 2.0 | 2.0 | +| test.c:848:10:848:15 | ... != ... | 1.0 | -1.0 | -1.0 | +| test.c:848:15:848:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:848:15:848:15 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:849:5:849:5 | n | 13.0 | 1.0 | 1.0 | +| test.c:849:5:849:7 | ... -- | 13.0 | 1.0 | 1.0 | +| test.c:852:7:852:7 | (int)... | 7.0 | 2.0 | 1.0 | +| test.c:852:7:852:7 | n | 7.0 | 2.0 | 1.0 | +| test.c:856:7:856:7 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:856:7:856:7 | n | 1.0 | 1.0 | 1.0 | +| test.c:856:7:856:11 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:856:11:856:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:859:7:859:7 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:859:7:859:7 | n | 1.0 | 1.0 | 1.0 | +| test.c:859:7:859:12 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.c:859:12:859:12 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:860:9:860:9 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:860:9:860:9 | n | 1.0 | 1.0 | 1.0 | +| test.c:862:9:862:9 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:862:9:862:9 | n | 1.0 | 1.0 | 1.0 | +| test.c:865:7:865:7 | n | 2.0 | 2.0 | 2.0 | +| test.c:866:9:866:9 | (int)... | 2.0 | 1.0 | 2.0 | +| test.c:866:9:866:9 | n | 2.0 | 1.0 | 2.0 | +| test.c:868:9:868:9 | (int)... | 1.5 | 2.0 | 1.0 | +| test.c:868:9:868:9 | n | 1.5 | 2.0 | 1.0 | +| test.c:871:10:871:10 | (int)... | 13.0 | 2.0 | 4.0 | +| test.c:871:10:871:10 | n | 12.0 | 2.0 | 4.0 | +| test.c:871:10:871:15 | ... != ... | 1.0 | -1.0 | -1.0 | +| test.c:871:15:871:15 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:872:5:872:5 | n | 12.0 | 1.0 | 3.0 | +| test.c:872:5:872:7 | ... -- | 12.0 | 1.0 | 3.0 | +| test.c:875:7:875:7 | (int)... | 6.5 | 2.0 | 3.0 | +| test.c:875:7:875:7 | n | 6.5 | 2.0 | 3.0 | +| test.c:879:7:879:7 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:879:7:879:7 | n | 1.0 | 1.0 | 1.0 | +| test.c:879:7:879:12 | ... != ... | 1.0 | -1.0 | -1.0 | +| test.c:879:12:879:12 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:880:9:880:9 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:880:9:880:9 | n | 1.0 | 1.0 | 1.0 | +| test.c:880:9:880:14 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:880:14:880:14 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:881:11:881:11 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:881:11:881:11 | n | 1.0 | 1.0 | 1.0 | +| test.c:885:7:885:7 | (int)... | 2.0 | 2.0 | 3.0 | +| test.c:885:7:885:7 | n | 2.0 | 2.0 | 3.0 | +| test.c:885:7:885:12 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:885:12:885:12 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:886:9:886:9 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:886:9:886:13 | ... * ... | 1.5 | 1.0 | 3.0 | +| test.c:886:9:886:18 | ... - ... | 1.5 | 1.0 | 3.0 | +| test.c:886:9:886:23 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.c:886:13:886:13 | (int)... | 1.5 | 1.0 | 3.0 | +| test.c:886:13:886:13 | n | 1.5 | 1.0 | 3.0 | +| test.c:886:17:886:18 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:886:23:886:23 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:889:9:889:9 | (int)... | 1.5 | 1.0 | 3.0 | +| test.c:889:9:889:9 | n | 1.5 | 1.0 | 3.0 | +| test.c:892:7:892:7 | (int)... | 3.0 | 3.0 | 4.0 | +| test.c:892:7:892:7 | n | 3.0 | 3.0 | 4.0 | +| test.c:892:7:892:17 | ... != ... | 1.0 | -1.0 | -1.0 | +| test.c:892:7:892:32 | ... && ... | 1.0 | -1.0 | -1.0 | +| test.c:892:12:892:17 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:892:13:892:17 | 32768 | 1.0 | -1.0 | -1.0 | +| test.c:892:22:892:22 | (int)... | 3.0 | 3.0 | 4.0 | +| test.c:892:22:892:22 | n | 3.0 | 3.0 | 4.0 | +| test.c:892:22:892:32 | ... != ... | 1.0 | -1.0 | -1.0 | +| test.c:892:27:892:32 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:892:28:892:32 | 32767 | 1.0 | -1.0 | -1.0 | +| test.c:893:9:893:9 | (int)... | 3.0 | 3.0 | 4.0 | +| test.c:893:9:893:9 | n | 3.0 | 3.0 | 4.0 | +| test.c:896:7:896:7 | (int)... | 5.0 | 5.0 | 6.0 | +| test.c:896:7:896:7 | n | 5.0 | 5.0 | 6.0 | +| test.c:896:7:896:12 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:896:12:896:12 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:897:5:897:5 | n | 3.0 | 2.0 | 6.0 | +| test.c:897:5:897:14 | ... ? ... : ... | 6.0 | 3.0 | 6.0 | +| test.c:897:10:897:10 | (int)... | 3.0 | 2.0 | 5.0 | +| test.c:897:10:897:10 | n | 3.0 | 2.0 | 5.0 | +| test.c:897:14:897:14 | (int)... | 2.0 | 2.0 | 4.0 | +| test.c:897:14:897:14 | n | 2.0 | 2.0 | 4.0 | +| test.c:898:5:898:6 | ! ... | 1.0 | -1.0 | -1.0 | +| test.c:898:5:898:14 | ... ? ... : ... | 15.0 | 3.0 | 6.0 | +| test.c:898:6:898:6 | n | 5.0 | 3.0 | 6.0 | +| test.c:898:10:898:10 | (int)... | 3.0 | 3.0 | 4.0 | +| test.c:898:10:898:10 | n | 3.0 | 3.0 | 4.0 | +| test.c:898:14:898:14 | (int)... | 5.0 | 2.0 | 5.0 | +| test.c:898:14:898:14 | n | 5.0 | 2.0 | 5.0 | +| test.c:909:7:909:8 | (unsigned long)... | 1.0 | 1.0 | 1.0 | +| test.c:909:7:909:8 | ss | 1.0 | 1.0 | 1.0 | +| test.c:909:7:909:22 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:909:12:909:22 | sizeof(int) | 1.0 | -1.0 | -1.0 | +| test.c:910:9:910:10 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:910:9:910:10 | ss | 1.0 | 1.0 | 1.0 | +| test.c:913:7:913:8 | (int)... | 2.0 | 3.0 | 2.0 | +| test.c:913:7:913:8 | ss | 2.0 | 3.0 | 2.0 | +| test.c:913:7:913:17 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:913:12:913:17 | 32769 | 1.0 | -1.0 | -1.0 | +| test.c:914:9:914:10 | (int)... | 1.5 | 3.0 | 2.0 | +| test.c:914:9:914:10 | ss | 1.5 | 3.0 | 2.0 | +| test.c:917:7:917:15 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:917:7:917:15 | (short)... | 1.0 | 1.0 | 1.0 | +| test.c:917:7:917:20 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:917:14:917:15 | us | 1.0 | 1.0 | 1.0 | +| test.c:917:20:917:20 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:918:9:918:10 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:918:9:918:10 | us | 1.0 | 1.0 | 1.0 | +| test.c:921:7:921:15 | (int)... | 2.0 | 2.0 | 1.0 | +| test.c:921:7:921:15 | (short)... | 2.0 | 1.0 | 2.0 | +| test.c:921:7:921:21 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:921:14:921:15 | us | 2.0 | 1.0 | 2.0 | +| test.c:921:20:921:21 | - ... | 1.0 | 1.0 | 1.0 | +| test.c:921:21:921:21 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:922:9:922:10 | (int)... | 1.5 | 1.0 | 2.0 | +| test.c:922:9:922:10 | us | 1.5 | 1.0 | 2.0 | +| test.c:925:7:925:8 | (unsigned long)... | 3.0 | 3.0 | 2.0 | +| test.c:925:7:925:8 | ss | 3.0 | 3.0 | 2.0 | +| test.c:925:7:925:23 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:925:13:925:23 | sizeof(int) | 1.0 | -1.0 | -1.0 | +| test.c:926:9:926:10 | (int)... | 2.0 | 2.0 | 2.0 | +| test.c:926:9:926:10 | ss | 2.0 | 2.0 | 2.0 | +| test.c:929:7:929:8 | (int)... | 4.0 | 3.0 | 2.0 | +| test.c:929:7:929:8 | ss | 4.0 | 3.0 | 2.0 | +| test.c:929:7:929:12 | (unsigned long)... | 4.0 | 3.0 | 2.0 | +| test.c:929:7:929:12 | ... + ... | 4.0 | 3.0 | 2.0 | +| test.c:929:7:929:26 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:929:12:929:12 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:929:16:929:26 | sizeof(int) | 1.0 | -1.0 | -1.0 | +| test.c:930:9:930:10 | (int)... | 2.5 | 3.0 | 1.0 | +| test.c:930:9:930:10 | ss | 2.5 | 3.0 | 1.0 | +| test.c:936:8:936:8 | s | 1.0 | -1.0 | -1.0 | +| test.c:936:8:936:12 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.c:936:12:936:12 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:936:15:936:15 | s | 13.0 | 3.0 | 6.0 | +| test.c:936:15:936:20 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:936:19:936:20 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:936:23:936:23 | s | 13.0 | 3.0 | 5.0 | +| test.c:936:23:936:25 | ... ++ | 13.0 | 3.0 | 5.0 | +| test.c:937:18:937:18 | s | 13.0 | 3.0 | 5.0 | +| test.c:937:18:937:22 | ... + ... | 13.0 | 5.0 | 14.0 | +| test.c:937:22:937:22 | s | 13.0 | 3.0 | 5.0 | +| test.c:938:9:938:14 | result | 13.0 | 3.0 | 6.0 | +| test.c:943:10:943:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:944:7:944:7 | i | 1.0 | 1.0 | 1.0 | +| test.c:944:7:944:11 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:944:11:944:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:945:9:945:9 | i | 1.0 | -1.0 | -1.0 | +| test.c:948:20:948:20 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:948:20:948:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:949:7:949:7 | u | 1.0 | 1.0 | 1.0 | +| test.c:949:7:949:11 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.c:949:11:949:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:949:11:949:11 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test.c:950:9:950:9 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:950:9:950:9 | u | 1.0 | -1.0 | -1.0 | +| test.c:955:12:955:12 | s | 1.0 | 1.0 | 1.0 | +| test.c:955:12:955:16 | ... % ... | 1.0 | 3.0 | 1.0 | +| test.c:955:16:955:16 | 5 | 1.0 | -1.0 | -1.0 | +| test.c:956:7:956:8 | s2 | 1.0 | 3.0 | 1.0 | +| test.c:961:7:961:7 | x | 1.0 | 1.0 | 1.0 | +| test.c:962:9:962:9 | y | 1.0 | 1.0 | 1.0 | +| test.c:962:9:962:14 | ... != ... | 1.0 | -1.0 | -1.0 | +| test.c:962:14:962:14 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:963:12:963:12 | 0 | 1.0 | -1.0 | -1.0 | +| test.c:966:7:966:7 | y | 2.0 | 2.0 | 2.0 | +| test.c:975:7:975:7 | x | 1.0 | 1.0 | 1.0 | +| test.c:975:7:975:13 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.c:975:12:975:13 | 10 | 1.0 | -1.0 | -1.0 | +| test.c:980:7:980:7 | x | 13.0 | 1.0 | 1.0 | +| test.c:985:16:985:26 | 2147483647 | 1.0 | -1.0 | -1.0 | +| test.c:986:16:986:19 | 256 | 1.0 | -1.0 | -1.0 | +| test.c:987:7:987:13 | (...) | 1.0 | 2.0 | 1.0 | +| test.c:987:7:987:20 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.c:987:8:987:8 | x | 1.0 | 1.0 | 1.0 | +| test.c:987:8:987:12 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.c:987:12:987:12 | y | 1.0 | 1.0 | 1.0 | +| test.c:987:18:987:20 | 512 | 1.0 | -1.0 | -1.0 | +| test.c:988:9:988:9 | x | 1.0 | 1.0 | 1.0 | +| test.c:989:9:989:9 | y | 1.0 | 1.0 | 1.0 | +| test.c:994:9:994:11 | 1 | 1.0 | -1.0 | -1.0 | +| test.c:995:9:995:11 | 2 | 1.0 | -1.0 | -1.0 | +| test.c:996:9:996:11 | 4 | 1.0 | -1.0 | -1.0 | +| test.c:997:9:997:11 | 8 | 1.0 | -1.0 | -1.0 | +| test.c:998:9:998:12 | 16 | 1.0 | -1.0 | -1.0 | +| test.c:1002:7:1002:7 | (int)... | 1.0 | 1.0 | 1.0 | +| test.c:1002:7:1002:7 | e | 1.0 | 1.0 | 1.0 | +| test.cpp:9:11:9:12 | - ... | 1.0 | 1.0 | 1.0 | +| test.cpp:9:12:9:12 | 1 | 1.0 | -1.0 | -1.0 | +| test.cpp:10:7:10:7 | (bool)... | 1.0 | 1.0 | 1.0 | +| test.cpp:10:7:10:7 | b | 1.0 | 1.0 | 1.0 | +| test.cpp:11:5:11:5 | x | 1.0 | -1.0 | -1.0 | +| test.cpp:11:5:11:14 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.cpp:11:12:11:12 | call to operator[] | 1.0 | -1.0 | -1.0 | +| test.cpp:11:12:11:14 | (reference dereference) | 1.0 | 1.0 | 1.0 | +| test.cpp:11:13:11:13 | 3 | 1.0 | -1.0 | -1.0 | +| test.cpp:13:10:13:10 | x | 2.0 | 2.0 | 2.0 | +| test.cpp:18:12:18:31 | (int)... | 1.0 | 1.0 | 1.0 | +| test.cpp:18:12:18:31 | static_cast... | 1.0 | 1.0 | 1.0 | +| test.cpp:18:30:18:30 | x | 1.0 | 1.0 | 1.0 | +| test.cpp:19:10:19:11 | x0 | 1.0 | 1.0 | 1.0 | +| test.cpp:27:7:27:7 | y | 1.0 | 1.0 | 1.0 | +| test.cpp:27:7:27:12 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.cpp:27:12:27:12 | 0 | 1.0 | -1.0 | -1.0 | +| test.cpp:28:5:28:5 | x | 1.0 | -1.0 | -1.0 | +| test.cpp:28:5:28:9 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.cpp:28:9:28:9 | 0 | 1.0 | -1.0 | -1.0 | +| test.cpp:30:7:30:7 | y | 2.0 | 2.0 | 2.0 | +| test.cpp:30:7:30:13 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.cpp:30:12:30:13 | - ... | 1.0 | 1.0 | 1.0 | +| test.cpp:30:13:30:13 | 1 | 1.0 | -1.0 | -1.0 | +| test.cpp:31:5:31:5 | x | 1.0 | -1.0 | -1.0 | +| test.cpp:31:5:31:10 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.cpp:31:9:31:10 | - ... | 1.0 | 1.0 | 1.0 | +| test.cpp:31:10:31:10 | 1 | 1.0 | -1.0 | -1.0 | +| test.cpp:33:7:33:7 | y | 3.5 | 3.0 | 3.0 | +| test.cpp:33:7:33:12 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.cpp:33:12:33:12 | 1 | 1.0 | -1.0 | -1.0 | +| test.cpp:34:5:34:5 | x | 1.0 | -1.0 | -1.0 | +| test.cpp:34:5:34:9 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.cpp:34:9:34:9 | 1 | 1.0 | -1.0 | -1.0 | +| test.cpp:36:7:36:7 | y | 5.75 | 4.0 | 4.0 | +| test.cpp:36:7:36:15 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.cpp:36:12:36:15 | - ... | 1.0 | 1.0 | 1.0 | +| test.cpp:36:13:36:15 | 128 | 1.0 | -1.0 | -1.0 | +| test.cpp:37:5:37:5 | x | 1.0 | -1.0 | -1.0 | +| test.cpp:37:5:37:12 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.cpp:37:9:37:12 | - ... | 1.0 | 1.0 | 1.0 | +| test.cpp:37:10:37:12 | 128 | 1.0 | -1.0 | -1.0 | +| test.cpp:39:7:39:7 | y | 9.125 | 5.0 | 5.0 | +| test.cpp:39:7:39:14 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.cpp:39:12:39:14 | 128 | 1.0 | -1.0 | -1.0 | +| test.cpp:40:5:40:5 | x | 1.0 | -1.0 | -1.0 | +| test.cpp:40:5:40:11 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.cpp:40:9:40:11 | 128 | 1.0 | -1.0 | -1.0 | +| test.cpp:42:7:42:7 | y | 14.1875 | 6.0 | 6.0 | +| test.cpp:42:7:42:16 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.cpp:42:12:42:16 | - ... | 1.0 | 1.0 | 1.0 | +| test.cpp:42:13:42:16 | 1024 | 1.0 | -1.0 | -1.0 | +| test.cpp:43:5:43:5 | x | 1.0 | -1.0 | -1.0 | +| test.cpp:43:5:43:13 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.cpp:43:9:43:13 | - ... | 1.0 | 1.0 | 1.0 | +| test.cpp:43:10:43:13 | 1024 | 1.0 | -1.0 | -1.0 | +| test.cpp:45:7:45:7 | y | 21.78125 | 7.0 | 7.0 | +| test.cpp:45:7:45:15 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.cpp:45:12:45:15 | 1024 | 1.0 | -1.0 | -1.0 | +| test.cpp:46:5:46:5 | x | 1.0 | -1.0 | -1.0 | +| test.cpp:46:5:46:12 | ... = ... | 1.0 | 1.0 | 1.0 | +| test.cpp:46:9:46:12 | 1024 | 1.0 | -1.0 | -1.0 | +| test.cpp:49:10:49:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.cpp:51:7:51:7 | x | 8.0 | 8.0 | 8.0 | +| test.cpp:51:7:51:12 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.cpp:51:12:51:12 | 0 | 1.0 | -1.0 | -1.0 | +| test.cpp:52:15:52:21 | (bool)... | 1.0 | 2.0 | 1.0 | +| test.cpp:52:21:52:21 | x | 4.5 | 4.0 | 4.0 | +| test.cpp:53:5:53:5 | t | 1.0 | 1.0 | 1.0 | +| test.cpp:53:5:53:16 | ... += ... | 4.5 | 2.0 | 1.0 | +| test.cpp:53:10:53:16 | (int)... | 4.5 | 2.0 | 1.0 | +| test.cpp:53:15:53:16 | xb | 4.5 | 2.0 | 1.0 | +| test.cpp:56:7:56:7 | x | 12.5 | 8.0 | 8.0 | +| test.cpp:56:7:56:11 | ... > ... | 1.0 | -1.0 | -1.0 | +| test.cpp:56:11:56:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.cpp:57:15:57:21 | (bool)... | 1.0 | 1.0 | 2.0 | +| test.cpp:57:21:57:21 | x | 6.75 | 3.0 | 8.0 | +| test.cpp:58:5:58:5 | t | 5.5 | 2.0 | 1.0 | +| test.cpp:58:5:58:16 | ... += ... | 37.125 | 2.0 | 2.0 | +| test.cpp:58:10:58:16 | (int)... | 6.75 | 1.0 | 2.0 | +| test.cpp:58:15:58:16 | xb | 6.75 | 1.0 | 2.0 | +| test.cpp:61:7:61:7 | x | 13.5 | 8.0 | 8.0 | +| test.cpp:61:7:61:11 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.cpp:61:11:61:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.cpp:62:15:62:21 | (bool)... | 1.0 | 1.0 | 2.0 | +| test.cpp:62:21:62:21 | x | 7.25 | 8.0 | 3.0 | +| test.cpp:63:5:63:5 | t | 42.625 | 3.0 | 2.0 | +| test.cpp:63:5:63:16 | ... += ... | 309.03125 | 3.0 | 3.0 | +| test.cpp:63:10:63:16 | (int)... | 7.25 | 1.0 | 2.0 | +| test.cpp:63:15:63:16 | xb | 7.25 | 1.0 | 2.0 | +| test.cpp:66:13:66:19 | (bool)... | 1.0 | 2.0 | 2.0 | +| test.cpp:66:19:66:19 | x | 14.5 | 8.0 | 8.0 | +| test.cpp:67:3:67:3 | t | 351.65625 | 4.0 | 3.0 | +| test.cpp:67:3:67:14 | ... += ... | 5099.015625 | 5.0 | 4.0 | +| test.cpp:67:8:67:14 | (int)... | 14.5 | 2.0 | 2.0 | +| test.cpp:67:13:67:14 | xb | 14.5 | 2.0 | 2.0 | +| test.cpp:69:10:69:10 | b | 1.0 | 1.0 | 1.0 | +| test.cpp:69:10:69:21 | ... \|\| ... | 1.0 | -1.0 | -1.0 | +| test.cpp:69:15:69:21 | (bool)... | 1.0 | 2.0 | 2.0 | +| test.cpp:69:21:69:21 | t | 5099.015625 | 5.0 | 4.0 | +| test.cpp:74:30:74:30 | (int)... | 1.0 | 1.0 | 1.0 | +| test.cpp:74:30:74:30 | c | 1.0 | 1.0 | 1.0 | +| test.cpp:74:30:74:34 | (unsigned short)... | 1.0 | 1.0 | 1.0 | +| test.cpp:74:30:74:34 | ... + ... | 1.0 | 1.0 | 1.0 | +| test.cpp:74:34:74:34 | (int)... | 1.0 | 1.0 | 1.0 | +| test.cpp:74:34:74:34 | c | 1.0 | 1.0 | 1.0 | +| test.cpp:75:7:75:30 | (int)... | 1.0 | 1.0 | 1.0 | +| test.cpp:75:7:75:30 | (unsigned char)... | 1.0 | 1.0 | 1.0 | +| test.cpp:75:7:75:35 | ... == ... | 1.0 | -1.0 | -1.0 | +| test.cpp:75:22:75:30 | c_times_2 | 1.0 | 1.0 | 1.0 | +| test.cpp:75:35:75:35 | 0 | 1.0 | -1.0 | -1.0 | +| test.cpp:77:5:77:13 | c_times_2 | 1.0 | 1.0 | 1.0 | +| test.cpp:79:3:79:11 | c_times_2 | 1.0 | 1.0 | 1.0 | +| test.cpp:83:16:83:22 | (reference dereference) | 1.0 | 1.0 | 1.0 | +| test.cpp:83:16:83:22 | (reference to) | 1.0 | 1.0 | 1.0 | +| test.cpp:83:16:83:22 | aliased | 1.0 | 1.0 | 1.0 | +| test.cpp:85:7:85:7 | (reference dereference) | 1.0 | 1.0 | 1.0 | +| test.cpp:85:7:85:7 | i | 1.0 | 1.0 | 1.0 | +| test.cpp:85:7:85:12 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.cpp:85:12:85:12 | 2 | 1.0 | -1.0 | -1.0 | +| test.cpp:86:12:86:12 | (reference dereference) | 1.0 | 1.0 | 1.0 | +| test.cpp:86:12:86:12 | i | 1.0 | 1.0 | 1.0 | +| test.cpp:88:7:88:8 | (reference dereference) | 1.0 | 1.0 | 1.0 | +| test.cpp:88:7:88:8 | ci | 1.0 | 1.0 | 1.0 | +| test.cpp:88:7:88:13 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.cpp:88:13:88:13 | 2 | 1.0 | -1.0 | -1.0 | +| test.cpp:89:12:89:13 | (reference dereference) | 1.0 | 1.0 | 1.0 | +| test.cpp:89:12:89:13 | ci | 1.0 | 1.0 | 1.0 | +| test.cpp:91:7:91:13 | (reference dereference) | 1.0 | 1.0 | 1.0 | +| test.cpp:91:7:91:13 | aliased | 1.0 | 1.0 | 1.0 | +| test.cpp:91:7:91:18 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.cpp:91:18:91:18 | 2 | 1.0 | -1.0 | -1.0 | +| test.cpp:92:12:92:18 | (reference dereference) | 1.0 | 1.0 | 1.0 | +| test.cpp:92:12:92:18 | aliased | 1.0 | 1.0 | 1.0 | +| test.cpp:94:7:94:11 | (reference dereference) | 1.0 | 1.0 | 1.0 | +| test.cpp:94:7:94:11 | alias | 1.0 | 1.0 | 1.0 | +| test.cpp:94:7:94:16 | ... >= ... | 1.0 | -1.0 | -1.0 | +| test.cpp:94:16:94:16 | 2 | 1.0 | -1.0 | -1.0 | +| test.cpp:95:12:95:16 | (reference dereference) | 1.0 | 1.0 | 1.0 | +| test.cpp:95:12:95:16 | alias | 1.0 | 1.0 | 1.0 | +| test.cpp:97:10:97:10 | (reference dereference) | 13.0 | 1.0 | 8.0 | +| test.cpp:97:10:97:19 | ... <= ... | 1.0 | -1.0 | -1.0 | +| test.cpp:97:15:97:19 | 12345 | 1.0 | -1.0 | -1.0 | +| test.cpp:97:22:97:22 | (reference dereference) | 13.0 | 1.0 | 7.0 | +| test.cpp:97:22:97:24 | ... ++ | 13.0 | 1.0 | 7.0 | +| test.cpp:98:5:98:5 | (reference dereference) | 1.0 | 1.0 | 1.0 | +| test.cpp:98:5:98:5 | i | 1.0 | -1.0 | -1.0 | +| test.cpp:98:5:98:9 | ... = ... | 13.0 | 1.0 | 7.0 | +| test.cpp:98:9:98:9 | (reference dereference) | 13.0 | 1.0 | 7.0 | +| test.cpp:99:5:99:5 | (reference dereference) | 13.0 | 1.0 | 7.0 | +| test.cpp:102:10:102:10 | 0 | 1.0 | -1.0 | -1.0 | +| test.cpp:106:7:106:7 | (int)... | 1.0 | 1.0 | 1.0 | +| test.cpp:106:7:106:7 | n | 1.0 | 1.0 | 1.0 | +| test.cpp:106:7:106:11 | ... < ... | 1.0 | -1.0 | -1.0 | +| test.cpp:106:11:106:11 | 0 | 1.0 | -1.0 | -1.0 | +| test.cpp:109:7:109:7 | (bool)... | 1.0 | 1.0 | 2.0 | +| test.cpp:109:7:109:7 | n | 1.0 | 1.0 | 1.0 | +| test.cpp:110:5:110:5 | n | 1.0 | 1.0 | 1.0 | +| test.cpp:112:5:112:5 | n | 1.0 | 1.0 | 1.0 | +| test.cpp:115:7:115:8 | ! ... | 1.0 | -1.0 | -1.0 | +| test.cpp:115:8:115:8 | (bool)... | 1.0 | 2.0 | 2.0 | +| test.cpp:115:8:115:8 | n | 2.0 | 2.0 | 2.0 | +| test.cpp:116:5:116:5 | n | 1.5 | 2.0 | 1.0 | +| test.cpp:118:5:118:5 | n | 2.0 | 1.0 | 2.0 | +| test.cpp:121:3:121:3 | (bool)... | 1.0 | 2.0 | 2.0 | +| test.cpp:121:3:121:3 | n | 3.5 | 2.0 | 3.0 | +| test.cpp:121:3:121:12 | ... ? ... : ... | 7.875 | 2.0 | 3.0 | +| test.cpp:121:8:121:8 | n | 3.5 | 1.0 | 2.0 | +| test.cpp:121:12:121:12 | n | 2.25 | 2.0 | 1.0 | +| test.cpp:122:3:122:4 | ! ... | 1.0 | -1.0 | -1.0 | +| test.cpp:122:3:122:12 | ... ? ... : ... | 19.40625 | 2.0 | 3.0 | +| test.cpp:122:4:122:4 | (bool)... | 1.0 | 2.0 | 2.0 | +| test.cpp:122:4:122:4 | n | 5.75 | 2.0 | 3.0 | +| test.cpp:122:8:122:8 | n | 3.375 | 2.0 | 1.0 | +| test.cpp:122:12:122:12 | n | 5.75 | 1.0 | 2.0 | +| test_nr_of_bounds.cpp:2:9:2:11 | 1 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:3:9:3:11 | 2 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:4:9:4:11 | 4 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:5:9:5:11 | 8 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:6:9:6:12 | 16 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:7:9:7:12 | 32 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:8:9:8:12 | 64 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:9:9:9:12 | 128 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:10:9:10:13 | 256 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:11:9:11:13 | 512 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:12:9:12:13 | 1024 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:13:9:13:13 | 2048 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:14:9:14:14 | 4096 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:15:9:15:14 | 8192 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:16:9:16:14 | 16384 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:17:9:17:14 | 32768 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:18:9:18:15 | 65536 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:19:9:19:15 | 131072 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:20:9:20:15 | 262144 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:21:9:21:15 | 524288 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:22:9:22:16 | 1048576 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:23:9:23:16 | 2097152 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:24:9:24:16 | 4194304 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:25:9:25:16 | 8388608 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:26:9:26:17 | 16777216 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:27:10:27:18 | 33554432 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:28:10:28:18 | 67108864 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:29:10:29:18 | 134217728 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:30:10:30:19 | 268435456 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:31:10:31:19 | 536870912 | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:40:5:40:19 | ... & ... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:40:5:40:19 | ... -= ... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:40:5:40:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:40:5:40:20 | (...) | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:40:5:40:20 | x | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:40:5:40:20 | x | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:40:19:40:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:40:19:40:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:40:19:40:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:40:19:40:19 | A | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:40:19:40:19 | A | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:40:19:40:19 | A | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:41:5:41:19 | ... & ... | 2.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:41:5:41:19 | ... -= ... | 2.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:41:5:41:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:41:5:41:20 | (...) | 2.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:41:5:41:20 | x | 2.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:41:5:41:20 | x | 2.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:41:19:41:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:41:19:41:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:41:19:41:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:41:19:41:19 | B | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:41:19:41:19 | B | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:41:19:41:19 | B | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:42:5:42:19 | ... & ... | 4.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:42:5:42:19 | ... -= ... | 4.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:42:5:42:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:42:5:42:20 | (...) | 4.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:42:5:42:20 | x | 4.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:42:5:42:20 | x | 4.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:42:19:42:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:42:19:42:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:42:19:42:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:42:19:42:19 | C | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:42:19:42:19 | C | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:42:19:42:19 | C | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:43:5:43:19 | ... & ... | 8.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:43:5:43:19 | ... -= ... | 8.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:43:5:43:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:43:5:43:20 | (...) | 8.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:43:5:43:20 | x | 8.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:43:5:43:20 | x | 8.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:43:19:43:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:43:19:43:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:43:19:43:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:43:19:43:19 | D | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:43:19:43:19 | D | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:43:19:43:19 | D | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:44:5:44:19 | ... & ... | 16.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:44:5:44:19 | ... -= ... | 16.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:44:5:44:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:44:5:44:20 | (...) | 16.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:44:5:44:20 | x | 16.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:44:5:44:20 | x | 16.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:44:19:44:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:44:19:44:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:44:19:44:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:44:19:44:19 | E | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:44:19:44:19 | E | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:44:19:44:19 | E | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:45:5:45:19 | ... & ... | 32.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:45:5:45:19 | ... -= ... | 32.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:45:5:45:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:45:5:45:20 | (...) | 32.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:45:5:45:20 | x | 32.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:45:5:45:20 | x | 32.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:45:19:45:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:45:19:45:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:45:19:45:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:45:19:45:19 | F | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:45:19:45:19 | F | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:45:19:45:19 | F | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:46:5:46:19 | ... & ... | 64.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:46:5:46:19 | ... -= ... | 64.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:46:5:46:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:46:5:46:20 | (...) | 64.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:46:5:46:20 | x | 64.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:46:5:46:20 | x | 64.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:46:19:46:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:46:19:46:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:46:19:46:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:46:19:46:19 | G | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:46:19:46:19 | G | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:46:19:46:19 | G | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:47:5:47:19 | ... & ... | 128.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:47:5:47:19 | ... -= ... | 128.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:47:5:47:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:47:5:47:20 | (...) | 128.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:47:5:47:20 | x | 128.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:47:5:47:20 | x | 128.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:47:19:47:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:47:19:47:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:47:19:47:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:47:19:47:19 | H | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:47:19:47:19 | H | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:47:19:47:19 | H | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:48:5:48:19 | ... & ... | 256.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:48:5:48:19 | ... -= ... | 256.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:48:5:48:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:48:5:48:20 | (...) | 256.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:48:5:48:20 | x | 256.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:48:5:48:20 | x | 256.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:48:19:48:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:48:19:48:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:48:19:48:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:48:19:48:19 | I | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:48:19:48:19 | I | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:48:19:48:19 | I | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:49:5:49:19 | ... & ... | 512.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:49:5:49:19 | ... -= ... | 512.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:49:5:49:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:49:5:49:20 | (...) | 512.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:49:5:49:20 | x | 512.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:49:5:49:20 | x | 512.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:49:19:49:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:49:19:49:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:49:19:49:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:49:19:49:19 | J | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:49:19:49:19 | J | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:49:19:49:19 | J | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:50:5:50:19 | ... & ... | 1024.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:50:5:50:19 | ... -= ... | 1024.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:50:5:50:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:50:5:50:20 | (...) | 1024.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:50:5:50:20 | x | 1024.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:50:5:50:20 | x | 1024.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:50:19:50:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:50:19:50:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:50:19:50:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:50:19:50:19 | L | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:50:19:50:19 | L | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:50:19:50:19 | L | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:51:5:51:19 | ... & ... | 2048.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:51:5:51:19 | ... -= ... | 2048.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:51:5:51:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:51:5:51:20 | (...) | 2048.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:51:5:51:20 | x | 2048.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:51:5:51:20 | x | 2048.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:51:19:51:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:51:19:51:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:51:19:51:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:51:19:51:19 | M | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:51:19:51:19 | M | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:51:19:51:19 | M | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:52:5:52:19 | ... & ... | 4096.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:52:5:52:19 | ... -= ... | 4096.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:52:5:52:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:52:5:52:20 | (...) | 4096.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:52:5:52:20 | x | 4096.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:52:5:52:20 | x | 4096.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:52:19:52:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:52:19:52:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:52:19:52:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:52:19:52:19 | N | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:52:19:52:19 | N | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:52:19:52:19 | N | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:53:5:53:19 | ... & ... | 8192.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:53:5:53:19 | ... -= ... | 8192.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:53:5:53:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:53:5:53:20 | (...) | 8192.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:53:5:53:20 | x | 8192.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:53:5:53:20 | x | 8192.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:53:19:53:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:53:19:53:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:53:19:53:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:53:19:53:19 | O | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:53:19:53:19 | O | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:53:19:53:19 | O | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:54:5:54:19 | ... & ... | 16384.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:54:5:54:19 | ... -= ... | 16384.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:54:5:54:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:54:5:54:20 | (...) | 16384.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:54:5:54:20 | x | 16384.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:54:5:54:20 | x | 16384.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:54:19:54:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:54:19:54:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:54:19:54:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:54:19:54:19 | P | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:54:19:54:19 | P | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:54:19:54:19 | P | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:55:5:55:19 | ... & ... | 32768.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:55:5:55:19 | ... -= ... | 32768.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:55:5:55:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:55:5:55:20 | (...) | 32768.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:55:5:55:20 | x | 32768.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:55:5:55:20 | x | 32768.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:55:19:55:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:55:19:55:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:55:19:55:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:55:19:55:19 | Q | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:55:19:55:19 | Q | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:55:19:55:19 | Q | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:56:5:56:19 | ... & ... | 65536.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:56:5:56:19 | ... -= ... | 65536.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:56:5:56:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:56:5:56:20 | (...) | 65536.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:56:5:56:20 | x | 65536.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:56:5:56:20 | x | 65536.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:56:19:56:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:56:19:56:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:56:19:56:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:56:19:56:19 | R | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:56:19:56:19 | R | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:56:19:56:19 | R | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:57:5:57:19 | ... & ... | 131072.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:57:5:57:19 | ... -= ... | 131072.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:57:5:57:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:57:5:57:20 | (...) | 131072.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:57:5:57:20 | x | 131072.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:57:5:57:20 | x | 131072.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:57:19:57:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:57:19:57:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:57:19:57:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:57:19:57:19 | S | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:57:19:57:19 | S | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:57:19:57:19 | S | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:58:5:58:19 | ... & ... | 262144.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:58:5:58:19 | ... -= ... | 262144.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:58:5:58:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:58:5:58:20 | (...) | 262144.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:58:5:58:20 | x | 262144.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:58:5:58:20 | x | 262144.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:58:19:58:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:58:19:58:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:58:19:58:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:58:19:58:19 | T | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:58:19:58:19 | T | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:58:19:58:19 | T | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:59:5:59:19 | ... & ... | 524288.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:59:5:59:19 | ... -= ... | 524288.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:59:5:59:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:59:5:59:20 | (...) | 524288.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:59:5:59:20 | x | 524288.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:59:5:59:20 | x | 524288.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:59:19:59:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:59:19:59:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:59:19:59:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:59:19:59:19 | U | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:59:19:59:19 | U | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:59:19:59:19 | U | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:60:5:60:19 | ... & ... | 1048576.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:60:5:60:19 | ... -= ... | 1048576.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:60:5:60:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:60:5:60:20 | (...) | 1048576.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:60:5:60:20 | x | 1048576.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:60:5:60:20 | x | 1048576.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:60:19:60:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:60:19:60:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:60:19:60:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:60:19:60:19 | V | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:60:19:60:19 | V | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:60:19:60:19 | V | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:61:5:61:19 | ... & ... | 2097152.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:61:5:61:19 | ... -= ... | 2097152.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:61:5:61:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:61:5:61:20 | (...) | 2097152.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:61:5:61:20 | x | 2097152.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:61:5:61:20 | x | 2097152.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:61:19:61:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:61:19:61:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:61:19:61:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:61:19:61:19 | W | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:61:19:61:19 | W | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:61:19:61:19 | W | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:62:5:62:19 | ... & ... | 4194304.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:62:5:62:19 | ... -= ... | 4194304.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:62:5:62:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:62:5:62:20 | (...) | 4194304.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:62:5:62:20 | x | 4194304.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:62:5:62:20 | x | 4194304.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:62:19:62:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:62:19:62:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:62:19:62:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:62:19:62:19 | X | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:62:19:62:19 | X | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:62:19:62:19 | X | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:63:5:63:19 | ... & ... | 8388608.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:63:5:63:19 | ... -= ... | 8388608.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:63:5:63:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:63:5:63:20 | (...) | 8388608.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:63:5:63:20 | x | 8388608.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:63:5:63:20 | x | 8388608.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:63:19:63:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:63:19:63:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:63:19:63:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:63:19:63:19 | Y | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:63:19:63:19 | Y | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:63:19:63:19 | Y | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:64:5:64:19 | ... & ... | 1.6777216E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:64:5:64:19 | ... -= ... | 1.6777216E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:64:5:64:19 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:64:5:64:20 | (...) | 1.6777216E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:64:5:64:20 | x | 1.6777216E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:64:5:64:20 | x | 1.6777216E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:64:19:64:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:64:19:64:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:64:19:64:19 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:64:19:64:19 | Z | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:64:19:64:19 | Z | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:64:19:64:19 | Z | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:65:5:65:20 | ... & ... | 3.3554432E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:65:5:65:20 | ... -= ... | 3.3554432E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:65:5:65:20 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:65:5:65:21 | (...) | 3.3554432E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:65:5:65:21 | x | 3.3554432E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:65:5:65:21 | x | 3.3554432E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:65:19:65:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:65:19:65:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:65:19:65:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:65:19:65:20 | AA | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:65:19:65:20 | AA | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:65:19:65:20 | AA | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:66:5:66:20 | ... & ... | 6.7108864E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:66:5:66:20 | ... -= ... | 6.7108864E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:66:5:66:20 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:66:5:66:21 | (...) | 6.7108864E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:66:5:66:21 | x | 6.7108864E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:66:5:66:21 | x | 6.7108864E7 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:66:19:66:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:66:19:66:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:66:19:66:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:66:19:66:20 | AB | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:66:19:66:20 | AB | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:66:19:66:20 | AB | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:67:5:67:20 | ... & ... | 1.34217728E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:67:5:67:20 | ... -= ... | 1.34217728E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:67:5:67:20 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:67:5:67:21 | (...) | 1.34217728E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:67:5:67:21 | x | 1.34217728E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:67:5:67:21 | x | 1.34217728E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:67:19:67:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:67:19:67:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:67:19:67:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:67:19:67:20 | AC | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:67:19:67:20 | AC | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:67:19:67:20 | AC | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:68:5:68:20 | ... & ... | 2.68435456E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:68:5:68:20 | ... -= ... | 2.68435456E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:68:5:68:20 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:68:5:68:21 | (...) | 2.68435456E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:68:5:68:21 | x | 2.68435456E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:68:5:68:21 | x | 2.68435456E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:68:19:68:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:68:19:68:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:68:19:68:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:68:19:68:20 | AD | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:68:19:68:20 | AD | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:68:19:68:20 | AD | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:69:5:69:20 | ... & ... | 5.36870912E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:69:5:69:20 | ... -= ... | 5.36870912E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:69:5:69:20 | ... == ... | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:69:5:69:21 | (...) | 5.36870912E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:69:5:69:21 | x | 5.36870912E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:69:5:69:21 | x | 5.36870912E8 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:69:19:69:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:69:19:69:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:69:19:69:20 | (unsigned int)... | 1.0 | 1.0 | 1.0 | +| test_nr_of_bounds.cpp:69:19:69:20 | AE | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:69:19:69:20 | AE | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:69:19:69:20 | AE | 1.0 | -1.0 | -1.0 | +| test_nr_of_bounds.cpp:72:12:72:12 | x | 1.073741824E9 | 1.0 | 1.0 | diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.ql b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.ql index efafcf6e684b..fabdba8f4b19 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.ql +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/nrOfBounds.ql @@ -2,8 +2,20 @@ import cpp import utils.test.InlineExpectationsTest import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis -query predicate estimateNrOfBounds(Expr e, float nrOfBounds) { - nrOfBounds = SimpleRangeAnalysisInternal::estimateNrOfBounds(e) +query predicate estimateNrOfBounds( + Expr e, float nrOfBounds, float actualNrOfLowerBounds, float actualNrOfUpperBounds +) { + nrOfBounds = SimpleRangeAnalysisInternal::estimateNrOfBounds(e) and + ( + actualNrOfLowerBounds = SimpleRangeAnalysisInternal::countNrOfLowerBounds(e) + or + not exists(SimpleRangeAnalysisInternal::countNrOfLowerBounds(e)) and actualNrOfLowerBounds = -1 + ) and + ( + actualNrOfUpperBounds = SimpleRangeAnalysisInternal::countNrOfUpperBounds(e) + or + not exists(SimpleRangeAnalysisInternal::countNrOfUpperBounds(e)) and actualNrOfUpperBounds = -1 + ) } /** @@ -14,8 +26,14 @@ private predicate nonFunctionalNrOfBounds(Expr e) { strictcount(SimpleRangeAnalysisInternal::estimateNrOfBounds(e)) > 1 } +private predicate nrOfBoundsNotEq1(Expr e, int n) { + e.getFile().getBaseName() = "test_nr_of_bounds.cpp" and + n = count(SimpleRangeAnalysisInternal::estimateNrOfBounds(e)) and + n != 1 +} + module FunctionalityTest implements TestSig { - string getARelevantTag() { result = "nonFunctionalNrOfBounds" } + string getARelevantTag() { result = ["nonFunctionalNrOfBounds", "bounds"] } predicate hasActualResult(Location location, string element, string tag, string value) { exists(Expr e | @@ -25,6 +43,14 @@ module FunctionalityTest implements TestSig { tag = "nonFunctionalNrOfBounds" and value = "" ) + or + exists(Expr e, int n | + nrOfBoundsNotEq1(e, n) and + location = e.getLocation() and + element = e.toString() and + tag = "bounds" and + value = n.toString() + ) } } diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryLower.expected b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryLower.expected index 50b65d84bf32..8b30e12cd4f6 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryLower.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryLower.expected @@ -77,77 +77,77 @@ | test.c:426:22:426:82 | ... ? ... : ... | 0.13204114 | 0.42186276 | 0.13204114 | | test.c:426:26:426:69 | ... ? ... : ... | 0.42186276 | 0.42186276 | 0.44996679 | | test.c:426:30:426:56 | ... ? ... : ... | 0.42186276 | 0.42186276 | 0.53843358 | -| test.c:468:4:642:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:468:5:470:49 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:471:6:553:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:472:8:490:41 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:475:10:479:21 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:475:31:475:79 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:477:13:479:21 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:484:12:489:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:485:12:485:60 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:487:15:489:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:491:6:510:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:494:8:498:19 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:494:29:494:77 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:496:11:498:19 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:499:6:499:54 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:503:10:507:21 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:503:31:503:79 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:505:13:507:21 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:508:9:510:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:512:10:531:43 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:515:12:520:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:516:12:516:60 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:518:15:520:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:525:14:530:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:526:14:526:62 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:528:17:530:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:532:9:553:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:535:14:540:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:536:14:536:62 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:538:17:540:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:541:12:541:60 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:545:12:550:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:546:12:546:60 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:548:15:550:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:551:11:553:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:554:9:556:51 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:557:9:642:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:558:14:577:47 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:561:16:566:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:562:16:562:64 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:564:19:566:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:571:18:576:29 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:572:18:572:66 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:574:21:576:29 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:578:12:599:29 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:581:14:586:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:582:14:582:62 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:584:17:586:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:587:12:587:60 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:591:16:596:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:592:16:592:64 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:594:19:596:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:597:15:599:29 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:601:12:620:45 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:604:14:609:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:605:14:605:62 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:607:17:609:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:614:16:619:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:615:16:615:64 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:617:19:619:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:621:11:642:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:624:16:629:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:625:16:625:64 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:627:19:629:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:630:14:630:62 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:634:14:639:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:635:14:635:62 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:637:17:639:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:640:13:642:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | -| test.c:668:20:668:36 | ... ? ... : ... | 0.0 | 0.0 | 100.0 | -| test.c:880:5:880:14 | ... ? ... : ... | 0.0 | 1.0 | 0.0 | -| test.c:881:5:881:14 | ... ? ... : ... | 0.0 | 0.0 | 1.0 | +| test.c:485:4:659:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:485:5:487:49 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:488:6:570:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:489:8:507:41 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:492:10:496:21 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:492:31:492:79 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:494:13:496:21 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:501:12:506:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:502:12:502:60 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:504:15:506:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:508:6:527:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:511:8:515:19 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:511:29:511:77 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:513:11:515:19 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:516:6:516:54 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:520:10:524:21 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:520:31:520:79 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:522:13:524:21 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:525:9:527:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:529:10:548:43 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:532:12:537:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:533:12:533:60 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:535:15:537:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:542:14:547:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:543:14:543:62 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:545:17:547:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:549:9:570:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:552:14:557:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:553:14:553:62 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:555:17:557:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:558:12:558:60 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:562:12:567:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:563:12:563:60 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:565:15:567:23 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:568:11:570:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:571:9:573:51 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:574:9:659:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:575:14:594:47 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:578:16:583:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:579:16:579:64 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:581:19:583:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:588:18:593:29 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:589:18:589:66 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:591:21:593:29 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:595:12:616:29 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:598:14:603:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:599:14:599:62 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:601:17:603:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:604:12:604:60 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:608:16:613:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:609:16:609:64 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:611:19:613:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:614:15:616:29 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:618:12:637:45 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:621:14:626:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:622:14:622:62 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:624:17:626:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:631:16:636:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:632:16:632:64 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:634:19:636:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:638:11:659:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:641:16:646:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:642:16:642:64 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:644:19:646:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:647:14:647:62 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:651:14:656:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:652:14:652:62 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:654:17:656:25 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:657:13:659:27 | ... ? ... : ... | 0.0 | 0.0 | 0.0 | +| test.c:685:20:685:36 | ... ? ... : ... | 0.0 | 0.0 | 100.0 | +| test.c:897:5:897:14 | ... ? ... : ... | 0.0 | 1.0 | 0.0 | +| test.c:898:5:898:14 | ... ? ... : ... | 0.0 | 0.0 | 1.0 | | test.cpp:121:3:121:12 | ... ? ... : ... | 0.0 | 1.0 | 0.0 | | test.cpp:122:3:122:12 | ... ? ... : ... | 0.0 | 0.0 | 1.0 | diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryUpper.expected b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryUpper.expected index 3b3a00df6b9c..90f786b6cef6 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryUpper.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryUpper.expected @@ -77,77 +77,77 @@ | test.c:426:22:426:82 | ... ? ... : ... | 0.53843358 | 0.53843358 | 0.13204114 | | test.c:426:26:426:69 | ... ? ... : ... | 0.53843358 | 0.53843358 | 0.44996679 | | test.c:426:30:426:56 | ... ? ... : ... | 0.53843358 | 0.42186276 | 0.53843358 | -| test.c:468:4:642:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:468:5:470:49 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:471:6:553:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:472:8:490:41 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:475:10:479:21 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:475:31:475:79 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:477:13:479:21 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:484:12:489:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:485:12:485:60 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:487:15:489:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:491:6:510:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:494:8:498:19 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:494:29:494:77 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:496:11:498:19 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:499:6:499:54 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:503:10:507:21 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:503:31:503:79 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:505:13:507:21 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:508:9:510:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:512:10:531:43 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:515:12:520:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:516:12:516:60 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:518:15:520:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:525:14:530:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:526:14:526:62 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:528:17:530:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:532:9:553:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:535:14:540:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:536:14:536:62 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:538:17:540:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:541:12:541:60 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:545:12:550:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:546:12:546:60 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:548:15:550:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:551:11:553:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:554:9:556:51 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:557:9:642:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:558:14:577:47 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:561:16:566:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:562:16:562:64 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:564:19:566:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:571:18:576:29 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:572:18:572:66 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:574:21:576:29 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:578:12:599:29 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:581:14:586:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:582:14:582:62 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:584:17:586:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:587:12:587:60 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:591:16:596:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:592:16:592:64 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:594:19:596:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:597:15:599:29 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:601:12:620:45 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:604:14:609:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:605:14:605:62 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:607:17:609:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:614:16:619:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:615:16:615:64 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:617:19:619:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:621:11:642:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:624:16:629:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:625:16:625:64 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:627:19:629:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:630:14:630:62 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:634:14:639:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:635:14:635:62 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:637:17:639:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:640:13:642:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | -| test.c:668:20:668:36 | ... ? ... : ... | 100.0 | 99.0 | 100.0 | -| test.c:880:5:880:14 | ... ? ... : ... | 32767.0 | 32767.0 | 0.0 | -| test.c:881:5:881:14 | ... ? ... : ... | 32767.0 | 0.0 | 32767.0 | +| test.c:485:4:659:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:485:5:487:49 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:488:6:570:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:489:8:507:41 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:492:10:496:21 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:492:31:492:79 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:494:13:496:21 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:501:12:506:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:502:12:502:60 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:504:15:506:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:508:6:527:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:511:8:515:19 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:511:29:511:77 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:513:11:515:19 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:516:6:516:54 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:520:10:524:21 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:520:31:520:79 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:522:13:524:21 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:525:9:527:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:529:10:548:43 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:532:12:537:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:533:12:533:60 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:535:15:537:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:542:14:547:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:543:14:543:62 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:545:17:547:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:549:9:570:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:552:14:557:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:553:14:553:62 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:555:17:557:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:558:12:558:60 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:562:12:567:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:563:12:563:60 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:565:15:567:23 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:568:11:570:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:571:9:573:51 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:574:9:659:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:575:14:594:47 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:578:16:583:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:579:16:579:64 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:581:19:583:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:588:18:593:29 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:589:18:589:66 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:591:21:593:29 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:595:12:616:29 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:598:14:603:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:599:14:599:62 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:601:17:603:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:604:12:604:60 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:608:16:613:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:609:16:609:64 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:611:19:613:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:614:15:616:29 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:618:12:637:45 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:621:14:626:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:622:14:622:62 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:624:17:626:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:631:16:636:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:632:16:632:64 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:634:19:636:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:638:11:659:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:641:16:646:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:642:16:642:64 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:644:19:646:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:647:14:647:62 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:651:14:656:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:652:14:652:62 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:654:17:656:25 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:657:13:659:27 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 4.294967295E9 | +| test.c:685:20:685:36 | ... ? ... : ... | 100.0 | 99.0 | 100.0 | +| test.c:897:5:897:14 | ... ? ... : ... | 32767.0 | 32767.0 | 0.0 | +| test.c:898:5:898:14 | ... ? ... : ... | 32767.0 | 0.0 | 32767.0 | | test.cpp:121:3:121:12 | ... ? ... : ... | 32767.0 | 32767.0 | 0.0 | | test.cpp:122:3:122:12 | ... ? ... : ... | 32767.0 | 0.0 | 32767.0 | diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/test.c b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/test.c index d394eb637ab1..0f5ee451dff9 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/test.c +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/test.c @@ -446,6 +446,23 @@ int repeated_if_statements(unsigned int rhs) { return rhs; // rhs has 6 bounds } +int repeated_if_else_statements(unsigned int rhs) { + // Test how many bounds we estimate for repeated `if`-`else` statements that + // guard the same variable. + if (rhs < 10) { rhs << 1; } else { rhs << 2; } + if (rhs < 11) { rhs << 1; } else { rhs << 2; } + if (rhs < 12) { rhs << 1; } else { rhs << 2; } + if (rhs < 13) { rhs << 1; } else { rhs << 2; } + if (rhs < 14) { rhs << 1; } else { rhs << 2; } + if (rhs < 15) { rhs << 1; } else { rhs << 2; } + if (rhs < 16) { rhs << 1; } else { rhs << 2; } + if (rhs < 17) { rhs << 1; } else { rhs << 2; } + if (rhs < 18) { rhs << 1; } else { rhs << 2; } + if (rhs < 19) { rhs << 1; } else { rhs << 2; } + if (rhs < 20) { rhs << 1; } else { rhs << 2; } + return rhs; // rhs has 12 bounds +} + int ne_phi_nodes(int a, int b) { if (a == 17) { if (b == 23) { @@ -972,3 +989,15 @@ void test_overflow() { out(y); } } + +enum MY_ENUM_2 { + A = 0x1, + B = 0x2, + C = 0x4, + D = 0x8, + E = 0x10 +}; + +void test_enum(enum MY_ENUM_2 e) { + out(e); +} \ No newline at end of file diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/test_nr_of_bounds.cpp b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/test_nr_of_bounds.cpp new file mode 100644 index 000000000000..4c78d719053f --- /dev/null +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/test_nr_of_bounds.cpp @@ -0,0 +1,73 @@ +enum MY_ENUM { + A = 0x1, + B = 0x2, + C = 0x4, + D = 0x8, + E = 0x10, + F = 0x20, + G = 0x40, + H = 0x80, + I = 0x100, + J = 0x200, + L = 0x400, + M = 0x800, + N = 0x1000, + O = 0x2000, + P = 0x4000, + Q = 0x8000, + R = 0x10000, + S = 0x20000, + T = 0x40000, + U = 0x80000, + V = 0x100000, + W = 0x200000, + X = 0x400000, + Y = 0x800000, + Z = 0x1000000, + AA = 0x2000000, + AB = 0x4000000, + AC = 0x8000000, + AD = 0x10000000, + AE = 0x20000000 +}; + +typedef unsigned int MY_ENUM_FLAGS; + +MY_ENUM_FLAGS check_and_subs(MY_ENUM_FLAGS x) +{ + + #define CHECK_AND_SUB(flag) if ((x & flag) == flag) { x -= flag; } + CHECK_AND_SUB(A); + CHECK_AND_SUB(B); + CHECK_AND_SUB(C); + CHECK_AND_SUB(D); + CHECK_AND_SUB(E); + CHECK_AND_SUB(F); + CHECK_AND_SUB(G); + CHECK_AND_SUB(H); + CHECK_AND_SUB(I); + CHECK_AND_SUB(J); + CHECK_AND_SUB(L); + CHECK_AND_SUB(M); + CHECK_AND_SUB(N); + CHECK_AND_SUB(O); + CHECK_AND_SUB(P); + CHECK_AND_SUB(Q); + CHECK_AND_SUB(R); + CHECK_AND_SUB(S); + CHECK_AND_SUB(T); + CHECK_AND_SUB(U); + CHECK_AND_SUB(V); + CHECK_AND_SUB(W); + CHECK_AND_SUB(X); + CHECK_AND_SUB(Y); + CHECK_AND_SUB(Z); + CHECK_AND_SUB(AA); + CHECK_AND_SUB(AB); + CHECK_AND_SUB(AC); + CHECK_AND_SUB(AD); + CHECK_AND_SUB(AE); + #undef CHECK_AND_SUB + + return x; +} \ No newline at end of file diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected index dd7fc398f0ca..29b428bc6afd 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected @@ -513,518 +513,553 @@ | test.c:445:7:445:9 | rhs | 4294967295 | | test.c:445:19:445:21 | rhs | 15 | | test.c:446:10:446:12 | rhs | 4294967295 | -| test.c:450:7:450:7 | a | 2147483647 | -| test.c:451:9:451:9 | b | 2147483647 | -| test.c:452:7:452:7 | a | 17 | -| test.c:452:12:452:12 | b | 23 | -| test.c:454:9:454:9 | a | 40 | -| test.c:455:7:455:7 | b | 2147483647 | -| test.c:460:11:460:11 | a | 2147483647 | -| test.c:460:15:460:15 | b | 2147483647 | -| test.c:461:10:461:10 | a | 2147483647 | -| test.c:461:14:461:14 | b | 2147483647 | -| test.c:468:10:468:11 | ip | 4294967295 | -| test.c:468:20:468:21 | ip | 4294967295 | -| test.c:468:40:468:41 | ip | 4294967295 | -| test.c:469:14:469:15 | ip | 4294967295 | -| test.c:470:14:470:15 | ip | 4294967295 | -| test.c:470:34:470:35 | ip | 4294967295 | -| test.c:471:11:471:12 | ip | 4294967295 | -| test.c:472:13:472:14 | ip | 4294967295 | -| test.c:473:14:473:15 | ip | 4294967295 | -| test.c:474:14:474:15 | ip | 4294967295 | -| test.c:475:15:475:16 | ip | 4294967295 | -| test.c:475:41:475:42 | ip | 4294967295 | -| test.c:475:52:475:53 | ip | 4294967295 | -| test.c:475:67:475:68 | ip | 4294967295 | -| test.c:475:78:475:79 | ip | 4294967295 | -| test.c:476:18:476:19 | ip | 4294967295 | -| test.c:477:23:477:24 | ip | 4294967295 | -| test.c:477:34:477:35 | ip | 4294967295 | -| test.c:478:25:478:26 | ip | 4294967295 | -| test.c:479:20:479:21 | ip | 4294967295 | -| test.c:480:11:480:12 | ip | 4294967295 | -| test.c:480:26:480:27 | ip | 4294967295 | -| test.c:481:16:481:17 | ip | 4294967295 | -| test.c:482:16:482:17 | ip | 4294967295 | -| test.c:483:16:483:17 | ip | 4294967295 | -| test.c:484:17:484:18 | ip | 4294967295 | -| test.c:485:22:485:23 | ip | 4294967295 | -| test.c:485:33:485:34 | ip | 4294967295 | -| test.c:485:48:485:49 | ip | 4294967295 | -| test.c:485:59:485:60 | ip | 4294967295 | -| test.c:486:20:486:21 | ip | 4294967295 | -| test.c:487:25:487:26 | ip | 4294967295 | -| test.c:487:36:487:37 | ip | 4294967295 | -| test.c:488:27:488:28 | ip | 4294967295 | -| test.c:489:22:489:23 | ip | 4294967295 | -| test.c:490:15:490:16 | ip | 4294967295 | -| test.c:490:30:490:31 | ip | 4294967295 | -| test.c:491:11:491:12 | ip | 4294967295 | -| test.c:492:12:492:13 | ip | 4294967295 | -| test.c:493:12:493:13 | ip | 4294967295 | -| test.c:494:13:494:14 | ip | 4294967295 | -| test.c:494:39:494:40 | ip | 4294967295 | -| test.c:494:50:494:51 | ip | 4294967295 | -| test.c:494:65:494:66 | ip | 4294967295 | -| test.c:494:76:494:77 | ip | 4294967295 | -| test.c:495:16:495:17 | ip | 4294967295 | -| test.c:496:21:496:22 | ip | 4294967295 | -| test.c:496:32:496:33 | ip | 4294967295 | -| test.c:497:23:497:24 | ip | 4294967295 | -| test.c:498:18:498:19 | ip | 4294967295 | -| test.c:499:11:499:12 | ip | 4294967295 | -| test.c:499:17:499:18 | ip | 4294967295 | -| test.c:499:37:499:38 | ip | 4294967295 | -| test.c:499:43:499:44 | ip | 4294967295 | -| test.c:500:14:500:15 | ip | 4294967295 | -| test.c:501:14:501:15 | ip | 4294967295 | -| test.c:502:14:502:15 | ip | 4294967295 | -| test.c:503:15:503:16 | ip | 4294967295 | -| test.c:503:41:503:42 | ip | 4294967295 | -| test.c:503:52:503:53 | ip | 4294967295 | -| test.c:503:67:503:68 | ip | 4294967295 | -| test.c:503:78:503:79 | ip | 4294967295 | -| test.c:504:18:504:19 | ip | 4294967295 | -| test.c:505:23:505:24 | ip | 4294967295 | -| test.c:505:34:505:35 | ip | 4294967295 | -| test.c:506:25:506:26 | ip | 4294967295 | -| test.c:507:20:507:21 | ip | 4294967295 | -| test.c:508:14:508:15 | ip | 4294967295 | -| test.c:508:20:508:21 | ip | 4294967295 | -| test.c:509:16:509:17 | ip | 4294967295 | +| test.c:452:7:452:9 | rhs | 4294967295 | +| test.c:452:19:452:21 | rhs | 9 | +| test.c:452:38:452:40 | rhs | 4294967295 | +| test.c:453:7:453:9 | rhs | 4294967295 | +| test.c:453:19:453:21 | rhs | 10 | +| test.c:453:38:453:40 | rhs | 4294967295 | +| test.c:454:7:454:9 | rhs | 4294967295 | +| test.c:454:19:454:21 | rhs | 11 | +| test.c:454:38:454:40 | rhs | 4294967295 | +| test.c:455:7:455:9 | rhs | 4294967295 | +| test.c:455:19:455:21 | rhs | 12 | +| test.c:455:38:455:40 | rhs | 4294967295 | +| test.c:456:7:456:9 | rhs | 4294967295 | +| test.c:456:19:456:21 | rhs | 13 | +| test.c:456:38:456:40 | rhs | 4294967295 | +| test.c:457:7:457:9 | rhs | 4294967295 | +| test.c:457:19:457:21 | rhs | 14 | +| test.c:457:38:457:40 | rhs | 4294967295 | +| test.c:458:7:458:9 | rhs | 4294967295 | +| test.c:458:19:458:21 | rhs | 15 | +| test.c:458:38:458:40 | rhs | 4294967295 | +| test.c:459:7:459:9 | rhs | 4294967295 | +| test.c:459:19:459:21 | rhs | 16 | +| test.c:459:38:459:40 | rhs | 4294967295 | +| test.c:460:7:460:9 | rhs | 4294967295 | +| test.c:460:19:460:21 | rhs | 17 | +| test.c:460:38:460:40 | rhs | 4294967295 | +| test.c:461:7:461:9 | rhs | 4294967295 | +| test.c:461:19:461:21 | rhs | 18 | +| test.c:461:38:461:40 | rhs | 4294967295 | +| test.c:462:7:462:9 | rhs | 4294967295 | +| test.c:462:19:462:21 | rhs | 19 | +| test.c:462:38:462:40 | rhs | 4294967295 | +| test.c:463:10:463:12 | rhs | 4294967295 | +| test.c:467:7:467:7 | a | 2147483647 | +| test.c:468:9:468:9 | b | 2147483647 | +| test.c:469:7:469:7 | a | 17 | +| test.c:469:12:469:12 | b | 23 | +| test.c:471:9:471:9 | a | 40 | +| test.c:472:7:472:7 | b | 2147483647 | +| test.c:477:11:477:11 | a | 2147483647 | +| test.c:477:15:477:15 | b | 2147483647 | +| test.c:478:10:478:10 | a | 2147483647 | +| test.c:478:14:478:14 | b | 2147483647 | +| test.c:485:10:485:11 | ip | 4294967295 | +| test.c:485:20:485:21 | ip | 4294967295 | +| test.c:485:40:485:41 | ip | 4294967295 | +| test.c:486:14:486:15 | ip | 4294967295 | +| test.c:487:14:487:15 | ip | 4294967295 | +| test.c:487:34:487:35 | ip | 4294967295 | +| test.c:488:11:488:12 | ip | 4294967295 | +| test.c:489:13:489:14 | ip | 4294967295 | +| test.c:490:14:490:15 | ip | 4294967295 | +| test.c:491:14:491:15 | ip | 4294967295 | +| test.c:492:15:492:16 | ip | 4294967295 | +| test.c:492:41:492:42 | ip | 4294967295 | +| test.c:492:52:492:53 | ip | 4294967295 | +| test.c:492:67:492:68 | ip | 4294967295 | +| test.c:492:78:492:79 | ip | 4294967295 | +| test.c:493:18:493:19 | ip | 4294967295 | +| test.c:494:23:494:24 | ip | 4294967295 | +| test.c:494:34:494:35 | ip | 4294967295 | +| test.c:495:25:495:26 | ip | 4294967295 | +| test.c:496:20:496:21 | ip | 4294967295 | +| test.c:497:11:497:12 | ip | 4294967295 | +| test.c:497:26:497:27 | ip | 4294967295 | +| test.c:498:16:498:17 | ip | 4294967295 | +| test.c:499:16:499:17 | ip | 4294967295 | +| test.c:500:16:500:17 | ip | 4294967295 | +| test.c:501:17:501:18 | ip | 4294967295 | +| test.c:502:22:502:23 | ip | 4294967295 | +| test.c:502:33:502:34 | ip | 4294967295 | +| test.c:502:48:502:49 | ip | 4294967295 | +| test.c:502:59:502:60 | ip | 4294967295 | +| test.c:503:20:503:21 | ip | 4294967295 | +| test.c:504:25:504:26 | ip | 4294967295 | +| test.c:504:36:504:37 | ip | 4294967295 | +| test.c:505:27:505:28 | ip | 4294967295 | +| test.c:506:22:506:23 | ip | 4294967295 | +| test.c:507:15:507:16 | ip | 4294967295 | +| test.c:507:30:507:31 | ip | 4294967295 | +| test.c:508:11:508:12 | ip | 4294967295 | +| test.c:509:12:509:13 | ip | 4294967295 | | test.c:510:12:510:13 | ip | 4294967295 | -| test.c:511:14:511:15 | ip | 4294967295 | -| test.c:512:15:512:16 | ip | 4294967295 | -| test.c:513:16:513:17 | ip | 4294967295 | -| test.c:514:16:514:17 | ip | 4294967295 | -| test.c:515:17:515:18 | ip | 4294967295 | -| test.c:516:22:516:23 | ip | 4294967295 | -| test.c:516:33:516:34 | ip | 4294967295 | -| test.c:516:48:516:49 | ip | 4294967295 | -| test.c:516:59:516:60 | ip | 4294967295 | -| test.c:517:20:517:21 | ip | 4294967295 | -| test.c:518:25:518:26 | ip | 4294967295 | -| test.c:518:36:518:37 | ip | 4294967295 | -| test.c:519:27:519:28 | ip | 4294967295 | -| test.c:520:22:520:23 | ip | 4294967295 | -| test.c:521:13:521:14 | ip | 4294967295 | -| test.c:521:28:521:29 | ip | 4294967295 | -| test.c:522:18:522:19 | ip | 4294967295 | -| test.c:523:18:523:19 | ip | 4294967295 | -| test.c:524:18:524:19 | ip | 4294967295 | -| test.c:525:19:525:20 | ip | 4294967295 | -| test.c:526:24:526:25 | ip | 4294967295 | -| test.c:526:35:526:36 | ip | 4294967295 | -| test.c:526:50:526:51 | ip | 4294967295 | -| test.c:526:61:526:62 | ip | 4294967295 | -| test.c:527:22:527:23 | ip | 4294967295 | -| test.c:528:27:528:28 | ip | 4294967295 | -| test.c:528:38:528:39 | ip | 4294967295 | -| test.c:529:29:529:30 | ip | 4294967295 | -| test.c:530:24:530:25 | ip | 4294967295 | -| test.c:531:17:531:18 | ip | 4294967295 | -| test.c:531:32:531:33 | ip | 4294967295 | -| test.c:532:14:532:15 | ip | 4294967295 | -| test.c:533:18:533:19 | ip | 4294967295 | -| test.c:534:18:534:19 | ip | 4294967295 | -| test.c:535:19:535:20 | ip | 4294967295 | -| test.c:536:24:536:25 | ip | 4294967295 | -| test.c:536:35:536:36 | ip | 4294967295 | -| test.c:536:50:536:51 | ip | 4294967295 | -| test.c:536:61:536:62 | ip | 4294967295 | +| test.c:511:13:511:14 | ip | 4294967295 | +| test.c:511:39:511:40 | ip | 4294967295 | +| test.c:511:50:511:51 | ip | 4294967295 | +| test.c:511:65:511:66 | ip | 4294967295 | +| test.c:511:76:511:77 | ip | 4294967295 | +| test.c:512:16:512:17 | ip | 4294967295 | +| test.c:513:21:513:22 | ip | 4294967295 | +| test.c:513:32:513:33 | ip | 4294967295 | +| test.c:514:23:514:24 | ip | 4294967295 | +| test.c:515:18:515:19 | ip | 4294967295 | +| test.c:516:11:516:12 | ip | 4294967295 | +| test.c:516:17:516:18 | ip | 4294967295 | +| test.c:516:37:516:38 | ip | 4294967295 | +| test.c:516:43:516:44 | ip | 4294967295 | +| test.c:517:14:517:15 | ip | 4294967295 | +| test.c:518:14:518:15 | ip | 4294967295 | +| test.c:519:14:519:15 | ip | 4294967295 | +| test.c:520:15:520:16 | ip | 4294967295 | +| test.c:520:41:520:42 | ip | 4294967295 | +| test.c:520:52:520:53 | ip | 4294967295 | +| test.c:520:67:520:68 | ip | 4294967295 | +| test.c:520:78:520:79 | ip | 4294967295 | +| test.c:521:18:521:19 | ip | 4294967295 | +| test.c:522:23:522:24 | ip | 4294967295 | +| test.c:522:34:522:35 | ip | 4294967295 | +| test.c:523:25:523:26 | ip | 4294967295 | +| test.c:524:20:524:21 | ip | 4294967295 | +| test.c:525:14:525:15 | ip | 4294967295 | +| test.c:525:20:525:21 | ip | 4294967295 | +| test.c:526:16:526:17 | ip | 4294967295 | +| test.c:527:12:527:13 | ip | 4294967295 | +| test.c:528:14:528:15 | ip | 4294967295 | +| test.c:529:15:529:16 | ip | 4294967295 | +| test.c:530:16:530:17 | ip | 4294967295 | +| test.c:531:16:531:17 | ip | 4294967295 | +| test.c:532:17:532:18 | ip | 4294967295 | +| test.c:533:22:533:23 | ip | 4294967295 | +| test.c:533:33:533:34 | ip | 4294967295 | +| test.c:533:48:533:49 | ip | 4294967295 | +| test.c:533:59:533:60 | ip | 4294967295 | +| test.c:534:20:534:21 | ip | 4294967295 | +| test.c:535:25:535:26 | ip | 4294967295 | +| test.c:535:36:535:37 | ip | 4294967295 | +| test.c:536:27:536:28 | ip | 4294967295 | | test.c:537:22:537:23 | ip | 4294967295 | -| test.c:538:27:538:28 | ip | 4294967295 | -| test.c:538:38:538:39 | ip | 4294967295 | -| test.c:539:29:539:30 | ip | 4294967295 | -| test.c:540:24:540:25 | ip | 4294967295 | -| test.c:541:17:541:18 | ip | 4294967295 | -| test.c:541:23:541:24 | ip | 4294967295 | -| test.c:541:43:541:44 | ip | 4294967295 | -| test.c:541:49:541:50 | ip | 4294967295 | -| test.c:542:16:542:17 | ip | 4294967295 | -| test.c:543:16:543:17 | ip | 4294967295 | -| test.c:544:16:544:17 | ip | 4294967295 | -| test.c:545:17:545:18 | ip | 4294967295 | -| test.c:546:22:546:23 | ip | 4294967295 | -| test.c:546:33:546:34 | ip | 4294967295 | -| test.c:546:48:546:49 | ip | 4294967295 | -| test.c:546:59:546:60 | ip | 4294967295 | -| test.c:547:20:547:21 | ip | 4294967295 | -| test.c:548:25:548:26 | ip | 4294967295 | -| test.c:548:36:548:37 | ip | 4294967295 | -| test.c:549:27:549:28 | ip | 4294967295 | -| test.c:550:22:550:23 | ip | 4294967295 | -| test.c:551:16:551:17 | ip | 4294967295 | -| test.c:551:22:551:23 | ip | 4294967295 | -| test.c:552:18:552:19 | ip | 4294967295 | -| test.c:553:14:553:15 | ip | 4294967295 | -| test.c:554:14:554:15 | ip | 4294967295 | -| test.c:554:24:554:25 | ip | 4294967295 | -| test.c:554:44:554:45 | ip | 4294967295 | -| test.c:555:16:555:17 | ip | 4294967295 | -| test.c:556:16:556:17 | ip | 4294967295 | -| test.c:556:36:556:37 | ip | 4294967295 | -| test.c:557:14:557:15 | ip | 4294967295 | -| test.c:558:19:558:20 | ip | 4294967295 | -| test.c:559:20:559:21 | ip | 4294967295 | -| test.c:560:20:560:21 | ip | 4294967295 | -| test.c:561:21:561:22 | ip | 4294967295 | -| test.c:562:26:562:27 | ip | 4294967295 | -| test.c:562:37:562:38 | ip | 4294967295 | -| test.c:562:52:562:53 | ip | 4294967295 | -| test.c:562:63:562:64 | ip | 4294967295 | -| test.c:563:24:563:25 | ip | 4294967295 | -| test.c:564:29:564:30 | ip | 4294967295 | -| test.c:564:40:564:41 | ip | 4294967295 | -| test.c:565:31:565:32 | ip | 4294967295 | -| test.c:566:26:566:27 | ip | 4294967295 | -| test.c:567:17:567:18 | ip | 4294967295 | -| test.c:567:32:567:33 | ip | 4294967295 | +| test.c:538:13:538:14 | ip | 4294967295 | +| test.c:538:28:538:29 | ip | 4294967295 | +| test.c:539:18:539:19 | ip | 4294967295 | +| test.c:540:18:540:19 | ip | 4294967295 | +| test.c:541:18:541:19 | ip | 4294967295 | +| test.c:542:19:542:20 | ip | 4294967295 | +| test.c:543:24:543:25 | ip | 4294967295 | +| test.c:543:35:543:36 | ip | 4294967295 | +| test.c:543:50:543:51 | ip | 4294967295 | +| test.c:543:61:543:62 | ip | 4294967295 | +| test.c:544:22:544:23 | ip | 4294967295 | +| test.c:545:27:545:28 | ip | 4294967295 | +| test.c:545:38:545:39 | ip | 4294967295 | +| test.c:546:29:546:30 | ip | 4294967295 | +| test.c:547:24:547:25 | ip | 4294967295 | +| test.c:548:17:548:18 | ip | 4294967295 | +| test.c:548:32:548:33 | ip | 4294967295 | +| test.c:549:14:549:15 | ip | 4294967295 | +| test.c:550:18:550:19 | ip | 4294967295 | +| test.c:551:18:551:19 | ip | 4294967295 | +| test.c:552:19:552:20 | ip | 4294967295 | +| test.c:553:24:553:25 | ip | 4294967295 | +| test.c:553:35:553:36 | ip | 4294967295 | +| test.c:553:50:553:51 | ip | 4294967295 | +| test.c:553:61:553:62 | ip | 4294967295 | +| test.c:554:22:554:23 | ip | 4294967295 | +| test.c:555:27:555:28 | ip | 4294967295 | +| test.c:555:38:555:39 | ip | 4294967295 | +| test.c:556:29:556:30 | ip | 4294967295 | +| test.c:557:24:557:25 | ip | 4294967295 | +| test.c:558:17:558:18 | ip | 4294967295 | +| test.c:558:23:558:24 | ip | 4294967295 | +| test.c:558:43:558:44 | ip | 4294967295 | +| test.c:558:49:558:50 | ip | 4294967295 | +| test.c:559:16:559:17 | ip | 4294967295 | +| test.c:560:16:560:17 | ip | 4294967295 | +| test.c:561:16:561:17 | ip | 4294967295 | +| test.c:562:17:562:18 | ip | 4294967295 | +| test.c:563:22:563:23 | ip | 4294967295 | +| test.c:563:33:563:34 | ip | 4294967295 | +| test.c:563:48:563:49 | ip | 4294967295 | +| test.c:563:59:563:60 | ip | 4294967295 | +| test.c:564:20:564:21 | ip | 4294967295 | +| test.c:565:25:565:26 | ip | 4294967295 | +| test.c:565:36:565:37 | ip | 4294967295 | +| test.c:566:27:566:28 | ip | 4294967295 | +| test.c:567:22:567:23 | ip | 4294967295 | +| test.c:568:16:568:17 | ip | 4294967295 | | test.c:568:22:568:23 | ip | 4294967295 | -| test.c:569:22:569:23 | ip | 4294967295 | -| test.c:570:22:570:23 | ip | 4294967295 | -| test.c:571:23:571:24 | ip | 4294967295 | -| test.c:572:28:572:29 | ip | 4294967295 | -| test.c:572:39:572:40 | ip | 4294967295 | -| test.c:572:54:572:55 | ip | 4294967295 | -| test.c:572:65:572:66 | ip | 4294967295 | -| test.c:573:26:573:27 | ip | 4294967295 | -| test.c:574:31:574:32 | ip | 4294967295 | -| test.c:574:42:574:43 | ip | 4294967295 | -| test.c:575:33:575:34 | ip | 4294967295 | -| test.c:576:28:576:29 | ip | 4294967295 | -| test.c:577:21:577:22 | ip | 4294967295 | -| test.c:577:36:577:37 | ip | 4294967295 | -| test.c:578:17:578:18 | ip | 4294967295 | -| test.c:579:18:579:19 | ip | 4294967295 | -| test.c:580:18:580:19 | ip | 4294967295 | -| test.c:581:19:581:20 | ip | 4294967295 | -| test.c:582:24:582:25 | ip | 4294967295 | -| test.c:582:35:582:36 | ip | 4294967295 | -| test.c:582:50:582:51 | ip | 4294967295 | -| test.c:582:61:582:62 | ip | 4294967295 | -| test.c:583:22:583:23 | ip | 4294967295 | -| test.c:584:27:584:28 | ip | 4294967295 | -| test.c:584:38:584:39 | ip | 4294967295 | -| test.c:585:29:585:30 | ip | 4294967295 | -| test.c:586:24:586:25 | ip | 4294967295 | -| test.c:587:17:587:18 | ip | 4294967295 | -| test.c:587:23:587:24 | ip | 4294967295 | -| test.c:587:43:587:44 | ip | 4294967295 | -| test.c:587:49:587:50 | ip | 4294967295 | -| test.c:588:20:588:21 | ip | 4294967295 | -| test.c:589:20:589:21 | ip | 4294967295 | -| test.c:590:20:590:21 | ip | 4294967295 | -| test.c:591:21:591:22 | ip | 4294967295 | -| test.c:592:26:592:27 | ip | 4294967295 | -| test.c:592:37:592:38 | ip | 4294967295 | -| test.c:592:52:592:53 | ip | 4294967295 | -| test.c:592:63:592:64 | ip | 4294967295 | -| test.c:593:24:593:25 | ip | 4294967295 | -| test.c:594:29:594:30 | ip | 4294967295 | -| test.c:594:40:594:41 | ip | 4294967295 | -| test.c:595:31:595:32 | ip | 4294967295 | -| test.c:596:26:596:27 | ip | 4294967295 | -| test.c:597:20:597:21 | ip | 4294967295 | -| test.c:597:26:597:27 | ip | 4294967295 | -| test.c:598:22:598:23 | ip | 4294967295 | -| test.c:599:18:599:19 | ip | 4294967295 | -| test.c:600:16:600:17 | ip | 4294967295 | -| test.c:601:17:601:18 | ip | 4294967295 | -| test.c:602:18:602:19 | ip | 4294967295 | -| test.c:603:18:603:19 | ip | 4294967295 | -| test.c:604:19:604:20 | ip | 4294967295 | -| test.c:605:24:605:25 | ip | 4294967295 | -| test.c:605:35:605:36 | ip | 4294967295 | -| test.c:605:50:605:51 | ip | 4294967295 | -| test.c:605:61:605:62 | ip | 4294967295 | -| test.c:606:22:606:23 | ip | 4294967295 | -| test.c:607:27:607:28 | ip | 4294967295 | -| test.c:607:38:607:39 | ip | 4294967295 | -| test.c:608:29:608:30 | ip | 4294967295 | -| test.c:609:24:609:25 | ip | 4294967295 | -| test.c:610:15:610:16 | ip | 4294967295 | -| test.c:610:30:610:31 | ip | 4294967295 | -| test.c:611:20:611:21 | ip | 4294967295 | -| test.c:612:20:612:21 | ip | 4294967295 | -| test.c:613:20:613:21 | ip | 4294967295 | -| test.c:614:21:614:22 | ip | 4294967295 | -| test.c:615:26:615:27 | ip | 4294967295 | -| test.c:615:37:615:38 | ip | 4294967295 | -| test.c:615:52:615:53 | ip | 4294967295 | -| test.c:615:63:615:64 | ip | 4294967295 | -| test.c:616:24:616:25 | ip | 4294967295 | -| test.c:617:29:617:30 | ip | 4294967295 | -| test.c:617:40:617:41 | ip | 4294967295 | -| test.c:618:31:618:32 | ip | 4294967295 | -| test.c:619:26:619:27 | ip | 4294967295 | -| test.c:620:19:620:20 | ip | 4294967295 | -| test.c:620:34:620:35 | ip | 4294967295 | -| test.c:621:16:621:17 | ip | 4294967295 | -| test.c:622:20:622:21 | ip | 4294967295 | -| test.c:623:20:623:21 | ip | 4294967295 | -| test.c:624:21:624:22 | ip | 4294967295 | -| test.c:625:26:625:27 | ip | 4294967295 | -| test.c:625:37:625:38 | ip | 4294967295 | -| test.c:625:52:625:53 | ip | 4294967295 | -| test.c:625:63:625:64 | ip | 4294967295 | +| test.c:569:18:569:19 | ip | 4294967295 | +| test.c:570:14:570:15 | ip | 4294967295 | +| test.c:571:14:571:15 | ip | 4294967295 | +| test.c:571:24:571:25 | ip | 4294967295 | +| test.c:571:44:571:45 | ip | 4294967295 | +| test.c:572:16:572:17 | ip | 4294967295 | +| test.c:573:16:573:17 | ip | 4294967295 | +| test.c:573:36:573:37 | ip | 4294967295 | +| test.c:574:14:574:15 | ip | 4294967295 | +| test.c:575:19:575:20 | ip | 4294967295 | +| test.c:576:20:576:21 | ip | 4294967295 | +| test.c:577:20:577:21 | ip | 4294967295 | +| test.c:578:21:578:22 | ip | 4294967295 | +| test.c:579:26:579:27 | ip | 4294967295 | +| test.c:579:37:579:38 | ip | 4294967295 | +| test.c:579:52:579:53 | ip | 4294967295 | +| test.c:579:63:579:64 | ip | 4294967295 | +| test.c:580:24:580:25 | ip | 4294967295 | +| test.c:581:29:581:30 | ip | 4294967295 | +| test.c:581:40:581:41 | ip | 4294967295 | +| test.c:582:31:582:32 | ip | 4294967295 | +| test.c:583:26:583:27 | ip | 4294967295 | +| test.c:584:17:584:18 | ip | 4294967295 | +| test.c:584:32:584:33 | ip | 4294967295 | +| test.c:585:22:585:23 | ip | 4294967295 | +| test.c:586:22:586:23 | ip | 4294967295 | +| test.c:587:22:587:23 | ip | 4294967295 | +| test.c:588:23:588:24 | ip | 4294967295 | +| test.c:589:28:589:29 | ip | 4294967295 | +| test.c:589:39:589:40 | ip | 4294967295 | +| test.c:589:54:589:55 | ip | 4294967295 | +| test.c:589:65:589:66 | ip | 4294967295 | +| test.c:590:26:590:27 | ip | 4294967295 | +| test.c:591:31:591:32 | ip | 4294967295 | +| test.c:591:42:591:43 | ip | 4294967295 | +| test.c:592:33:592:34 | ip | 4294967295 | +| test.c:593:28:593:29 | ip | 4294967295 | +| test.c:594:21:594:22 | ip | 4294967295 | +| test.c:594:36:594:37 | ip | 4294967295 | +| test.c:595:17:595:18 | ip | 4294967295 | +| test.c:596:18:596:19 | ip | 4294967295 | +| test.c:597:18:597:19 | ip | 4294967295 | +| test.c:598:19:598:20 | ip | 4294967295 | +| test.c:599:24:599:25 | ip | 4294967295 | +| test.c:599:35:599:36 | ip | 4294967295 | +| test.c:599:50:599:51 | ip | 4294967295 | +| test.c:599:61:599:62 | ip | 4294967295 | +| test.c:600:22:600:23 | ip | 4294967295 | +| test.c:601:27:601:28 | ip | 4294967295 | +| test.c:601:38:601:39 | ip | 4294967295 | +| test.c:602:29:602:30 | ip | 4294967295 | +| test.c:603:24:603:25 | ip | 4294967295 | +| test.c:604:17:604:18 | ip | 4294967295 | +| test.c:604:23:604:24 | ip | 4294967295 | +| test.c:604:43:604:44 | ip | 4294967295 | +| test.c:604:49:604:50 | ip | 4294967295 | +| test.c:605:20:605:21 | ip | 4294967295 | +| test.c:606:20:606:21 | ip | 4294967295 | +| test.c:607:20:607:21 | ip | 4294967295 | +| test.c:608:21:608:22 | ip | 4294967295 | +| test.c:609:26:609:27 | ip | 4294967295 | +| test.c:609:37:609:38 | ip | 4294967295 | +| test.c:609:52:609:53 | ip | 4294967295 | +| test.c:609:63:609:64 | ip | 4294967295 | +| test.c:610:24:610:25 | ip | 4294967295 | +| test.c:611:29:611:30 | ip | 4294967295 | +| test.c:611:40:611:41 | ip | 4294967295 | +| test.c:612:31:612:32 | ip | 4294967295 | +| test.c:613:26:613:27 | ip | 4294967295 | +| test.c:614:20:614:21 | ip | 4294967295 | +| test.c:614:26:614:27 | ip | 4294967295 | +| test.c:615:22:615:23 | ip | 4294967295 | +| test.c:616:18:616:19 | ip | 4294967295 | +| test.c:617:16:617:17 | ip | 4294967295 | +| test.c:618:17:618:18 | ip | 4294967295 | +| test.c:619:18:619:19 | ip | 4294967295 | +| test.c:620:18:620:19 | ip | 4294967295 | +| test.c:621:19:621:20 | ip | 4294967295 | +| test.c:622:24:622:25 | ip | 4294967295 | +| test.c:622:35:622:36 | ip | 4294967295 | +| test.c:622:50:622:51 | ip | 4294967295 | +| test.c:622:61:622:62 | ip | 4294967295 | +| test.c:623:22:623:23 | ip | 4294967295 | +| test.c:624:27:624:28 | ip | 4294967295 | +| test.c:624:38:624:39 | ip | 4294967295 | +| test.c:625:29:625:30 | ip | 4294967295 | | test.c:626:24:626:25 | ip | 4294967295 | -| test.c:627:29:627:30 | ip | 4294967295 | -| test.c:627:40:627:41 | ip | 4294967295 | -| test.c:628:31:628:32 | ip | 4294967295 | -| test.c:629:26:629:27 | ip | 4294967295 | -| test.c:630:19:630:20 | ip | 4294967295 | -| test.c:630:25:630:26 | ip | 4294967295 | -| test.c:630:45:630:46 | ip | 4294967295 | -| test.c:630:51:630:52 | ip | 4294967295 | -| test.c:631:18:631:19 | ip | 4294967295 | -| test.c:632:18:632:19 | ip | 4294967295 | -| test.c:633:18:633:19 | ip | 4294967295 | -| test.c:634:19:634:20 | ip | 4294967295 | -| test.c:635:24:635:25 | ip | 4294967295 | -| test.c:635:35:635:36 | ip | 4294967295 | -| test.c:635:50:635:51 | ip | 4294967295 | -| test.c:635:61:635:62 | ip | 4294967295 | -| test.c:636:22:636:23 | ip | 4294967295 | -| test.c:637:27:637:28 | ip | 4294967295 | -| test.c:637:38:637:39 | ip | 4294967295 | -| test.c:638:29:638:30 | ip | 4294967295 | -| test.c:639:24:639:25 | ip | 4294967295 | -| test.c:640:18:640:19 | ip | 4294967295 | -| test.c:640:24:640:25 | ip | 4294967295 | -| test.c:641:20:641:21 | ip | 4294967295 | -| test.c:642:16:642:17 | ip | 4294967295 | -| test.c:643:10:643:23 | special_number | 4294967295 | -| test.c:651:7:651:8 | c1 | 2147483647 | -| test.c:651:13:651:13 | x | 0 | -| test.c:652:7:652:8 | c2 | 2147483647 | -| test.c:652:13:652:13 | x | 748596 | -| test.c:653:7:653:8 | c3 | 2147483647 | -| test.c:653:13:653:13 | x | 85400991 | -| test.c:654:7:654:8 | c4 | 2147483647 | -| test.c:654:13:654:13 | x | 89076886 | -| test.c:655:7:655:8 | c5 | 2147483647 | -| test.c:655:13:655:13 | x | 89175520 | -| test.c:656:7:656:8 | c1 | 2147483647 | -| test.c:656:13:656:14 | c2 | 2147483647 | -| test.c:656:19:656:19 | x | 97010505 | -| test.c:657:7:657:8 | c1 | 2147483647 | -| test.c:657:13:657:14 | c3 | 2147483647 | -| test.c:657:19:657:19 | x | 1035467903 | -| test.c:658:7:658:8 | c1 | 2147483647 | -| test.c:658:13:658:14 | c4 | 2147483647 | -| test.c:658:19:658:19 | x | 1109363551 | -| test.c:659:7:659:8 | c1 | 2147483647 | -| test.c:659:13:659:14 | c5 | 2147483647 | -| test.c:659:19:659:19 | x | 1121708983 | -| test.c:660:7:660:8 | c2 | 2147483647 | -| test.c:660:13:660:14 | c3 | 2147483647 | -| test.c:660:19:660:19 | x | 1121747830 | -| test.c:662:11:662:11 | x | 2147483647 | -| test.c:662:15:662:15 | x | 2147483647 | -| test.c:662:19:662:19 | x | 2147483647 | -| test.c:662:23:662:23 | x | 2147483647 | -| test.c:662:27:662:27 | x | 2147483647 | -| test.c:662:31:662:31 | x | 2147483647 | -| test.c:662:35:662:35 | x | 2147483647 | -| test.c:662:39:662:39 | x | 2147483647 | -| test.c:662:43:662:43 | x | 2147483647 | -| test.c:662:47:662:47 | x | 2147483647 | -| test.c:662:51:662:51 | x | 2147483647 | -| test.c:662:55:662:55 | x | 2147483647 | -| test.c:663:10:663:10 | y | 2147483647 | -| test.c:668:20:668:20 | x | 4294967295 | -| test.c:668:30:668:30 | x | 99 | -| test.c:671:3:671:4 | y1 | 4294967295 | -| test.c:671:11:671:11 | y | 100 | -| test.c:671:14:671:14 | y | 101 | -| test.c:672:3:672:4 | y2 | 4294967295 | -| test.c:672:9:672:9 | y | 101 | -| test.c:672:14:672:14 | y | 102 | -| test.c:672:22:672:22 | y | 105 | -| test.c:673:10:673:11 | y1 | 101 | -| test.c:673:15:673:16 | y2 | 105 | -| test.c:681:3:681:3 | i | 2147483647 | -| test.c:682:7:682:7 | i | 10 | -| test.c:684:3:684:3 | i | 2147483647 | -| test.c:685:3:685:3 | i | 10 | -| test.c:686:7:686:7 | i | 20 | -| test.c:688:3:688:3 | i | 2147483647 | -| test.c:689:3:689:3 | i | 40 | -| test.c:690:7:690:7 | i | 30 | -| test.c:692:3:692:3 | i | 2147483647 | -| test.c:692:7:692:7 | j | 2147483647 | -| test.c:693:7:693:7 | i | 40 | -| test.c:695:3:695:3 | i | 2147483647 | -| test.c:695:8:695:8 | j | 40 | -| test.c:696:7:696:7 | i | 50 | +| test.c:627:15:627:16 | ip | 4294967295 | +| test.c:627:30:627:31 | ip | 4294967295 | +| test.c:628:20:628:21 | ip | 4294967295 | +| test.c:629:20:629:21 | ip | 4294967295 | +| test.c:630:20:630:21 | ip | 4294967295 | +| test.c:631:21:631:22 | ip | 4294967295 | +| test.c:632:26:632:27 | ip | 4294967295 | +| test.c:632:37:632:38 | ip | 4294967295 | +| test.c:632:52:632:53 | ip | 4294967295 | +| test.c:632:63:632:64 | ip | 4294967295 | +| test.c:633:24:633:25 | ip | 4294967295 | +| test.c:634:29:634:30 | ip | 4294967295 | +| test.c:634:40:634:41 | ip | 4294967295 | +| test.c:635:31:635:32 | ip | 4294967295 | +| test.c:636:26:636:27 | ip | 4294967295 | +| test.c:637:19:637:20 | ip | 4294967295 | +| test.c:637:34:637:35 | ip | 4294967295 | +| test.c:638:16:638:17 | ip | 4294967295 | +| test.c:639:20:639:21 | ip | 4294967295 | +| test.c:640:20:640:21 | ip | 4294967295 | +| test.c:641:21:641:22 | ip | 4294967295 | +| test.c:642:26:642:27 | ip | 4294967295 | +| test.c:642:37:642:38 | ip | 4294967295 | +| test.c:642:52:642:53 | ip | 4294967295 | +| test.c:642:63:642:64 | ip | 4294967295 | +| test.c:643:24:643:25 | ip | 4294967295 | +| test.c:644:29:644:30 | ip | 4294967295 | +| test.c:644:40:644:41 | ip | 4294967295 | +| test.c:645:31:645:32 | ip | 4294967295 | +| test.c:646:26:646:27 | ip | 4294967295 | +| test.c:647:19:647:20 | ip | 4294967295 | +| test.c:647:25:647:26 | ip | 4294967295 | +| test.c:647:45:647:46 | ip | 4294967295 | +| test.c:647:51:647:52 | ip | 4294967295 | +| test.c:648:18:648:19 | ip | 4294967295 | +| test.c:649:18:649:19 | ip | 4294967295 | +| test.c:650:18:650:19 | ip | 4294967295 | +| test.c:651:19:651:20 | ip | 4294967295 | +| test.c:652:24:652:25 | ip | 4294967295 | +| test.c:652:35:652:36 | ip | 4294967295 | +| test.c:652:50:652:51 | ip | 4294967295 | +| test.c:652:61:652:62 | ip | 4294967295 | +| test.c:653:22:653:23 | ip | 4294967295 | +| test.c:654:27:654:28 | ip | 4294967295 | +| test.c:654:38:654:39 | ip | 4294967295 | +| test.c:655:29:655:30 | ip | 4294967295 | +| test.c:656:24:656:25 | ip | 4294967295 | +| test.c:657:18:657:19 | ip | 4294967295 | +| test.c:657:24:657:25 | ip | 4294967295 | +| test.c:658:20:658:21 | ip | 4294967295 | +| test.c:659:16:659:17 | ip | 4294967295 | +| test.c:660:10:660:23 | special_number | 4294967295 | +| test.c:668:7:668:8 | c1 | 2147483647 | +| test.c:668:13:668:13 | x | 0 | +| test.c:669:7:669:8 | c2 | 2147483647 | +| test.c:669:13:669:13 | x | 748596 | +| test.c:670:7:670:8 | c3 | 2147483647 | +| test.c:670:13:670:13 | x | 85400991 | +| test.c:671:7:671:8 | c4 | 2147483647 | +| test.c:671:13:671:13 | x | 89076886 | +| test.c:672:7:672:8 | c5 | 2147483647 | +| test.c:672:13:672:13 | x | 89175520 | +| test.c:673:7:673:8 | c1 | 2147483647 | +| test.c:673:13:673:14 | c2 | 2147483647 | +| test.c:673:19:673:19 | x | 97010505 | +| test.c:674:7:674:8 | c1 | 2147483647 | +| test.c:674:13:674:14 | c3 | 2147483647 | +| test.c:674:19:674:19 | x | 1035467903 | +| test.c:675:7:675:8 | c1 | 2147483647 | +| test.c:675:13:675:14 | c4 | 2147483647 | +| test.c:675:19:675:19 | x | 1109363551 | +| test.c:676:7:676:8 | c1 | 2147483647 | +| test.c:676:13:676:14 | c5 | 2147483647 | +| test.c:676:19:676:19 | x | 1121708983 | +| test.c:677:7:677:8 | c2 | 2147483647 | +| test.c:677:13:677:14 | c3 | 2147483647 | +| test.c:677:19:677:19 | x | 1121747830 | +| test.c:679:11:679:11 | x | 2147483647 | +| test.c:679:15:679:15 | x | 2147483647 | +| test.c:679:19:679:19 | x | 2147483647 | +| test.c:679:23:679:23 | x | 2147483647 | +| test.c:679:27:679:27 | x | 2147483647 | +| test.c:679:31:679:31 | x | 2147483647 | +| test.c:679:35:679:35 | x | 2147483647 | +| test.c:679:39:679:39 | x | 2147483647 | +| test.c:679:43:679:43 | x | 2147483647 | +| test.c:679:47:679:47 | x | 2147483647 | +| test.c:679:51:679:51 | x | 2147483647 | +| test.c:679:55:679:55 | x | 2147483647 | +| test.c:680:10:680:10 | y | 2147483647 | +| test.c:685:20:685:20 | x | 4294967295 | +| test.c:685:30:685:30 | x | 99 | +| test.c:688:3:688:4 | y1 | 4294967295 | +| test.c:688:11:688:11 | y | 100 | +| test.c:688:14:688:14 | y | 101 | +| test.c:689:3:689:4 | y2 | 4294967295 | +| test.c:689:9:689:9 | y | 101 | +| test.c:689:14:689:14 | y | 102 | +| test.c:689:22:689:22 | y | 105 | +| test.c:690:10:690:11 | y1 | 101 | +| test.c:690:15:690:16 | y2 | 105 | | test.c:698:3:698:3 | i | 2147483647 | -| test.c:698:13:698:13 | j | 50 | -| test.c:699:7:699:7 | i | 60 | -| test.c:706:12:706:12 | a | 4294967295 | -| test.c:706:17:706:17 | a | 4294967295 | -| test.c:706:33:706:33 | b | 4294967295 | -| test.c:706:38:706:38 | b | 4294967295 | -| test.c:707:13:707:13 | a | 11 | -| test.c:707:15:707:15 | b | 23 | -| test.c:708:5:708:9 | total | 0 | -| test.c:708:14:708:14 | r | 253 | -| test.c:710:12:710:12 | a | 4294967295 | -| test.c:710:17:710:17 | a | 4294967295 | -| test.c:710:33:710:33 | b | 4294967295 | -| test.c:710:38:710:38 | b | 4294967295 | -| test.c:711:13:711:13 | a | 11 | -| test.c:711:15:711:15 | b | 23 | -| test.c:712:5:712:9 | total | 253 | -| test.c:712:14:712:14 | r | 253 | -| test.c:714:12:714:12 | a | 4294967295 | -| test.c:714:17:714:17 | a | 4294967295 | -| test.c:714:34:714:34 | b | 4294967295 | -| test.c:714:39:714:39 | b | 4294967295 | -| test.c:715:13:715:13 | a | 11 | -| test.c:715:15:715:15 | b | 23 | -| test.c:716:5:716:9 | total | 506 | -| test.c:716:14:716:14 | r | 253 | -| test.c:719:10:719:14 | total | 759 | -| test.c:725:12:725:12 | b | 4294967295 | -| test.c:725:17:725:17 | b | 4294967295 | -| test.c:726:16:726:16 | b | 23 | -| test.c:727:5:727:9 | total | 0 | -| test.c:727:14:727:14 | r | 253 | -| test.c:729:12:729:12 | b | 4294967295 | -| test.c:729:17:729:17 | b | 4294967295 | -| test.c:730:16:730:16 | b | 23 | -| test.c:731:5:731:9 | total | 253 | -| test.c:731:14:731:14 | r | 253 | -| test.c:733:13:733:13 | b | 4294967295 | -| test.c:733:18:733:18 | b | 4294967295 | -| test.c:734:16:734:16 | b | 23 | -| test.c:735:5:735:9 | total | 506 | -| test.c:735:14:735:14 | r | 253 | -| test.c:738:10:738:14 | total | 759 | -| test.c:743:3:743:3 | x | 18446744073709551616 | -| test.c:743:7:743:7 | y | 18446744073709551616 | -| test.c:744:3:744:4 | xy | 18446744073709551616 | -| test.c:744:8:744:8 | x | 1000000003 | -| test.c:744:12:744:12 | y | 1000000003 | -| test.c:745:10:745:11 | xy | 1000000006000000000 | -| test.c:750:3:750:3 | x | 18446744073709551616 | -| test.c:751:3:751:3 | y | 18446744073709551616 | -| test.c:752:3:752:4 | xy | 18446744073709551616 | -| test.c:752:8:752:8 | x | 274177 | -| test.c:752:12:752:12 | y | 67280421310721 | -| test.c:753:10:753:11 | xy | 18446744073709551616 | -| test.c:757:7:757:8 | ui | 4294967295 | -| test.c:758:43:758:44 | ui | 4294967295 | -| test.c:758:48:758:49 | ui | 4294967295 | -| test.c:759:12:759:17 | result | 18446744065119617024 | -| test.c:761:7:761:8 | ul | 18446744073709551616 | -| test.c:762:28:762:29 | ul | 18446744073709551616 | -| test.c:762:33:762:34 | ul | 18446744073709551616 | -| test.c:763:12:763:17 | result | 18446744073709551616 | -| test.c:769:7:769:8 | ui | 4294967295 | -| test.c:769:19:769:20 | ui | 10 | -| test.c:770:5:770:6 | ui | 10 | -| test.c:770:11:770:12 | ui | 10 | -| test.c:771:12:771:13 | ui | 100 | -| test.c:775:3:775:9 | uiconst | 10 | -| test.c:778:3:778:9 | ulconst | 10 | -| test.c:779:10:779:16 | uiconst | 40 | -| test.c:779:20:779:26 | ulconst | 40 | -| test.c:783:7:783:7 | i | 2147483647 | -| test.c:783:18:783:18 | i | 2147483647 | -| test.c:784:5:784:5 | i | 2147483647 | -| test.c:784:13:784:13 | i | 2 | -| test.c:785:9:785:9 | i | 10 | -| test.c:787:5:787:5 | i | 2147483647 | -| test.c:787:9:787:9 | i | 10 | -| test.c:788:9:788:9 | i | 15 | -| test.c:790:5:790:5 | i | 15 | -| test.c:791:9:791:9 | i | 105 | -| test.c:793:5:793:5 | i | 105 | -| test.c:794:9:794:9 | i | 2310 | -| test.c:796:7:796:7 | i | 2147483647 | -| test.c:797:5:797:5 | i | 2147483647 | -| test.c:797:9:797:9 | i | -1 | -| test.c:798:9:798:9 | i | 1 | -| test.c:800:3:800:3 | i | 2147483647 | +| test.c:699:7:699:7 | i | 10 | +| test.c:701:3:701:3 | i | 2147483647 | +| test.c:702:3:702:3 | i | 10 | +| test.c:703:7:703:7 | i | 20 | +| test.c:705:3:705:3 | i | 2147483647 | +| test.c:706:3:706:3 | i | 40 | +| test.c:707:7:707:7 | i | 30 | +| test.c:709:3:709:3 | i | 2147483647 | +| test.c:709:7:709:7 | j | 2147483647 | +| test.c:710:7:710:7 | i | 40 | +| test.c:712:3:712:3 | i | 2147483647 | +| test.c:712:8:712:8 | j | 40 | +| test.c:713:7:713:7 | i | 50 | +| test.c:715:3:715:3 | i | 2147483647 | +| test.c:715:13:715:13 | j | 50 | +| test.c:716:7:716:7 | i | 60 | +| test.c:723:12:723:12 | a | 4294967295 | +| test.c:723:17:723:17 | a | 4294967295 | +| test.c:723:33:723:33 | b | 4294967295 | +| test.c:723:38:723:38 | b | 4294967295 | +| test.c:724:13:724:13 | a | 11 | +| test.c:724:15:724:15 | b | 23 | +| test.c:725:5:725:9 | total | 0 | +| test.c:725:14:725:14 | r | 253 | +| test.c:727:12:727:12 | a | 4294967295 | +| test.c:727:17:727:17 | a | 4294967295 | +| test.c:727:33:727:33 | b | 4294967295 | +| test.c:727:38:727:38 | b | 4294967295 | +| test.c:728:13:728:13 | a | 11 | +| test.c:728:15:728:15 | b | 23 | +| test.c:729:5:729:9 | total | 253 | +| test.c:729:14:729:14 | r | 253 | +| test.c:731:12:731:12 | a | 4294967295 | +| test.c:731:17:731:17 | a | 4294967295 | +| test.c:731:34:731:34 | b | 4294967295 | +| test.c:731:39:731:39 | b | 4294967295 | +| test.c:732:13:732:13 | a | 11 | +| test.c:732:15:732:15 | b | 23 | +| test.c:733:5:733:9 | total | 506 | +| test.c:733:14:733:14 | r | 253 | +| test.c:736:10:736:14 | total | 759 | +| test.c:742:12:742:12 | b | 4294967295 | +| test.c:742:17:742:17 | b | 4294967295 | +| test.c:743:16:743:16 | b | 23 | +| test.c:744:5:744:9 | total | 0 | +| test.c:744:14:744:14 | r | 253 | +| test.c:746:12:746:12 | b | 4294967295 | +| test.c:746:17:746:17 | b | 4294967295 | +| test.c:747:16:747:16 | b | 23 | +| test.c:748:5:748:9 | total | 253 | +| test.c:748:14:748:14 | r | 253 | +| test.c:750:13:750:13 | b | 4294967295 | +| test.c:750:18:750:18 | b | 4294967295 | +| test.c:751:16:751:16 | b | 23 | +| test.c:752:5:752:9 | total | 506 | +| test.c:752:14:752:14 | r | 253 | +| test.c:755:10:755:14 | total | 759 | +| test.c:760:3:760:3 | x | 18446744073709551616 | +| test.c:760:7:760:7 | y | 18446744073709551616 | +| test.c:761:3:761:4 | xy | 18446744073709551616 | +| test.c:761:8:761:8 | x | 1000000003 | +| test.c:761:12:761:12 | y | 1000000003 | +| test.c:762:10:762:11 | xy | 1000000006000000000 | +| test.c:767:3:767:3 | x | 18446744073709551616 | +| test.c:768:3:768:3 | y | 18446744073709551616 | +| test.c:769:3:769:4 | xy | 18446744073709551616 | +| test.c:769:8:769:8 | x | 274177 | +| test.c:769:12:769:12 | y | 67280421310721 | +| test.c:770:10:770:11 | xy | 18446744073709551616 | +| test.c:774:7:774:8 | ui | 4294967295 | +| test.c:775:43:775:44 | ui | 4294967295 | +| test.c:775:48:775:49 | ui | 4294967295 | +| test.c:776:12:776:17 | result | 18446744065119617024 | +| test.c:778:7:778:8 | ul | 18446744073709551616 | +| test.c:779:28:779:29 | ul | 18446744073709551616 | +| test.c:779:33:779:34 | ul | 18446744073709551616 | +| test.c:780:12:780:17 | result | 18446744073709551616 | +| test.c:786:7:786:8 | ui | 4294967295 | +| test.c:786:19:786:20 | ui | 10 | +| test.c:787:5:787:6 | ui | 10 | +| test.c:787:11:787:12 | ui | 10 | +| test.c:788:12:788:13 | ui | 100 | +| test.c:792:3:792:9 | uiconst | 10 | +| test.c:795:3:795:9 | ulconst | 10 | +| test.c:796:10:796:16 | uiconst | 40 | +| test.c:796:20:796:26 | ulconst | 40 | | test.c:800:7:800:7 | i | 2147483647 | -| test.c:801:10:801:10 | i | 2147483647 | -| test.c:804:3:804:3 | i | 2147483647 | -| test.c:804:10:804:11 | sc | 1 | -| test.c:806:7:806:7 | i | 127 | -| test.c:813:7:813:7 | n | 4294967295 | -| test.c:815:7:815:7 | n | 4294967295 | -| test.c:816:9:816:9 | n | 4294967295 | -| test.c:819:7:819:7 | n | 4294967295 | -| test.c:820:9:820:9 | n | 4294967295 | -| test.c:822:9:822:9 | n | 0 | -| test.c:825:8:825:8 | n | 4294967295 | -| test.c:826:9:826:9 | n | 0 | -| test.c:828:9:828:9 | n | 4294967295 | -| test.c:831:10:831:10 | n | 4294967295 | -| test.c:832:5:832:5 | n | 4294967295 | -| test.c:835:7:835:7 | n | 0 | -| test.c:839:7:839:7 | n | 32767 | -| test.c:842:7:842:7 | n | 32767 | +| test.c:800:18:800:18 | i | 2147483647 | +| test.c:801:5:801:5 | i | 2147483647 | +| test.c:801:13:801:13 | i | 2 | +| test.c:802:9:802:9 | i | 10 | +| test.c:804:5:804:5 | i | 2147483647 | +| test.c:804:9:804:9 | i | 10 | +| test.c:805:9:805:9 | i | 15 | +| test.c:807:5:807:5 | i | 15 | +| test.c:808:9:808:9 | i | 105 | +| test.c:810:5:810:5 | i | 105 | +| test.c:811:9:811:9 | i | 2310 | +| test.c:813:7:813:7 | i | 2147483647 | +| test.c:814:5:814:5 | i | 2147483647 | +| test.c:814:9:814:9 | i | -1 | +| test.c:815:9:815:9 | i | 1 | +| test.c:817:3:817:3 | i | 2147483647 | +| test.c:817:7:817:7 | i | 2147483647 | +| test.c:818:10:818:10 | i | 2147483647 | +| test.c:821:3:821:3 | i | 2147483647 | +| test.c:821:10:821:11 | sc | 1 | +| test.c:823:7:823:7 | i | 127 | +| test.c:830:7:830:7 | n | 4294967295 | +| test.c:832:7:832:7 | n | 4294967295 | +| test.c:833:9:833:9 | n | 4294967295 | +| test.c:836:7:836:7 | n | 4294967295 | +| test.c:837:9:837:9 | n | 4294967295 | +| test.c:839:9:839:9 | n | 0 | +| test.c:842:8:842:8 | n | 4294967295 | | test.c:843:9:843:9 | n | 0 | -| test.c:845:9:845:9 | n | 32767 | -| test.c:848:7:848:7 | n | 32767 | -| test.c:849:9:849:9 | n | 32767 | -| test.c:851:9:851:9 | n | 0 | -| test.c:854:10:854:10 | n | 32767 | -| test.c:855:5:855:5 | n | 32767 | -| test.c:858:7:858:7 | n | 0 | -| test.c:862:7:862:7 | n | 32767 | -| test.c:863:9:863:9 | n | 32767 | -| test.c:864:11:864:11 | n | 32767 | -| test.c:868:7:868:7 | n | 32767 | -| test.c:869:13:869:13 | n | 32767 | -| test.c:872:9:872:9 | n | 32767 | -| test.c:875:7:875:7 | n | 32767 | -| test.c:875:22:875:22 | n | 32767 | -| test.c:876:9:876:9 | n | 32767 | +| test.c:845:9:845:9 | n | 4294967295 | +| test.c:848:10:848:10 | n | 4294967295 | +| test.c:849:5:849:5 | n | 4294967295 | +| test.c:852:7:852:7 | n | 0 | +| test.c:856:7:856:7 | n | 32767 | +| test.c:859:7:859:7 | n | 32767 | +| test.c:860:9:860:9 | n | 0 | +| test.c:862:9:862:9 | n | 32767 | +| test.c:865:7:865:7 | n | 32767 | +| test.c:866:9:866:9 | n | 32767 | +| test.c:868:9:868:9 | n | 0 | +| test.c:871:10:871:10 | n | 32767 | +| test.c:872:5:872:5 | n | 32767 | +| test.c:875:7:875:7 | n | 0 | | test.c:879:7:879:7 | n | 32767 | -| test.c:880:5:880:5 | n | 32767 | -| test.c:880:10:880:10 | n | 32767 | -| test.c:880:14:880:14 | n | 0 | -| test.c:881:6:881:6 | n | 32767 | -| test.c:881:10:881:10 | n | 0 | -| test.c:881:14:881:14 | n | 32767 | -| test.c:892:7:892:8 | ss | 32767 | -| test.c:893:9:893:10 | ss | 3 | -| test.c:896:7:896:8 | ss | 32767 | -| test.c:897:9:897:10 | ss | 32767 | -| test.c:900:14:900:15 | us | 65535 | -| test.c:901:9:901:10 | us | 32767 | -| test.c:904:14:904:15 | us | 65535 | -| test.c:905:9:905:10 | us | 65535 | -| test.c:908:7:908:8 | ss | 32767 | -| test.c:909:9:909:10 | ss | 32767 | -| test.c:912:7:912:8 | ss | 32767 | -| test.c:913:9:913:10 | ss | 2 | -| test.c:919:8:919:8 | s | 2147483647 | -| test.c:919:15:919:15 | s | 127 | -| test.c:919:23:919:23 | s | 9 | -| test.c:920:18:920:18 | s | 9 | -| test.c:920:22:920:22 | s | 9 | -| test.c:921:9:921:14 | result | 127 | -| test.c:927:7:927:7 | i | 0 | -| test.c:928:9:928:9 | i | 2147483647 | -| test.c:932:7:932:7 | u | 0 | -| test.c:933:9:933:9 | u | 4294967295 | -| test.c:938:12:938:12 | s | 2147483647 | -| test.c:939:7:939:8 | s2 | 4 | -| test.c:944:7:944:7 | x | 2147483647 | -| test.c:945:9:945:9 | y | 2147483647 | -| test.c:949:7:949:7 | y | 2147483647 | -| test.c:958:7:958:7 | x | 2147483647 | -| test.c:963:7:963:7 | x | 15 | -| test.c:970:8:970:8 | x | 2147483647 | -| test.c:970:12:970:12 | y | 256 | -| test.c:971:9:971:9 | x | 2147483647 | -| test.c:972:9:972:9 | y | 256 | +| test.c:880:9:880:9 | n | 32767 | +| test.c:881:11:881:11 | n | 32767 | +| test.c:885:7:885:7 | n | 32767 | +| test.c:886:13:886:13 | n | 32767 | +| test.c:889:9:889:9 | n | 32767 | +| test.c:892:7:892:7 | n | 32767 | +| test.c:892:22:892:22 | n | 32767 | +| test.c:893:9:893:9 | n | 32767 | +| test.c:896:7:896:7 | n | 32767 | +| test.c:897:5:897:5 | n | 32767 | +| test.c:897:10:897:10 | n | 32767 | +| test.c:897:14:897:14 | n | 0 | +| test.c:898:6:898:6 | n | 32767 | +| test.c:898:10:898:10 | n | 0 | +| test.c:898:14:898:14 | n | 32767 | +| test.c:909:7:909:8 | ss | 32767 | +| test.c:910:9:910:10 | ss | 3 | +| test.c:913:7:913:8 | ss | 32767 | +| test.c:914:9:914:10 | ss | 32767 | +| test.c:917:14:917:15 | us | 65535 | +| test.c:918:9:918:10 | us | 32767 | +| test.c:921:14:921:15 | us | 65535 | +| test.c:922:9:922:10 | us | 65535 | +| test.c:925:7:925:8 | ss | 32767 | +| test.c:926:9:926:10 | ss | 32767 | +| test.c:929:7:929:8 | ss | 32767 | +| test.c:930:9:930:10 | ss | 2 | +| test.c:936:8:936:8 | s | 2147483647 | +| test.c:936:15:936:15 | s | 127 | +| test.c:936:23:936:23 | s | 9 | +| test.c:937:18:937:18 | s | 9 | +| test.c:937:22:937:22 | s | 9 | +| test.c:938:9:938:14 | result | 127 | +| test.c:944:7:944:7 | i | 0 | +| test.c:945:9:945:9 | i | 2147483647 | +| test.c:949:7:949:7 | u | 0 | +| test.c:950:9:950:9 | u | 4294967295 | +| test.c:955:12:955:12 | s | 2147483647 | +| test.c:956:7:956:8 | s2 | 4 | +| test.c:961:7:961:7 | x | 2147483647 | +| test.c:962:9:962:9 | y | 2147483647 | +| test.c:966:7:966:7 | y | 2147483647 | +| test.c:975:7:975:7 | x | 2147483647 | +| test.c:980:7:980:7 | x | 15 | +| test.c:987:8:987:8 | x | 2147483647 | +| test.c:987:12:987:12 | y | 256 | +| test.c:988:9:988:9 | x | 2147483647 | +| test.c:989:9:989:9 | y | 256 | +| test.c:1002:7:1002:7 | e | 2147483647 | | test.cpp:10:7:10:7 | b | 2147483647 | | test.cpp:11:5:11:5 | x | 2147483647 | | test.cpp:13:10:13:10 | x | 2147483647 | @@ -1093,3 +1128,64 @@ | test.cpp:122:4:122:4 | n | 32767 | | test.cpp:122:8:122:8 | n | 0 | | test.cpp:122:12:122:12 | n | 32767 | +| test_nr_of_bounds.cpp:40:5:40:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:40:5:40:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:41:5:41:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:41:5:41:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:42:5:42:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:42:5:42:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:43:5:43:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:43:5:43:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:44:5:44:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:44:5:44:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:45:5:45:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:45:5:45:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:46:5:46:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:46:5:46:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:47:5:47:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:47:5:47:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:48:5:48:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:48:5:48:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:49:5:49:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:49:5:49:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:50:5:50:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:50:5:50:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:51:5:51:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:51:5:51:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:52:5:52:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:52:5:52:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:53:5:53:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:53:5:53:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:54:5:54:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:54:5:54:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:55:5:55:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:55:5:55:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:56:5:56:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:56:5:56:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:57:5:57:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:57:5:57:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:58:5:58:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:58:5:58:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:59:5:59:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:59:5:59:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:60:5:60:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:60:5:60:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:61:5:61:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:61:5:61:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:62:5:62:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:62:5:62:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:63:5:63:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:63:5:63:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:64:5:64:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:64:5:64:20 | x | 4294967295 | +| test_nr_of_bounds.cpp:65:5:65:21 | x | 4294967295 | +| test_nr_of_bounds.cpp:65:5:65:21 | x | 4294967295 | +| test_nr_of_bounds.cpp:66:5:66:21 | x | 4294967295 | +| test_nr_of_bounds.cpp:66:5:66:21 | x | 4294967295 | +| test_nr_of_bounds.cpp:67:5:67:21 | x | 4294967295 | +| test_nr_of_bounds.cpp:67:5:67:21 | x | 4294967295 | +| test_nr_of_bounds.cpp:68:5:68:21 | x | 4294967295 | +| test_nr_of_bounds.cpp:68:5:68:21 | x | 4294967295 | +| test_nr_of_bounds.cpp:69:5:69:21 | x | 4294967295 | +| test_nr_of_bounds.cpp:69:5:69:21 | x | 4294967295 | +| test_nr_of_bounds.cpp:72:12:72:12 | x | 4294967295 | diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.expected b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.expected index a9c1bc66c50f..773cb92b0b13 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.expected +++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.expected @@ -1,15 +1,143 @@ -| test.cpp:314:5:314:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:309:13:309:14 | st | st | -| test.cpp:327:5:327:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:322:13:322:14 | st | st | -| test.cpp:338:6:338:10 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:333:62:333:63 | st | st | -| test.cpp:484:5:484:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:480:13:480:14 | st | st | -| test.cpp:497:5:497:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:492:13:492:14 | st | st | -| test.cpp:509:5:509:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:505:13:505:14 | st | st | -| test.cpp:606:11:606:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:602:12:602:19 | timeinfo | timeinfo | -| test.cpp:634:11:634:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:628:12:628:19 | timeinfo | timeinfo | -| test.cpp:636:11:636:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:628:12:628:19 | timeinfo | timeinfo | -| test.cpp:640:5:640:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:629:13:629:14 | st | st | -| test.cpp:642:5:642:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:629:13:629:14 | st | st | -| test.cpp:718:5:718:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:712:13:712:14 | st | st | -| test.cpp:731:5:731:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:725:13:725:14 | st | st | -| test.cpp:732:5:732:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:725:13:725:14 | st | st | -| test.cpp:733:5:733:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:725:13:725:14 | st | st | +#select +| test.cpp:422:2:422:14 | ... += ... | test.cpp:422:2:422:14 | ... += ... | test.cpp:422:2:422:14 | ... += ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:440:2:440:11 | ... ++ | test.cpp:440:2:440:11 | ... ++ | test.cpp:440:2:440:11 | ... ++ | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:456:2:456:12 | ... ++ | test.cpp:456:2:456:12 | ... ++ | test.cpp:456:2:456:12 | ... ++ | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:681:2:681:23 | ... += ... | test.cpp:681:2:681:23 | ... += ... | test.cpp:681:2:681:23 | ... += ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:813:2:813:40 | ... = ... | test.cpp:813:21:813:40 | ... + ... | test.cpp:813:2:813:40 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:818:2:818:24 | ... = ... | test.cpp:818:13:818:24 | ... + ... | test.cpp:818:2:818:24 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:951:3:951:25 | ... = ... | test.cpp:951:14:951:25 | ... + ... | test.cpp:951:3:951:25 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:969:3:969:12 | ... ++ | test.cpp:969:3:969:12 | ... ++ | test.cpp:969:3:969:12 | ... ++ | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1031:2:1031:11 | ... ++ | test.cpp:1031:2:1031:11 | ... ++ | test.cpp:1031:2:1031:11 | ... ++ | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1051:16:1051:23 | increment_arg output argument | test.cpp:1039:2:1039:4 | ... ++ | test.cpp:1051:16:1051:23 | increment_arg output argument | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1055:27:1055:35 | increment_arg_by_pointer output argument | test.cpp:1043:2:1043:7 | ... ++ | test.cpp:1055:27:1055:35 | increment_arg_by_pointer output argument | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1109:2:1109:26 | ... = ... | test.cpp:1109:14:1109:26 | ... - ... | test.cpp:1109:2:1109:26 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1160:2:1160:19 | ... = ... | test.cpp:1158:2:1158:15 | ... += ... | test.cpp:1160:2:1160:19 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1199:2:1199:28 | ... = ... | test.cpp:1199:16:1199:28 | ... + ... | test.cpp:1199:2:1199:28 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1214:2:1214:28 | ... = ... | test.cpp:1214:16:1214:28 | ... + ... | test.cpp:1214:2:1214:28 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1228:2:1228:28 | ... = ... | test.cpp:1228:16:1228:28 | ... + ... | test.cpp:1228:2:1228:28 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1242:2:1242:26 | ... = ... | test.cpp:1242:14:1242:26 | ... + ... | test.cpp:1242:2:1242:26 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1256:2:1256:26 | ... = ... | test.cpp:1256:14:1256:26 | ... + ... | test.cpp:1256:2:1256:26 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1262:2:1262:28 | ... = ... | test.cpp:1262:16:1262:28 | ... + ... | test.cpp:1262:2:1262:28 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1274:2:1274:28 | ... = ... | test.cpp:1274:16:1274:28 | ... + ... | test.cpp:1274:2:1274:28 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1287:2:1287:26 | ... = ... | test.cpp:1287:14:1287:26 | ... + ... | test.cpp:1287:2:1287:26 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1299:2:1299:26 | ... = ... | test.cpp:1299:14:1299:26 | ... + ... | test.cpp:1299:2:1299:26 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1341:2:1341:17 | ... = ... | test.cpp:1432:12:1432:17 | ... + ... | test.cpp:1341:2:1341:17 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1341:2:1341:17 | ... = ... | test.cpp:1446:9:1446:16 | ... + ... | test.cpp:1341:2:1341:17 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1341:2:1341:17 | ... = ... | test.cpp:1458:9:1458:16 | ... + ... | test.cpp:1341:2:1341:17 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1515:2:1515:15 | ... = ... | test.cpp:1512:2:1512:10 | ... += ... | test.cpp:1515:2:1515:15 | ... = ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1545:2:1545:22 | ... += ... | test.cpp:1545:2:1545:22 | ... += ... | test.cpp:1545:2:1545:22 | ... += ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1553:2:1553:22 | ... += ... | test.cpp:1553:2:1553:22 | ... += ... | test.cpp:1553:2:1553:22 | ... += ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1632:2:1632:22 | ... += ... | test.cpp:1632:2:1632:22 | ... += ... | test.cpp:1632:2:1632:22 | ... += ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1644:2:1644:22 | ... += ... | test.cpp:1644:2:1644:22 | ... += ... | test.cpp:1644:2:1644:22 | ... += ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1677:2:1677:22 | ... += ... | test.cpp:1677:2:1677:22 | ... += ... | test.cpp:1677:2:1677:22 | ... += ... | Year field has been modified, but no appropriate check for LeapYear was found. | +| test.cpp:1753:2:1753:22 | ... += ... | test.cpp:1753:2:1753:22 | ... += ... | test.cpp:1753:2:1753:22 | ... += ... | Year field has been modified, but no appropriate check for LeapYear was found. | +edges +| test.cpp:813:21:813:40 | ... + ... | test.cpp:813:2:813:40 | ... = ... | provenance | | +| test.cpp:818:13:818:24 | ... + ... | test.cpp:818:2:818:24 | ... = ... | provenance | | +| test.cpp:951:14:951:25 | ... + ... | test.cpp:951:3:951:25 | ... = ... | provenance | | +| test.cpp:1038:26:1038:26 | *x | test.cpp:1051:16:1051:23 | increment_arg output argument | provenance | | +| test.cpp:1039:2:1039:4 | ... ++ | test.cpp:1038:26:1038:26 | *x | provenance | | +| test.cpp:1042:37:1042:37 | *x | test.cpp:1055:27:1055:35 | increment_arg_by_pointer output argument | provenance | | +| test.cpp:1043:2:1043:7 | ... ++ | test.cpp:1042:37:1042:37 | *x | provenance | | +| test.cpp:1109:14:1109:26 | ... - ... | test.cpp:1109:2:1109:26 | ... = ... | provenance | | +| test.cpp:1158:2:1158:15 | ... += ... | test.cpp:1160:2:1160:19 | ... = ... | provenance | | +| test.cpp:1199:16:1199:28 | ... + ... | test.cpp:1199:2:1199:28 | ... = ... | provenance | | +| test.cpp:1214:16:1214:28 | ... + ... | test.cpp:1214:2:1214:28 | ... = ... | provenance | | +| test.cpp:1228:16:1228:28 | ... + ... | test.cpp:1228:2:1228:28 | ... = ... | provenance | | +| test.cpp:1242:14:1242:26 | ... + ... | test.cpp:1242:2:1242:26 | ... = ... | provenance | | +| test.cpp:1256:14:1256:26 | ... + ... | test.cpp:1256:2:1256:26 | ... = ... | provenance | | +| test.cpp:1262:16:1262:28 | ... + ... | test.cpp:1262:2:1262:28 | ... = ... | provenance | | +| test.cpp:1274:16:1274:28 | ... + ... | test.cpp:1274:2:1274:28 | ... = ... | provenance | | +| test.cpp:1287:14:1287:26 | ... + ... | test.cpp:1287:2:1287:26 | ... = ... | provenance | | +| test.cpp:1299:14:1299:26 | ... + ... | test.cpp:1299:2:1299:26 | ... = ... | provenance | | +| test.cpp:1338:20:1338:23 | year | test.cpp:1341:2:1341:17 | ... = ... | provenance | | +| test.cpp:1351:15:1351:22 | ... + ... | test.cpp:1351:3:1351:22 | ... = ... | provenance | | +| test.cpp:1356:12:1356:17 | ... + ... | test.cpp:1338:20:1338:23 | year | provenance | | +| test.cpp:1365:15:1365:22 | ... + ... | test.cpp:1365:3:1365:22 | ... = ... | provenance | | +| test.cpp:1375:3:1375:20 | ... = ... | test.cpp:1377:12:1377:18 | yeartmp | provenance | | +| test.cpp:1375:13:1375:20 | ... + ... | test.cpp:1375:3:1375:20 | ... = ... | provenance | | +| test.cpp:1377:12:1377:18 | yeartmp | test.cpp:1338:20:1338:23 | year | provenance | | +| test.cpp:1420:15:1420:22 | ... + ... | test.cpp:1420:3:1420:22 | ... = ... | provenance | | +| test.cpp:1425:12:1425:17 | ... + ... | test.cpp:1338:20:1338:23 | year | provenance | | +| test.cpp:1432:12:1432:17 | ... + ... | test.cpp:1338:20:1338:23 | year | provenance | | +| test.cpp:1446:2:1446:16 | ... = ... | test.cpp:1450:3:1450:18 | ... = ... | provenance | | +| test.cpp:1446:2:1446:16 | ... = ... | test.cpp:1455:12:1455:15 | year | provenance | | +| test.cpp:1446:9:1446:16 | ... + ... | test.cpp:1446:2:1446:16 | ... = ... | provenance | | +| test.cpp:1455:12:1455:15 | year | test.cpp:1338:20:1338:23 | year | provenance | | +| test.cpp:1458:2:1458:16 | ... = ... | test.cpp:1464:12:1464:15 | year | provenance | | +| test.cpp:1458:9:1458:16 | ... + ... | test.cpp:1458:2:1458:16 | ... = ... | provenance | | +| test.cpp:1464:12:1464:15 | year | test.cpp:1338:20:1338:23 | year | provenance | | +| test.cpp:1512:2:1512:10 | ... += ... | test.cpp:1515:2:1515:15 | ... = ... | provenance | | +nodes +| test.cpp:422:2:422:14 | ... += ... | semmle.label | ... += ... | +| test.cpp:440:2:440:11 | ... ++ | semmle.label | ... ++ | +| test.cpp:456:2:456:12 | ... ++ | semmle.label | ... ++ | +| test.cpp:482:3:482:12 | ... ++ | semmle.label | ... ++ | +| test.cpp:681:2:681:23 | ... += ... | semmle.label | ... += ... | +| test.cpp:813:2:813:40 | ... = ... | semmle.label | ... = ... | +| test.cpp:813:21:813:40 | ... + ... | semmle.label | ... + ... | +| test.cpp:818:2:818:24 | ... = ... | semmle.label | ... = ... | +| test.cpp:818:13:818:24 | ... + ... | semmle.label | ... + ... | +| test.cpp:872:4:872:15 | ... ++ | semmle.label | ... ++ | +| test.cpp:951:3:951:25 | ... = ... | semmle.label | ... = ... | +| test.cpp:951:14:951:25 | ... + ... | semmle.label | ... + ... | +| test.cpp:969:3:969:12 | ... ++ | semmle.label | ... ++ | +| test.cpp:1031:2:1031:11 | ... ++ | semmle.label | ... ++ | +| test.cpp:1038:26:1038:26 | *x | semmle.label | *x | +| test.cpp:1039:2:1039:4 | ... ++ | semmle.label | ... ++ | +| test.cpp:1042:37:1042:37 | *x | semmle.label | *x | +| test.cpp:1043:2:1043:7 | ... ++ | semmle.label | ... ++ | +| test.cpp:1051:16:1051:23 | increment_arg output argument | semmle.label | increment_arg output argument | +| test.cpp:1055:27:1055:35 | increment_arg_by_pointer output argument | semmle.label | increment_arg_by_pointer output argument | +| test.cpp:1109:2:1109:26 | ... = ... | semmle.label | ... = ... | +| test.cpp:1109:14:1109:26 | ... - ... | semmle.label | ... - ... | +| test.cpp:1158:2:1158:15 | ... += ... | semmle.label | ... += ... | +| test.cpp:1160:2:1160:19 | ... = ... | semmle.label | ... = ... | +| test.cpp:1199:2:1199:28 | ... = ... | semmle.label | ... = ... | +| test.cpp:1199:16:1199:28 | ... + ... | semmle.label | ... + ... | +| test.cpp:1214:2:1214:28 | ... = ... | semmle.label | ... = ... | +| test.cpp:1214:16:1214:28 | ... + ... | semmle.label | ... + ... | +| test.cpp:1228:2:1228:28 | ... = ... | semmle.label | ... = ... | +| test.cpp:1228:16:1228:28 | ... + ... | semmle.label | ... + ... | +| test.cpp:1242:2:1242:26 | ... = ... | semmle.label | ... = ... | +| test.cpp:1242:14:1242:26 | ... + ... | semmle.label | ... + ... | +| test.cpp:1256:2:1256:26 | ... = ... | semmle.label | ... = ... | +| test.cpp:1256:14:1256:26 | ... + ... | semmle.label | ... + ... | +| test.cpp:1262:2:1262:28 | ... = ... | semmle.label | ... = ... | +| test.cpp:1262:16:1262:28 | ... + ... | semmle.label | ... + ... | +| test.cpp:1274:2:1274:28 | ... = ... | semmle.label | ... = ... | +| test.cpp:1274:16:1274:28 | ... + ... | semmle.label | ... + ... | +| test.cpp:1287:2:1287:26 | ... = ... | semmle.label | ... = ... | +| test.cpp:1287:14:1287:26 | ... + ... | semmle.label | ... + ... | +| test.cpp:1299:2:1299:26 | ... = ... | semmle.label | ... = ... | +| test.cpp:1299:14:1299:26 | ... + ... | semmle.label | ... + ... | +| test.cpp:1338:20:1338:23 | year | semmle.label | year | +| test.cpp:1341:2:1341:17 | ... = ... | semmle.label | ... = ... | +| test.cpp:1351:3:1351:22 | ... = ... | semmle.label | ... = ... | +| test.cpp:1351:15:1351:22 | ... + ... | semmle.label | ... + ... | +| test.cpp:1356:12:1356:17 | ... + ... | semmle.label | ... + ... | +| test.cpp:1365:3:1365:22 | ... = ... | semmle.label | ... = ... | +| test.cpp:1365:15:1365:22 | ... + ... | semmle.label | ... + ... | +| test.cpp:1375:3:1375:20 | ... = ... | semmle.label | ... = ... | +| test.cpp:1375:13:1375:20 | ... + ... | semmle.label | ... + ... | +| test.cpp:1377:12:1377:18 | yeartmp | semmle.label | yeartmp | +| test.cpp:1420:3:1420:22 | ... = ... | semmle.label | ... = ... | +| test.cpp:1420:15:1420:22 | ... + ... | semmle.label | ... + ... | +| test.cpp:1425:12:1425:17 | ... + ... | semmle.label | ... + ... | +| test.cpp:1432:12:1432:17 | ... + ... | semmle.label | ... + ... | +| test.cpp:1446:2:1446:16 | ... = ... | semmle.label | ... = ... | +| test.cpp:1446:9:1446:16 | ... + ... | semmle.label | ... + ... | +| test.cpp:1450:3:1450:18 | ... = ... | semmle.label | ... = ... | +| test.cpp:1455:12:1455:15 | year | semmle.label | year | +| test.cpp:1458:2:1458:16 | ... = ... | semmle.label | ... = ... | +| test.cpp:1458:9:1458:16 | ... + ... | semmle.label | ... + ... | +| test.cpp:1464:12:1464:15 | year | semmle.label | year | +| test.cpp:1512:2:1512:10 | ... += ... | semmle.label | ... += ... | +| test.cpp:1515:2:1515:15 | ... = ... | semmle.label | ... = ... | +| test.cpp:1545:2:1545:22 | ... += ... | semmle.label | ... += ... | +| test.cpp:1553:2:1553:22 | ... += ... | semmle.label | ... += ... | +| test.cpp:1632:2:1632:22 | ... += ... | semmle.label | ... += ... | +| test.cpp:1644:2:1644:22 | ... += ... | semmle.label | ... += ... | +| test.cpp:1677:2:1677:22 | ... += ... | semmle.label | ... += ... | +| test.cpp:1753:2:1753:22 | ... += ... | semmle.label | ... += ... | +subpaths diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.qlref b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.qlref index 22a30d72b689..12bb5eb1e69b 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.qlref +++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedLeapYearAfterYearModification.qlref @@ -1 +1,2 @@ -Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql +query: Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql +postprocess: utils/test/InlineExpectationsTestQuery.ql \ No newline at end of file diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedReturnValueForTimeFunctions.expected b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedReturnValueForTimeFunctions.expected index fb79592b7f2d..9c1d83861f0a 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedReturnValueForTimeFunctions.expected +++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/UncheckedReturnValueForTimeFunctions.expected @@ -1,5 +1,6 @@ -| test.cpp:317:2:317:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:309:13:309:14 | st | st | -| test.cpp:330:2:330:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:322:13:322:14 | st | st | -| test.cpp:341:2:341:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:333:62:333:63 | st | st | -| test.cpp:720:2:720:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:712:13:712:14 | st | st | -| test.cpp:735:2:735:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:725:13:725:14 | st | st | +| test.cpp:425:2:425:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:101:1:101:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:417:13:417:14 | st | st | +| test.cpp:443:2:443:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:101:1:101:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:435:13:435:14 | st | st | +| test.cpp:459:2:459:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:101:1:101:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:451:62:451:63 | st | st | +| test.cpp:953:3:953:22 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:101:1:101:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:944:14:944:15 | st | st | +| test.cpp:971:3:971:22 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:101:1:101:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:962:14:962:15 | st | st | +| test.cpp:1035:2:1035:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:101:1:101:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:1025:13:1025:14 | st | st | diff --git a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp index 3db9b61edd2b..a2dce39cc852 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification/test.cpp @@ -1,4 +1,4 @@ -typedef unsigned short WORD; +typedef unsigned short WORD; typedef unsigned long DWORD, HANDLE; typedef int BOOL, BOOLEAN, errno_t; typedef char CHAR; @@ -46,6 +46,8 @@ typedef struct _TIME_DYNAMIC_ZONE_INFORMATION { BOOLEAN DynamicDaylightTimeDisabled; } DYNAMIC_TIME_ZONE_INFORMATION, *PDYNAMIC_TIME_ZONE_INFORMATION; +typedef const wchar_t* LPCWSTR; + struct tm { int tm_sec; // seconds after the minute - [0, 60] including leap second @@ -59,6 +61,42 @@ struct tm int tm_isdst; // daylight savings time flag }; +struct timespec +{ + time_t tv_sec; + long tv_nsec; +}; + +/* Timestamps of log entries. */ +struct logtime { + struct tm tm; + long usec; +}; + +/* + * Data structure representing a broken-down timestamp. + * + * CAUTION: the IANA timezone library (src/timezone/) follows the POSIX + * convention that tm_mon counts from 0 and tm_year is relative to 1900. + * However, Postgres' datetime functions generally treat tm_mon as counting + * from 1 and tm_year as relative to 1 BC. Be sure to make the appropriate + * adjustments when moving from one code domain to the other. + */ +struct pg_tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; /* see above */ + int tm_year; /* see above */ + int tm_wday; + int tm_yday; + int tm_isdst; + long int tm_gmtoff; + const char *tm_zone; +}; + BOOL SystemTimeToFileTime( const SYSTEMTIME* lpSystemTime, @@ -99,9 +137,16 @@ TzSpecificLocalTimeToSystemTimeEx( LPSYSTEMTIME lpUniversalTime ); +int _wtoi( + const wchar_t *str +); + void GetSystemTime( LPSYSTEMTIME lpSystemTime ); +void GetLocalTime( + LPSYSTEMTIME lpSystemTime +); void GetSystemTimeAsFileTime( LPFILETIME lpSystemTimeAsFileTime @@ -149,6 +194,12 @@ GetFileTime( LPFILETIME lpLastWriteTime ); +struct tm *localtime_r( const time_t *timer, struct tm *buf ); + +/** + * Negative Case + * FileTimeToSystemTime is called and the return value is checked +*/ void Correct_FileTimeToSystemTime(const FILETIME* lpFileTime) { SYSTEMTIME systemTime; @@ -162,6 +213,10 @@ void Correct_FileTimeToSystemTime(const FILETIME* lpFileTime) /// Normal usage } +/** + * Positive (Out of Scope) Bug Case + * FileTimeToSystemTime is called but no check is conducted to verify the result of the operation +*/ void AntiPattern_FileTimeToSystemTime(const FILETIME* lpFileTime) { SYSTEMTIME systemTime; @@ -170,6 +225,10 @@ void AntiPattern_FileTimeToSystemTime(const FILETIME* lpFileTime) FileTimeToSystemTime(lpFileTime, &systemTime); } +/** + * Negative Case + * SystemTimeToTzSpecificLocalTime is called and the return value is verified +*/ void Correct_SystemTimeToTzSpecificLocalTime(const TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpUniversalTime) { SYSTEMTIME localTime; @@ -183,6 +242,10 @@ void Correct_SystemTimeToTzSpecificLocalTime(const TIME_ZONE_INFORMATION *lpTime /// Normal usage } +/** + * Positive (Out of Scope) Case + * AntiPattern_SystemTimeToTzSpecificLocalTime is called but the return value is not validated +*/ void AntiPattern_SystemTimeToTzSpecificLocalTime(const TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpUniversalTime) { SYSTEMTIME localTime; @@ -191,6 +254,10 @@ void AntiPattern_SystemTimeToTzSpecificLocalTime(const TIME_ZONE_INFORMATION *lp SystemTimeToTzSpecificLocalTime(lpTimeZoneInformation, lpUniversalTime, &localTime); } +/** + * Negative Case + * SystemTimeToTzSpecificLocalTimeEx is called and the return value is validated +*/ void Correct_SystemTimeToTzSpecificLocalTimeEx(const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpUniversalTime) { SYSTEMTIME localTime; @@ -204,6 +271,10 @@ void Correct_SystemTimeToTzSpecificLocalTimeEx(const DYNAMIC_TIME_ZONE_INFORMATI /// Normal usage } +/** + * Positive Case + * SystemTimeToTzSpecificLocalTimeEx is called but the return value is not validated +*/ void AntiPattern_SystemTimeToTzSpecificLocalTimeEx(const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpUniversalTime) { SYSTEMTIME localTime; @@ -212,6 +283,10 @@ void AntiPattern_SystemTimeToTzSpecificLocalTimeEx(const DYNAMIC_TIME_ZONE_INFOR SystemTimeToTzSpecificLocalTimeEx(lpTimeZoneInformation, lpUniversalTime, &localTime); } +/** + * Negative Case + * Correct use of TzSpecificLocalTimeToSystemTime, function is called and the return value is validated. +*/ void Correct_TzSpecificLocalTimeToSystemTime(const TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpLocalTime) { SYSTEMTIME universalTime; @@ -225,6 +300,10 @@ void Correct_TzSpecificLocalTimeToSystemTime(const TIME_ZONE_INFORMATION *lpTime /// Normal usage } +/** + * Positive (Out of Scope) Case + * TzSpecificLocalTimeToSystemTime is called however the return value is not validated +*/ void AntiPattern_TzSpecificLocalTimeToSystemTime(const TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpLocalTime) { SYSTEMTIME universalTime; @@ -233,6 +312,10 @@ void AntiPattern_TzSpecificLocalTimeToSystemTime(const TIME_ZONE_INFORMATION *lp TzSpecificLocalTimeToSystemTime(lpTimeZoneInformation, lpLocalTime, &universalTime); } +/** + * Negative Case + * TzSpecificLocalTimeToSystemTimeEx is called and the return value is correctly validated +*/ void Correct_TzSpecificLocalTimeToSystemTimeEx(const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpLocalTime) { SYSTEMTIME universalTime; @@ -246,6 +329,10 @@ void Correct_TzSpecificLocalTimeToSystemTimeEx(const DYNAMIC_TIME_ZONE_INFORMATI /// Normal usage } +/** + * Positive (Out of Scope) Case + * TzSpecificLocalTimeToSystemTimeEx is called however the return value is not validated +*/ void AntiPattern_TzSpecificLocalTimeToSystemTimeEx(const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpLocalTime) { SYSTEMTIME universalTime; @@ -258,6 +345,10 @@ void AntiPattern_TzSpecificLocalTimeToSystemTimeEx(const DYNAMIC_TIME_ZONE_INFOR SYSTEMTIME Cases *************************************************/ +/** + * Negative Case + * SystemTimeToFileTime is called and the return value is validated in a guard +*/ void Correct_filetime_conversion_check(SYSTEMTIME& st) { FILETIME ft; @@ -273,6 +364,10 @@ void Correct_filetime_conversion_check(SYSTEMTIME& st) ////////////////////////////////////////////// +/** + * Positive (Out of Scope) Case + * SystemTimeToFileTime is called but the return value is not validated in a guard +*/ void AntiPattern_unchecked_filetime_conversion(SYSTEMTIME& st) { FILETIME ft; @@ -281,6 +376,10 @@ void AntiPattern_unchecked_filetime_conversion(SYSTEMTIME& st) SystemTimeToFileTime(&st, &ft); } +/** + * Positive (Out of Scope) Case + * SystemTimeToFileTime is called but the return value is not validated in a guard +*/ void AntiPattern_unchecked_filetime_conversion2(SYSTEMTIME* st) { FILETIME ft; @@ -292,6 +391,10 @@ void AntiPattern_unchecked_filetime_conversion2(SYSTEMTIME* st) } } +/** + * Positive (Out of Scope) + * SYSTEMTIME.wDay is incremented by one (and no guard exists) +*/ void AntiPattern_unchecked_filetime_conversion2() { SYSTEMTIME st; @@ -304,6 +407,11 @@ void AntiPattern_unchecked_filetime_conversion2() SystemTimeToFileTime(&st, &ft); } +/** + * Positive Cases + * - Anti-pattern 1: [year +-n, month, day] + * - Generic (Out of Scope) - UncheckedReturnValueForTimeFunctions +*/ void AntiPattern_unchecked_filetime_conversion2a() { SYSTEMTIME st; @@ -311,12 +419,17 @@ void AntiPattern_unchecked_filetime_conversion2a() GetSystemTime(&st); // BUG - UncheckedLeapYearAfterYearModification - st.wYear += 2; + st.wYear += 2; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] // BUG - UncheckedReturnValueForTimeFunctions SystemTimeToFileTime(&st, &ft); } +/** + * Positive Cases + * - Anti-pattern 1: [year +-n, month, day] + * - Generic (Out of Scope) - UncheckedReturnValueForTimeFunctions +*/ void AntiPattern_unchecked_filetime_conversion2b() { SYSTEMTIME st; @@ -324,23 +437,33 @@ void AntiPattern_unchecked_filetime_conversion2b() GetSystemTime(&st); // BUG - UncheckedLeapYearAfterYearModification - st.wYear++; + st.wYear++; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] // BUG - UncheckedReturnValueForTimeFunctions SystemTimeToFileTime(&st, &ft); } +/** + * Positive Cases + * - Anti-pattern 1: [year +-n, month, day] + * - Generic (Out of Scope) - UncheckedReturnValueForTimeFunctions +*/ void AntiPattern_unchecked_filetime_conversion2b(SYSTEMTIME* st) { FILETIME ft; // BUG - UncheckedLeapYearAfterYearModification - st->wYear++; + st->wYear++; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] // BUG - UncheckedReturnValueForTimeFunctions SystemTimeToFileTime(st, &ft); } +/** + * Positive Cases + * - Anti-pattern 3: datetime.AddDays(+-28) + * - Generic (Out of Scope) - UncheckedReturnValueForTimeFunctions +*/ void AntiPattern_unchecked_filetime_conversion3() { SYSTEMTIME st; @@ -349,11 +472,12 @@ void AntiPattern_unchecked_filetime_conversion3() if (st.wMonth < 12) { + // Anti-pattern 3: datetime.AddDays(+-28) st.wMonth++; } else { - // Check for leap year, but... + // No check for leap year is required here, as the month is statically set to January. st.wMonth = 1; st.wYear++; } @@ -363,6 +487,11 @@ void AntiPattern_unchecked_filetime_conversion3() } ////////////////////////////////////////////// + +/** + * Negative Case - Anti-pattern 1: [year +-n, month, day] + * Year is incremented and if we are on Feb the 29th, set to the 28th if the new year is a common year. +*/ void CorrectPattern_check1() { SYSTEMTIME st; @@ -370,7 +499,7 @@ void CorrectPattern_check1() st.wYear++; - // Guard + // Guard against February the 29th if (st.wMonth == 2 && st.wDay == 29) { // move back a day when landing on Feb 29 in an non-leap year @@ -385,6 +514,10 @@ void CorrectPattern_check1() AntiPattern_unchecked_filetime_conversion(st); } +/** + * Negative Case - Anti-pattern 1: [year +-n, month, day] + * Years is incremented by some integer and then the leap year case is correctly guarded and handled. +*/ void CorrectPattern_check2(int yearsToAdd) { SYSTEMTIME st; @@ -400,11 +533,18 @@ void CorrectPattern_check2(int yearsToAdd) AntiPattern_unchecked_filetime_conversion(st); } +/** + * Could give rise to AntiPattern 7: IsLeapYear (Conditional Logic) +*/ bool isLeapYear(SYSTEMTIME& st) { return st.wYear % 4 == 0 && (st.wYear % 100 != 0 || st.wYear % 400 == 0); } +/** + * Negative Case - Anti-pattern 1: [year +-n, month, day] + * Years is incremented by some integer and then the leap year case is correctly guarded and handled. +*/ void CorrectPattern_check3() { SYSTEMTIME st; @@ -413,6 +553,9 @@ void CorrectPattern_check3() st.wYear++; // Guard + /** Negative Case - Anti-pattern 7: IsLeapYear + * Body of conditional statement is safe recommended code + */ if (st.wMonth == 2 && st.wDay == 29 && isLeapYear(st)) { // move back a day when landing on Feb 29 in an non-leap year @@ -423,6 +566,9 @@ void CorrectPattern_check3() AntiPattern_unchecked_filetime_conversion(st); } +/** + * Could give rise to AntiPattern 7: IsLeapYear (Conditional Logic) +*/ bool isLeapYear2(int year) { return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); @@ -433,6 +579,10 @@ bool fixDate(int day, int month, int year) return (month == 2 && day == 29 && isLeapYear2(year)); } +/** + * Negative Case - Anti-pattern 1: [year +-n, month, day] + * Years is incremented by some integer and then the leap year case is correctly guarded and handled. +*/ void CorrectPattern_check4() { SYSTEMTIME st; @@ -442,18 +592,23 @@ void CorrectPattern_check4() st.wYear++; // Guard + /** Negative Case - Anti-pattern 7: IsLeapYear + * Body of conditional statement is safe recommended code + */ if (fixDate(st.wDay, st.wMonth, st.wYear)) { // move back a day when landing on Feb 29 in an non-leap year - st.wDay = 28; // GOOD [FALSE POSITIVE] + st.wDay = 28; // GOOD [FALSE POSITIVE] Anti-pattern 7 } // Safe to use AntiPattern_unchecked_filetime_conversion(st); } - - +/** + * Negative Case - Generic + * No manipulation is conducted on struct populated from GetSystemTime. +*/ void CorrectPattern_NotManipulated_DateFromAPI_0() { SYSTEMTIME st; @@ -464,6 +619,10 @@ void CorrectPattern_NotManipulated_DateFromAPI_0() SystemTimeToFileTime(&st, &ft); } +/** + * Negative Case - Generic + * No manipulation is conducted on struct populated from GetFileTime. +*/ void CorrectPattern_NotManipulated_DateFromAPI_1(HANDLE hWatchdog) { SYSTEMTIME st; @@ -475,43 +634,56 @@ void CorrectPattern_NotManipulated_DateFromAPI_1(HANDLE hWatchdog) ///////////////////////////////////////////////////////////////// +/** + * Negative Case - Anti-pattern 1: [year +-n, month, day] + * Year is incremented by some integer and checked through a conversion through an inter procedural function check +*/ void AntiPattern_1_year_addition() { SYSTEMTIME st; GetSystemTime(&st); - // BUG - UncheckedLeapYearAfterYearModification + // Safe, checked interprocedurally through Correct_filetime_conversion_check st.wYear++; // Usage of potentially invalid date Correct_filetime_conversion_check(st); } + + +/** + * Negative Case - Anti-pattern 1: [year +-n, month, day] + * Years is incremented by some integer and checked through a conversion through an inter procedural function check +*/ void AntiPattern_simple_addition(int yearAddition) { SYSTEMTIME st; GetSystemTime(&st); - // BUG - UncheckedLeapYearAfterYearModification st.wYear += yearAddition; // Usage of potentially invalid date Correct_filetime_conversion_check(st); } +/** + * Positive Case - Anti-pattern 1: [year +-n, month, day] + * Years is incremented by some integer but a leap year is not handled *correctly*. +*/ void AntiPattern_IncorrectGuard(int yearsToAdd) { SYSTEMTIME st; GetSystemTime(&st); // BUG - UncheckedLeapYearAfterYearModification - st.wYear += yearsToAdd; + st.wYear += yearsToAdd; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] // Incorrect Guard if (st.wMonth == 2 && st.wDay == 29) { - // Part of a different anti-pattern. + // Part of a different anti-pattern (AntiPattern 5). // Make sure the guard includes the proper check bool isLeapYear = st.wYear % 4 == 0; if (!isLeapYear) @@ -519,9 +691,6 @@ void AntiPattern_IncorrectGuard(int yearsToAdd) st.wDay = 28; } } - - // Potentially Unsafe to use - Correct_filetime_conversion_check(st); } /************************************************* @@ -539,6 +708,10 @@ void CorrectUsageOf_mkgmtime(struct tm& timeinfo) /// _mkgmtime succeeded } +/** + * Positive Case - General (Out of Scope) + * Must Check for return value of _mkgmtime +*/ void AntiPattern_uncheckedUsageOf_mkgmtime(struct tm& timeinfo) { // (out-of-scope) GeneralBug: Must check return value for _mkgmtime @@ -550,6 +723,10 @@ void AntiPattern_uncheckedUsageOf_mkgmtime(struct tm& timeinfo) ////////////////////////////////////////////////////////// +/** + * Negative Case - Anti-pattern 1: [year +-n, month, day] + * Years is incremented by some integer and leap year is not handled correctly. +*/ void Correct_year_addition_struct_tm() { time_t rawtime; @@ -567,7 +744,7 @@ void Correct_year_addition_struct_tm() timeinfo.tm_year++; // Guard - // move back a day when landing on Feb 29 in an non-leap year + // move back a day when landing on Feb 29 in an non-leap year bool isLeapYear = timeinfo.tm_year % 4 == 0 && (timeinfo.tm_year % 100 != 0 || (timeinfo.tm_year + 1900) % 400 == 0); timeinfo.tm_mday = timeinfo.tm_mon == 1 && timeinfo.tm_mday == 29 && !isLeapYear ? 28 : timeinfo.tm_mday; @@ -575,7 +752,11 @@ void Correct_year_addition_struct_tm() AntiPattern_uncheckedUsageOf_mkgmtime(timeinfo); } -void Correct_LinuxPattern() +/** + * Positive Case - Anti-pattern 1: [year +-n, month, day] + * Years is incremented by some integer and leap year is not handled correctly. +*/ +void Incorrect_LinuxPattern() { time_t rawtime; struct tm timeinfo; @@ -584,6 +765,7 @@ void Correct_LinuxPattern() errno_t err = gmtime_s(&timeinfo, &rawtime); /* from 1900 -> from 1980 */ + // BUG - UncheckedLeapYearAfterYearModification timeinfo.tm_year -= 80; /* 0~11 -> 1~12 */ timeinfo.tm_mon++; @@ -596,34 +778,30 @@ void Correct_LinuxPattern() ////////////////////////////////////////// +/** + * Negative Case - Anti-pattern 1: [year +-n, month, day] + * Years is incremented by some integer and leap year is assumed checked through + * check of a conversion functions return value. +*/ void AntiPattern_year_addition_struct_tm() { time_t rawtime; struct tm timeinfo; time(&rawtime); gmtime_s(&timeinfo, &rawtime); - // BUG - UncheckedLeapYearAfterYearModification timeinfo.tm_year++; - // Usage of potentially invalid date + // mkgmtime result checked in nested call here, assume leap year conversion is potentially handled CorrectUsageOf_mkgmtime(timeinfo); } ///////////////////////////////////////////////////////// -void FalsePositiveTests(int x) -{ - struct tm timeinfo; - SYSTEMTIME st; - - timeinfo.tm_year = x; - timeinfo.tm_year = 1970; - - st.wYear = x; - st.wYear = 1900 + x; -} -void FalseNegativeTests(int x) +/** + * Positive Case - Anti-pattern 1: [year +-n, month, day] +*/ +void test(int x) { struct tm timeinfo; SYSTEMTIME st; @@ -631,106 +809,952 @@ void FalseNegativeTests(int x) timeinfo.tm_year = x; // BUG - UncheckedLeapYearAfterYearModification - timeinfo.tm_year = x + timeinfo.tm_year; - // BUG - UncheckedLeapYearAfterYearModification - timeinfo.tm_year = 1970 + timeinfo.tm_year; + // Positive Case - Anti-pattern 1: [year +-n, month, day] + timeinfo.tm_year = x + timeinfo.tm_year; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] st.wYear = x; // BUG - UncheckedLeapYearAfterYearModification - st.wYear = x + st.wYear; - // BUG - UncheckedLeapYearAfterYearModification - st.wYear = (1986 + st.wYear) - 1; + // Positive Case - Anti-pattern 1: [year +-n, month, day] + st.wYear = x + st.wYear; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] } -// False positive -inline void -IncrementMonth(LPSYSTEMTIME pst) +/** + * Positive AntiPattern 1 NOTE: historically considered positive but mktime checks year validity, needs re-assessment + * Year field is modified but via an intermediary variable. +*/ +void tp_intermediaryVar(struct timespec now, struct logtime ×tamp_remote) { - if (pst->wMonth < 12) + struct tm tm_parsed; + + struct tm tm_now; + time_t t_now; + int year; + + /* + * As the timestamp does not contain the year + * number, daylight saving time information, nor + * a time zone, attempt to infer it. Due to + * clock skews, the timestamp may even be part + * of the next year. Use the last year for which + * the timestamp is at most one week in the + * future. + * + * This loop can only run for at most three + * iterations before terminating. + */ + t_now = now.tv_sec; + localtime_r(&t_now, &tm_now); + + timestamp_remote.tm = tm_parsed; + timestamp_remote.tm.tm_isdst = -1; + timestamp_remote.usec = now.tv_nsec * 0.001; + for (year = tm_now.tm_year + 1;; --year) { - pst->wMonth++; + // assert(year >= tm_now.tm_year - 1); + timestamp_remote.tm.tm_year = year; + if (mktime(×tamp_remote.tm) < t_now + 7 * 24 * 60 * 60) + break; } - else +} + + + // False positive + inline void + IncrementMonth(LPSYSTEMTIME pst) { - pst->wMonth = 1; - pst->wYear++; + if (pst->wMonth < 12) + { + pst->wMonth++; + } + else + { + pst->wMonth = 1; + pst->wYear++; + } } -} -///////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////// -void mkDateTest(int year) -{ - struct tm t; + void mkDateTest(int year) + { + struct tm t; + + t.tm_sec = 0; + t.tm_min = 0; + t.tm_hour = 0; + t.tm_mday = 1; // day of the month - [1, 31] + t.tm_mon = 0; // months since January - [0, 11] + if (year >= 1900) + { + // 4-digit year + t.tm_year = year - 1900; // GOOD + } + else if ((year >= 0) && (year < 100)) + { + // 2-digit year assumed in the range 2000 - 2099 + t.tm_year = year + 100; // GOOD [FALSE POSITIVE] + } + else + { + // fail + } + // ... + } + + /** + * Negative Case - Anti-pattern 1a: [a.year, b.month, b.day] + * False positive: No modification of SYSTEMTIME struct. + */ + void unmodified1() + { + SYSTEMTIME st; + FILETIME ft; + WORD w; - t.tm_sec = 0; - t.tm_min = 0; - t.tm_hour = 0; - t.tm_mday = 1; // day of the month - [1, 31] - t.tm_mon = 0; // months since January - [0, 11] - if (year >= 1900) + GetSystemTime(&st); + + w = st.wYear; + + SystemTimeToFileTime(&st, &ft); // GOOD - no modification + } + + /** + * Negative Case - Anti-pattern 1a: [a.year, b.month, b.day] + * False positive: No modification of SYSTEMTIME struct. + */ + void unmodified2() { - // 4-digit year - t.tm_year = year - 1900; // GOOD - } else if ((year >= 0) && (year < 100)) { - // 2-digit year assumed in the range 2000 - 2099 - t.tm_year = year + 100; // GOOD [FALSE POSITIVE] - } else { - // fail + SYSTEMTIME st; + FILETIME ft; + WORD *w_ptr; + + GetSystemTime(&st); + + w_ptr = &(st.wYear); + + SystemTimeToFileTime(&st, &ft); // GOOD - no modification } - // ... -} -void unmodified1() + /** + * Positive Case - Anti-pattern 1: [year +-n, month, day] + * Modification of SYSTEMTIME struct adding to year but no leap year guard is conducted. + */ + void modified3() + { + SYSTEMTIME st; + FILETIME ft; + WORD *w_ptr; + + GetSystemTime(&st); + + // BUG - UncheckedLeapYearAfterYearModification + st.wYear = st.wYear + 1; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + + SystemTimeToFileTime(&st, &ft); + } + + /** + * Positive Case - Anti-pattern 1: [year +-n, month, day] + * Modification of SYSTEMTIME struct adding to year but no leap year guard is conducted. + */ + void modified4() + { + SYSTEMTIME st; + FILETIME ft; + WORD *w_ptr; + + GetSystemTime(&st); + + // BUG - UncheckedLeapYearAfterYearModification + st.wYear++; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + + SystemTimeToFileTime(&st, &ft); + } + + /** + * Negative Case - Anti-pattern 1: [year +-n, month, day] + * Modification of SYSTEMTIME struct adding to year but value passed to a + * conversion function that can be checked for success, and the result is checked. + */ + void modified5() + { + SYSTEMTIME st; + FILETIME ft; + WORD *w_ptr; + + GetSystemTime(&st); + + st.wYear++; + + // Presumed safe usage, as if the conversion is incorrect, a user can handle the error. + // NOTE: it doesn't mean the user actually does the correct conversion and it it also + // doesn't mean it will error our in all cases that may be invalid. + // For example, if a leap year and the date is 28, we may want 29 if the time is meant + // to capture the end of the month, but 28 is still valid and will not error out. + if (SystemTimeToFileTime(&st, &ft)) + { + ///... + } + } + +/** +* Negative Case - Anti-pattern 1: [year +-n, month, day] +* Modification of SYSTEMTIME struct by copying from another struct, but no arithmetic is performed. +*/ +bool +FMAPITimeToSysTimeW(LPCWSTR wszTime, SYSTEMTIME *psystime) { + // if (!wszTime || SafeIsBadReadPtr(wszTime, 1) || lstrlenW(wszTime) != cchMAPITime) + // return false; + // AssertTag(!SafeIsBadWritePtr(psystime, sizeof(SYSTEMTIME)), 0x0004289a /* tag_abc80 */); + // memset(psystime, 0, sizeof(SYSTEMTIME)); + + psystime->wYear = (WORD)_wtoi(wszTime); + psystime->wMonth = (WORD)_wtoi(wszTime+5); + psystime->wDay = (WORD)_wtoi(wszTime+8); + psystime->wHour = (WORD)_wtoi(wszTime+11); + psystime->wMinute = (WORD)_wtoi(wszTime+14); + return true; +} + +/** +* Negative Case - Anti-pattern 1: [year +-n, month, day] +* Modification of SYSTEMTIME struct by copying from another struct, but no arithmetic is performed. +*/ +void fp_daymonth_guard(){ SYSTEMTIME st; FILETIME ft; - WORD w; + GetSystemTime(&st); + // FALSE POSITIVE: year is incremented but month is checked and day corrected + // in a ternary operation. It may be possible to fix this with a more sophisticated + // data flow analysis. + st.wYear++; // $ SPURIOUS: Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + + st.wDay = st.wMonth == 2 && st.wDay == 29 ? 28 : st.wDay; + SystemTimeToFileTime(&st, &ft); +} + +void increment_arg(WORD &x){ + x++; // $ Source +} + +void increment_arg_by_pointer(WORD *x){ + (*x)++; // $ Source +} + + +void fn_year_set_through_out_arg(){ + SYSTEMTIME st; GetSystemTime(&st); + // BAD, year incremented without check + increment_arg(st.wYear); // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + + // GetSystemTime(&st); + // Bad, year incremented without check + increment_arg_by_pointer(&st.wYear); // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] +} - w = st.wYear; - SystemTimeToFileTime(&st, &ft); // GOOD - no modification +/* TODO: don't alert on simple copies from another struct where all three {year,month,day} are copied +void +GetEpochTime(struct pg_tm *tm) +{ + struct pg_tm *t0; + pg_time_t epoch = 0; + + t0 = pg_gmtime(&epoch); + + tm->tm_year = t0->tm_year; + tm->tm_mon = t0->tm_mon; + tm->tm_mday = t0->tm_mday; + tm->tm_hour = t0->tm_hour; + tm->tm_min = t0->tm_min; + tm->tm_sec = t0->tm_sec; + + tm->tm_year += 1900; + tm->tm_mon++; +} */ + +void +fp_guarded_by_month(struct pg_tm *tm){ + int woy = 52; + int MONTHS_PER_YEAR = 12; + /* + * If it is week 52/53 and the month is January, then the + * week must belong to the previous year. Also, some + * December dates belong to the next year. + */ + if (woy >= 52 && tm->tm_mon == 1) + --tm->tm_year; // Negative Test Case + if (woy <= 1 && tm->tm_mon == MONTHS_PER_YEAR) + ++tm->tm_year; // Negative Test Case +} + +typedef unsigned short CSHORT; + +typedef struct _TIME_FIELDS { + CSHORT Year; + CSHORT Month; + CSHORT Day; + CSHORT Hour; + CSHORT Minute; + CSHORT Second; + CSHORT Milliseconds; + CSHORT Weekday; +} TIME_FIELDS, *PTIME_FIELDS; + +void +tp_ptime(PTIME_FIELDS ptm){ + ptm->Year = ptm->Year - 1; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] } -void unmodified2() + +bool isLeapYearRaw(WORD year) { - SYSTEMTIME st; - FILETIME ft; - WORD *w_ptr; + return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); +} - GetSystemTime(&st); +void leap_year_checked_raw_false_positive1(WORD year, WORD offset, WORD day){ + struct tm tmp; - w_ptr = &(st.wYear); + year += offset; - SystemTimeToFileTime(&st, &ft); // GOOD - no modification + if (isLeapYearRaw(year)){ + // in this simplified example, assume the logic of this function + // can assume a day is 28 by default + // this check is more to establish the leap year guard is present + day += 1; + } + + // Assume the check handled leap year correctly + tmp.tm_year = year; // GOOD + tmp.tm_mday = day; } -void modified3() + +void leap_year_checked_raw_false_positive2(WORD year, WORD offset, WORD day){ + struct tm tmp; + + year += offset; + + tmp.tm_year = year; // GOOD, check performed immediately after on raw year + + // Adding some additional checks to resemble cases observed in the wild + if ( day > 0) + { + if (isLeapYearRaw(year)){ + // Assume logic that would adjust the day correctly + } + } + else{ + if (isLeapYearRaw(year)){ + // Assume logic that would adjust the day correctly + } + } + + tmp.tm_mday = day; + + year += offset; // $ Source + + tmp.tm_year = year; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + +} + + +bool isNotLeapYear(struct tm tm) { - SYSTEMTIME st; + return !(tm.tm_year % 4 == 0 && (tm.tm_year % 100 != 0 || tm.tm_year % 400 == 0)); +} + +bool isNotLeapYear2(struct tm tm) +{ + return (tm.tm_year % 4 != 0 || (tm.tm_year % 100 == 0 && tm.tm_year % 400 != 0)); +} + + +void inverted_leap_year_check(WORD year, WORD offset, WORD day){ + struct tm tmp; + + tmp.tm_year = year + offset; + + if (isNotLeapYear(tmp)){ + day = 28; + } + + tmp.tm_year = year + offset; + + if(isNotLeapYear2(tmp)){ + day = 28; + } + + + tmp.tm_year = year + offset; + bool isNotLeapYear = (tmp.tm_year % 4 != 0 || (tmp.tm_year % 100 == 0 && tmp.tm_year % 400 != 0)); + + if(isNotLeapYear){ + day = 28; + } + + tmp.tm_year = year + offset; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] +} + + +void simplified_leap_year_check1(WORD year, WORD offset){ + struct tm tmp; + + tmp.tm_year = year + offset; // OK + + bool isLeap = (!((tmp.tm_year + 1900) % 4)) && ((tmp.tm_year + 1900) % 100 || !((tmp.tm_year + 1900) % 400)); + if(isLeap){ + // do something + } + + // Modified after check, could be dangerous + tmp.tm_year = year + offset; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] +} + +void simplified_leap_year_check2(WORD year, WORD offset){ + struct tm tmp; + + tmp.tm_year = year + offset; // OK + + bool isNotLeap = ((tmp.tm_year + 1900) % 4) || (!((tmp.tm_year + 1900) % 100) && ((tmp.tm_year + 1900) % 400)); + if(isNotLeap){ + // do something + } + + // Modified after check, could be dangerous + tmp.tm_year = year + offset; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] +} + +void simplified_leap_year_check3(WORD year, WORD offset){ + SYSTEMTIME tmp; + + tmp.wYear = year + offset; // OK + + bool isLeap = (!(tmp.wYear % 4)) && (tmp.wYear % 100 || !(tmp.wYear% 400)); + if(isLeap){ + // do something + } + + // Modified after check, could be dangerous + tmp.wYear = year + offset; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] +} + +void simplified_leap_year_check4(WORD year, WORD offset){ + SYSTEMTIME tmp; + + tmp.wYear = year + offset; // OK + + bool isNotLeap = (tmp.wYear % 4) || (!(tmp.wYear % 100) && (tmp.wYear % 400)); + if(isNotLeap){ + // do something + } + + // Modified after check, could be dangerous + tmp.wYear = year + offset; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] +} + +void bad_simplified_leap_year_check1(WORD year, WORD offset){ + struct tm tmp; + + tmp.tm_year = year + offset; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + + // incorrect logic, should negate the %4 result + bool isLeap = ((tmp.tm_year + 1900) % 4) && ((tmp.tm_year + 1900) % 100 || !((tmp.tm_year + 1900) % 400)); + if(isLeap){ + // do something + } +} + +void bad_simplified_leap_year_check2(WORD year, WORD offset){ + struct tm tmp; + + tmp.tm_year = year + offset; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + + + // incorrect logic, should not negate the %4 result + bool isNotLeap = (!((tmp.tm_year + 1900) % 4)) || (!((tmp.tm_year + 1900) % 100) && ((tmp.tm_year + 1900) % 400)); + if(isNotLeap){ + // do something + } +} + +void bad_simplified_leap_year_check3(WORD year, WORD offset){ + SYSTEMTIME tmp; + + tmp.wYear = year + offset; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + + // incorrect logic, should negate the %4 result + bool isLeap = (tmp.wYear % 4) && (tmp.wYear % 100 || !(tmp.wYear % 400)); + if(isLeap){ + // do something + } +} + +void bad_simplified_leap_year_check4(WORD year, WORD offset){ + SYSTEMTIME tmp; + + tmp.wYear = year + offset; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + + + // incorrect logic, should not negate the %4 result + bool isNotLeap = (!(tmp.wYear % 4)) || (!(tmp.wYear % 100) && (tmp.wYear % 400)); + if(isNotLeap){ + // do something + } +} + + +void compound_leap_year_check(WORD year, WORD offset, WORD month, WORD day){ + struct tm tmp; + + tmp.tm_year = year + offset; + + bool isLeap = tmp.tm_year % 4 == 0 && (tmp.tm_year % 100 != 0 || tmp.tm_year % 400 == 0) && (month == 2 && day == 29); + + if(isLeap){ + // do something + } + tmp.tm_mday = day; + tmp.tm_mon = month; +} + +void indirect_time_conversion_check(WORD year, WORD offset){ + SYSTEMTIME tmp; + + tmp.wYear = year + offset; + FILETIME ft; - WORD *w_ptr; - GetSystemTime(&st); + // (out-of-scope) GeneralBug: Unchecked call to SystemTimeToFileTime. this may have failed, but we didn't check the return value! + BOOL res = SystemTimeToFileTime(&tmp, &ft); + + // Assume this check of the result is sufficient as an implicit leap year check. + bool x = (res == 0) ? true : false; +} - st.wYear = st.wYear + 1; // BAD +void set_time(WORD year, WORD month, WORD day){ + SYSTEMTIME tmp; - SystemTimeToFileTime(&st, &ft); + tmp.wYear = year; //$ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + tmp.wMonth = month; + tmp.wDay = day; +} + +void constant_month_on_year_modification1(WORD year, WORD offset, WORD month){ + SYSTEMTIME tmp; + + if(month++ > 12){ + tmp.wMonth = 1; + tmp.wYear = year + 1;// OK since the year is incremented with a known non-leap year month change + } + + if(month++ > 12){ + + set_time(year+1, 1, 31);// OK since the year is incremented with a known non-leap year month change + } +} + +void constant_month_on_year_modification2(WORD year, WORD offset, WORD month){ + SYSTEMTIME tmp; + + if(month++ > 12){ + tmp.wMonth = 1; + tmp.wYear = year + 1;// OK since the year is incremented with a known non-leap year month change + } + + + if(month++ > 12){ + // some heuristics to detect a false positive here rely on variable names + // which is often consistent in the wild. + // This variant uses the variable names yeartmp and monthtmp + WORD yeartmp; + WORD monthtmp; + yeartmp = year + 1; + monthtmp = 1; + set_time(yeartmp, monthtmp, 31);// OK since the year is incremented with a known non-leap year month change + } +} + +typedef struct parent_struct { + SYSTEMTIME t; +} PARENT_STRUCT; + + + +void nested_time_struct(WORD year, WORD offset){ + PARENT_STRUCT ps; + + ps.t.wYear = year + offset; // OK, checked below + + bool isLeap = isLeapYearRaw(ps.t.wYear); + + if(isLeap){ + // do something + } } -void modified4() +void intermediate_time_struct(WORD year, WORD offset){ + SYSTEMTIME tm, tm2; + FILETIME ftTime; + + tm.wYear = year + offset; + + tm2.wYear = tm.wYear; + + + while ( !SystemTimeToFileTime( &tm2, &ftTime ) ) + { + /// handle error + } + +} + +void constant_day_on_year_modification1(WORD year, WORD offset, WORD month){ + SYSTEMTIME tmp; + + if(month++ > 12){ + tmp.wDay = 1; + tmp.wYear = year + 1;// OK since the year is incremented with a known non-leap year day + } + + if(month++ > 12){ + + set_time(year+1, month, 1);// OK since the year is incremented with a known non-leap year day + } + + if(month++ > 12){ + + // BAD, year incremented, month unknown in block, and date is set to 31 + // which is dangerous. + set_time(year+1, month, 31);// $ Source + } +} + +void constant_day_on_year_modification2(WORD year, WORD month){ + SYSTEMTIME tmp; + + // FLASE POSITIVE SOURCE: + // flowing into set_time, the set time does pass a constant day + // but the source here and the source of that constant month don't align + // Current heuristics require the source of the constant day align with the + // source and/or the sink of the year modification. + // We could potentially improve this by checking the paths of both the year and day + // flows, but this may be more complex than is warranted for now. + year = year + 1; // $ SPURIOUS: Source + + if(month++ > 12){ + tmp.wDay = 1; + tmp.wYear = year;// OK since the year is incremented with a known non-leap year day + } + + if(month++ > 12){ + + set_time(year, month, 1);// OK since the year is incremented with a known non-leap year day + } + + year = year + 1; // $ Source + + if(month++ > 12){ + + // BAD, year incremented, month unknown in block, and date is set to 31 + // which is dangerous. + set_time(year, month, 31); + } +} + + +void modification_after_conversion1(tm timeinfo){ + // convert a tm year into a civil year, then modify after conversion + // This case shows a false negative where the year might be used and it is incorrectly modified, + // and never reassigned to another struct. + WORD year = timeinfo.tm_year + 1900; + + year += 1; // $ MISSING: Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] +} + +WORD get_civil_year(tm timeinfo){ + return timeinfo.tm_year + 1900; +} + +void modification_after_conversion2(tm timeinfo){ + // convert a tm year into a civil year, then modify after conversion + // This case shows a false negative where the year might be used and it is incorrectly modified, + // and never reassigned to another struct. + WORD year = get_civil_year(timeinfo); + year += 1; // $ MISSING: Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] +} + +void modification_after_conversion_saved_to_other_time_struct1(tm timeinfo){ + // convert a tm year into a civil year, then modify after conversion + // This case shows a false negative where the year might be used and it is incorrectly modified, + // and never reassigned to another struct. + WORD year = timeinfo.tm_year + 1900; + + year += 1; // $ MISSING: Source + + SYSTEMTIME s; + // FALSE NEGATIVE: missing this because the conversion happens locally before + // the year adjustment, which seems as though it is part of a conversion itself + s.wYear = year; // $ MISSING: Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] +} + + + +void modification_after_conversion_saved_to_other_time_struct2(tm timeinfo){ + // convert a tm year into a civil year, then modify after conversion + // This case shows a false negative where the year might be used and it is incorrectly modified, + // and never reassigned to another struct. + WORD year = get_civil_year(timeinfo); + + year += 1; // $ Source + + SYSTEMTIME s; + s.wYear = year; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] +} + +void modification_after_conversion_saved_to_other_time_struct3(tm timeinfo){ + // convert a tm year into a civil year, then modify after conversion + // This case shows a false negative where the year might be used and it is incorrectly modified, + // and never reassigned to another struct. + WORD year = timeinfo.tm_year + 1900; + + year = year + 1; // $ MISSING: Source + + SYSTEMTIME s; + // FALSE NEGATIVE: missing this because the conversion happens locally before + // the year adjustment, which seems as though it is part of a conversion itself + s.wYear = year; // $ MISSING: Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] +} + + +void year_saved_to_variable_then_modified1(tm timeinfo){ + // A modified year is not directly assigned to the year, rather, the year is + // saved to a variable, modified, used, but never assigned back. + WORD year = timeinfo.tm_year; + + // NOTE: should we even try to detect cases like this? + // Our current rationale is that a year in a struct is more dangerous than a year in isolation + // A year in isolation is harder to interpret + year += 1; // MISSING: $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] +} + +void modification_before_conversion1(tm timeinfo){ + timeinfo.tm_year += 1; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + // convert a tm year into a civil year, then modify after conversion + // This case shows a false negative where the year might be used and it is incorrectly modified, + // and never reassigned to another struct. + WORD year = timeinfo.tm_year + 1900; +} + +void modification_before_conversion2(tm timeinfo){ + timeinfo.tm_year += 1; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + // convert a tm year into a civil year, then modify after conversion + // This case shows a false negative where the year might be used and it is incorrectly modified, + // and never reassigned to another struct. + WORD year = get_civil_year(timeinfo); +} + + + +void year_saved_to_variable_then_modified_with_leap_check1(tm timeinfo){ + // A modified year is not directly assigned to the year, rather, the year is + // saved to a variable, modified, used, but never assigned back. + WORD year = timeinfo.tm_year; + + year += 1; + + // performing a check is considered good enough, even if not used correctly + bool b = (year+1900) % 4 == 0 && ((year+1900) % 100 != 0 || (year+1900) % 400 == 0); +} + + +void modification_after_conversion_with_leap_check1(tm timeinfo){ + // convert a tm year into a civil year, then modify after conversion + // This case shows a false negative where the year might be used and it is incorrectly modified, + // and never reassigned to another struct. + WORD year = timeinfo.tm_year + 1900; + + year += 1; + + // performing a check is considered good enough, even if not used correctly + bool b = year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); +} + +void modification_after_conversion_with_leap_check2(tm timeinfo){ + // convert a tm year into a civil year, then modify after conversion + // This case shows a false negative where the year might be used and it is incorrectly modified, + // and never reassigned to another struct. + WORD year = get_civil_year(timeinfo); + + year += 1; + + // performing a check is considered good enough, even if not used correctly + bool b = year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); +} + +void modification_before_conversion_with_leap_check1(tm timeinfo){ + timeinfo.tm_year += 1; + // convert a tm year into a civil year, then modify after conversion + // This case shows a false negative where the year might be used and it is incorrectly modified, + // and never reassigned to another struct. + WORD year = timeinfo.tm_year + 1900; + + // performing a check is considered good enough, even if not used correctly + bool b = year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); +} + +void modification_before_conversion_with_leap_check2(tm timeinfo){ + timeinfo.tm_year += 1; + // convert a tm year into a civil year, then modify after conversion + // This case shows a false negative where the year might be used and it is incorrectly modified, + // and never reassigned to another struct. + WORD year = get_civil_year(timeinfo); + + // performing a check is considered good enough, even if not used correctly + bool b = (year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0); +} + +void odd_leap_year_check1(tm timeinfo){ + timeinfo.tm_year += 1; + + + // Using an odd sytle of checking divisible by 4 presumably as an optimization trick + if(((timeinfo.tm_year+1900) & 3) == 0 && ((timeinfo.tm_year+1900) % 100 != 0 || (timeinfo.tm_year+1900) % 400 == 0)) + { + // do something + } +} + +void odd_leap_year_check2(tm timeinfo){ + timeinfo.tm_year += 1; // $ SPURIOUS: Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + + // Using an odd sytle of checking divisible by 4 presumably as an optimization trick + // but also check unrelated conditions on the year as an optimization to rule out irrelevant years + // for gregorian leap years + if(timeinfo.tm_mon == 2 && ((timeinfo.tm_year+1900) & 3) == 0 && ((timeinfo.tm_year+1900) <= 1582 || (timeinfo.tm_year+1900) % 100 != 0 || (timeinfo.tm_year+1900) % 400 == 0)) + { + // do something + } +} + +void odd_leap_year_check3(tm timeinfo){ + timeinfo.tm_year += 1; // $ SPURIOUS: Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + + // Using an odd sytle of checking divisible by 4 presumably as an optimization trick + // but also check unrelated conditions on the year as an optimization to rule out irrelevant years + // for gregorian leap years + if(timeinfo.tm_mon == 2 && ((timeinfo.tm_year+1900) % 4) == 0 && ((timeinfo.tm_year+1900) <= 1582 || (timeinfo.tm_year+1900) % 100 != 0 || (timeinfo.tm_year+1900) % 400 == 0)) + { + // do something + } +} + +void odd_leap_year_check4(tm timeinfo){ + timeinfo.tm_year += 1; + WORD year = timeinfo.tm_year + 1900; + + if( (year % 4 == 0) && (year % 100 > 0 || (year % 400 == 0))) + { + // do something + } +} + +void odd_leap_year_check5(tm timeinfo){ + timeinfo.tm_year += 1; + WORD year = timeinfo.tm_year + 1900; + + if( (year % 4 > 0) || (year % 100 == 0 && (year % 400 > 0))) + { + // do something + } +} + + +void date_adjusted_through_mkgmtime(tm timeinfo){ + timeinfo.tm_year += 1; // $ SPURIOUS: Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + + // Using an odd sytle of checking divisible by 4 presumably as an optimization trick + // but also check unrelated conditions on the year as an optimization to rule out irrelevant years + // for gregorian leap years + if(timeinfo.tm_mon == 2 && ((timeinfo.tm_year+1900) % 4) == 0 && ((timeinfo.tm_year+1900) <= 1582 || (timeinfo.tm_year+1900) % 100 != 0 || (timeinfo.tm_year+1900) % 400 == 0)) + { + // do something + } +} + +bool data_killer(WORD *d){ + (*d) = 1; + return true; +} + +void interproc_data_killer1(tm timeinfo, WORD delta){ + WORD year = delta + 1; + + if(data_killer(&year)){ + timeinfo.tm_year = year; + } +} + + +void leap_year_check_after_normalization(tm timeinfo, WORD delta){ + WORD year = delta + 1; + + if(data_killer(&year)){ + timeinfo.tm_year = year; + } +} + + +void leap_year_check_call_on_conversion1(tm timeinfo){ + timeinfo.tm_year += 1; + isLeapYearRaw(timeinfo.tm_year + 1900); +} + +void leap_year_check_call_on_conversion2(tm timeinfo){ + timeinfo.tm_year += 1; + WORD year = get_civil_year(timeinfo); + isLeapYearRaw(year); +} + +WORD getDaysInMonth(WORD year, WORD month){ + // simplified + if(month == 2){ + return isLeapYearRaw(year) ? 29 : 28; + } + // else assume logic for every other month, + // returning 30 for simplicity + return 30; +} + +WORD get_civil_year_raw(WORD year){ + return year + 1900; +} + +void leap_year_check_call_on_conversion3(tm timeinfo, WORD year, WORD month, WORD delta){ + year += delta; + WORD days = getDaysInMonth(get_civil_year_raw(year), month); + timeinfo.tm_year = year; +} + +void assumed_maketime_conversion1(tm timeinfo) { - SYSTEMTIME st; - FILETIME ft; - WORD *w_ptr; + //the docs of mktime suggest feb29 is handled, and conversion will occur automatically + //no check required. + timeinfo.tm_year += 1; - GetSystemTime(&st); + mktime(&timeinfo); +} - st.wYear++; // BAD - st.wYear++; // BAD - st.wYear++; // BAD - SystemTimeToFileTime(&st, &ft); +void bad_leap_year_check_logic1(tm timeinfo){ + timeinfo.tm_year += 1; // $ Alert[cpp/leap-year/unchecked-after-arithmetic-year-modification] + + WORD year = get_civil_year(timeinfo); + + // expected logic: + //(year % 4) && ((year % 100) || !(year % 400 ))) + WORD days = (!(year % 4) && (!(year % 100) || (year % 400))) ? 366 : 365; } diff --git a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/ReturnStackAllocatedMemory/test.cpp b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/ReturnStackAllocatedMemory/test.cpp index abc21aa74d81..07e3520fa814 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/ReturnStackAllocatedMemory/test.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/ReturnStackAllocatedMemory/test.cpp @@ -250,3 +250,8 @@ void* test_strndupa(const char* s, size_t size) { return s2; // BAD } +int* f_rec(int *p) { + int x; + int* px = f_rec(&x); // GOOD + return p; +} diff --git a/csharp/documentation/library-coverage/coverage.csv b/csharp/documentation/library-coverage/coverage.csv index c75661cc3dda..5dbefc4c8167 100644 --- a/csharp/documentation/library-coverage/coverage.csv +++ b/csharp/documentation/library-coverage/coverage.csv @@ -44,5 +44,5 @@ NHibernate,3,,,,,,,,,,,,3,,,,,,,,,, Newtonsoft.Json,,,91,,,,,,,,,,,,,,,,,,,73,18 ServiceStack,194,,7,27,,,,,75,,,,92,,,,,,,,,7, SourceGenerators,,,5,,,,,,,,,,,,,,,,,,,,5 -System,59,47,12491,,6,5,12,,,4,1,,31,2,,6,15,17,4,3,,6378,6113 +System,59,47,12495,,6,5,12,,,4,1,,31,2,,6,15,17,4,3,,6382,6113 Windows.Security.Cryptography.Core,1,,,,,,,1,,,,,,,,,,,,,,, diff --git a/csharp/documentation/library-coverage/coverage.rst b/csharp/documentation/library-coverage/coverage.rst index 3f67bec413dc..4061f675b859 100644 --- a/csharp/documentation/library-coverage/coverage.rst +++ b/csharp/documentation/library-coverage/coverage.rst @@ -8,7 +8,7 @@ C# framework & library support Framework / library,Package,Flow sources,Taint & value steps,Sinks (total),`CWE-079` :sub:`Cross-site scripting` `ServiceStack `_,"``ServiceStack.*``, ``ServiceStack``",,7,194, - System,"``System.*``, ``System``",47,12491,59,5 + System,"``System.*``, ``System``",47,12495,59,5 Others,"``Amazon.Lambda.APIGatewayEvents``, ``Amazon.Lambda.Core``, ``Dapper``, ``ILCompiler``, ``ILLink.RoslynAnalyzer``, ``ILLink.Shared``, ``ILLink.Tasks``, ``Internal.IL``, ``Internal.Pgo``, ``Internal.TypeSystem``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.AspNetCore.Components``, ``Microsoft.AspNetCore.Http``, ``Microsoft.AspNetCore.Mvc``, ``Microsoft.AspNetCore.WebUtilities``, ``Microsoft.CSharp``, ``Microsoft.Data.SqlClient``, ``Microsoft.Diagnostics.Tools.Pgo``, ``Microsoft.DotNet.Build.Tasks``, ``Microsoft.DotNet.PlatformAbstractions``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.Diagnostics.Metrics``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.JSInterop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.VisualBasic``, ``Microsoft.Win32``, ``Mono.Linker``, ``MySql.Data.MySqlClient``, ``NHibernate``, ``Newtonsoft.Json``, ``SourceGenerators``, ``Windows.Security.Cryptography.Core``",60,2406,162,4 - Totals,,107,14904,415,9 + Totals,,107,14908,415,9 diff --git a/csharp/downgrades/178a7e6cf335486d33d4e49543148e3f57f04a9a/old.dbscheme b/csharp/downgrades/178a7e6cf335486d33d4e49543148e3f57f04a9a/old.dbscheme new file mode 100644 index 000000000000..178a7e6cf335 --- /dev/null +++ b/csharp/downgrades/178a7e6cf335486d33d4e49543148e3f57f04a9a/old.dbscheme @@ -0,0 +1,1489 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile.rsp` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * Overlay support + */ + +/** + * The CLI will automatically emit the tuple `databaseMetadata("isOverlay", "true")`, + * along with an `overlayChangedFiles` tuple for each new/modified/deleted file, + * when building an overlay database, and these can be used by the discard predicates. + */ +databaseMetadata( + string metadataKey : string ref, + string value : string ref +); + +overlayChangedFiles( + string path : string ref +); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +@locatable = @declaration_with_accessors | @callable_accessor | @declaration_or_directive + | @diagnostic | @extractor_message | @preprocessor_directive | @attribute | @type_mention | @type_parameter_constraints + | @declaration_with_accessors | @callable_accessor | @operator | @method + | @constructor | @destructor | @field | @local_variable | @parameter | @stmt | @expr + | @xmllocatable | @commentline | @commentblock | @asp_element + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type +| 35 = @extension_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type | @extension_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extension_receiver_type( + unique int extension: @extension_type ref, + int receiver_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type | @extension_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, params/array = 3, this = 4, in = 5, ref readonly = 6 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +| 138 = @interpolated_string_insert_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_expr = @assign_arith_expr | @assign_bitwise_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @assign_expr | @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@call = @method_invocation_expr | @constructor_init_expr | @operator_invocation_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @operator_invocation_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* XML Files */ + +xmlEncoding ( + unique int id: @file ref, + string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); diff --git a/csharp/downgrades/178a7e6cf335486d33d4e49543148e3f57f04a9a/semmlecode.csharp.dbscheme b/csharp/downgrades/178a7e6cf335486d33d4e49543148e3f57f04a9a/semmlecode.csharp.dbscheme new file mode 100644 index 000000000000..68b5aec54e50 --- /dev/null +++ b/csharp/downgrades/178a7e6cf335486d33d4e49543148e3f57f04a9a/semmlecode.csharp.dbscheme @@ -0,0 +1,1484 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile.rsp` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * Overlay support + */ + +/** + * The CLI will automatically emit the tuple `databaseMetadata("isOverlay", "true")`, + * along with an `overlayChangedFiles` tuple for each new/modified/deleted file, + * when building an overlay database, and these can be used by the discard predicates. + */ +databaseMetadata( + string metadataKey : string ref, + string value : string ref +); + +overlayChangedFiles( + string path : string ref +); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +@locatable = @declaration_with_accessors | @callable_accessor | @declaration_or_directive + | @diagnostic | @extractor_message | @preprocessor_directive | @attribute | @type_mention | @type_parameter_constraints + | @declaration_with_accessors | @callable_accessor | @operator | @method + | @constructor | @destructor | @field | @local_variable | @parameter | @stmt | @expr + | @xmllocatable | @commentline | @commentblock | @asp_element + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, params/array = 3, this = 4, in = 5, ref readonly = 6 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +| 138 = @interpolated_string_insert_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_expr = @assign_arith_expr | @assign_bitwise_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @assign_expr | @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@call = @method_invocation_expr | @constructor_init_expr | @operator_invocation_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @operator_invocation_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* XML Files */ + +xmlEncoding ( + unique int id: @file ref, + string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); diff --git a/csharp/downgrades/178a7e6cf335486d33d4e49543148e3f57f04a9a/upgrade.properties b/csharp/downgrades/178a7e6cf335486d33d4e49543148e3f57f04a9a/upgrade.properties new file mode 100644 index 000000000000..50b000605102 --- /dev/null +++ b/csharp/downgrades/178a7e6cf335486d33d4e49543148e3f57f04a9a/upgrade.properties @@ -0,0 +1,3 @@ +description: Remove the relation `extension_receiver_type` and remove the `extension_type` type kind. +compatibility: backwards +extension_receiver_type.rel: delete diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependabotProxy.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependabotProxy.cs index be5f137548c4..e06970141fed 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependabotProxy.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependabotProxy.cs @@ -5,6 +5,7 @@ using Semmle.Util; using Semmle.Util.Logging; using Newtonsoft.Json; +using System.Linq; namespace Semmle.Extraction.CSharp.DependencyFetching { @@ -37,7 +38,8 @@ public record class RegistryConfig(string Type, string URL); /// internal X509Certificate2? Certificate { get; private set; } - internal static DependabotProxy? GetDependabotProxy(ILogger logger, TemporaryDirectory tempWorkingDirectory) + internal static DependabotProxy? GetDependabotProxy( + ILogger logger, IDiagnosticsWriter diagnosticsWriter, TemporaryDirectory tempWorkingDirectory) { // Setting HTTP(S)_PROXY and SSL_CERT_FILE have no effect on Windows or macOS, // but we would still end up using the Dependabot proxy to check for feed reachability. @@ -112,6 +114,23 @@ public record class RegistryConfig(string Type, string URL); } } + // Emit a diagnostic for the discovered private registries, so that it is easy + // for users to see that they were picked up. + if (result.RegistryURLs.Count > 0) + { + diagnosticsWriter.AddEntry(new DiagnosticMessage( + Language.CSharp, + "buildless/analysis-using-private-registries", + severity: DiagnosticMessage.TspSeverity.Note, + visibility: new DiagnosticMessage.TspVisibility(true, true, true), + name: "C# extraction used private package registries", + markdownMessage: string.Format( + "C# was extracted using the following private package registries:\n\n{0}\n", + string.Join("\n", result.RegistryURLs.Select(url => string.Format("- `{0}`", url))) + ) + )); + } + return result; } diff --git a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs index ad69d0c85c37..bc010e318c35 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs @@ -106,7 +106,7 @@ void exitCallback(int ret, string msg, bool silent) return BuildScript.Success; }).Run(SystemBuildActions.Instance, startCallback, exitCallback); - dependabotProxy = DependabotProxy.GetDependabotProxy(logger, tempWorkingDirectory); + dependabotProxy = DependabotProxy.GetDependabotProxy(logger, diagnosticsWriter, tempWorkingDirectory); try { diff --git a/csharp/extractor/Semmle.Extraction.CSharp/CodeAnalysisExtensions/SymbolExtensions.cs b/csharp/extractor/Semmle.Extraction.CSharp/CodeAnalysisExtensions/SymbolExtensions.cs index 72f78f160598..fbc1b52c99b3 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/CodeAnalysisExtensions/SymbolExtensions.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/CodeAnalysisExtensions/SymbolExtensions.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using Microsoft.CodeAnalysis; +using Semmle.Util; using Semmle.Extraction.CSharp.Entities; namespace Semmle.Extraction.CSharp @@ -164,6 +165,7 @@ public static void BuildTypeId(this ITypeSymbol type, Context cx, EscapingTextWr case TypeKind.Enum: case TypeKind.Delegate: case TypeKind.Error: + case TypeKind.Extension: var named = (INamedTypeSymbol)type; named.BuildNamedTypeId(cx, trapFile, symbolBeingDefined, constructUnderlyingTupleType); return; @@ -275,6 +277,20 @@ private static void BuildFunctionPointerTypeId(this IFunctionPointerTypeSymbol f public static IEnumerable GetTupleElementsMaybeNull(this INamedTypeSymbol type) => type.TupleElements; + private static void BuildExtensionTypeId(this INamedTypeSymbol named, Context cx, EscapingTextWriter trapFile) + { + trapFile.Write("extension("); + if (named.ExtensionMarkerName is not null) + { + trapFile.Write(named.ExtensionMarkerName); + } + else + { + trapFile.Write("unknown"); + } + trapFile.Write(")"); + } + private static void BuildQualifierAndName(INamedTypeSymbol named, Context cx, EscapingTextWriter trapFile, ISymbol symbolBeingDefined) { if (named.ContainingType is not null) @@ -289,8 +305,18 @@ private static void BuildQualifierAndName(INamedTypeSymbol named, Context cx, Es named.ContainingNamespace.BuildNamespace(cx, trapFile); } - var name = named.IsFileLocal ? named.MetadataName : named.Name; - trapFile.Write(name); + if (named.IsFileLocal) + { + trapFile.Write(named.MetadataName); + } + else if (named.IsExtension) + { + named.BuildExtensionTypeId(cx, trapFile); + } + else + { + trapFile.Write(named.Name); + } } private static void BuildTupleId(INamedTypeSymbol named, Context cx, EscapingTextWriter trapFile, ISymbol symbolBeingDefined) @@ -391,6 +417,7 @@ public static void BuildDisplayName(this ITypeSymbol type, Context cx, TextWrite case TypeKind.Enum: case TypeKind.Delegate: case TypeKind.Error: + case TypeKind.Extension: var named = (INamedTypeSymbol)type; named.BuildNamedTypeDisplayName(cx, trapFile, constructUnderlyingTupleType); return; @@ -465,6 +492,20 @@ public static void BuildFunctionPointerSignature(IFunctionPointerTypeSymbol funp private static void BuildFunctionPointerTypeDisplayName(this IFunctionPointerTypeSymbol funptr, Context cx, TextWriter trapFile) => BuildFunctionPointerSignature(funptr, trapFile, s => s.BuildDisplayName(cx, trapFile)); + private static void BuildExtensionTypeDisplayName(this INamedTypeSymbol named, Context cx, TextWriter trapFile) + { + trapFile.Write("extension("); + if (named.ExtensionParameter?.Type is ITypeSymbol type) + { + type.BuildDisplayName(cx, trapFile); + } + else + { + trapFile.Write("unknown"); + } + trapFile.Write(")"); + } + private static void BuildNamedTypeDisplayName(this INamedTypeSymbol namedType, Context cx, TextWriter trapFile, bool constructUnderlyingTupleType) { if (!constructUnderlyingTupleType && namedType.IsTupleType) @@ -484,6 +525,12 @@ private static void BuildNamedTypeDisplayName(this INamedTypeSymbol namedType, C return; } + if (namedType.IsExtension) + { + namedType.BuildExtensionTypeDisplayName(cx, trapFile); + return; + } + if (namedType.IsAnonymousType) { namedType.BuildAnonymousName(cx, trapFile); @@ -596,6 +643,84 @@ public static bool IsSourceDeclaration(this IParameterSymbol parameter) return true; } + /// + /// Return true if this method is a compiler-generated extension method. + /// + public static bool IsCompilerGeneratedExtensionMethod(this IMethodSymbol method) => + method.TryGetExtensionMethod() is not null; + + /// + /// Returns the extension method corresponding to this compiler-generated extension method, if it exists. + /// + public static IMethodSymbol? TryGetExtensionMethod(this IMethodSymbol method) + { + if (method.IsImplicitlyDeclared && method.ContainingSymbol is INamedTypeSymbol containingType) + { + // Extension types are declared within the same type as the generated + // extension method implementation. + var extensions = containingType.GetMembers() + .OfType() + .Where(t => t.IsExtension); + // Find the (possibly unbound) original extension method that maps to this implementation (if any). + var unboundDeclaration = extensions.SelectMany(e => e.GetMembers()) + .OfType() + .FirstOrDefault(m => SymbolEqualityComparer.Default.Equals(m.AssociatedExtensionImplementation, method.ConstructedFrom)); + + var isFullyConstructed = method.IsBoundGenericMethod(); + if (isFullyConstructed && unboundDeclaration?.ContainingType is INamedTypeSymbol extensionType) + { + try + { + // Use the type arguments from the constructed extension method to construct the extension type. + var arguments = method.TypeArguments.ToArray(); + var (extensionTypeArguments, extensionMethodArguments) = arguments.SplitAt(extensionType.TypeParameters.Length); + + // Construct the extension type. + var boundExtensionType = extensionType.IsUnboundGenericType() + ? extensionType.Construct(extensionTypeArguments.ToArray()) + : extensionType; + + // Find the extension method declaration within the constructed extension type. + var extensionDeclaration = boundExtensionType.GetMembers() + .OfType() + .First(c => SymbolEqualityComparer.Default.Equals(c.OriginalDefinition, unboundDeclaration)); + + // If the extension declaration is unbound apply the remaning type arguments and construct it. + return extensionDeclaration.IsUnboundGenericMethod() + ? extensionDeclaration.Construct(extensionMethodArguments.ToArray()) + : extensionDeclaration; + } + catch + { + // If anything goes wrong, fall back to the unbound declaration. + return unboundDeclaration; + } + } + else + { + return unboundDeclaration; + } + } + return null; + } + + /// + /// Returns true if this method is an unbound generic method. + /// + public static bool IsUnboundGenericMethod(this IMethodSymbol method) => + method.IsGenericMethod && SymbolEqualityComparer.Default.Equals(method.ConstructedFrom, method); + + /// + /// Returns true if this method is a bound generic method. + /// + public static bool IsBoundGenericMethod(this IMethodSymbol method) => method.IsGenericMethod && !method.IsUnboundGenericMethod(); + + /// + /// Returns true if this type is an unbound generic type. + /// + public static bool IsUnboundGenericType(this INamedTypeSymbol type) => + type.IsGenericType && SymbolEqualityComparer.Default.Equals(type.ConstructedFrom, type); + /// /// Gets the base type of `symbol`. Unlike `symbol.BaseType`, this excludes effective base /// types of type parameters as well as `object` base types. @@ -603,6 +728,15 @@ public static bool IsSourceDeclaration(this IParameterSymbol parameter) public static INamedTypeSymbol? GetNonObjectBaseType(this ITypeSymbol symbol, Context cx) => symbol is ITypeParameterSymbol || SymbolEqualityComparer.Default.Equals(symbol.BaseType, cx.Compilation.ObjectType) ? null : symbol.BaseType; + public static IMethodSymbol GetBodyDeclaringSymbol(this IMethodSymbol method) => + method.PartialImplementationPart ?? method; + + public static IPropertySymbol GetBodyDeclaringSymbol(this IPropertySymbol property) => + property.PartialImplementationPart ?? property; + + public static IEventSymbol GetBodyDeclaringSymbol(this IEventSymbol symbol) => + symbol.PartialImplementationPart ?? symbol; + [return: NotNullIfNotNull(nameof(symbol))] public static IEntity? CreateEntity(this Context cx, ISymbol symbol) { @@ -692,5 +826,35 @@ public static bool ShouldExtractSymbol(this ISymbol symbol) /// public static IEnumerable ExtractionCandidates(this IEnumerable symbols) where T : ISymbol => symbols.Where(symbol => symbol.ShouldExtractSymbol()); + + /// + /// Returns the parameter kind for this parameter symbol, e.g. `ref`, `out`, `params`, etc. + /// + public static Parameter.Kind GetParameterKind(this IParameterSymbol parameter) + { + switch (parameter.RefKind) + { + case RefKind.Out: + return Parameter.Kind.Out; + case RefKind.Ref: + return Parameter.Kind.Ref; + case RefKind.In: + return Parameter.Kind.In; + case RefKind.RefReadOnlyParameter: + return Parameter.Kind.RefReadOnly; + default: + if (parameter.IsParams) + return Parameter.Kind.Params; + + if (parameter.Ordinal == 0) + { + if (parameter.ContainingSymbol is IMethodSymbol method && method.IsExtensionMethod) + { + return Parameter.Kind.This; + } + } + return Parameter.Kind.None; + } + } } } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Accessor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Accessor.cs index fe01e0f9b58d..ed409e23b395 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Accessor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Accessor.cs @@ -70,7 +70,7 @@ public override void Populate(TextWriter trapFile) Overrides(trapFile); - if (Symbol.FromSource() && Block is null) + if (Symbol.FromSource() && !HasBody) { trapFile.compiler_generated(this); } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/CachedEntity.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/CachedEntity.cs index 2002fe0f1d7a..39d0f886b813 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/CachedEntity.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/CachedEntity.cs @@ -54,22 +54,6 @@ public string DebugContents } } - protected static void WriteLocationToTrap(Action writeAction, T1 entity, Location l) - { - if (l is not EmptyLocation) - { - writeAction(entity, l); - } - } - - protected static void WriteLocationsToTrap(Action writeAction, T1 entity, IEnumerable locations) - { - foreach (var loc in locations) - { - WriteLocationToTrap(writeAction, entity, loc); - } - } - public override bool NeedsPopulation { get; } public override int GetHashCode() => Symbol is null ? 0 : Symbol.GetHashCode(); diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/CachedSymbol.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/CachedSymbol.cs index 92861e97fdd8..26f31c66979b 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/CachedSymbol.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/CachedSymbol.cs @@ -9,9 +9,14 @@ namespace Semmle.Extraction.CSharp.Entities { internal abstract class CachedSymbol : CachedEntity where T : class, ISymbol { + private readonly Lazy blockLazy; + private readonly Lazy expressionBodyLazy; + protected CachedSymbol(Context cx, T init) : base(cx, init) { + blockLazy = new Lazy(() => GetBlock(Symbol)); + expressionBodyLazy = new Lazy(() => GetExpressionBody(Symbol)); } public virtual Type? ContainingType => Symbol.ContainingType is not null @@ -32,32 +37,6 @@ protected void PopulateAttributes() Attribute.ExtractAttributes(Context, Symbol, this); } - protected void PopulateNullability(TextWriter trapFile, AnnotatedTypeSymbol type) - { - var n = NullabilityEntity.Create(Context, Nullability.Create(type)); - if (!type.HasObliviousNullability()) - { - trapFile.type_nullability(this, n); - } - } - - protected void PopulateRefKind(TextWriter trapFile, RefKind kind) - { - switch (kind) - { - case RefKind.Out: - trapFile.type_annotation(this, Kinds.TypeAnnotation.Out); - break; - case RefKind.Ref: - trapFile.type_annotation(this, Kinds.TypeAnnotation.Ref); - break; - case RefKind.RefReadOnly: - case RefKind.RefReadOnlyParameter: - trapFile.type_annotation(this, Kinds.TypeAnnotation.ReadonlyRef); - break; - } - } - protected void PopulateScopedKind(TextWriter trapFile, ScopedKind kind) { switch (kind) @@ -113,31 +92,29 @@ protected void BindComments() Context.BindComments(this, FullLocation); } - protected virtual T BodyDeclaringSymbol => Symbol; - - public BlockSyntax? Block + private static BlockSyntax? GetBlock(T symbol) { - get - { - return BodyDeclaringSymbol.DeclaringSyntaxReferences + return symbol.DeclaringSyntaxReferences .SelectMany(r => r.GetSyntax().ChildNodes()) .OfType() .FirstOrDefault(); - } } - public ExpressionSyntax? ExpressionBody + private static ExpressionSyntax? GetExpressionBody(T symbol) { - get - { - return BodyDeclaringSymbol.DeclaringSyntaxReferences + return symbol.DeclaringSyntaxReferences .SelectMany(r => r.GetSyntax().ChildNodes()) .OfType() .Select(arrow => arrow.Expression) .FirstOrDefault(); - } } + public BlockSyntax? Block => blockLazy.Value; + + public ExpressionSyntax? ExpressionBody => expressionBodyLazy.Value; + + public bool HasBody => Block is not null || ExpressionBody is not null; + public virtual bool IsSourceDeclaration => Symbol.IsSourceDeclaration(); public override bool NeedsPopulation => Context.Defines(Symbol); diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/Entity.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/Entity.cs index ca1887b3be9c..94b2e16e9e6b 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/Entity.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/Entity.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using System.IO; using Microsoft.CodeAnalysis; +using Semmle.Extraction.CSharp.Entities; namespace Semmle.Extraction.CSharp { @@ -24,7 +26,7 @@ public virtual void WriteQuotedId(EscapingTextWriter trapFile) trapFile.WriteUnescaped('\"'); } - public abstract Location? ReportingLocation { get; } + public abstract Microsoft.CodeAnalysis.Location? ReportingLocation { get; } public abstract TrapStackBehaviour TrapStackBehaviour { get; } @@ -65,6 +67,48 @@ public string GetDebugLabel() } #endif + protected void PopulateRefKind(TextWriter trapFile, RefKind kind) + { + switch (kind) + { + case RefKind.Out: + trapFile.type_annotation(this, Kinds.TypeAnnotation.Out); + break; + case RefKind.Ref: + trapFile.type_annotation(this, Kinds.TypeAnnotation.Ref); + break; + case RefKind.RefReadOnly: + case RefKind.RefReadOnlyParameter: + trapFile.type_annotation(this, Kinds.TypeAnnotation.ReadonlyRef); + break; + } + } + + protected void PopulateNullability(TextWriter trapFile, AnnotatedTypeSymbol type) + { + var n = NullabilityEntity.Create(Context, Nullability.Create(type)); + if (!type.HasObliviousNullability()) + { + trapFile.type_nullability(this, n); + } + } + + protected static void WriteLocationToTrap(Action writeAction, T1 entity, Entities.Location l) + { + if (l is not EmptyLocation) + { + writeAction(entity, l); + } + } + + protected static void WriteLocationsToTrap(Action writeAction, T1 entity, IEnumerable locations) + { + foreach (var loc in locations) + { + WriteLocationToTrap(writeAction, entity, loc); + } + } + public override string ToString() => Label.ToString(); } } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs index 14d9b5480151..58c94cf047a1 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; @@ -12,7 +13,9 @@ namespace Semmle.Extraction.CSharp.Entities internal class Constructor : Method { private readonly List declaringReferenceSyntax; - + private readonly Lazy ordinaryConstructorSyntaxLazy; + private readonly Lazy primaryConstructorSyntaxLazy; + private readonly Lazy primaryBaseLazy; private Constructor(Context cx, IMethodSymbol init) : base(cx, init) { @@ -20,8 +23,28 @@ private Constructor(Context cx, IMethodSymbol init) Symbol.DeclaringSyntaxReferences .Select(r => r.GetSyntax()) .ToList(); + ordinaryConstructorSyntaxLazy = new Lazy(() => + declaringReferenceSyntax + .OfType() + .FirstOrDefault()); + primaryConstructorSyntaxLazy = new Lazy(() => + declaringReferenceSyntax + .OfType() + .FirstOrDefault(t => t is ClassDeclarationSyntax or StructDeclarationSyntax or RecordDeclarationSyntax)); + primaryBaseLazy = new Lazy(() => + PrimaryConstructorSyntax? + .BaseList? + .Types + .OfType() + .FirstOrDefault()); } + private ConstructorDeclarationSyntax? OrdinaryConstructorSyntax => ordinaryConstructorSyntaxLazy.Value; + + private TypeDeclarationSyntax? PrimaryConstructorSyntax => primaryConstructorSyntaxLazy.Value; + + private PrimaryConstructorBaseTypeSyntax? PrimaryBase => primaryBaseLazy.Value; + public override void Populate(TextWriter trapFile) { PopulateMethod(trapFile); @@ -42,7 +65,7 @@ public override void Populate(TextWriter trapFile) return; } - if (MakeSynthetic) + if (MakeSyntheticBody) { // Create a synthetic empty body for primary and default constructors. Statements.SyntheticEmptyBlock.Create(Context, this, 0, Location); @@ -60,7 +83,7 @@ protected override void ExtractInitializers(TextWriter trapFile) // Do not extract initializers for constructed types. // Extract initializers for constructors with a body, primary constructors // and default constructors for classes and structs declared in source code. - if (Block is null && ExpressionBody is null && !MakeSynthetic || Context.OnlyScaffold) + if (!HasBody && !MakeSyntheticBody || Context.OnlyScaffold) { return; } @@ -176,23 +199,6 @@ private void ExtractSourceInitializer(TextWriter trapFile, ITypeSymbol? type, IM init.PopulateArguments(trapFile, arguments, 0); } - private ConstructorDeclarationSyntax? OrdinaryConstructorSyntax => - declaringReferenceSyntax - .OfType() - .FirstOrDefault(); - - private TypeDeclarationSyntax? PrimaryConstructorSyntax => - declaringReferenceSyntax - .OfType() - .FirstOrDefault(t => t is ClassDeclarationSyntax or StructDeclarationSyntax or RecordDeclarationSyntax); - - private PrimaryConstructorBaseTypeSyntax? PrimaryBase => - PrimaryConstructorSyntax? - .BaseList? - .Types - .OfType() - .FirstOrDefault(); - private bool IsPrimary => PrimaryConstructorSyntax is not null; // This is a default constructor in a class or struct declared in source. @@ -211,7 +217,7 @@ Symbol.ContainingType.TypeKind is TypeKind.Class or TypeKind.Struct && /// private bool IsBestSourceLocation => ReportingLocation is not null && Context.IsLocationInContext(ReportingLocation); - private bool MakeSynthetic => (IsPrimary || (IsDefault && IsBestSourceLocation)) && !Context.OnlyScaffold; + private bool MakeSyntheticBody => (IsPrimary || (IsDefault && IsBestSourceLocation)) && !Context.OnlyScaffold; [return: NotNullIfNotNull(nameof(constructor))] public static new Constructor? Create(Context cx, IMethodSymbol? constructor) @@ -223,7 +229,7 @@ Symbol.ContainingType.TypeKind is TypeKind.Class or TypeKind.Struct && { case MethodKind.StaticConstructor: case MethodKind.Constructor: - return ConstructorFactory.Instance.CreateEntityFromSymbol(cx, constructor); + return ConstructorFactory.Instance.CreateEntityFromSymbol(cx, constructor.GetBodyDeclaringSymbol()); default: throw new InternalError(constructor, "Attempt to create a Constructor from a symbol that isn't a constructor"); } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Event.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Event.cs index bbd90989617c..bed4a87d5dab 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Event.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Event.cs @@ -30,10 +30,10 @@ public override void Populate(TextWriter trapFile) var adder = Symbol.AddMethod; var remover = Symbol.RemoveMethod; - if (!(adder is null)) + if (adder is not null) Method.Create(Context, adder); - if (!(remover is null)) + if (remover is not null) Method.Create(Context, remover); PopulateModifiers(trapFile); @@ -72,7 +72,7 @@ public override void Populate(TextWriter trapFile) } } - public static Event Create(Context cx, IEventSymbol symbol) => EventFactory.Instance.CreateEntityFromSymbol(cx, symbol); + public static Event Create(Context cx, IEventSymbol symbol) => EventFactory.Instance.CreateEntityFromSymbol(cx, symbol.GetBodyDeclaringSymbol()); private class EventFactory : CachedEntityFactory { diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/EventAccessor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/EventAccessor.cs index 254e7c769569..05518119858e 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/EventAccessor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/EventAccessor.cs @@ -13,6 +13,10 @@ private EventAccessor(Context cx, IMethodSymbol init, IEventSymbol @event) this.@event = @event; } + public override bool NeedsPopulation => + base.NeedsPopulation && + !Symbol.IsPartialDefinition; // Accessors always have an implementing declaration as well. + /// /// Gets the event symbol associated with accessor `symbol`, or `null` /// if there is no associated symbol. @@ -55,7 +59,7 @@ public override void Populate(TextWriter trapFile) Overrides(trapFile); - if (Symbol.FromSource() && Block is null) + if (Symbol.FromSource() && !HasBody) { trapFile.compiler_generated(this); } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Factory.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Factory.cs index 0da8de1e5d59..ed8dae3738fc 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Factory.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Factory.cs @@ -160,6 +160,9 @@ internal static Expression Create(ExpressionNodeInfo info) case SyntaxKind.ThisExpression: return This.CreateExplicit(info); + case SyntaxKind.FieldExpression: + return PropertyFieldAccess.Create(info); + case SyntaxKind.AddressOfExpression: return Unary.Create(info.SetKind(ExprKind.ADDRESS_OF)); diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Invocation.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Invocation.cs index a6272974c22b..2ed7aec9955c 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Invocation.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Invocation.cs @@ -24,6 +24,16 @@ private Invocation(ExpressionNodeInfo info) private bool IsExplicitDelegateInvokeCall() => Kind == ExprKind.DELEGATE_INVOCATION && Context.GetModel(Syntax.Expression).GetSymbolInfo(Syntax.Expression).Symbol is IMethodSymbol m && m.MethodKind == MethodKind.DelegateInvoke; + private bool IsOperatorCall() => Kind == ExprKind.OPERATOR_INVOCATION; + + private bool IsValidMemberAccessKind() + { + return Kind == ExprKind.METHOD_INVOCATION || + IsEventDelegateCall() || + IsExplicitDelegateInvokeCall() || + IsOperatorCall(); + } + protected override void PopulateExpression(TextWriter trapFile) { if (IsNameof(Syntax)) @@ -37,7 +47,7 @@ protected override void PopulateExpression(TextWriter trapFile) var target = TargetSymbol; switch (Syntax.Expression) { - case MemberAccessExpressionSyntax memberAccess when Kind == ExprKind.METHOD_INVOCATION || IsEventDelegateCall() || IsExplicitDelegateInvokeCall(): + case MemberAccessExpressionSyntax memberAccess when IsValidMemberAccessKind(): memberName = memberAccess.Name.Identifier.Text; if (Syntax.Expression.Kind() == SyntaxKind.SimpleMemberAccessExpression) // Qualified method call; `x.M()` @@ -113,14 +123,24 @@ private static bool IsDynamicCall(ExpressionNodeInfo info) public SymbolInfo SymbolInfo => info.SymbolInfo; + private static bool IsOperatorLikeCall(ExpressionNodeInfo info) + { + return info.SymbolInfo.Symbol is IMethodSymbol method && + method.TryGetExtensionMethod()?.MethodKind == MethodKind.UserDefinedOperator; + } + public IMethodSymbol? TargetSymbol { get { var si = SymbolInfo; - if (si.Symbol is not null) - return si.Symbol as IMethodSymbol; + if (si.Symbol is ISymbol symbol) + { + var method = symbol as IMethodSymbol; + // Case for compiler-generated extension methods. + return method?.TryGetExtensionMethod() ?? method; + } if (si.CandidateReason == CandidateReason.OverloadResolutionFailure) { @@ -196,15 +216,25 @@ private static bool IsLocalFunctionInvocation(ExpressionNodeInfo info) private static ExprKind GetKind(ExpressionNodeInfo info) { - return IsNameof((InvocationExpressionSyntax)info.Node) - ? ExprKind.NAMEOF - : IsDelegateLikeCall(info) - ? IsDelegateInvokeCall(info) - ? ExprKind.DELEGATE_INVOCATION - : ExprKind.FUNCTION_POINTER_INVOCATION - : IsLocalFunctionInvocation(info) - ? ExprKind.LOCAL_FUNCTION_INVOCATION - : ExprKind.METHOD_INVOCATION; + if (IsNameof((InvocationExpressionSyntax)info.Node)) + { + return ExprKind.NAMEOF; + } + if (IsDelegateLikeCall(info)) + { + return IsDelegateInvokeCall(info) + ? ExprKind.DELEGATE_INVOCATION + : ExprKind.FUNCTION_POINTER_INVOCATION; + } + if (IsLocalFunctionInvocation(info)) + { + return ExprKind.LOCAL_FUNCTION_INVOCATION; + } + if (IsOperatorLikeCall(info)) + { + return ExprKind.OPERATOR_INVOCATION; + } + return ExprKind.METHOD_INVOCATION; } private static bool IsNameof(InvocationExpressionSyntax syntax) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/PropertyFieldAccess.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/PropertyFieldAccess.cs new file mode 100644 index 000000000000..a9d2afa84c9e --- /dev/null +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/PropertyFieldAccess.cs @@ -0,0 +1,28 @@ +using System.IO; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Semmle.Extraction.Kinds; + +namespace Semmle.Extraction.CSharp.Entities.Expressions +{ + internal class PropertyFieldAccess : Expression + { + private PropertyFieldAccess(ExpressionNodeInfo info) : base(info.SetKind(ExprKind.FIELD_ACCESS)) { } + + public static Expression Create(ExpressionNodeInfo info) => new PropertyFieldAccess(info).TryPopulate(); + + protected override void PopulateExpression(TextWriter trapFile) + { + var symbolInfo = Context.GetSymbolInfo(Syntax); + if (symbolInfo.Symbol is IFieldSymbol field) + { + var target = PropertyField.Create(Context, field); + trapFile.expr_access(this, target); + if (!field.IsStatic) + { + This.CreateImplicit(Context, field.ContainingType, Location, this, -1); + } + } + } + } +} diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Field.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Field.cs index 9a010aad3760..329115f11c7a 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Field.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Field.cs @@ -10,7 +10,7 @@ namespace Semmle.Extraction.CSharp.Entities { internal class Field : CachedSymbol, IExpressionParentEntity { - private Field(Context cx, IFieldSymbol init) + protected Field(Context cx, IFieldSymbol init) : base(cx, init) { type = new Lazy(() => Entities.Type.Create(cx, Symbol.Type)); diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/IParameter.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/IParameter.cs new file mode 100644 index 000000000000..d3f3a04c08fc --- /dev/null +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/IParameter.cs @@ -0,0 +1,9 @@ +namespace Semmle.Extraction.CSharp.Entities +{ + /// + /// Marker interface for parameter entities. + /// + internal interface IParameter : IEntity + { + } +} diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Indexer.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Indexer.cs index 870c2eb76500..10f17abef18f 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Indexer.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Indexer.cs @@ -20,8 +20,8 @@ public override void Populate(TextWriter trapFile) var type = Type.Create(Context, Symbol.Type); trapFile.indexers(this, Symbol.GetName(useMetadataName: true), ContainingType!, type.TypeRef, OriginalDefinition); - var getter = BodyDeclaringSymbol.GetMethod; - var setter = BodyDeclaringSymbol.SetMethod; + var getter = Symbol.GetMethod; + var setter = Symbol.SetMethod; if (getter is null && setter is null) Context.ModelError(Symbol, "No indexer accessor defined"); @@ -81,7 +81,7 @@ public override void Populate(TextWriter trapFile) TypeMention.Create(Context, syntax.Type, this, type); } - public static new Indexer Create(Context cx, IPropertySymbol prop) => IndexerFactory.Instance.CreateEntityFromSymbol(cx, prop); + public static new Indexer Create(Context cx, IPropertySymbol prop) => IndexerFactory.Instance.CreateEntityFromSymbol(cx, prop.GetBodyDeclaringSymbol()); public override void WriteId(EscapingTextWriter trapFile) { diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Method.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Method.cs index c92c561f31b6..d2c7a05c4f8f 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Method.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Method.cs @@ -14,9 +14,28 @@ internal abstract class Method : CachedSymbol, IExpressionParentE protected Method(Context cx, IMethodSymbol init) : base(cx, init) { } + private SyntheticExtensionParameter? SyntheticParameter { get; set; } + + private int SynthesizeExtensionParameter() + { + // Synthesize implicit parameter for extension methods declared using extension(...) syntax. + if (Symbol.ContainingSymbol is INamedTypeSymbol type && + type.IsExtension && type.ExtensionParameter is IParameterSymbol parameter && + !string.IsNullOrEmpty(parameter.Name) && !Symbol.IsStatic) + { + var originalSyntheticParam = OriginalDefinition.SyntheticParameter; + SyntheticParameter = SyntheticExtensionParameter.Create(Context, this, parameter, originalSyntheticParam); + return 1; + } + + return 0; + } + protected void PopulateParameters() { var originalMethod = OriginalDefinition; + var positionOffset = SynthesizeExtensionParameter(); + IEnumerable parameters = Symbol.Parameters; IEnumerable originalParameters = originalMethod.Symbol.Parameters; @@ -24,8 +43,8 @@ protected void PopulateParameters() { var original = SymbolEqualityComparer.Default.Equals(p.paramSymbol, p.originalParam) ? null - : Parameter.Create(Context, p.originalParam, originalMethod); - Parameter.Create(Context, p.paramSymbol, this, original); + : Parameter.Create(Context, p.originalParam, originalMethod, null, positionOffset); + Parameter.Create(Context, p.paramSymbol, this, original, positionOffset); } if (Symbol.IsVararg) @@ -66,7 +85,7 @@ protected virtual void PopulateMethodBody(TextWriter trapFile) else Expression.Create(Context, expr!, this, 0); - NumberOfLines(trapFile, BodyDeclaringSymbol, this); + NumberOfLines(trapFile, Symbol, this); }); } } @@ -302,9 +321,9 @@ public static void AddExplicitInterfaceQualifierToId(Context cx, EscapingTextWri /// /// Whether this method has unbound type parameters. /// - public bool IsUnboundGeneric => IsGeneric && SymbolEqualityComparer.Default.Equals(Symbol.ConstructedFrom, Symbol); + public bool IsUnboundGeneric => Symbol.IsUnboundGenericMethod(); - public bool IsBoundGeneric => IsGeneric && !IsUnboundGeneric; + public bool IsBoundGeneric => Symbol.IsBoundGenericMethod(); protected IMethodSymbol ConstructedFromSymbol => Symbol.ConstructedFrom; diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/OrdinaryMethod.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/OrdinaryMethod.cs index 22bcd1dce2c8..fa7e4473dedf 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/OrdinaryMethod.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/OrdinaryMethod.cs @@ -14,16 +14,18 @@ protected OrdinaryMethod(Context cx, IMethodSymbol init) public override string Name => Symbol.GetName(); - protected override IMethodSymbol BodyDeclaringSymbol => Symbol.PartialImplementationPart ?? Symbol; - public IMethodSymbol SourceDeclaration => Symbol.OriginalDefinition; public override Microsoft.CodeAnalysis.Location ReportingLocation => IsCompilerGeneratedDelegate() ? Symbol.ContainingType.GetSymbolLocation() - : BodyDeclaringSymbol.GetSymbolLocation(); + : Symbol.GetSymbolLocation(); - public override bool NeedsPopulation => base.NeedsPopulation || IsCompilerGeneratedDelegate(); + public override bool NeedsPopulation => + (base.NeedsPopulation || IsCompilerGeneratedDelegate()) && + // Exclude compiler-generated extension methods. A call to such a method + // is replaced by a call to the defining extension method. + !Symbol.IsCompilerGeneratedExtensionMethod(); public override void Populate(TextWriter trapFile) { @@ -73,7 +75,7 @@ Symbol.ContainingType is INamedTypeSymbol nt && cx.ExtractionContext.Logger.LogWarning("Reduced extension method symbols should not be directly extracted."); } - return OrdinaryMethodFactory.Instance.CreateEntityFromSymbol(cx, method); + return OrdinaryMethodFactory.Instance.CreateEntityFromSymbol(cx, method.GetBodyDeclaringSymbol()); } private class OrdinaryMethodFactory : CachedEntityFactory diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Parameter.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Parameter.cs index 49ef9a4a6e9a..dbb410382f95 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Parameter.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Parameter.cs @@ -7,16 +7,23 @@ namespace Semmle.Extraction.CSharp.Entities { - internal class Parameter : CachedSymbol, IExpressionParentEntity + internal class Parameter : CachedSymbol, IExpressionParentEntity, IParameter { protected IEntity? Parent { get; set; } protected Parameter Original { get; } + private int PositionOffset { get; set; } - protected Parameter(Context cx, IParameterSymbol init, IEntity? parent, Parameter? original) + private Parameter(Context cx, IParameterSymbol init, IEntity? parent, Parameter? original, int positionOffset) : base(cx, init) { Parent = parent; Original = original ?? this; + PositionOffset = positionOffset; + } + + protected Parameter(Context cx, IParameterSymbol init, IEntity? parent, Parameter? original) + : this(cx, init, parent, original, 0) + { } public override Microsoft.CodeAnalysis.Location ReportingLocation => Symbol.GetSymbolLocation(); @@ -32,46 +39,18 @@ public enum Kind RefReadOnly = 6 } - protected virtual int Ordinal => Symbol.Ordinal; - - private Kind ParamKind - { - get - { - switch (Symbol.RefKind) - { - case RefKind.Out: - return Kind.Out; - case RefKind.Ref: - return Kind.Ref; - case RefKind.In: - return Kind.In; - case RefKind.RefReadOnlyParameter: - return Kind.RefReadOnly; - default: - if (Symbol.IsParams) - return Kind.Params; - - if (Ordinal == 0) - { - if (Symbol.ContainingSymbol is IMethodSymbol method && method.IsExtensionMethod) - return Kind.This; - } - return Kind.None; - } - } - } + protected virtual int Ordinal => Symbol.Ordinal + PositionOffset; - public static Parameter Create(Context cx, IParameterSymbol param, IEntity parent, Parameter? original = null) + public static Parameter Create(Context cx, IParameterSymbol param, IEntity parent, Parameter? original = null, int positionOffset = 0) { var cachedSymbol = cx.GetPossiblyCachedParameterSymbol(param); - return ParameterFactory.Instance.CreateEntity(cx, cachedSymbol, (cachedSymbol, parent, original)); + return ParameterFactory.Instance.CreateEntity(cx, cachedSymbol, (cachedSymbol, parent, original, positionOffset)); } public static Parameter Create(Context cx, IParameterSymbol param) { var cachedSymbol = cx.GetPossiblyCachedParameterSymbol(param); - return ParameterFactory.Instance.CreateEntity(cx, cachedSymbol, (cachedSymbol, null, null)); + return ParameterFactory.Instance.CreateEntity(cx, cachedSymbol, (cachedSymbol, null, null, 0)); } public override void WriteId(EscapingTextWriter trapFile) @@ -79,6 +58,9 @@ public override void WriteId(EscapingTextWriter trapFile) if (Parent is null) Parent = Method.Create(Context, Symbol.ContainingSymbol as IMethodSymbol); + if (Parent is null && Symbol.ContainingSymbol is INamedTypeSymbol type && type.IsExtension) + Parent = Type.Create(Context, type); + if (Parent is null) throw new InternalError(Symbol, "Couldn't get parent of symbol."); @@ -113,7 +95,8 @@ public override void Populate(TextWriter trapFile) Context.ModelError(Symbol, "Inconsistent parameter declaration"); var type = Type.Create(Context, Symbol.Type); - trapFile.@params(this, Name, type.TypeRef, Ordinal, ParamKind, Parent!, Original); + var kind = Symbol.GetParameterKind(); + trapFile.@params(this, Name, type.TypeRef, Ordinal, kind, Parent!, Original); if (Context.OnlyScaffold) { @@ -194,11 +177,11 @@ Symbol.ContainingSymbol is IMethodSymbol ms && return syntax?.Default; } - private class ParameterFactory : CachedEntityFactory<(IParameterSymbol, IEntity?, Parameter?), Parameter> + private class ParameterFactory : CachedEntityFactory<(IParameterSymbol, IEntity?, Parameter?, int), Parameter> { public static ParameterFactory Instance { get; } = new ParameterFactory(); - public override Parameter Create(Context cx, (IParameterSymbol, IEntity?, Parameter?) init) => new Parameter(cx, init.Item1, init.Item2, init.Item3); + public override Parameter Create(Context cx, (IParameterSymbol, IEntity?, Parameter?, int) init) => new Parameter(cx, init.Item1, init.Item2, init.Item3, init.Item4); } public override TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.OptionalLabel; diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Property.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Property.cs index d48d778cb75a..57eb5efc0070 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Property.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Property.cs @@ -21,10 +21,6 @@ protected Property(Context cx, IPropertySymbol init) private Type Type => type.Value; - protected override IPropertySymbol BodyDeclaringSymbol => Symbol.PartialImplementationPart ?? Symbol; - - public override Microsoft.CodeAnalysis.Location? ReportingLocation => BodyDeclaringSymbol.Locations.BestOrDefault(); - public override void WriteId(EscapingTextWriter trapFile) { trapFile.WriteSubId(Type); @@ -46,8 +42,8 @@ public override void Populate(TextWriter trapFile) var type = Type; trapFile.properties(this, Symbol.GetName(), ContainingType!, type.TypeRef, Create(Context, Symbol.OriginalDefinition)); - var getter = BodyDeclaringSymbol.GetMethod; - var setter = BodyDeclaringSymbol.SetMethod; + var getter = Symbol.GetMethod; + var setter = Symbol.SetMethod; if (getter is not null) Method.Create(Context, getter); @@ -132,7 +128,7 @@ public static Property Create(Context cx, IPropertySymbol prop) { var isIndexer = prop.IsIndexer || prop.Parameters.Any(); - return isIndexer ? Indexer.Create(cx, prop) : PropertyFactory.Instance.CreateEntityFromSymbol(cx, prop); + return isIndexer ? Indexer.Create(cx, prop) : PropertyFactory.Instance.CreateEntityFromSymbol(cx, prop.GetBodyDeclaringSymbol()); } private class PropertyFactory : CachedEntityFactory diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/PropertyField.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/PropertyField.cs new file mode 100644 index 000000000000..9e9b1f41fff2 --- /dev/null +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/PropertyField.cs @@ -0,0 +1,53 @@ +using System.IO; +using Microsoft.CodeAnalysis; +using Semmle.Extraction.CSharp.Util; +using Semmle.Extraction.Kinds; + +namespace Semmle.Extraction.CSharp.Entities +{ + /// + /// Represents the autogenerated backing field `field` for a property. + /// It is only created for properties that use the `field` keyword in their getter or setter, and + /// is not created for auto-properties. + /// + internal class PropertyField : Field + { + protected PropertyField(Context cx, IFieldSymbol init) + : base(cx, init) + { + } + + public static new PropertyField Create(Context cx, IFieldSymbol field) => PropertyFieldFactory.Instance.CreateEntity(cx, (field, field.AssociatedSymbol), field); + + public override bool NeedsPopulation => true; + + public override void Populate(TextWriter trapFile) + { + PopulateNullability(trapFile, Symbol.GetAnnotatedType()); + + var unboundFieldKey = PropertyField.Create(Context, Symbol.OriginalDefinition); + var name = Symbol.AssociatedSymbol is not null ? $"{Symbol.AssociatedSymbol.GetName()}.field" : Symbol.Name; + trapFile.fields(this, VariableKind.None, name, ContainingType!, Type.TypeRef, unboundFieldKey); + trapFile.compiler_generated(this); + + PopulateModifiers(trapFile); + + if (Context.OnlyScaffold) + { + return; + } + + if (Context.ExtractLocation(Symbol)) + { + WriteLocationsToTrap(trapFile.field_location, this, Locations); + } + } + + private class PropertyFieldFactory : CachedEntityFactory + { + public static PropertyFieldFactory Instance { get; } = new PropertyFieldFactory(); + + public override PropertyField Create(Context cx, IFieldSymbol init) => new PropertyField(cx, init); + } + } +} diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/SyntheticExtensionParameter.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/SyntheticExtensionParameter.cs new file mode 100644 index 000000000000..81d58507a108 --- /dev/null +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/SyntheticExtensionParameter.cs @@ -0,0 +1,77 @@ +using System.IO; +using System.Linq; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace Semmle.Extraction.CSharp.Entities +{ + /// + /// Synthetic parameter for extension methods declared using the extension syntax. + /// That is, we add a synthetic parameter `s` to `IsValid` in the following example: + /// extension(string s) { + /// public bool IsValid() { ... } + /// } + /// + /// Note, that we use the characteristics of the parameter of the extension type + /// to populate the database. + /// + internal class SyntheticExtensionParameter : FreshEntity, IParameter + { + private Method ExtensionMethod { get; } + private IParameterSymbol ExtensionParameter { get; } + private SyntheticExtensionParameter Original { get; } + + private SyntheticExtensionParameter(Context cx, Method method, IParameterSymbol parameter, SyntheticExtensionParameter? original) : base(cx) + { + ExtensionMethod = method; + ExtensionParameter = parameter; + Original = original ?? this; + } + + private static int Ordinal => 0; + + private string Name => ExtensionParameter.Name; + + private bool IsSourceDeclaration => ExtensionMethod.Symbol.IsSourceDeclaration(); + + protected override void Populate(TextWriter trapFile) + { + PopulateNullability(trapFile, ExtensionParameter.GetAnnotatedType()); + PopulateRefKind(trapFile, ExtensionParameter.RefKind); + + var type = Type.Create(Context, ExtensionParameter.Type); + var kind = ExtensionParameter.GetParameterKind(); + trapFile.@params(this, Name, type.TypeRef, Ordinal, kind, ExtensionMethod, Original); + + if (Context.OnlyScaffold) + { + return; + } + + if (Context.ExtractLocation(ExtensionParameter)) + { + var locations = Context.GetLocations(ExtensionParameter); + WriteLocationsToTrap(trapFile.param_location, this, locations); + } + + if (IsSourceDeclaration) + { + foreach (var syntax in ExtensionParameter.DeclaringSyntaxReferences + .Select(d => d.GetSyntax()) + .OfType() + .Where(s => s.Type is not null)) + { + TypeMention.Create(Context, syntax.Type!, this, type); + } + } + } + + public static SyntheticExtensionParameter Create(Context cx, Method method, IParameterSymbol parameter, SyntheticExtensionParameter? original) + { + var p = new SyntheticExtensionParameter(cx, method, parameter, original); + p.TryPopulate(); + return p; + } + } + +} diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Types/NamedType.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Types/NamedType.cs index dcf2bffe095f..078ccf01c10e 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Types/NamedType.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Types/NamedType.cs @@ -20,6 +20,8 @@ private NamedType(Context cx, INamedTypeSymbol init, bool constructUnderlyingTup public static NamedType Create(Context cx, INamedTypeSymbol type) => NamedTypeFactory.Instance.CreateEntityFromSymbol(cx, type); + public NamedType OriginalDefinition => Create(Context, Symbol.OriginalDefinition); + /// /// Creates a named type entity from a tuple type. Unlike , this /// will create an entity for the underlying `System.ValueTuple` struct. @@ -90,6 +92,25 @@ public override void Populate(TextWriter trapFile) { trapFile.anonymous_types(this); } + + if (Symbol.IsExtension && Symbol.ExtensionParameter is IParameterSymbol parameter) + { + // For some reason an extension type has a receiver parameter with an empty name + // even when there is no parameter. + if (!string.IsNullOrEmpty(parameter.Name)) + { + var originalType = OriginalDefinition; + // In case this is a constructed generic, we also need to create the unbound parameter. + var originalParameter = SymbolEqualityComparer.Default.Equals(Symbol, originalType.Symbol.ExtensionParameter) || originalType.Symbol.ExtensionParameter is null + ? null + : Parameter.Create(Context, originalType.Symbol.ExtensionParameter, originalType); + Parameter.Create(Context, parameter, this, originalParameter); + } + + // Use the parameter type as the receiver type. + var receiverType = Type.Create(Context, parameter.Type).TypeRef; + trapFile.extension_receiver_type(this, receiverType); + } } private readonly Lazy typeArgumentsLazy; diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Types/Type.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Types/Type.cs index 3e79a8f81018..0f28a1153e22 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Types/Type.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Types/Type.cs @@ -105,6 +105,7 @@ public Kinds.TypeKind GetTypeKind(Context cx, bool constructUnderlyingTupleType) case TypeKind.Pointer: return Kinds.TypeKind.POINTER; case TypeKind.FunctionPointer: return Kinds.TypeKind.FUNCTION_POINTER; case TypeKind.Error: return Kinds.TypeKind.UNKNOWN; + case TypeKind.Extension: return Kinds.TypeKind.EXTENSION; default: cx.ModelError(Symbol, $"Unhandled type kind '{Symbol.TypeKind}'"); return Kinds.TypeKind.UNKNOWN; @@ -366,7 +367,7 @@ private class DelegateTypeParameter : Parameter private DelegateTypeParameter(Context cx, IParameterSymbol init, IEntity parent, Parameter? original) : base(cx, init, parent, original) { } - public static new DelegateTypeParameter Create(Context cx, IParameterSymbol param, IEntity parent, Parameter? original = null) => + public static DelegateTypeParameter Create(Context cx, IParameterSymbol param, IEntity parent, Parameter? original = null) => // We need to use a different cache key than `param` to avoid mixing up // `DelegateTypeParameter`s and `Parameter`s DelegateTypeParameterFactory.Instance.CreateEntity(cx, (typeof(DelegateTypeParameter), new SymbolEqualityWrapper(param)), (param, parent, original)); diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Kinds/TypeKind.cs b/csharp/extractor/Semmle.Extraction.CSharp/Kinds/TypeKind.cs index a35f25c7596c..9088a11da61f 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Kinds/TypeKind.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Kinds/TypeKind.cs @@ -38,5 +38,6 @@ public enum TypeKind TUPLE = 32, FUNCTION_POINTER = 33, INLINE_ARRAY = 34, + EXTENSION = 35 } } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Trap/Tuples.cs b/csharp/extractor/Semmle.Extraction.CSharp/Trap/Tuples.cs index b789eaa2e9c7..1a25da058bd8 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Trap/Tuples.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Trap/Tuples.cs @@ -202,6 +202,9 @@ internal static void exprorstmt_name(this TextWriter trapFile, IEntity expr, str internal static void extend(this TextWriter trapFile, Type type, Type super) => trapFile.WriteTuple("extend", type, super); + internal static void extension_receiver_type(this TextWriter trapFile, Type @extension, Type receiverType) => + trapFile.WriteTuple("extension_receiver_type", extension, receiverType); + internal static void anonymous_types(this TextWriter trapFile, Type type) => trapFile.WriteTuple("anonymous_types", type); @@ -292,10 +295,10 @@ internal static void operators(this TextWriter trapFile, UserOperator method, st internal static void overrides(this TextWriter trapFile, Method overriding, Method overridden) => trapFile.WriteTuple("overrides", overriding, overridden); - internal static void param_location(this TextWriter trapFile, Parameter param, Location location) => + internal static void param_location(this TextWriter trapFile, IParameter param, Location location) => trapFile.WriteTuple("param_location", param, location); - internal static void @params(this TextWriter trapFile, Parameter param, string name, Type type, int child, Parameter.Kind mode, IEntity method, Parameter originalDefinition) => + internal static void @params(this TextWriter trapFile, IParameter param, string name, Type type, int child, Parameter.Kind mode, IEntity method, IParameter originalDefinition) => trapFile.WriteTuple("params", param, name, type, child, (int)mode, method, originalDefinition); internal static void parent_namespace(this TextWriter trapFile, IEntity type, Namespace parent) => diff --git a/csharp/extractor/Semmle.Util/IEnumerableExtensions.cs b/csharp/extractor/Semmle.Util/IEnumerableExtensions.cs index 1ca676f0ce6d..f4cc97a4d48c 100644 --- a/csharp/extractor/Semmle.Util/IEnumerableExtensions.cs +++ b/csharp/extractor/Semmle.Util/IEnumerableExtensions.cs @@ -119,5 +119,28 @@ public static int SequenceHash(this IEnumerable items) where T : notnull /// public static IEnumerable WhereNotNull(this IEnumerable items) where T : class => items.Where(i => i is not null)!; + + /// + /// Splits the sequence at the given index. + /// + public static (IEnumerable, IEnumerable) SplitAt(this IEnumerable items, int index) + { + var left = new List(); + var right = new List(); + var i = 0; + foreach (var item in items) + { + if (i < index) + { + left.Add(item); + } + else + { + right.Add(item); + } + i++; + } + return (left, right); + } } } diff --git a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md index 68238efa1101..df4169a11740 100644 --- a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.59 + +No user-facing changes. + ## 1.7.58 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.59.md b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.59.md new file mode 100644 index 000000000000..7f6b5bd0256a --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.59.md @@ -0,0 +1,3 @@ +## 1.7.59 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml index 422196097f2a..45a32aec8000 100644 --- a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.58 +lastReleaseVersion: 1.7.59 diff --git a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml index 09feed992650..2bf13d256c9b 100644 --- a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-all -version: 1.7.58 +version: 1.7.60-dev groups: - csharp - solorigate diff --git a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md index 68238efa1101..df4169a11740 100644 --- a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.59 + +No user-facing changes. + ## 1.7.58 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.59.md b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.59.md new file mode 100644 index 000000000000..7f6b5bd0256a --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.59.md @@ -0,0 +1,3 @@ +## 1.7.59 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml index 422196097f2a..45a32aec8000 100644 --- a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.58 +lastReleaseVersion: 1.7.59 diff --git a/csharp/ql/campaigns/Solorigate/src/qlpack.yml b/csharp/ql/campaigns/Solorigate/src/qlpack.yml index 6f7ea3b625bf..780301f353c8 100644 --- a/csharp/ql/campaigns/Solorigate/src/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-queries -version: 1.7.58 +version: 1.7.60-dev groups: - csharp - solorigate diff --git a/csharp/ql/integration-tests/posix/conftest.py b/csharp/ql/integration-tests/posix/conftest.py new file mode 100644 index 000000000000..543bc046c982 --- /dev/null +++ b/csharp/ql/integration-tests/posix/conftest.py @@ -0,0 +1,19 @@ +import runs_on + + +def _supports_mono_nuget(): + """ + Helper function to determine if the current platform supports Mono and nuget. + + Returns True if running on Linux or on macOS x86_64 (excluding macos-15 and macos-26). + macOS ARM runners (macos-15 and macos-26) are excluded due to issues with Mono and nuget. + """ + return ( + runs_on.linux + or ( + runs_on.macos + and runs_on.x86_64 + and not runs_on.macos_15 + and not runs_on.macos_26 + ) + ) diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py index d1c1745d69b6..725ded1899c9 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py @@ -1,13 +1,9 @@ -import runs_on import pytest import os +from ..conftest import _supports_mono_nuget -# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget. -@pytest.mark.only_if( - runs_on.linux - or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15) -) +@pytest.mark.only_if(_supports_mono_nuget()) def test(codeql, csharp): os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_DOTNET_FRAMEWORK_REFERENCES"] = ( "/non-existent-path" diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py index 6d2058c684c2..662178aa3c0f 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py @@ -1,13 +1,9 @@ import os -import runs_on import pytest +from ..conftest import _supports_mono_nuget -# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget. -@pytest.mark.only_if( - runs_on.linux - or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15) -) +@pytest.mark.only_if(_supports_mono_nuget()) def test(codeql, csharp): # making sure we're not doing any fallback restore: os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT"] = "1" diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py index 7f88196097ff..d8e8c8055ad5 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py @@ -1,11 +1,7 @@ -import runs_on import pytest +from ..conftest import _supports_mono_nuget -# Skipping the test on the ARM runners and macos-15, as we're running into trouble with Mono and nuget. -@pytest.mark.only_if( - runs_on.linux - or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15) -) +@pytest.mark.only_if(_supports_mono_nuget()) def test(codeql, csharp): codeql.database.create(build_mode="none") diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/test.py index 185fb5201f95..ccd8f61a3845 100644 --- a/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/test.py +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/test.py @@ -1,11 +1,7 @@ -import runs_on import pytest +from ..conftest import _supports_mono_nuget -# Skipping the test on the ARM runners, as we're running into trouble with Mono and nuget. -@pytest.mark.only_if( - runs_on.linux - or (runs_on.macos and runs_on.x86_64 and not runs_on.macos_15) -) +@pytest.mark.only_if(_supports_mono_nuget()) def test(codeql, csharp): codeql.database.create(source_root="proj", build_mode="none") diff --git a/csharp/ql/lib/CHANGELOG.md b/csharp/ql/lib/CHANGELOG.md index 2910824c1b72..21b19c8a09ab 100644 --- a/csharp/ql/lib/CHANGELOG.md +++ b/csharp/ql/lib/CHANGELOG.md @@ -1,3 +1,10 @@ +## 5.4.7 + +### Minor Analysis Improvements + +* The model for `System.Web.HttpUtility` has been modified to better model the flow of tainted URIs. +* C# 14: Added support for `extension` members in the extractor, QL library, data flow, and Models as Data, covering extension methods, properties, and operators. + ## 5.4.6 ### Minor Analysis Improvements diff --git a/csharp/ql/lib/change-notes/2026-02-12-field-keyword.md b/csharp/ql/lib/change-notes/2026-02-12-field-keyword.md new file mode 100644 index 000000000000..7ca6548b27f0 --- /dev/null +++ b/csharp/ql/lib/change-notes/2026-02-12-field-keyword.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* C# 14: Added support for the `field` keyword in properties. diff --git a/csharp/ql/lib/change-notes/2026-02-16-partial-events.md b/csharp/ql/lib/change-notes/2026-02-16-partial-events.md new file mode 100644 index 000000000000..3bbc1ae829ad --- /dev/null +++ b/csharp/ql/lib/change-notes/2026-02-16-partial-events.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* C# 14: Added support for partial events. diff --git a/csharp/ql/lib/change-notes/2026-02-23-partial-extraction-fix.md b/csharp/ql/lib/change-notes/2026-02-23-partial-extraction-fix.md new file mode 100644 index 000000000000..fc7a9d1dfbf5 --- /dev/null +++ b/csharp/ql/lib/change-notes/2026-02-23-partial-extraction-fix.md @@ -0,0 +1,4 @@ +--- +category: fix +--- +* Fixed an issue where the body of a partial member could be extracted twice. When both a *defining* and an *implementing* declaration exist, only the *implementing* declaration is now extracted. diff --git a/csharp/ql/lib/change-notes/2026-02-24-partial-constructors.md b/csharp/ql/lib/change-notes/2026-02-24-partial-constructors.md new file mode 100644 index 000000000000..5ce442aaa10f --- /dev/null +++ b/csharp/ql/lib/change-notes/2026-02-24-partial-constructors.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* C# 14: Added support for partial constructors. diff --git a/csharp/ql/lib/change-notes/2026-03-02-post-update-nodes.md b/csharp/ql/lib/change-notes/2026-03-02-post-update-nodes.md new file mode 100644 index 000000000000..d021cabf1a08 --- /dev/null +++ b/csharp/ql/lib/change-notes/2026-03-02-post-update-nodes.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Added post-update nodes for struct-type arguments, allowing data flow out of method calls via those arguments. diff --git a/csharp/ql/lib/change-notes/2026-03-03-implicit-conversion-reverse-flow.md b/csharp/ql/lib/change-notes/2026-03-03-implicit-conversion-reverse-flow.md new file mode 100644 index 000000000000..842c2069b3e7 --- /dev/null +++ b/csharp/ql/lib/change-notes/2026-03-03-implicit-conversion-reverse-flow.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Added reverse taint flow from implicit conversion operator calls to their arguments. diff --git a/csharp/ql/lib/change-notes/released/5.4.7.md b/csharp/ql/lib/change-notes/released/5.4.7.md new file mode 100644 index 000000000000..b7d268470a27 --- /dev/null +++ b/csharp/ql/lib/change-notes/released/5.4.7.md @@ -0,0 +1,6 @@ +## 5.4.7 + +### Minor Analysis Improvements + +* The model for `System.Web.HttpUtility` has been modified to better model the flow of tainted URIs. +* C# 14: Added support for `extension` members in the extractor, QL library, data flow, and Models as Data, covering extension methods, properties, and operators. diff --git a/csharp/ql/lib/codeql-pack.release.yml b/csharp/ql/lib/codeql-pack.release.yml index 2f1d6ff78a82..4db516ab4153 100644 --- a/csharp/ql/lib/codeql-pack.release.yml +++ b/csharp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 5.4.6 +lastReleaseVersion: 5.4.7 diff --git a/csharp/ql/lib/ext/System.Web.model.yml b/csharp/ql/lib/ext/System.Web.model.yml index 6d05cdae75b5..63c539fbe5ec 100644 --- a/csharp/ql/lib/ext/System.Web.model.yml +++ b/csharp/ql/lib/ext/System.Web.model.yml @@ -29,6 +29,10 @@ extensions: - ["System.Web", "HttpUtility", False, "JavaScriptStringEncode", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"] - ["System.Web", "HttpUtility", False, "JavaScriptStringEncode", "(System.String,System.Boolean)", "", "Argument[0]", "ReturnValue", "taint", "manual"] - ["System.Web", "HttpUtility", False, "ParseQueryString", "", "", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["System.Web", "HttpUtility", False, "UrlDecode", "(System.Byte[],System.Int32,System.Int32,System.Text.Encoding)", "", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["System.Web", "HttpUtility", False, "UrlDecode", "(System.Byte[],System.Text.Encoding)", "", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["System.Web", "HttpUtility", False, "UrlDecode", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["System.Web", "HttpUtility", False, "UrlDecode", "(System.String,System.Text.Encoding)", "", "Argument[0]", "ReturnValue", "taint", "manual"] - ["System.Web", "HttpUtility", False, "UrlEncode", "(System.Byte[])", "", "Argument[0]", "ReturnValue", "taint", "manual"] - ["System.Web", "HttpUtility", False, "UrlEncode", "(System.Byte[],System.Int32,System.Int32)", "", "Argument[0]", "ReturnValue", "taint", "manual"] - ["System.Web", "HttpUtility", False, "UrlEncode", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"] diff --git a/csharp/ql/lib/qlpack.yml b/csharp/ql/lib/qlpack.yml index 28d4a36b3ab7..30f75e743043 100644 --- a/csharp/ql/lib/qlpack.yml +++ b/csharp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-all -version: 5.4.6 +version: 5.4.8-dev groups: csharp dbscheme: semmlecode.csharp.dbscheme extractor: csharp diff --git a/csharp/ql/lib/semmle/code/csharp/Callable.qll b/csharp/ql/lib/semmle/code/csharp/Callable.qll index 49a2271b27c8..f8346cfe01e2 100644 --- a/csharp/ql/lib/semmle/code/csharp/Callable.qll +++ b/csharp/ql/lib/semmle/code/csharp/Callable.qll @@ -10,6 +10,7 @@ import exprs.Call private import commons.QualifiedName private import commons.Collections private import semmle.code.csharp.ExprOrStmtParent +private import semmle.code.csharp.internal.Callable private import semmle.code.csharp.metrics.Complexity private import TypeRef @@ -223,6 +224,8 @@ class Callable extends Parameterizable, ExprOrStmtParent, @callable { Call getACall() { this = result.getTarget() } } +final class ExtensionCallable = ExtensionCallableImpl; + /** * A method, for example * @@ -267,8 +270,11 @@ class Method extends Callable, Virtualizable, Attributable, @method { override Location getALocation() { method_location(this.getUnboundDeclaration(), result) } + /** Holds if this method is a classic extension method. */ + predicate isClassicExtensionMethod() { this.getParameter(0).hasExtensionMethodModifier() } + /** Holds if this method is an extension method. */ - predicate isExtensionMethod() { this.getParameter(0).hasExtensionMethodModifier() } + predicate isExtensionMethod() { this.isClassicExtensionMethod() or this.isInExtension() } /** Gets the type of the `params` parameter of this method, if any. */ Type getParamsType() { @@ -295,8 +301,10 @@ class Method extends Callable, Virtualizable, Attributable, @method { override string getAPrimaryQlClass() { result = "Method" } } +final class ExtensionMethod = ExtensionMethodImpl; + /** - * An extension method, for example + * An extension method, for example * * ```csharp * static bool IsDefined(this Widget w) { @@ -304,16 +312,28 @@ class Method extends Callable, Virtualizable, Attributable, @method { * } * ``` */ -class ExtensionMethod extends Method { - ExtensionMethod() { this.isExtensionMethod() } +class ClassicExtensionMethod extends ExtensionMethodImpl { + ClassicExtensionMethod() { this.isClassicExtensionMethod() } - override predicate isStatic() { any() } - - /** Gets the type being extended by this method. */ pragma[noinline] - Type getExtendedType() { result = this.getParameter(0).getType() } + override Type getExtendedType() { result = this.getParameter(0).getType() } + + override predicate isStatic() { any() } +} - override string getAPrimaryQlClass() { result = "ExtensionMethod" } +/** + * An extension method declared in an extension type, for example `IsNullOrEmpty` in + * + * ```csharp + * static class MyExtensions { + * extension(string s) { + * public bool IsNullOrEmpty() { ... } + * } + * } + * ``` + */ +class ExtensionTypeExtensionMethod extends ExtensionMethodImpl { + ExtensionTypeExtensionMethod() { this.isInExtension() } } /** @@ -536,6 +556,21 @@ class RecordCloneMethod extends Method { } } +/** + * An extension operator, for example `*` in + * + * ```csharp + * static class MyExtensions { + * extension(string s) { + * public static string operator *(int s1, string s2) { ... } + * } + * } + * ``` + */ +class ExtensionOperator extends ExtensionCallableImpl, Operator { + ExtensionOperator() { this.isInExtension() } +} + /** * A user-defined unary operator - an operator taking one operand. * diff --git a/csharp/ql/lib/semmle/code/csharp/Member.qll b/csharp/ql/lib/semmle/code/csharp/Member.qll index a196d3b3fc70..b64f408af64c 100644 --- a/csharp/ql/lib/semmle/code/csharp/Member.qll +++ b/csharp/ql/lib/semmle/code/csharp/Member.qll @@ -102,6 +102,9 @@ class Declaration extends NamedElement, @declaration { * implicit constructors or accessors. */ predicate isCompilerGenerated() { compiler_generated(this) } + + /** Holds if this declaration is in an extension type. */ + predicate isInExtension() { this.getDeclaringType() instanceof ExtensionType } } /** A declaration that can have a modifier. */ @@ -469,7 +472,7 @@ class Virtualizable extends Overridable, Member, @virtualizable { /** * A parameterizable declaration. Either a callable (`Callable`), a delegate - * type (`DelegateType`), or an indexer (`Indexer`). + * type (`DelegateType`), an indexer (`Indexer`), or an extension (`ExtensionType`). */ class Parameterizable extends Declaration, @parameterizable { /** Gets raw parameter `i`, including the `this` parameter at index 0. */ diff --git a/csharp/ql/lib/semmle/code/csharp/Property.qll b/csharp/ql/lib/semmle/code/csharp/Property.qll index e651639b6313..88665280d5b9 100644 --- a/csharp/ql/lib/semmle/code/csharp/Property.qll +++ b/csharp/ql/lib/semmle/code/csharp/Property.qll @@ -6,6 +6,7 @@ import Member import Stmt import Type private import semmle.code.csharp.ExprOrStmtParent +private import semmle.code.csharp.internal.Callable private import TypeRef /** @@ -260,6 +261,21 @@ class Property extends DeclarationWithGetSetAccessors, @property { override string getAPrimaryQlClass() { result = "Property" } } +/** + * An extension property, for example `FirstChar` in + * + * ```csharp + * static class MyExtensions { + * extension(string s) { + * public char FirstChar { get { ... } } + * } + * } + * ``` + */ +class ExtensionProperty extends Property { + ExtensionProperty() { this.isInExtension() } +} + /** * An indexer, for example `string this[int i]` on line 2 in * @@ -413,6 +429,22 @@ class Accessor extends Callable, Modifiable, Attributable, Overridable, @callabl override string toString() { result = this.getName() } } +/** + * An extension accessor. Either a getter (`Getter`) or a setter (`Setter`) of an + * extension property, for example `get` in + * + * ```csharp + * static class MyExtensions { + * extension(string s) { + * public char FirstChar { get { ... } } + * } + * } + * ``` + */ +class ExtensionAccessor extends ExtensionCallableImpl, Accessor { + ExtensionAccessor() { this.isInExtension() } +} + /** * A `get` accessor, for example `get { return p; }` in * diff --git a/csharp/ql/lib/semmle/code/csharp/Type.qll b/csharp/ql/lib/semmle/code/csharp/Type.qll index 1efb1aa93bff..54bbe9a6219f 100644 --- a/csharp/ql/lib/semmle/code/csharp/Type.qll +++ b/csharp/ql/lib/semmle/code/csharp/Type.qll @@ -17,7 +17,8 @@ private import semmle.code.csharp.frameworks.system.runtime.CompilerServices * * Either a value or reference type (`ValueOrRefType`), the `void` type (`VoidType`), * a pointer type (`PointerType`), the arglist type (`ArglistType`), an unknown - * type (`UnknownType`), or a type parameter (`TypeParameter`). + * type (`UnknownType`), a type parameter (`TypeParameter`) or + * an extension type (`ExtensionType`). */ class Type extends Member, TypeContainer, @type { /** Gets the name of this type without additional syntax such as `[]` or `*`. */ @@ -1326,3 +1327,35 @@ class TypeMention extends @type_mention { /** Gets the location of this type mention. */ Location getLocation() { type_mention_location(this, result) } } + +/** + * A type extension declaration, for example `extension(string s) { ... }` in + * + * ```csharp + * static class MyExtensions { + * extension(string s) { ... } + * ``` + */ +class ExtensionType extends Parameterizable, @extension_type { + /** + * Gets the receiver parameter of this extension type, if any. + */ + Parameter getReceiverParameter() { result = this.getParameter(0) } + + /** + * Holds if this extension type has a receiver parameter. + */ + predicate hasReceiverParameter() { exists(this.getReceiverParameter()) } + + /** + * Gets the type being extended by this extension type. + */ + Type getExtendedType() { + extension_receiver_type(this, result) + or + not extension_receiver_type(this, any(Type t)) and + extension_receiver_type(this, getTypeRef(result)) + } + + override string getAPrimaryQlClass() { result = "ExtensionType" } +} diff --git a/csharp/ql/lib/semmle/code/csharp/commons/QualifiedName.qll b/csharp/ql/lib/semmle/code/csharp/commons/QualifiedName.qll index 2af02f3e85f2..6fef9cc24571 100644 --- a/csharp/ql/lib/semmle/code/csharp/commons/QualifiedName.qll +++ b/csharp/ql/lib/semmle/code/csharp/commons/QualifiedName.qll @@ -67,6 +67,12 @@ module QualifiedName { ) } + private string getName(ValueOrRefType t) { + not t instanceof ExtensionType and result = t.getUndecoratedName() + or + result = "extension(" + getFullName(t.(ExtensionType).getExtendedType()) + ")" + } + /** Holds if declaration `d` has the qualified name `qualifier`.`name`. */ predicate hasQualifiedName(Declaration d, string qualifier, string name) { d = @@ -86,12 +92,12 @@ module QualifiedName { exists(string name0 | name = name0 + Input::getUnboundGenericSuffix(ugt) | exists(string enclosing | hasQualifiedName(ugt.getDeclaringType(), qualifier, enclosing) and - name0 = enclosing + "+" + ugt.getUndecoratedName() + name0 = enclosing + "+" + getName(ugt) ) or not exists(ugt.getDeclaringType()) and qualifier = ugt.getNamespace().getFullName() and - name0 = ugt.getUndecoratedName() + name0 = getName(ugt) ) ) or @@ -100,12 +106,12 @@ module QualifiedName { exists(string name0 | name = name0 + "<" + getTypeArgumentsQualifiedNames(ct) + ">" | exists(string enclosing | hasQualifiedName(ct.getDeclaringType(), qualifier, enclosing) and - name0 = enclosing + "+" + ct.getUndecoratedName() + name0 = enclosing + "+" + getName(ct) ) or not exists(ct.getDeclaringType()) and qualifier = ct.getNamespace().getFullName() and - name0 = ct.getUndecoratedName() + name0 = getName(ct) ) ) or @@ -116,12 +122,12 @@ module QualifiedName { ( exists(string enclosing | hasQualifiedName(vort.getDeclaringType(), qualifier, enclosing) and - name = enclosing + "+" + vort.getUndecoratedName() + name = enclosing + "+" + getName(vort) ) or not exists(vort.getDeclaringType()) and qualifier = vort.getNamespace().getFullName() and - name = vort.getUndecoratedName() + name = getName(vort) ) ) or diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll index 1b3de63495f0..5f28c9da1964 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll @@ -6,6 +6,7 @@ private import ControlFlowReachability private import FlowSummaryImpl as FlowSummaryImpl private import semmle.code.csharp.dataflow.FlowSummary as FlowSummary private import semmle.code.csharp.dataflow.internal.ExternalFlow +private import semmle.code.csharp.commons.Collections private import semmle.code.csharp.Conversion private import semmle.code.csharp.dataflow.internal.SsaImpl as SsaImpl private import semmle.code.csharp.ExprOrStmtParent @@ -16,7 +17,6 @@ private import semmle.code.csharp.frameworks.EntityFramework private import semmle.code.csharp.frameworks.system.linq.Expressions private import semmle.code.csharp.frameworks.NHibernate private import semmle.code.csharp.frameworks.Razor -private import semmle.code.csharp.frameworks.system.Collections private import semmle.code.csharp.frameworks.system.threading.Tasks private import semmle.code.csharp.internal.Location private import codeql.util.Unit @@ -1087,7 +1087,7 @@ predicate exprMayHavePostUpdateNode(Expr e) { or t = any(TypeParameter tp | not tp.isValueType()) or - t.isRefLikeType() + t instanceof Struct ) } @@ -2545,6 +2545,7 @@ private predicate clearsCont(Node n, Content c) { a.getType() = s and f = s.getAField() and c.(FieldContent).getField() = f.getUnboundDeclaration() and + not f.getType() instanceof CollectionType and not f.isRef() ) or diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/ExternalFlow.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/ExternalFlow.qll index 61954f63e10b..edfaae018e98 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/ExternalFlow.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/ExternalFlow.qll @@ -214,7 +214,7 @@ module ModelValidation { not namespace.regexpMatch("[a-zA-Z0-9_\\.]+") and result = "Dubious namespace \"" + namespace + "\" in " + pred + " model." or - not type.regexpMatch("[a-zA-Z0-9_<>,\\+]+") and + not type.regexpMatch("[a-zA-Z0-9_<>,\\(\\)\\+\\.]+") and result = "Dubious type \"" + type + "\" in " + pred + " model." or not name.regexpMatch("[a-zA-Z0-9_<>,\\.]*") and diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll index b24a104d3880..bb08c8f7e2ca 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll @@ -109,6 +109,16 @@ private class LocalTaintExprStepConfiguration extends ControlFlowReachabilityCon } } +private ControlFlow::Nodes::ExprNode getALastEvalNode(ControlFlow::Nodes::ExprNode cfn) { + exists(OperatorCall oc | any(LocalTaintExprStepConfiguration x).hasExprPath(_, result, oc, cfn) | + oc.getTarget() instanceof ImplicitConversionOperator + ) +} + +private ControlFlow::Nodes::ExprNode getPostUpdateReverseStep(ControlFlow::Nodes::ExprNode e) { + result = getALastEvalNode(e) +} + private predicate localTaintStepCommon(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { hasNodePath(any(LocalTaintExprStepConfiguration x), nodeFrom, nodeTo) } @@ -177,6 +187,16 @@ private module Cached { readStep(nodeFrom, any(DataFlow::ContentSet c | c.isElement()), nodeTo) or nodeTo = nodeFrom.(DataFlow::NonLocalJumpNode).getAJumpSuccessor(false) + or + // Allow reverse update flow for implicit conversion operator calls. + // This is needed to support flow out of method call arguments, where an implicit conversion is applied + // to a call argument. + nodeTo.(PostUpdateNode).getPreUpdateNode().(DataFlow::ExprNode).getControlFlowNode() = + getPostUpdateReverseStep(nodeFrom + .(PostUpdateNode) + .getPreUpdateNode() + .(DataFlow::ExprNode) + .getControlFlowNode()) ) and model = "" or diff --git a/csharp/ql/lib/semmle/code/csharp/dispatch/Dispatch.qll b/csharp/ql/lib/semmle/code/csharp/dispatch/Dispatch.qll index c61ad0f2a2a9..a83967441d74 100644 --- a/csharp/ql/lib/semmle/code/csharp/dispatch/Dispatch.qll +++ b/csharp/ql/lib/semmle/code/csharp/dispatch/Dispatch.qll @@ -87,7 +87,8 @@ private module Internal { newtype TDispatchCall = TDispatchMethodCall(MethodCall mc) { not isReflectionCall(mc, _, _, _, _) and - not mc.isLateBound() + not mc.isLateBound() and + not isExtensionAccessorCall(mc) } or TDispatchAccessorCall(AccessorCall ac) or TDispatchOperatorCall(OperatorCall oc) { not oc.isLateBound() } or @@ -110,7 +111,8 @@ private module Internal { c instanceof ConstructorInitializer or c instanceof LocalFunctionCall - } + } or + TDispatchExtensionAccessorCall(MethodCall mc) { isExtensionAccessorCall(mc) } cached Expr getCall(DispatchCall dc) { result = dc.(DispatchCallImpl).getCall() } @@ -142,6 +144,8 @@ private module Internal { import Cached + private predicate isExtensionAccessorCall(MethodCall mc) { exists(mc.getTargetAccessor()) } + /** * Holds if `mc` is a reflection call to a method named `name`, where * `object` is the object on which to invoke the method (`null` if a @@ -819,6 +823,33 @@ private module Internal { override Method getAStaticTarget() { result = this.getCall().getTarget() } } + /** + * A call to an extension accessor method. + */ + private class DispatchExtensionAccessorCall extends DispatchCallImpl, + TDispatchExtensionAccessorCall + { + override MethodCall getCall() { this = TDispatchExtensionAccessorCall(result) } + + private Expr getArgumentForParameter(Parameter p) { + this.getCall().getTargetAccessor().getAParameter() = p and + result = this.getCall().getArgument(p.getPosition()) + } + + override Expr getArgument(int i) { + exists(MethodCall call, Parameter p | call = this.getCall() | + p = call.getTargetAccessor().getParameter(i) and + result = this.getArgumentForParameter(p) + ) + } + + override Expr getQualifier() { result = this.getCall().getQualifier() } + + override Accessor getAStaticTarget() { result = this.getCall().getTargetAccessor() } + + override RuntimeCallable getADynamicTarget() { result = this.getAStaticTarget() } + } + /** * An ordinary operator call. * diff --git a/csharp/ql/lib/semmle/code/csharp/exprs/Access.qll b/csharp/ql/lib/semmle/code/csharp/exprs/Access.qll index eafc4fac491f..84375bc70130 100644 --- a/csharp/ql/lib/semmle/code/csharp/exprs/Access.qll +++ b/csharp/ql/lib/semmle/code/csharp/exprs/Access.qll @@ -223,6 +223,40 @@ class ParameterAccess extends LocalScopeVariableAccess, @parameter_access_expr { override string getAPrimaryQlClass() { result = "ParameterAccess" } } +/** + * An access to a synthetic parameter for an extension method, for example the + * access to `s` on line 3 in + * + * ```csharp + * static class MyExtensions { + * extension(string s) { + * public bool IsEmpty() { return s == string.Empty; } + * } + * } + * ``` + */ +class SyntheticExtensionParameterAccess extends ParameterAccess { + SyntheticExtensionParameterAccess() { + exists(ExtensionType et, Parameter p | + p = et.getReceiverParameter() and + expr_access(this, p) + ) + } + + override Parameter getTarget() { + exists(ExtensionCallable c | + this.getEnclosingCallable+() = c and + result = c.getParameter(0) + ) + } + + override string toString() { + result = "access to extension synthetic parameter " + this.getTarget().getName() + } + + override string getAPrimaryQlClass() { result = "SyntheticExtensionParameterAccess" } +} + /** * An access to a parameter that reads the underlying value, for example * the access to `p` on line 2 in diff --git a/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll b/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll index eecbc35900aa..f8b51a990ed1 100644 --- a/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll +++ b/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll @@ -267,9 +267,33 @@ class Call extends Expr, @call { class MethodCall extends Call, QualifiableExpr, LateBindableExpr, @method_invocation_expr { override Method getTarget() { expr_call(this, result) } + /** + * Gets the accessor that was used to generate this method, if any. For example, the + * method call `MyExtensions.get_FirstChar(s)` on line 9 is generated from the property + * accessor `get_FirstChar` on line 3 in + * + * ```csharp + * static class MyExtensions { + * extension(string s) { + * public char FirstChar { get { ... } } + * } + * } + * + * class A { + * char M(string s) { + * return MyExtensions.get_FirstChar(s); + * } + * } + */ + Accessor getTargetAccessor() { expr_call(this, result) } + override Method getQualifiedDeclaration() { result = this.getTarget() } - override string toString() { result = "call to method " + concat(this.getTarget().getName()) } + override string toString() { + if exists(this.getTargetAccessor()) + then result = "call to extension accessor " + concat(this.getTargetAccessor().getName()) + else result = "call to method " + concat(this.getTarget().getName()) + } override string getAPrimaryQlClass() { result = "MethodCall" } @@ -479,6 +503,30 @@ class OperatorCall extends Call, LateBindableExpr, @operator_invocation_expr { override string getAPrimaryQlClass() { result = "OperatorCall" } } +/** + * A call to an extension operator, for example `3 * s` on + * line 9 in + * + * ```csharp + * static class MyExtensions { + * extension(string s) { + * public static string operator *(int i, string s) { ... } + * } + * } + * + * class A { + * string M(string s) { + * return 3 * s; + * } + * } + * ``` + */ +class ExtensionOperatorCall extends OperatorCall { + ExtensionOperatorCall() { this.getTarget() instanceof ExtensionOperator } + + override string getAPrimaryQlClass() { result = "ExtensionOperatorCall" } +} + /** * A call to a user-defined mutator operator, for example `a++` on * line 7 in @@ -658,6 +706,44 @@ class IndexerCall extends AccessorCall, IndexerAccessExpr { override string getAPrimaryQlClass() { result = "IndexerCall" } } +/** + * A call to an extension property accessor (via the property), for example + * `s.FirstChar` on line 9 in + * + * ```csharp + * static class MyExtensions { + * extension(string s) { + * public char FirstChar { get { ... } } + * } + * } + * + * class A { + * char M(string s) { + * return s.FirstChar; + * } + * } + * ``` + */ +class ExtensionPropertyCall extends PropertyCall { + private ExtensionProperty prop; + + ExtensionPropertyCall() { this.getProperty() = prop } + + override Expr getArgument(int i) { + if prop.isStatic() + then result = super.getArgument(i) + else ( + // Shift arguments as the qualifier is an explicit argument in the getter/setter. + i = 0 and + result = this.getQualifier() + or + result = super.getArgument(i - 1) + ) + } + + override string getAPrimaryQlClass() { result = "ExtensionPropertyCall" } +} + /** * A call to an event accessor, for example the call to `add_Click` * (defined on line 5) on line 12 in diff --git a/csharp/ql/lib/semmle/code/csharp/internal/Callable.qll b/csharp/ql/lib/semmle/code/csharp/internal/Callable.qll new file mode 100644 index 000000000000..533bf31c0741 --- /dev/null +++ b/csharp/ql/lib/semmle/code/csharp/internal/Callable.qll @@ -0,0 +1,33 @@ +/** + * INTERNAL: Do not use. + * + * Provides `Callable` classes, which are things that can be called + * such as methods and operators. + */ + +private import semmle.code.csharp.Callable +private import semmle.code.csharp.Property + +/** + * A callable that is declared as an extension. + * + * Either an extension method (`ExtensionMethod`), an extension operator + * (`ExtensionOperator`) or an extension accessor (`ExtensionAccessor`). + */ +abstract class ExtensionCallableImpl extends Callable { + /** Gets the type being extended by this method. */ + pragma[noinline] + Type getExtendedType() { result = this.getDeclaringType().(ExtensionType).getExtendedType() } + + override string getAPrimaryQlClass() { result = "ExtensionCallable" } +} + +/** + * An extension method. + * + * Either a classic extension method (`ClassicExtensionMethod`) or an extension + * type extension method (`ExtensionTypeExtensionMethod`). + */ +abstract class ExtensionMethodImpl extends ExtensionCallableImpl, Method { + override string getAPrimaryQlClass() { result = "ExtensionMethod" } +} diff --git a/csharp/ql/lib/semmlecode.csharp.dbscheme b/csharp/ql/lib/semmlecode.csharp.dbscheme index 68b5aec54e50..178a7e6cf335 100644 --- a/csharp/ql/lib/semmlecode.csharp.dbscheme +++ b/csharp/ql/lib/semmlecode.csharp.dbscheme @@ -492,6 +492,7 @@ case @type.kind of | 32 = @tuple_type | 33 = @function_pointer_type | 34 = @inline_array_type +| 35 = @extension_type ; @simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; @@ -502,7 +503,7 @@ case @type.kind of @value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; @ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type - | @dynamic_type; + | @dynamic_type | @extension_type; @value_or_ref_type = @value_type | @ref_type; typerefs( @@ -541,6 +542,10 @@ function_pointer_return_type( unique int function_pointer_id: @function_pointer_type ref, int return_type_id: @type_or_ref ref); +extension_receiver_type( + unique int extension: @extension_type ref, + int receiver_type_id: @type_or_ref ref); + extend( int sub: @type ref, int super: @type_or_ref ref); @@ -903,7 +908,7 @@ localvar_location( unique int id: @local_variable ref, int loc: @location ref); -@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type; +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type | @extension_type; #keyset[name, parent_id] #keyset[index, parent_id] diff --git a/csharp/ql/lib/upgrades/68b5aec54e50fe7e375df3777b756a746ca3a37c/old.dbscheme b/csharp/ql/lib/upgrades/68b5aec54e50fe7e375df3777b756a746ca3a37c/old.dbscheme new file mode 100644 index 000000000000..68b5aec54e50 --- /dev/null +++ b/csharp/ql/lib/upgrades/68b5aec54e50fe7e375df3777b756a746ca3a37c/old.dbscheme @@ -0,0 +1,1484 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile.rsp` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * Overlay support + */ + +/** + * The CLI will automatically emit the tuple `databaseMetadata("isOverlay", "true")`, + * along with an `overlayChangedFiles` tuple for each new/modified/deleted file, + * when building an overlay database, and these can be used by the discard predicates. + */ +databaseMetadata( + string metadataKey : string ref, + string value : string ref +); + +overlayChangedFiles( + string path : string ref +); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +@locatable = @declaration_with_accessors | @callable_accessor | @declaration_or_directive + | @diagnostic | @extractor_message | @preprocessor_directive | @attribute | @type_mention | @type_parameter_constraints + | @declaration_with_accessors | @callable_accessor | @operator | @method + | @constructor | @destructor | @field | @local_variable | @parameter | @stmt | @expr + | @xmllocatable | @commentline | @commentblock | @asp_element + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, params/array = 3, this = 4, in = 5, ref readonly = 6 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +| 138 = @interpolated_string_insert_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_expr = @assign_arith_expr | @assign_bitwise_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @assign_expr | @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@call = @method_invocation_expr | @constructor_init_expr | @operator_invocation_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @operator_invocation_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* XML Files */ + +xmlEncoding ( + unique int id: @file ref, + string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); diff --git a/csharp/ql/lib/upgrades/68b5aec54e50fe7e375df3777b756a746ca3a37c/semmlecode.csharp.dbscheme b/csharp/ql/lib/upgrades/68b5aec54e50fe7e375df3777b756a746ca3a37c/semmlecode.csharp.dbscheme new file mode 100644 index 000000000000..178a7e6cf335 --- /dev/null +++ b/csharp/ql/lib/upgrades/68b5aec54e50fe7e375df3777b756a746ca3a37c/semmlecode.csharp.dbscheme @@ -0,0 +1,1489 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile.rsp` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * Overlay support + */ + +/** + * The CLI will automatically emit the tuple `databaseMetadata("isOverlay", "true")`, + * along with an `overlayChangedFiles` tuple for each new/modified/deleted file, + * when building an overlay database, and these can be used by the discard predicates. + */ +databaseMetadata( + string metadataKey : string ref, + string value : string ref +); + +overlayChangedFiles( + string path : string ref +); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +@locatable = @declaration_with_accessors | @callable_accessor | @declaration_or_directive + | @diagnostic | @extractor_message | @preprocessor_directive | @attribute | @type_mention | @type_parameter_constraints + | @declaration_with_accessors | @callable_accessor | @operator | @method + | @constructor | @destructor | @field | @local_variable | @parameter | @stmt | @expr + | @xmllocatable | @commentline | @commentblock | @asp_element + +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type +| 35 = @extension_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type | @extension_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extension_receiver_type( + unique int extension: @extension_type ref, + int receiver_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type | @extension_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, params/array = 3, this = 4, in = 5, ref readonly = 6 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +| 138 = @interpolated_string_insert_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_expr = @assign_arith_expr | @assign_bitwise_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @assign_expr | @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@call = @method_invocation_expr | @constructor_init_expr | @operator_invocation_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @operator_invocation_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* XML Files */ + +xmlEncoding ( + unique int id: @file ref, + string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); diff --git a/csharp/ql/lib/upgrades/68b5aec54e50fe7e375df3777b756a746ca3a37c/upgrade.properties b/csharp/ql/lib/upgrades/68b5aec54e50fe7e375df3777b756a746ca3a37c/upgrade.properties new file mode 100644 index 000000000000..2d18dccf06cd --- /dev/null +++ b/csharp/ql/lib/upgrades/68b5aec54e50fe7e375df3777b756a746ca3a37c/upgrade.properties @@ -0,0 +1,2 @@ +description: Add the relation `extension_receiver_type` and add the `extension_type` type kind. +compatibility: full diff --git a/csharp/ql/src/CHANGELOG.md b/csharp/ql/src/CHANGELOG.md index d532951fadc8..8f2e918ca552 100644 --- a/csharp/ql/src/CHANGELOG.md +++ b/csharp/ql/src/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.6.2 + +### Bug Fixes + +* The `cs/web/missing-token-validation` ("Missing cross-site request forgery token validation") query now recognizes antiforgery attributes on base controller classes, fixing false positives when `[ValidateAntiForgeryToken]` or `[AutoValidateAntiforgeryToken]` is applied to a parent class. + ## 1.6.1 No user-facing changes. diff --git a/csharp/ql/src/Security Features/CWE-352/MissingAntiForgeryTokenValidation.ql b/csharp/ql/src/Security Features/CWE-352/MissingAntiForgeryTokenValidation.ql index acdc4637221a..60a022d43d0f 100644 --- a/csharp/ql/src/Security Features/CWE-352/MissingAntiForgeryTokenValidation.ql +++ b/csharp/ql/src/Security Features/CWE-352/MissingAntiForgeryTokenValidation.ql @@ -54,12 +54,12 @@ predicate hasGlobalAntiForgeryFilter() { predicate isUnvalidatedPostMethod(Class c, Method m) { c.(Controller).getAPostActionMethod() = m and not m.getAnAttribute() instanceof ValidateAntiForgeryTokenAttribute and - not c.getAnAttribute() instanceof ValidateAntiForgeryTokenAttribute + not c.getABaseType*().getAnAttribute() instanceof ValidateAntiForgeryTokenAttribute or c.(AspNetCore::MicrosoftAspNetCoreMvcController).getAnActionMethod() = m and m.getAnAttribute() instanceof AspNetCore::MicrosoftAspNetCoreMvcHttpPostAttribute and not m.getAnAttribute() instanceof AspNetCore::ValidateAntiForgeryAttribute and - not c.getAnAttribute() instanceof AspNetCore::ValidateAntiForgeryAttribute + not c.getABaseType*().getAnAttribute() instanceof AspNetCore::ValidateAntiForgeryAttribute } Element getAValidatedElement() { diff --git a/csharp/ql/src/change-notes/released/1.6.2.md b/csharp/ql/src/change-notes/released/1.6.2.md new file mode 100644 index 000000000000..696f2d0d8597 --- /dev/null +++ b/csharp/ql/src/change-notes/released/1.6.2.md @@ -0,0 +1,5 @@ +## 1.6.2 + +### Bug Fixes + +* The `cs/web/missing-token-validation` ("Missing cross-site request forgery token validation") query now recognizes antiforgery attributes on base controller classes, fixing false positives when `[ValidateAntiForgeryToken]` or `[AutoValidateAntiforgeryToken]` is applied to a parent class. diff --git a/csharp/ql/src/codeql-pack.release.yml b/csharp/ql/src/codeql-pack.release.yml index ef7a789e0cf1..5f5beb68311a 100644 --- a/csharp/ql/src/codeql-pack.release.yml +++ b/csharp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.6.1 +lastReleaseVersion: 1.6.2 diff --git a/csharp/ql/src/qlpack.yml b/csharp/ql/src/qlpack.yml index 85d9dbf9ead1..d43afd632c10 100644 --- a/csharp/ql/src/qlpack.yml +++ b/csharp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-queries -version: 1.6.1 +version: 1.6.3-dev groups: - csharp - queries diff --git a/csharp/ql/test/library-tests/csharp7/LocalTaintFlow.expected b/csharp/ql/test/library-tests/csharp7/LocalTaintFlow.expected index ebe04faf7258..b2094817cfb6 100644 --- a/csharp/ql/test/library-tests/csharp7/LocalTaintFlow.expected +++ b/csharp/ql/test/library-tests/csharp7/LocalTaintFlow.expected @@ -321,6 +321,7 @@ | CSharp7.cs:283:20:283:62 | call to method Select,(Int32,String)> | CSharp7.cs:283:13:283:16 | access to local variable list | | CSharp7.cs:283:32:283:35 | SSA param(item) | CSharp7.cs:283:41:283:44 | access to parameter item | | CSharp7.cs:283:32:283:35 | item | CSharp7.cs:283:32:283:35 | SSA param(item) | +| CSharp7.cs:283:41:283:44 | [post] access to parameter item | CSharp7.cs:283:51:283:54 | access to parameter item | | CSharp7.cs:283:41:283:44 | access to parameter item | CSharp7.cs:283:41:283:48 | access to property Key | | CSharp7.cs:283:41:283:44 | access to parameter item | CSharp7.cs:283:51:283:54 | access to parameter item | | CSharp7.cs:283:51:283:54 | access to parameter item | CSharp7.cs:283:51:283:60 | access to property Value | diff --git a/csharp/ql/test/library-tests/dataflow/constructors/ConstructorFlow.expected b/csharp/ql/test/library-tests/dataflow/constructors/ConstructorFlow.expected index 678dca279ff0..6e063d49ef62 100644 --- a/csharp/ql/test/library-tests/dataflow/constructors/ConstructorFlow.expected +++ b/csharp/ql/test/library-tests/dataflow/constructors/ConstructorFlow.expected @@ -122,6 +122,16 @@ edges | Constructors.cs:143:29:143:30 | access to local variable o2 : Object | Constructors.cs:143:18:143:31 | object creation of type R1 : R1 [property Obj2] : Object | provenance | | | Constructors.cs:144:14:144:15 | access to local variable r1 : R1 [property Obj1] : Object | Constructors.cs:144:14:144:20 | access to property Obj1 | provenance | | | Constructors.cs:145:14:145:15 | access to local variable r1 : R1 [property Obj2] : Object | Constructors.cs:145:14:145:20 | access to property Obj2 | provenance | | +| Constructors.cs:157:40:157:40 | o : Object | Constructors.cs:157:52:157:52 | access to parameter o : Object | provenance | | +| Constructors.cs:157:46:157:48 | [post] this access : CPartial [property Obj] : Object | Constructors.cs:157:24:157:31 | this [Return] : CPartial [property Obj] : Object | provenance | | +| Constructors.cs:157:52:157:52 | access to parameter o : Object | Constructors.cs:157:46:157:48 | [post] this access : CPartial [property Obj] : Object | provenance | | +| Constructors.cs:162:13:162:13 | access to local variable o : Object | Constructors.cs:163:37:163:37 | access to local variable o : Object | provenance | | +| Constructors.cs:162:17:162:34 | call to method Source : Object | Constructors.cs:162:13:162:13 | access to local variable o : Object | provenance | | +| Constructors.cs:163:13:163:20 | access to local variable cPartial : CPartial [property Obj] : Object | Constructors.cs:164:14:164:21 | access to local variable cPartial : CPartial [property Obj] : Object | provenance | | +| Constructors.cs:163:24:163:38 | object creation of type CPartial : CPartial [property Obj] : Object | Constructors.cs:163:13:163:20 | access to local variable cPartial : CPartial [property Obj] : Object | provenance | | +| Constructors.cs:163:37:163:37 | access to local variable o : Object | Constructors.cs:157:40:157:40 | o : Object | provenance | | +| Constructors.cs:163:37:163:37 | access to local variable o : Object | Constructors.cs:163:24:163:38 | object creation of type CPartial : CPartial [property Obj] : Object | provenance | | +| Constructors.cs:164:14:164:21 | access to local variable cPartial : CPartial [property Obj] : Object | Constructors.cs:164:14:164:25 | access to property Obj | provenance | | nodes | Constructors.cs:3:18:3:26 | [post] this access : C_no_ctor [field s1] : Object | semmle.label | [post] this access : C_no_ctor [field s1] : Object | | Constructors.cs:5:24:5:25 | [post] this access : C_no_ctor [field s1] : Object | semmle.label | [post] this access : C_no_ctor [field s1] : Object | @@ -255,6 +265,17 @@ nodes | Constructors.cs:144:14:144:20 | access to property Obj1 | semmle.label | access to property Obj1 | | Constructors.cs:145:14:145:15 | access to local variable r1 : R1 [property Obj2] : Object | semmle.label | access to local variable r1 : R1 [property Obj2] : Object | | Constructors.cs:145:14:145:20 | access to property Obj2 | semmle.label | access to property Obj2 | +| Constructors.cs:157:24:157:31 | this [Return] : CPartial [property Obj] : Object | semmle.label | this [Return] : CPartial [property Obj] : Object | +| Constructors.cs:157:40:157:40 | o : Object | semmle.label | o : Object | +| Constructors.cs:157:46:157:48 | [post] this access : CPartial [property Obj] : Object | semmle.label | [post] this access : CPartial [property Obj] : Object | +| Constructors.cs:157:52:157:52 | access to parameter o : Object | semmle.label | access to parameter o : Object | +| Constructors.cs:162:13:162:13 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| Constructors.cs:162:17:162:34 | call to method Source : Object | semmle.label | call to method Source : Object | +| Constructors.cs:163:13:163:20 | access to local variable cPartial : CPartial [property Obj] : Object | semmle.label | access to local variable cPartial : CPartial [property Obj] : Object | +| Constructors.cs:163:24:163:38 | object creation of type CPartial : CPartial [property Obj] : Object | semmle.label | object creation of type CPartial : CPartial [property Obj] : Object | +| Constructors.cs:163:37:163:37 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| Constructors.cs:164:14:164:21 | access to local variable cPartial : CPartial [property Obj] : Object | semmle.label | access to local variable cPartial : CPartial [property Obj] : Object | +| Constructors.cs:164:14:164:25 | access to property Obj | semmle.label | access to property Obj | subpaths | Constructors.cs:44:18:44:19 | this access : C2 [parameter o21param] : Object | Constructors.cs:46:23:46:27 | this access : C2 [parameter o21param] : Object | Constructors.cs:46:23:46:27 | [post] this access : C2 [field Obj21] : Object | Constructors.cs:44:18:44:19 | [post] this access : C2 [field Obj21] : Object | | Constructors.cs:64:37:64:37 | access to parameter o : Object | Constructors.cs:57:54:57:55 | o2 : Object | Constructors.cs:59:13:59:14 | access to parameter o1 : Object | Constructors.cs:64:27:64:34 | access to parameter o22param : Object | @@ -273,6 +294,7 @@ subpaths | Constructors.cs:132:29:132:30 | access to local variable o2 : Object | Constructors.cs:121:38:121:40 | oc2 : Object | Constructors.cs:121:16:121:17 | this [Return] : C4 [property Obj2] : Object | Constructors.cs:132:18:132:31 | object creation of type C4 : C4 [property Obj2] : Object | | Constructors.cs:143:25:143:26 | access to local variable o1 : Object | Constructors.cs:137:29:137:32 | Obj1 : Object | Constructors.cs:137:19:137:20 | this [Return] : R1 [property Obj1] : Object | Constructors.cs:143:18:143:31 | object creation of type R1 : R1 [property Obj1] : Object | | Constructors.cs:143:29:143:30 | access to local variable o2 : Object | Constructors.cs:137:42:137:45 | Obj2 : Object | Constructors.cs:137:19:137:20 | this [Return] : R1 [property Obj2] : Object | Constructors.cs:143:18:143:31 | object creation of type R1 : R1 [property Obj2] : Object | +| Constructors.cs:163:37:163:37 | access to local variable o : Object | Constructors.cs:157:40:157:40 | o : Object | Constructors.cs:157:24:157:31 | this [Return] : CPartial [property Obj] : Object | Constructors.cs:163:24:163:38 | object creation of type CPartial : CPartial [property Obj] : Object | testFailures #select | Constructors.cs:15:18:15:19 | access to field s1 | Constructors.cs:5:29:5:45 | call to method Source : Object | Constructors.cs:15:18:15:19 | access to field s1 | $@ | Constructors.cs:5:29:5:45 | call to method Source : Object | call to method Source : Object | @@ -288,3 +310,4 @@ testFailures | Constructors.cs:134:14:134:20 | access to property Obj2 | Constructors.cs:131:18:131:34 | call to method Source : Object | Constructors.cs:134:14:134:20 | access to property Obj2 | $@ | Constructors.cs:131:18:131:34 | call to method Source : Object | call to method Source : Object | | Constructors.cs:144:14:144:20 | access to property Obj1 | Constructors.cs:141:18:141:34 | call to method Source : Object | Constructors.cs:144:14:144:20 | access to property Obj1 | $@ | Constructors.cs:141:18:141:34 | call to method Source : Object | call to method Source : Object | | Constructors.cs:145:14:145:20 | access to property Obj2 | Constructors.cs:142:18:142:35 | call to method Source : Object | Constructors.cs:145:14:145:20 | access to property Obj2 | $@ | Constructors.cs:142:18:142:35 | call to method Source : Object | call to method Source : Object | +| Constructors.cs:164:14:164:25 | access to property Obj | Constructors.cs:162:17:162:34 | call to method Source : Object | Constructors.cs:164:14:164:25 | access to property Obj | $@ | Constructors.cs:162:17:162:34 | call to method Source : Object | call to method Source : Object | diff --git a/csharp/ql/test/library-tests/dataflow/constructors/Constructors.cs b/csharp/ql/test/library-tests/dataflow/constructors/Constructors.cs index 9eae5079d847..94beb58544b3 100644 --- a/csharp/ql/test/library-tests/dataflow/constructors/Constructors.cs +++ b/csharp/ql/test/library-tests/dataflow/constructors/Constructors.cs @@ -145,6 +145,25 @@ public void M7() Sink(r1.Obj2); // $ hasValueFlow=10 } + public partial class CPartial + { + public object Obj { get; } + + public partial CPartial(object o); + } + + public partial class CPartial + { + public partial CPartial(object o) => Obj = o; + } + + public void M8() + { + var o = Source(11); + var cPartial = new CPartial(o); + Sink(cPartial.Obj); // $ hasValueFlow=11 + } + public static void Sink(object o) { } public static T Source(object source) => throw null; diff --git a/csharp/ql/test/library-tests/dataflow/extensions/ExtensionFlow.expected b/csharp/ql/test/library-tests/dataflow/extensions/ExtensionFlow.expected new file mode 100644 index 000000000000..35a30ac1ffc9 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/extensions/ExtensionFlow.expected @@ -0,0 +1,502 @@ +models +edges +| extensions.cs:5:22:5:24 | obj : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | provenance | | +| extensions.cs:5:22:5:24 | obj : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | provenance | | +| extensions.cs:5:22:5:24 | obj : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | provenance | | +| extensions.cs:5:22:5:24 | obj : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | provenance | | +| extensions.cs:5:22:5:24 | obj : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | provenance | | +| extensions.cs:5:22:5:24 | obj : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | provenance | | +| extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:108:18:108:26 | access to property Prop1 : B | provenance | | +| extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:108:18:108:26 | access to property Prop1 : B | provenance | | +| extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | provenance | | +| extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | provenance | | +| extensions.cs:13:13:13:15 | value : B | extensions.cs:15:24:15:28 | access to parameter value | provenance | | +| extensions.cs:13:13:13:15 | value : B | extensions.cs:15:24:15:28 | access to parameter value | provenance | | +| extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:194:18:194:35 | access to property StaticProp1 : B | provenance | | +| extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:194:18:194:35 | access to property StaticProp1 : B | provenance | | +| extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | provenance | | +| extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | provenance | | +| extensions.cs:38:13:38:15 | value : B | extensions.cs:40:24:40:28 | access to parameter value | provenance | | +| extensions.cs:38:13:38:15 | value : B | extensions.cs:40:24:40:28 | access to parameter value | provenance | | +| extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:127:18:127:25 | call to method M1 : B | provenance | | +| extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:127:18:127:25 | call to method M1 : B | provenance | | +| extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:130:18:130:37 | call to method M1 : B | provenance | | +| extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:130:18:130:37 | call to method M1 : B | provenance | | +| extensions.cs:59:48:59:48 | a : B | extensions.cs:61:20:61:20 | access to parameter a | provenance | | +| extensions.cs:59:48:59:48 | a : B | extensions.cs:61:20:61:20 | access to parameter a | provenance | | +| extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:185:18:185:24 | call to operator - : B | provenance | | +| extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:185:18:185:24 | call to operator - : B | provenance | | +| extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:188:18:188:52 | call to operator - : B | provenance | | +| extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:188:18:188:52 | call to operator - : B | provenance | | +| extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | provenance | | +| extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | provenance | | +| extensions.cs:76:17:76:17 | b : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | provenance | | +| extensions.cs:76:17:76:17 | b : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | provenance | | +| extensions.cs:89:20:89:20 | t : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | provenance | | +| extensions.cs:89:20:89:20 | t : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | provenance | | +| extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | provenance | | +| extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | provenance | | +| extensions.cs:108:13:108:14 | access to local variable b1 : B | extensions.cs:109:14:109:15 | access to local variable b1 | provenance | | +| extensions.cs:108:13:108:14 | access to local variable b1 : B | extensions.cs:109:14:109:15 | access to local variable b1 | provenance | | +| extensions.cs:108:18:108:26 | access to property Prop1 : B | extensions.cs:108:13:108:14 | access to local variable b1 : B | provenance | | +| extensions.cs:108:18:108:26 | access to property Prop1 : B | extensions.cs:108:13:108:14 | access to local variable b1 : B | provenance | | +| extensions.cs:111:13:111:14 | access to local variable b2 : B | extensions.cs:112:14:112:15 | access to local variable b2 | provenance | | +| extensions.cs:111:13:111:14 | access to local variable b2 : B | extensions.cs:112:14:112:15 | access to local variable b2 | provenance | | +| extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | extensions.cs:111:13:111:14 | access to local variable b2 : B | provenance | | +| extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | extensions.cs:111:13:111:14 | access to local variable b2 : B | provenance | | +| extensions.cs:118:21:118:32 | call to method Source : B | extensions.cs:13:13:13:15 | value : B | provenance | | +| extensions.cs:118:21:118:32 | call to method Source : B | extensions.cs:13:13:13:15 | value : B | provenance | | +| extensions.cs:120:13:120:13 | access to local variable b : B | extensions.cs:121:37:121:37 | access to local variable b : B | provenance | | +| extensions.cs:120:13:120:13 | access to local variable b : B | extensions.cs:121:37:121:37 | access to local variable b : B | provenance | | +| extensions.cs:120:17:120:30 | call to method Source : B | extensions.cs:120:13:120:13 | access to local variable b : B | provenance | | +| extensions.cs:120:17:120:30 | call to method Source : B | extensions.cs:120:13:120:13 | access to local variable b : B | provenance | | +| extensions.cs:121:37:121:37 | access to local variable b : B | extensions.cs:13:13:13:15 | value : B | provenance | | +| extensions.cs:121:37:121:37 | access to local variable b : B | extensions.cs:13:13:13:15 | value : B | provenance | | +| extensions.cs:127:13:127:14 | access to local variable b1 : B | extensions.cs:128:14:128:15 | access to local variable b1 | provenance | | +| extensions.cs:127:13:127:14 | access to local variable b1 : B | extensions.cs:128:14:128:15 | access to local variable b1 | provenance | | +| extensions.cs:127:18:127:25 | call to method M1 : B | extensions.cs:127:13:127:14 | access to local variable b1 : B | provenance | | +| extensions.cs:127:18:127:25 | call to method M1 : B | extensions.cs:127:13:127:14 | access to local variable b1 : B | provenance | | +| extensions.cs:130:13:130:14 | access to local variable b2 : B | extensions.cs:131:14:131:15 | access to local variable b2 | provenance | | +| extensions.cs:130:13:130:14 | access to local variable b2 : B | extensions.cs:131:14:131:15 | access to local variable b2 | provenance | | +| extensions.cs:130:18:130:37 | call to method M1 : B | extensions.cs:130:13:130:14 | access to local variable b2 : B | provenance | | +| extensions.cs:130:18:130:37 | call to method M1 : B | extensions.cs:130:13:130:14 | access to local variable b2 : B | provenance | | +| extensions.cs:136:13:136:14 | access to local variable b1 : B | extensions.cs:137:9:137:10 | access to local variable b1 : B | provenance | | +| extensions.cs:136:13:136:14 | access to local variable b1 : B | extensions.cs:137:9:137:10 | access to local variable b1 : B | provenance | | +| extensions.cs:136:18:136:29 | call to method Source : B | extensions.cs:136:13:136:14 | access to local variable b1 : B | provenance | | +| extensions.cs:136:18:136:29 | call to method Source : B | extensions.cs:136:13:136:14 | access to local variable b1 : B | provenance | | +| extensions.cs:137:9:137:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:137:9:137:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:139:13:139:14 | access to local variable b2 : B | extensions.cs:140:25:140:26 | access to local variable b2 : B | provenance | | +| extensions.cs:139:13:139:14 | access to local variable b2 : B | extensions.cs:140:25:140:26 | access to local variable b2 : B | provenance | | +| extensions.cs:139:18:139:31 | call to method Source : B | extensions.cs:139:13:139:14 | access to local variable b2 : B | provenance | | +| extensions.cs:139:18:139:31 | call to method Source : B | extensions.cs:139:13:139:14 | access to local variable b2 : B | provenance | | +| extensions.cs:140:25:140:26 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:140:25:140:26 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:145:13:145:14 | access to local variable b1 : B | extensions.cs:146:18:146:19 | access to local variable b1 : B | provenance | | +| extensions.cs:145:13:145:14 | access to local variable b1 : B | extensions.cs:146:18:146:19 | access to local variable b1 : B | provenance | | +| extensions.cs:145:13:145:14 | access to local variable b1 : B | extensions.cs:149:34:149:35 | access to local variable b1 : B | provenance | | +| extensions.cs:145:13:145:14 | access to local variable b1 : B | extensions.cs:149:34:149:35 | access to local variable b1 : B | provenance | | +| extensions.cs:145:18:145:29 | call to method Source : B | extensions.cs:145:13:145:14 | access to local variable b1 : B | provenance | | +| extensions.cs:145:18:145:29 | call to method Source : B | extensions.cs:145:13:145:14 | access to local variable b1 : B | provenance | | +| extensions.cs:146:13:146:14 | access to local variable b2 : B | extensions.cs:147:14:147:15 | access to local variable b2 | provenance | | +| extensions.cs:146:13:146:14 | access to local variable b2 : B | extensions.cs:147:14:147:15 | access to local variable b2 | provenance | | +| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:146:18:146:24 | call to method B1 : B | provenance | | +| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:146:18:146:24 | call to method B1 : B | provenance | | +| extensions.cs:146:18:146:24 | call to method B1 : B | extensions.cs:146:13:146:14 | access to local variable b2 : B | provenance | | +| extensions.cs:146:18:146:24 | call to method B1 : B | extensions.cs:146:13:146:14 | access to local variable b2 : B | provenance | | +| extensions.cs:149:13:149:14 | access to local variable b3 : B | extensions.cs:150:14:150:15 | access to local variable b3 | provenance | | +| extensions.cs:149:13:149:14 | access to local variable b3 : B | extensions.cs:150:14:150:15 | access to local variable b3 | provenance | | +| extensions.cs:149:18:149:36 | call to method B1 : B | extensions.cs:149:13:149:14 | access to local variable b3 : B | provenance | | +| extensions.cs:149:18:149:36 | call to method B1 : B | extensions.cs:149:13:149:14 | access to local variable b3 : B | provenance | | +| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:149:18:149:36 | call to method B1 : B | provenance | | +| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:149:18:149:36 | call to method B1 : B | provenance | | +| extensions.cs:155:13:155:14 | access to local variable b1 : B | extensions.cs:156:18:156:19 | access to local variable b1 : B | provenance | | +| extensions.cs:155:13:155:14 | access to local variable b1 : B | extensions.cs:156:18:156:19 | access to local variable b1 : B | provenance | | +| extensions.cs:155:18:155:29 | call to method Source : B | extensions.cs:155:13:155:14 | access to local variable b1 : B | provenance | | +| extensions.cs:155:18:155:29 | call to method Source : B | extensions.cs:155:13:155:14 | access to local variable b1 : B | provenance | | +| extensions.cs:156:18:156:19 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:156:18:156:19 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:158:13:158:14 | access to local variable b3 : B | extensions.cs:159:41:159:42 | access to local variable b3 : B | provenance | | +| extensions.cs:158:13:158:14 | access to local variable b3 : B | extensions.cs:159:41:159:42 | access to local variable b3 : B | provenance | | +| extensions.cs:158:18:158:31 | call to method Source : B | extensions.cs:158:13:158:14 | access to local variable b3 : B | provenance | | +| extensions.cs:158:18:158:31 | call to method Source : B | extensions.cs:158:13:158:14 | access to local variable b3 : B | provenance | | +| extensions.cs:159:41:159:42 | access to local variable b3 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:159:41:159:42 | access to local variable b3 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:164:13:164:14 | access to local variable b1 : B | extensions.cs:165:9:165:10 | access to local variable b1 : B | provenance | | +| extensions.cs:164:13:164:14 | access to local variable b1 : B | extensions.cs:165:9:165:10 | access to local variable b1 : B | provenance | | +| extensions.cs:164:18:164:29 | call to method Source : B | extensions.cs:164:13:164:14 | access to local variable b1 : B | provenance | | +| extensions.cs:164:18:164:29 | call to method Source : B | extensions.cs:164:13:164:14 | access to local variable b1 : B | provenance | | +| extensions.cs:165:9:165:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:165:9:165:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:167:13:167:14 | access to local variable b2 : B | extensions.cs:168:32:168:33 | access to local variable b2 : B | provenance | | +| extensions.cs:167:13:167:14 | access to local variable b2 : B | extensions.cs:168:32:168:33 | access to local variable b2 : B | provenance | | +| extensions.cs:167:18:167:31 | call to method Source : B | extensions.cs:167:13:167:14 | access to local variable b2 : B | provenance | | +| extensions.cs:167:18:167:31 | call to method Source : B | extensions.cs:167:13:167:14 | access to local variable b2 : B | provenance | | +| extensions.cs:168:32:168:33 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:168:32:168:33 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:173:13:173:14 | access to local variable b1 : B | extensions.cs:175:18:175:19 | access to local variable b1 : B | provenance | | +| extensions.cs:173:13:173:14 | access to local variable b1 : B | extensions.cs:175:18:175:19 | access to local variable b1 : B | provenance | | +| extensions.cs:173:18:173:29 | call to method Source : B | extensions.cs:173:13:173:14 | access to local variable b1 : B | provenance | | +| extensions.cs:173:18:173:29 | call to method Source : B | extensions.cs:173:13:173:14 | access to local variable b1 : B | provenance | | +| extensions.cs:175:18:175:19 | access to local variable b1 : B | extensions.cs:59:48:59:48 | a : B | provenance | | +| extensions.cs:175:18:175:19 | access to local variable b1 : B | extensions.cs:59:48:59:48 | a : B | provenance | | +| extensions.cs:177:13:177:14 | access to local variable b4 : B | extensions.cs:178:43:178:44 | access to local variable b4 : B | provenance | | +| extensions.cs:177:13:177:14 | access to local variable b4 : B | extensions.cs:178:43:178:44 | access to local variable b4 : B | provenance | | +| extensions.cs:177:18:177:31 | call to method Source : B | extensions.cs:177:13:177:14 | access to local variable b4 : B | provenance | | +| extensions.cs:177:18:177:31 | call to method Source : B | extensions.cs:177:13:177:14 | access to local variable b4 : B | provenance | | +| extensions.cs:178:43:178:44 | access to local variable b4 : B | extensions.cs:59:48:59:48 | a : B | provenance | | +| extensions.cs:178:43:178:44 | access to local variable b4 : B | extensions.cs:59:48:59:48 | a : B | provenance | | +| extensions.cs:185:13:185:14 | access to local variable b3 : B | extensions.cs:186:14:186:15 | access to local variable b3 | provenance | | +| extensions.cs:185:13:185:14 | access to local variable b3 : B | extensions.cs:186:14:186:15 | access to local variable b3 | provenance | | +| extensions.cs:185:18:185:24 | call to operator - : B | extensions.cs:185:13:185:14 | access to local variable b3 : B | provenance | | +| extensions.cs:185:18:185:24 | call to operator - : B | extensions.cs:185:13:185:14 | access to local variable b3 : B | provenance | | +| extensions.cs:188:13:188:14 | access to local variable b4 : B | extensions.cs:189:14:189:15 | access to local variable b4 | provenance | | +| extensions.cs:188:13:188:14 | access to local variable b4 : B | extensions.cs:189:14:189:15 | access to local variable b4 | provenance | | +| extensions.cs:188:18:188:52 | call to operator - : B | extensions.cs:188:13:188:14 | access to local variable b4 : B | provenance | | +| extensions.cs:188:18:188:52 | call to operator - : B | extensions.cs:188:13:188:14 | access to local variable b4 : B | provenance | | +| extensions.cs:194:13:194:14 | access to local variable b1 : B | extensions.cs:195:14:195:15 | access to local variable b1 | provenance | | +| extensions.cs:194:13:194:14 | access to local variable b1 : B | extensions.cs:195:14:195:15 | access to local variable b1 | provenance | | +| extensions.cs:194:18:194:35 | access to property StaticProp1 : B | extensions.cs:194:13:194:14 | access to local variable b1 : B | provenance | | +| extensions.cs:194:18:194:35 | access to property StaticProp1 : B | extensions.cs:194:13:194:14 | access to local variable b1 : B | provenance | | +| extensions.cs:197:13:197:14 | access to local variable b2 : B | extensions.cs:198:14:198:15 | access to local variable b2 | provenance | | +| extensions.cs:197:13:197:14 | access to local variable b2 : B | extensions.cs:198:14:198:15 | access to local variable b2 | provenance | | +| extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | extensions.cs:197:13:197:14 | access to local variable b2 : B | provenance | | +| extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | extensions.cs:197:13:197:14 | access to local variable b2 : B | provenance | | +| extensions.cs:203:13:203:14 | access to local variable b1 : B | extensions.cs:204:30:204:31 | access to local variable b1 : B | provenance | | +| extensions.cs:203:13:203:14 | access to local variable b1 : B | extensions.cs:204:30:204:31 | access to local variable b1 : B | provenance | | +| extensions.cs:203:18:203:30 | call to method Source : B | extensions.cs:203:13:203:14 | access to local variable b1 : B | provenance | | +| extensions.cs:203:18:203:30 | call to method Source : B | extensions.cs:203:13:203:14 | access to local variable b1 : B | provenance | | +| extensions.cs:204:30:204:31 | access to local variable b1 : B | extensions.cs:38:13:38:15 | value : B | provenance | | +| extensions.cs:204:30:204:31 | access to local variable b1 : B | extensions.cs:38:13:38:15 | value : B | provenance | | +| extensions.cs:206:13:206:14 | access to local variable b2 : B | extensions.cs:207:38:207:39 | access to local variable b2 : B | provenance | | +| extensions.cs:206:13:206:14 | access to local variable b2 : B | extensions.cs:207:38:207:39 | access to local variable b2 : B | provenance | | +| extensions.cs:206:18:206:31 | call to method Source : B | extensions.cs:206:13:206:14 | access to local variable b2 : B | provenance | | +| extensions.cs:206:18:206:31 | call to method Source : B | extensions.cs:206:13:206:14 | access to local variable b2 : B | provenance | | +| extensions.cs:207:38:207:39 | access to local variable b2 : B | extensions.cs:38:13:38:15 | value : B | provenance | | +| extensions.cs:207:38:207:39 | access to local variable b2 : B | extensions.cs:38:13:38:15 | value : B | provenance | | +| extensions.cs:212:13:212:14 | access to local variable b1 : B | extensions.cs:213:9:213:10 | access to local variable b1 : B | provenance | | +| extensions.cs:212:13:212:14 | access to local variable b1 : B | extensions.cs:213:9:213:10 | access to local variable b1 : B | provenance | | +| extensions.cs:212:18:212:30 | call to method Source : B | extensions.cs:212:13:212:14 | access to local variable b1 : B | provenance | | +| extensions.cs:212:18:212:30 | call to method Source : B | extensions.cs:212:13:212:14 | access to local variable b1 : B | provenance | | +| extensions.cs:213:9:213:10 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:213:9:213:10 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:215:13:215:14 | access to local variable b2 : B | extensions.cs:216:25:216:26 | access to local variable b2 : B | provenance | | +| extensions.cs:215:13:215:14 | access to local variable b2 : B | extensions.cs:216:25:216:26 | access to local variable b2 : B | provenance | | +| extensions.cs:215:18:215:31 | call to method Source : B | extensions.cs:215:13:215:14 | access to local variable b2 : B | provenance | | +| extensions.cs:215:18:215:31 | call to method Source : B | extensions.cs:215:13:215:14 | access to local variable b2 : B | provenance | | +| extensions.cs:216:25:216:26 | access to local variable b2 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:216:25:216:26 | access to local variable b2 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:221:13:221:14 | access to local variable b1 : B | extensions.cs:222:9:222:10 | access to local variable b1 : B | provenance | | +| extensions.cs:221:13:221:14 | access to local variable b1 : B | extensions.cs:222:9:222:10 | access to local variable b1 : B | provenance | | +| extensions.cs:221:18:221:30 | call to method Source : B | extensions.cs:221:13:221:14 | access to local variable b1 : B | provenance | | +| extensions.cs:221:18:221:30 | call to method Source : B | extensions.cs:221:13:221:14 | access to local variable b1 : B | provenance | | +| extensions.cs:222:9:222:10 | access to local variable b1 : B | extensions.cs:89:20:89:20 | t : B | provenance | | +| extensions.cs:222:9:222:10 | access to local variable b1 : B | extensions.cs:89:20:89:20 | t : B | provenance | | +| extensions.cs:224:13:224:14 | access to local variable b2 : B | extensions.cs:225:32:225:33 | access to local variable b2 : B | provenance | | +| extensions.cs:224:13:224:14 | access to local variable b2 : B | extensions.cs:225:32:225:33 | access to local variable b2 : B | provenance | | +| extensions.cs:224:18:224:31 | call to method Source : B | extensions.cs:224:13:224:14 | access to local variable b2 : B | provenance | | +| extensions.cs:224:18:224:31 | call to method Source : B | extensions.cs:224:13:224:14 | access to local variable b2 : B | provenance | | +| extensions.cs:225:32:225:33 | access to local variable b2 : B | extensions.cs:89:20:89:20 | t : B | provenance | | +| extensions.cs:225:32:225:33 | access to local variable b2 : B | extensions.cs:89:20:89:20 | t : B | provenance | | +| extensions.cs:231:13:231:14 | access to local variable b1 : B | extensions.cs:232:32:232:33 | access to local variable b1 : B | provenance | | +| extensions.cs:231:13:231:14 | access to local variable b1 : B | extensions.cs:232:32:232:33 | access to local variable b1 : B | provenance | | +| extensions.cs:231:13:231:14 | access to local variable b1 : B | extensions.cs:235:46:235:47 | access to local variable b1 : B | provenance | | +| extensions.cs:231:13:231:14 | access to local variable b1 : B | extensions.cs:235:46:235:47 | access to local variable b1 : B | provenance | | +| extensions.cs:231:18:231:30 | call to method Source : B | extensions.cs:231:13:231:14 | access to local variable b1 : B | provenance | | +| extensions.cs:231:18:231:30 | call to method Source : B | extensions.cs:231:13:231:14 | access to local variable b1 : B | provenance | | +| extensions.cs:232:13:232:14 | access to local variable b2 : B | extensions.cs:233:14:233:15 | access to local variable b2 | provenance | | +| extensions.cs:232:13:232:14 | access to local variable b2 : B | extensions.cs:233:14:233:15 | access to local variable b2 | provenance | | +| extensions.cs:232:18:232:34 | call to method GenericM2 : B | extensions.cs:232:13:232:14 | access to local variable b2 : B | provenance | | +| extensions.cs:232:18:232:34 | call to method GenericM2 : B | extensions.cs:232:13:232:14 | access to local variable b2 : B | provenance | | +| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | provenance | | +| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | provenance | | +| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:232:18:232:34 | call to method GenericM2 : B | provenance | | +| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:232:18:232:34 | call to method GenericM2 : B | provenance | | +| extensions.cs:235:13:235:14 | access to local variable b3 : B | extensions.cs:236:14:236:15 | access to local variable b3 | provenance | | +| extensions.cs:235:13:235:14 | access to local variable b3 : B | extensions.cs:236:14:236:15 | access to local variable b3 | provenance | | +| extensions.cs:235:18:235:48 | call to method GenericM2 : B | extensions.cs:235:13:235:14 | access to local variable b3 : B | provenance | | +| extensions.cs:235:18:235:48 | call to method GenericM2 : B | extensions.cs:235:13:235:14 | access to local variable b3 : B | provenance | | +| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | provenance | | +| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | provenance | | +| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:235:18:235:48 | call to method GenericM2 : B | provenance | | +| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:235:18:235:48 | call to method GenericM2 : B | provenance | | +nodes +| extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B | +| extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B | +| extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B | +| extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B | +| extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B | +| extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B | +| extensions.cs:11:24:11:37 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:11:24:11:37 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:13:13:13:15 | value : B | semmle.label | value : B | +| extensions.cs:13:13:13:15 | value : B | semmle.label | value : B | +| extensions.cs:15:24:15:28 | access to parameter value | semmle.label | access to parameter value | +| extensions.cs:15:24:15:28 | access to parameter value | semmle.label | access to parameter value | +| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | semmle.label | access to extension synthetic parameter obj | +| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | semmle.label | access to extension synthetic parameter obj | +| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | semmle.label | access to extension synthetic parameter obj | +| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | semmle.label | access to extension synthetic parameter obj | +| extensions.cs:36:24:36:38 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:36:24:36:38 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:38:13:38:15 | value : B | semmle.label | value : B | +| extensions.cs:38:13:38:15 | value : B | semmle.label | value : B | +| extensions.cs:40:24:40:28 | access to parameter value | semmle.label | access to parameter value | +| extensions.cs:40:24:40:28 | access to parameter value | semmle.label | access to parameter value | +| extensions.cs:46:20:46:33 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:46:20:46:33 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | semmle.label | access to extension synthetic parameter obj | +| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | semmle.label | access to extension synthetic parameter obj | +| extensions.cs:59:48:59:48 | a : B | semmle.label | a : B | +| extensions.cs:59:48:59:48 | a : B | semmle.label | a : B | +| extensions.cs:61:20:61:20 | access to parameter a | semmle.label | access to parameter a | +| extensions.cs:61:20:61:20 | access to parameter a | semmle.label | access to parameter a | +| extensions.cs:67:20:67:33 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:67:20:67:33 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:76:17:76:17 | b : B | semmle.label | b : B | +| extensions.cs:76:17:76:17 | b : B | semmle.label | b : B | +| extensions.cs:76:17:76:17 | b : B | semmle.label | b : B | +| extensions.cs:76:17:76:17 | b : B | semmle.label | b : B | +| extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | semmle.label | access to extension synthetic parameter b : B | +| extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | semmle.label | access to extension synthetic parameter b : B | +| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | semmle.label | access to extension synthetic parameter b | +| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | semmle.label | access to extension synthetic parameter b | +| extensions.cs:89:20:89:20 | t : B | semmle.label | t : B | +| extensions.cs:89:20:89:20 | t : B | semmle.label | t : B | +| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | semmle.label | access to extension synthetic parameter t | +| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | semmle.label | access to extension synthetic parameter t | +| extensions.cs:96:33:96:37 | other : B | semmle.label | other : B | +| extensions.cs:96:33:96:37 | other : B | semmle.label | other : B | +| extensions.cs:98:20:98:24 | access to parameter other : B | semmle.label | access to parameter other : B | +| extensions.cs:98:20:98:24 | access to parameter other : B | semmle.label | access to parameter other : B | +| extensions.cs:108:13:108:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:108:13:108:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:108:18:108:26 | access to property Prop1 : B | semmle.label | access to property Prop1 : B | +| extensions.cs:108:18:108:26 | access to property Prop1 : B | semmle.label | access to property Prop1 : B | +| extensions.cs:109:14:109:15 | access to local variable b1 | semmle.label | access to local variable b1 | +| extensions.cs:109:14:109:15 | access to local variable b1 | semmle.label | access to local variable b1 | +| extensions.cs:111:13:111:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:111:13:111:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | semmle.label | call to extension accessor get_Prop1 : B | +| extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | semmle.label | call to extension accessor get_Prop1 : B | +| extensions.cs:112:14:112:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:112:14:112:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:118:21:118:32 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:118:21:118:32 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:120:13:120:13 | access to local variable b : B | semmle.label | access to local variable b : B | +| extensions.cs:120:13:120:13 | access to local variable b : B | semmle.label | access to local variable b : B | +| extensions.cs:120:17:120:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:120:17:120:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:121:37:121:37 | access to local variable b : B | semmle.label | access to local variable b : B | +| extensions.cs:121:37:121:37 | access to local variable b : B | semmle.label | access to local variable b : B | +| extensions.cs:127:13:127:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:127:13:127:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:127:18:127:25 | call to method M1 : B | semmle.label | call to method M1 : B | +| extensions.cs:127:18:127:25 | call to method M1 : B | semmle.label | call to method M1 : B | +| extensions.cs:128:14:128:15 | access to local variable b1 | semmle.label | access to local variable b1 | +| extensions.cs:128:14:128:15 | access to local variable b1 | semmle.label | access to local variable b1 | +| extensions.cs:130:13:130:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:130:13:130:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:130:18:130:37 | call to method M1 : B | semmle.label | call to method M1 : B | +| extensions.cs:130:18:130:37 | call to method M1 : B | semmle.label | call to method M1 : B | +| extensions.cs:131:14:131:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:131:14:131:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:136:13:136:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:136:13:136:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:136:18:136:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:136:18:136:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:137:9:137:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:137:9:137:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:139:13:139:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:139:13:139:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:139:18:139:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:139:18:139:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:140:25:140:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:140:25:140:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:145:13:145:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:145:13:145:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:145:18:145:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:145:18:145:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:146:13:146:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:146:13:146:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:146:18:146:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:146:18:146:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:146:18:146:24 | call to method B1 : B | semmle.label | call to method B1 : B | +| extensions.cs:146:18:146:24 | call to method B1 : B | semmle.label | call to method B1 : B | +| extensions.cs:147:14:147:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:147:14:147:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:149:13:149:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:149:13:149:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:149:18:149:36 | call to method B1 : B | semmle.label | call to method B1 : B | +| extensions.cs:149:18:149:36 | call to method B1 : B | semmle.label | call to method B1 : B | +| extensions.cs:149:34:149:35 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:149:34:149:35 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:150:14:150:15 | access to local variable b3 | semmle.label | access to local variable b3 | +| extensions.cs:150:14:150:15 | access to local variable b3 | semmle.label | access to local variable b3 | +| extensions.cs:155:13:155:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:155:13:155:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:155:18:155:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:155:18:155:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:156:18:156:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:156:18:156:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:158:13:158:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:158:13:158:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:158:18:158:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:158:18:158:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:159:41:159:42 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:159:41:159:42 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:164:13:164:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:164:13:164:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:164:18:164:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:164:18:164:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:165:9:165:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:165:9:165:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:167:13:167:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:167:13:167:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:167:18:167:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:167:18:167:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:168:32:168:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:168:32:168:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:173:13:173:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:173:13:173:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:173:18:173:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:173:18:173:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:175:18:175:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:175:18:175:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:177:13:177:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | +| extensions.cs:177:13:177:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | +| extensions.cs:177:18:177:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:177:18:177:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:178:43:178:44 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | +| extensions.cs:178:43:178:44 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | +| extensions.cs:185:13:185:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:185:13:185:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:185:18:185:24 | call to operator - : B | semmle.label | call to operator - : B | +| extensions.cs:185:18:185:24 | call to operator - : B | semmle.label | call to operator - : B | +| extensions.cs:186:14:186:15 | access to local variable b3 | semmle.label | access to local variable b3 | +| extensions.cs:186:14:186:15 | access to local variable b3 | semmle.label | access to local variable b3 | +| extensions.cs:188:13:188:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | +| extensions.cs:188:13:188:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | +| extensions.cs:188:18:188:52 | call to operator - : B | semmle.label | call to operator - : B | +| extensions.cs:188:18:188:52 | call to operator - : B | semmle.label | call to operator - : B | +| extensions.cs:189:14:189:15 | access to local variable b4 | semmle.label | access to local variable b4 | +| extensions.cs:189:14:189:15 | access to local variable b4 | semmle.label | access to local variable b4 | +| extensions.cs:194:13:194:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:194:13:194:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:194:18:194:35 | access to property StaticProp1 : B | semmle.label | access to property StaticProp1 : B | +| extensions.cs:194:18:194:35 | access to property StaticProp1 : B | semmle.label | access to property StaticProp1 : B | +| extensions.cs:195:14:195:15 | access to local variable b1 | semmle.label | access to local variable b1 | +| extensions.cs:195:14:195:15 | access to local variable b1 | semmle.label | access to local variable b1 | +| extensions.cs:197:13:197:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:197:13:197:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | semmle.label | call to extension accessor get_StaticProp1 : B | +| extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | semmle.label | call to extension accessor get_StaticProp1 : B | +| extensions.cs:198:14:198:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:198:14:198:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:203:13:203:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:203:13:203:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:203:18:203:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:203:18:203:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:204:30:204:31 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:204:30:204:31 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:206:13:206:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:206:13:206:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:206:18:206:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:206:18:206:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:207:38:207:39 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:207:38:207:39 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:212:13:212:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:212:13:212:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:212:18:212:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:212:18:212:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:213:9:213:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:213:9:213:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:215:13:215:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:215:13:215:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:215:18:215:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:215:18:215:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:216:25:216:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:216:25:216:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:221:13:221:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:221:13:221:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:221:18:221:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:221:18:221:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:222:9:222:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:222:9:222:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:224:13:224:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:224:13:224:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:224:18:224:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:224:18:224:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:225:32:225:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:225:32:225:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:231:13:231:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:231:13:231:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:231:18:231:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:231:18:231:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:232:13:232:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:232:13:232:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:232:18:232:34 | call to method GenericM2 : B | semmle.label | call to method GenericM2 : B | +| extensions.cs:232:18:232:34 | call to method GenericM2 : B | semmle.label | call to method GenericM2 : B | +| extensions.cs:232:32:232:33 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:232:32:232:33 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:233:14:233:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:233:14:233:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:235:13:235:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:235:13:235:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:235:18:235:48 | call to method GenericM2 : B | semmle.label | call to method GenericM2 : B | +| extensions.cs:235:18:235:48 | call to method GenericM2 : B | semmle.label | call to method GenericM2 : B | +| extensions.cs:235:46:235:47 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:235:46:235:47 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:236:14:236:15 | access to local variable b3 | semmle.label | access to local variable b3 | +| extensions.cs:236:14:236:15 | access to local variable b3 | semmle.label | access to local variable b3 | +subpaths +| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:146:18:146:24 | call to method B1 : B | +| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:146:18:146:24 | call to method B1 : B | +| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:149:18:149:36 | call to method B1 : B | +| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:149:18:149:36 | call to method B1 : B | +| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | extensions.cs:232:18:232:34 | call to method GenericM2 : B | +| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | extensions.cs:232:18:232:34 | call to method GenericM2 : B | +| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | extensions.cs:235:18:235:48 | call to method GenericM2 : B | +| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | extensions.cs:235:18:235:48 | call to method GenericM2 : B | +testFailures +#select +| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:118:21:118:32 | call to method Source : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:118:21:118:32 | call to method Source : B | call to method Source : B | +| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:118:21:118:32 | call to method Source : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:118:21:118:32 | call to method Source : B | call to method Source : B | +| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:120:17:120:30 | call to method Source : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:120:17:120:30 | call to method Source : B | call to method Source : B | +| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:120:17:120:30 | call to method Source : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:120:17:120:30 | call to method Source : B | call to method Source : B | +| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:155:18:155:29 | call to method Source : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:155:18:155:29 | call to method Source : B | call to method Source : B | +| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:155:18:155:29 | call to method Source : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:155:18:155:29 | call to method Source : B | call to method Source : B | +| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:158:18:158:31 | call to method Source : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:158:18:158:31 | call to method Source : B | call to method Source : B | +| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:158:18:158:31 | call to method Source : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:158:18:158:31 | call to method Source : B | call to method Source : B | +| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:164:18:164:29 | call to method Source : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:164:18:164:29 | call to method Source : B | call to method Source : B | +| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:164:18:164:29 | call to method Source : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:164:18:164:29 | call to method Source : B | call to method Source : B | +| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:167:18:167:31 | call to method Source : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:167:18:167:31 | call to method Source : B | call to method Source : B | +| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:167:18:167:31 | call to method Source : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:167:18:167:31 | call to method Source : B | call to method Source : B | +| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:203:18:203:30 | call to method Source : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:203:18:203:30 | call to method Source : B | call to method Source : B | +| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:203:18:203:30 | call to method Source : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:203:18:203:30 | call to method Source : B | call to method Source : B | +| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:206:18:206:31 | call to method Source : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:206:18:206:31 | call to method Source : B | call to method Source : B | +| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:206:18:206:31 | call to method Source : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:206:18:206:31 | call to method Source : B | call to method Source : B | +| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:136:18:136:29 | call to method Source : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:136:18:136:29 | call to method Source : B | call to method Source : B | +| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:136:18:136:29 | call to method Source : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:136:18:136:29 | call to method Source : B | call to method Source : B | +| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:139:18:139:31 | call to method Source : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:139:18:139:31 | call to method Source : B | call to method Source : B | +| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:139:18:139:31 | call to method Source : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:139:18:139:31 | call to method Source : B | call to method Source : B | +| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:173:18:173:29 | call to method Source : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:173:18:173:29 | call to method Source : B | call to method Source : B | +| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:173:18:173:29 | call to method Source : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:173:18:173:29 | call to method Source : B | call to method Source : B | +| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:177:18:177:31 | call to method Source : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:177:18:177:31 | call to method Source : B | call to method Source : B | +| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:177:18:177:31 | call to method Source : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:177:18:177:31 | call to method Source : B | call to method Source : B | +| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:212:18:212:30 | call to method Source : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:212:18:212:30 | call to method Source : B | call to method Source : B | +| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:212:18:212:30 | call to method Source : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:212:18:212:30 | call to method Source : B | call to method Source : B | +| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:215:18:215:31 | call to method Source : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:215:18:215:31 | call to method Source : B | call to method Source : B | +| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:215:18:215:31 | call to method Source : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:215:18:215:31 | call to method Source : B | call to method Source : B | +| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | extensions.cs:221:18:221:30 | call to method Source : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | $@ | extensions.cs:221:18:221:30 | call to method Source : B | call to method Source : B | +| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | extensions.cs:221:18:221:30 | call to method Source : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | $@ | extensions.cs:221:18:221:30 | call to method Source : B | call to method Source : B | +| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | extensions.cs:224:18:224:31 | call to method Source : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | $@ | extensions.cs:224:18:224:31 | call to method Source : B | call to method Source : B | +| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | extensions.cs:224:18:224:31 | call to method Source : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | $@ | extensions.cs:224:18:224:31 | call to method Source : B | call to method Source : B | +| extensions.cs:109:14:109:15 | access to local variable b1 | extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:109:14:109:15 | access to local variable b1 | $@ | extensions.cs:11:24:11:37 | call to method Source : B | call to method Source : B | +| extensions.cs:109:14:109:15 | access to local variable b1 | extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:109:14:109:15 | access to local variable b1 | $@ | extensions.cs:11:24:11:37 | call to method Source : B | call to method Source : B | +| extensions.cs:112:14:112:15 | access to local variable b2 | extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:112:14:112:15 | access to local variable b2 | $@ | extensions.cs:11:24:11:37 | call to method Source : B | call to method Source : B | +| extensions.cs:112:14:112:15 | access to local variable b2 | extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:112:14:112:15 | access to local variable b2 | $@ | extensions.cs:11:24:11:37 | call to method Source : B | call to method Source : B | +| extensions.cs:128:14:128:15 | access to local variable b1 | extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:128:14:128:15 | access to local variable b1 | $@ | extensions.cs:46:20:46:33 | call to method Source : B | call to method Source : B | +| extensions.cs:128:14:128:15 | access to local variable b1 | extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:128:14:128:15 | access to local variable b1 | $@ | extensions.cs:46:20:46:33 | call to method Source : B | call to method Source : B | +| extensions.cs:131:14:131:15 | access to local variable b2 | extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:131:14:131:15 | access to local variable b2 | $@ | extensions.cs:46:20:46:33 | call to method Source : B | call to method Source : B | +| extensions.cs:131:14:131:15 | access to local variable b2 | extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:131:14:131:15 | access to local variable b2 | $@ | extensions.cs:46:20:46:33 | call to method Source : B | call to method Source : B | +| extensions.cs:147:14:147:15 | access to local variable b2 | extensions.cs:145:18:145:29 | call to method Source : B | extensions.cs:147:14:147:15 | access to local variable b2 | $@ | extensions.cs:145:18:145:29 | call to method Source : B | call to method Source : B | +| extensions.cs:147:14:147:15 | access to local variable b2 | extensions.cs:145:18:145:29 | call to method Source : B | extensions.cs:147:14:147:15 | access to local variable b2 | $@ | extensions.cs:145:18:145:29 | call to method Source : B | call to method Source : B | +| extensions.cs:150:14:150:15 | access to local variable b3 | extensions.cs:145:18:145:29 | call to method Source : B | extensions.cs:150:14:150:15 | access to local variable b3 | $@ | extensions.cs:145:18:145:29 | call to method Source : B | call to method Source : B | +| extensions.cs:150:14:150:15 | access to local variable b3 | extensions.cs:145:18:145:29 | call to method Source : B | extensions.cs:150:14:150:15 | access to local variable b3 | $@ | extensions.cs:145:18:145:29 | call to method Source : B | call to method Source : B | +| extensions.cs:186:14:186:15 | access to local variable b3 | extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:186:14:186:15 | access to local variable b3 | $@ | extensions.cs:67:20:67:33 | call to method Source : B | call to method Source : B | +| extensions.cs:186:14:186:15 | access to local variable b3 | extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:186:14:186:15 | access to local variable b3 | $@ | extensions.cs:67:20:67:33 | call to method Source : B | call to method Source : B | +| extensions.cs:189:14:189:15 | access to local variable b4 | extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:189:14:189:15 | access to local variable b4 | $@ | extensions.cs:67:20:67:33 | call to method Source : B | call to method Source : B | +| extensions.cs:189:14:189:15 | access to local variable b4 | extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:189:14:189:15 | access to local variable b4 | $@ | extensions.cs:67:20:67:33 | call to method Source : B | call to method Source : B | +| extensions.cs:195:14:195:15 | access to local variable b1 | extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:195:14:195:15 | access to local variable b1 | $@ | extensions.cs:36:24:36:38 | call to method Source : B | call to method Source : B | +| extensions.cs:195:14:195:15 | access to local variable b1 | extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:195:14:195:15 | access to local variable b1 | $@ | extensions.cs:36:24:36:38 | call to method Source : B | call to method Source : B | +| extensions.cs:198:14:198:15 | access to local variable b2 | extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:198:14:198:15 | access to local variable b2 | $@ | extensions.cs:36:24:36:38 | call to method Source : B | call to method Source : B | +| extensions.cs:198:14:198:15 | access to local variable b2 | extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:198:14:198:15 | access to local variable b2 | $@ | extensions.cs:36:24:36:38 | call to method Source : B | call to method Source : B | +| extensions.cs:233:14:233:15 | access to local variable b2 | extensions.cs:231:18:231:30 | call to method Source : B | extensions.cs:233:14:233:15 | access to local variable b2 | $@ | extensions.cs:231:18:231:30 | call to method Source : B | call to method Source : B | +| extensions.cs:233:14:233:15 | access to local variable b2 | extensions.cs:231:18:231:30 | call to method Source : B | extensions.cs:233:14:233:15 | access to local variable b2 | $@ | extensions.cs:231:18:231:30 | call to method Source : B | call to method Source : B | +| extensions.cs:236:14:236:15 | access to local variable b3 | extensions.cs:231:18:231:30 | call to method Source : B | extensions.cs:236:14:236:15 | access to local variable b3 | $@ | extensions.cs:231:18:231:30 | call to method Source : B | call to method Source : B | +| extensions.cs:236:14:236:15 | access to local variable b3 | extensions.cs:231:18:231:30 | call to method Source : B | extensions.cs:236:14:236:15 | access to local variable b3 | $@ | extensions.cs:231:18:231:30 | call to method Source : B | call to method Source : B | diff --git a/csharp/ql/test/library-tests/dataflow/extensions/ExtensionFlow.ql b/csharp/ql/test/library-tests/dataflow/extensions/ExtensionFlow.ql new file mode 100644 index 000000000000..9ab95f59caf3 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/extensions/ExtensionFlow.ql @@ -0,0 +1,12 @@ +/** + * @kind path-problem + */ + +import csharp +import utils.test.InlineFlowTest +import DefaultFlowTest +import PathGraph + +from PathNode source, PathNode sink +where flowPath(source, sink) +select sink, source, sink, "$@", source, source.toString() diff --git a/csharp/ql/test/library-tests/dataflow/extensions/extensions.cs b/csharp/ql/test/library-tests/dataflow/extensions/extensions.cs new file mode 100644 index 000000000000..0e1c2226683d --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/extensions/extensions.cs @@ -0,0 +1,243 @@ +using System; + +public static class MyExtensions +{ + extension(object obj) + { + public B Prop1 + { + get + { + return A.Source(1); + } + set + { + A.Sink(value); // $ hasValueFlow=2 hasValueFlow=102 + } + } + + public B Prop2 + { + get + { + A.Sink(obj); // $ hasValueFlow=6 hasValueFlow=106 + return new B(); + } + set + { + A.Sink(obj); // $ hasValueFlow=7 hasValueFlow=107 + } + } + + public static B StaticProp1 + { + get + { + return A.Source(10); + } + set + { + A.Sink(value); // $ hasValueFlow=11 hasValueFlow=111 + } + } + + public B M1() + { + return A.Source(3); + } + + public void M2() + { + A.Sink(obj); // $ hasValueFlow=4 hasValueFlow=104 + } + + public static B M3(B b) + { + return b; + } + + public static object operator +(object a, object b) + { + A.Sink(a); // $ hasValueFlow=8 hasValueFlow=108 + return new object(); + } + + public static object operator -(object a, object b) + { + return A.Source(9); + } + + public T GenericMethod(T t) + { + return t; + } + } + + extension(B b) + { + public B B1() + { + return b; + } + + public void B2() + { + A.Sink(b); // $ hasValueFlow=12 hasValueFlow=112 + } + } + + extension(T t) where T : class + { + public void GenericM1() + { + A.Sink(t); // $ hasValueFlow=13 hasValueFlow=113 + } + + public S GenericM2(S other) + { + return other; + } + } +} + +public class A +{ + public void Test1() + { + var obj = new object(); + var b1 = obj.Prop1; + Sink(b1); // $ hasValueFlow=1 + + var b2 = MyExtensions.get_Prop1(obj); + Sink(b2); // $ hasValueFlow=1 + } + + public void Test2() + { + var obj = new object(); + obj.Prop1 = Source(2); + + var b = Source(102); + MyExtensions.set_Prop1(obj, b); + } + + public void Test3() + { + var obj = new object(); + var b1 = obj.M1(); + Sink(b1); // $ hasValueFlow=3 + + var b2 = MyExtensions.M1(obj); + Sink(b2); // $ hasValueFlow=3 + } + + public void Test4() + { + var b1 = Source(4); + b1.M2(); + + var b2 = Source(104); + MyExtensions.M2(b2); + } + + public void Test5() + { + var b1 = Source(5); + var b2 = b1.B1(); + Sink(b2); // $ hasValueFlow=5 + + var b3 = MyExtensions.B1(b1); + Sink(b3); // $ hasValueFlow=5 + } + + public void Test6() + { + var b1 = Source(6); + var b2 = b1.Prop2; + + var b3 = Source(106); + var b4 = MyExtensions.get_Prop2(b3); + } + + public void Test7() + { + var b1 = Source(7); + b1.Prop2 = new B(); + + var b2 = Source(107); + MyExtensions.set_Prop2(b2, new B()); + } + + public void Test8() + { + var b1 = Source(8); + var b2 = Source(1); + var b3 = b1 + b2; + + var b4 = Source(108); + var b5 = MyExtensions.op_Addition(b4, b2); + } + + public void Test9() + { + var b1 = Source(0); + var b2 = Source(1); + var b3 = b1 - b2; + Sink(b3); // $ hasValueFlow=9 + + var b4 = MyExtensions.op_Subtraction(b1, b2); + Sink(b4); // $ hasValueFlow=9 + } + + public void Test10() + { + var b1 = object.StaticProp1; + Sink(b1); // $ hasValueFlow=10 + + var b2 = MyExtensions.get_StaticProp1(); + Sink(b2); // $ hasValueFlow=10 + } + + public void Test11() + { + var b1 = Source(11); + object.StaticProp1 = b1; + + var b2 = Source(111); + MyExtensions.set_StaticProp1(b2); + } + + public void Test12() + { + var b1 = Source(12); + b1.B2(); + + var b2 = Source(112); + MyExtensions.B2(b2); + } + + public void Test13() + { + var b1 = Source(13); + b1.GenericM1(); + + var b2 = Source(113); + MyExtensions.GenericM1(b2); + } + + public void Test14() + { + var obj = new object(); + var b1 = Source(14); + var b2 = obj.GenericM2(b1); + Sink(b2); // $ hasValueFlow=14 + + var b3 = MyExtensions.GenericM2(obj, b1); + Sink(b3); // $ hasValueFlow=14 + } + + public static T Source(object source) => throw null; + public static void Sink(object o) { } +} + +public class B { } diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs index e28b8fdfcc92..1fa43ba456e5 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs @@ -348,4 +348,98 @@ public void M1() static void Sink(object o) { } } + // Test extensions + public static class TestExtensions + { + extension(object o) + { + public object Method1() => throw null; + public static object StaticMethod1(object s) => throw null; + public object Property1 { get { throw null; } set { throw null; } } + } + + extension(T t) where T : class + { + public T GenericMethod1() => throw null; + public static T GenericStaticMethod1(T t0) => throw null; + public T GenericProperty1 { get { throw null; } set { throw null; } } + } + } + + public class M + { + public void M1() + { + var obj = new object(); + var o1 = obj.Method1(); + Sink(o1); + + var o2 = TestExtensions.Method1(obj); + Sink(o2); + } + + public void M2() + { + var obj = new object(); + var o1 = object.StaticMethod1(obj); + Sink(o1); + + var o2 = TestExtensions.StaticMethod1(obj); + Sink(o2); + } + + public void M3(object o) + { + var obj = new object(); + o.Property1 = obj; + var o1 = o.Property1; + Sink(o1); + } + + public void M4(object o) + { + var obj = new object(); + TestExtensions.set_Property1(o, obj); + var o1 = TestExtensions.get_Property1(o); + Sink(o1); + } + + public void M5() + { + var obj = new object(); + var o1 = obj.GenericMethod1(); + Sink(o1); + + var o2 = TestExtensions.GenericMethod1(obj); + Sink(o2); + } + + public void M6() + { + var obj = new object(); + var o1 = object.GenericStaticMethod1(obj); + Sink(o1); + + var o2 = TestExtensions.GenericStaticMethod1(obj); + Sink(o2); + } + + public void M7(object o) + { + var obj = new object(); + o.GenericProperty1 = obj; + var o1 = o.GenericProperty1; + Sink(o1); + } + + public void M8(object o) + { + var obj = new object(); + TestExtensions.set_GenericProperty1(o, obj); + var o1 = TestExtensions.get_GenericProperty1(o); + Sink(o1); + } + + static void Sink(object o) { } + } } diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected index 3099a3fec7e6..b0256d6c41d8 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected @@ -32,6 +32,14 @@ models | 31 | Summary: My.Qltest; Library; false; GetValue; (); ; Argument[this].SyntheticField[X]; ReturnValue; value; dfc-generated | | 32 | Summary: My.Qltest; Library; false; MixedFlowArgs; (System.Object,System.Object); ; Argument[1]; ReturnValue; value; manual | | 33 | Summary: My.Qltest; Library; false; SetValue; (System.Object); ; Argument[0]; Argument[this].SyntheticField[X]; value; dfc-generated | +| 34 | Summary: My.Qltest; TestExtensions+extension(System.Object); false; Method1; (System.Object); ; Argument[0]; ReturnValue; value; manual | +| 35 | Summary: My.Qltest; TestExtensions+extension(System.Object); false; StaticMethod1; (System.Object); ; Argument[0]; ReturnValue; value; manual | +| 36 | Summary: My.Qltest; TestExtensions+extension(System.Object); false; get_Property1; (System.Object); ; Argument[0].SyntheticField[TestExtensions.Property1]; ReturnValue; value; manual | +| 37 | Summary: My.Qltest; TestExtensions+extension(System.Object); false; set_Property1; (System.Object,System.Object); ; Argument[1]; Argument[0].SyntheticField[TestExtensions.Property1]; value; manual | +| 38 | Summary: My.Qltest; TestExtensions+extension(T); false; GenericMethod1; (T); ; Argument[0]; ReturnValue; value; manual | +| 39 | Summary: My.Qltest; TestExtensions+extension(T); false; GenericStaticMethod1; (T); ; Argument[0]; ReturnValue; value; manual | +| 40 | Summary: My.Qltest; TestExtensions+extension(T); false; get_GenericProperty1; (T); ; Argument[0].SyntheticField[TestExtensions.GenericProperty1]; ReturnValue; value; manual | +| 41 | Summary: My.Qltest; TestExtensions+extension(T); false; set_GenericProperty1; (T,T); ; Argument[1]; Argument[0].SyntheticField[TestExtensions.GenericProperty1]; value; manual | edges | ExternalFlow.cs:9:20:9:23 | access to local variable arg1 : Object | ExternalFlow.cs:10:29:10:32 | access to local variable arg1 : Object | provenance | | | ExternalFlow.cs:9:27:9:38 | object creation of type Object : Object | ExternalFlow.cs:9:20:9:23 | access to local variable arg1 : Object | provenance | | @@ -150,6 +158,73 @@ edges | ExternalFlow.cs:344:13:344:13 | [post] access to local variable l : Library [synthetic X] : Object | ExternalFlow.cs:345:18:345:18 | access to local variable l : Library [synthetic X] : Object | provenance | | | ExternalFlow.cs:344:24:344:24 | access to local variable o : Object | ExternalFlow.cs:344:13:344:13 | [post] access to local variable l : Library [synthetic X] : Object | provenance | MaD:33 | | ExternalFlow.cs:345:18:345:18 | access to local variable l : Library [synthetic X] : Object | ExternalFlow.cs:345:18:345:29 | call to method GetValue | provenance | MaD:31 | +| ExternalFlow.cs:373:17:373:19 | access to local variable obj : Object | ExternalFlow.cs:374:22:374:24 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:373:17:373:19 | access to local variable obj : Object | ExternalFlow.cs:377:45:377:47 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:373:23:373:34 | object creation of type Object : Object | ExternalFlow.cs:373:17:373:19 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:374:17:374:18 | access to local variable o1 : Object | ExternalFlow.cs:375:18:375:19 | access to local variable o1 | provenance | | +| ExternalFlow.cs:374:22:374:24 | access to local variable obj : Object | ExternalFlow.cs:374:22:374:34 | call to method Method1 : Object | provenance | MaD:34 | +| ExternalFlow.cs:374:22:374:34 | call to method Method1 : Object | ExternalFlow.cs:374:17:374:18 | access to local variable o1 : Object | provenance | | +| ExternalFlow.cs:377:17:377:18 | access to local variable o2 : Object | ExternalFlow.cs:378:18:378:19 | access to local variable o2 | provenance | | +| ExternalFlow.cs:377:22:377:48 | call to method Method1 : Object | ExternalFlow.cs:377:17:377:18 | access to local variable o2 : Object | provenance | | +| ExternalFlow.cs:377:45:377:47 | access to local variable obj : Object | ExternalFlow.cs:377:22:377:48 | call to method Method1 : Object | provenance | MaD:34 | +| ExternalFlow.cs:383:17:383:19 | access to local variable obj : Object | ExternalFlow.cs:384:43:384:45 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:383:17:383:19 | access to local variable obj : Object | ExternalFlow.cs:387:51:387:53 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:383:23:383:34 | object creation of type Object : Object | ExternalFlow.cs:383:17:383:19 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:384:17:384:18 | access to local variable o1 : Object | ExternalFlow.cs:385:18:385:19 | access to local variable o1 | provenance | | +| ExternalFlow.cs:384:22:384:46 | call to method StaticMethod1 : Object | ExternalFlow.cs:384:17:384:18 | access to local variable o1 : Object | provenance | | +| ExternalFlow.cs:384:43:384:45 | access to local variable obj : Object | ExternalFlow.cs:384:22:384:46 | call to method StaticMethod1 : Object | provenance | MaD:35 | +| ExternalFlow.cs:387:17:387:18 | access to local variable o2 : Object | ExternalFlow.cs:388:18:388:19 | access to local variable o2 | provenance | | +| ExternalFlow.cs:387:22:387:54 | call to method StaticMethod1 : Object | ExternalFlow.cs:387:17:387:18 | access to local variable o2 : Object | provenance | | +| ExternalFlow.cs:387:51:387:53 | access to local variable obj : Object | ExternalFlow.cs:387:22:387:54 | call to method StaticMethod1 : Object | provenance | MaD:35 | +| ExternalFlow.cs:393:17:393:19 | access to local variable obj : Object | ExternalFlow.cs:394:27:394:29 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:393:23:393:34 | object creation of type Object : Object | ExternalFlow.cs:393:17:393:19 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:394:13:394:13 | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | ExternalFlow.cs:395:22:395:22 | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | provenance | | +| ExternalFlow.cs:394:27:394:29 | access to local variable obj : Object | ExternalFlow.cs:394:13:394:13 | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | provenance | MaD:37 | +| ExternalFlow.cs:395:17:395:18 | access to local variable o1 : Object | ExternalFlow.cs:396:18:396:19 | access to local variable o1 | provenance | | +| ExternalFlow.cs:395:22:395:22 | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | ExternalFlow.cs:395:22:395:32 | access to property Property1 : Object | provenance | MaD:36 | +| ExternalFlow.cs:395:22:395:32 | access to property Property1 : Object | ExternalFlow.cs:395:17:395:18 | access to local variable o1 : Object | provenance | | +| ExternalFlow.cs:401:17:401:19 | access to local variable obj : Object | ExternalFlow.cs:402:45:402:47 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:401:23:401:34 | object creation of type Object : Object | ExternalFlow.cs:401:17:401:19 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:402:42:402:42 | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | ExternalFlow.cs:403:51:403:51 | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | provenance | | +| ExternalFlow.cs:402:45:402:47 | access to local variable obj : Object | ExternalFlow.cs:402:42:402:42 | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | provenance | MaD:37 | +| ExternalFlow.cs:403:17:403:18 | access to local variable o1 : Object | ExternalFlow.cs:404:18:404:19 | access to local variable o1 | provenance | | +| ExternalFlow.cs:403:22:403:52 | call to extension accessor get_Property1 : Object | ExternalFlow.cs:403:17:403:18 | access to local variable o1 : Object | provenance | | +| ExternalFlow.cs:403:51:403:51 | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | ExternalFlow.cs:403:22:403:52 | call to extension accessor get_Property1 : Object | provenance | MaD:36 | +| ExternalFlow.cs:409:17:409:19 | access to local variable obj : Object | ExternalFlow.cs:410:22:410:24 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:409:17:409:19 | access to local variable obj : Object | ExternalFlow.cs:413:52:413:54 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:409:23:409:34 | object creation of type Object : Object | ExternalFlow.cs:409:17:409:19 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:410:17:410:18 | access to local variable o1 : Object | ExternalFlow.cs:411:18:411:19 | access to local variable o1 | provenance | | +| ExternalFlow.cs:410:22:410:24 | access to local variable obj : Object | ExternalFlow.cs:410:22:410:41 | call to method GenericMethod1 : Object | provenance | MaD:38 | +| ExternalFlow.cs:410:22:410:41 | call to method GenericMethod1 : Object | ExternalFlow.cs:410:17:410:18 | access to local variable o1 : Object | provenance | | +| ExternalFlow.cs:413:17:413:18 | access to local variable o2 : Object | ExternalFlow.cs:414:18:414:19 | access to local variable o2 | provenance | | +| ExternalFlow.cs:413:22:413:55 | call to method GenericMethod1 : Object | ExternalFlow.cs:413:17:413:18 | access to local variable o2 : Object | provenance | | +| ExternalFlow.cs:413:52:413:54 | access to local variable obj : Object | ExternalFlow.cs:413:22:413:55 | call to method GenericMethod1 : Object | provenance | MaD:38 | +| ExternalFlow.cs:419:17:419:19 | access to local variable obj : Object | ExternalFlow.cs:420:50:420:52 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:419:17:419:19 | access to local variable obj : Object | ExternalFlow.cs:423:58:423:60 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:419:23:419:34 | object creation of type Object : Object | ExternalFlow.cs:419:17:419:19 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:420:17:420:18 | access to local variable o1 : Object | ExternalFlow.cs:421:18:421:19 | access to local variable o1 | provenance | | +| ExternalFlow.cs:420:22:420:53 | call to method GenericStaticMethod1 : Object | ExternalFlow.cs:420:17:420:18 | access to local variable o1 : Object | provenance | | +| ExternalFlow.cs:420:50:420:52 | access to local variable obj : Object | ExternalFlow.cs:420:22:420:53 | call to method GenericStaticMethod1 : Object | provenance | MaD:39 | +| ExternalFlow.cs:423:17:423:18 | access to local variable o2 : Object | ExternalFlow.cs:424:18:424:19 | access to local variable o2 | provenance | | +| ExternalFlow.cs:423:22:423:61 | call to method GenericStaticMethod1 : Object | ExternalFlow.cs:423:17:423:18 | access to local variable o2 : Object | provenance | | +| ExternalFlow.cs:423:58:423:60 | access to local variable obj : Object | ExternalFlow.cs:423:22:423:61 | call to method GenericStaticMethod1 : Object | provenance | MaD:39 | +| ExternalFlow.cs:429:17:429:19 | access to local variable obj : Object | ExternalFlow.cs:430:34:430:36 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:429:23:429:34 | object creation of type Object : Object | ExternalFlow.cs:429:17:429:19 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:430:13:430:13 | [post] access to parameter o : Object [property GenericProperty1] : Object | ExternalFlow.cs:431:22:431:22 | access to parameter o : Object [property GenericProperty1] : Object | provenance | | +| ExternalFlow.cs:430:13:430:13 | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | ExternalFlow.cs:431:22:431:22 | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | provenance | | +| ExternalFlow.cs:430:34:430:36 | access to local variable obj : Object | ExternalFlow.cs:430:13:430:13 | [post] access to parameter o : Object [property GenericProperty1] : Object | provenance | | +| ExternalFlow.cs:430:34:430:36 | access to local variable obj : Object | ExternalFlow.cs:430:13:430:13 | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | provenance | MaD:41 | +| ExternalFlow.cs:431:17:431:18 | access to local variable o1 : Object | ExternalFlow.cs:432:18:432:19 | access to local variable o1 | provenance | | +| ExternalFlow.cs:431:22:431:22 | access to parameter o : Object [property GenericProperty1] : Object | ExternalFlow.cs:431:22:431:39 | access to property GenericProperty1 : Object | provenance | | +| ExternalFlow.cs:431:22:431:22 | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | ExternalFlow.cs:431:22:431:39 | access to property GenericProperty1 : Object | provenance | MaD:40 | +| ExternalFlow.cs:431:22:431:39 | access to property GenericProperty1 : Object | ExternalFlow.cs:431:17:431:18 | access to local variable o1 : Object | provenance | | +| ExternalFlow.cs:437:17:437:19 | access to local variable obj : Object | ExternalFlow.cs:438:52:438:54 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:437:23:437:34 | object creation of type Object : Object | ExternalFlow.cs:437:17:437:19 | access to local variable obj : Object | provenance | | +| ExternalFlow.cs:438:49:438:49 | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | ExternalFlow.cs:439:58:439:58 | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | provenance | | +| ExternalFlow.cs:438:52:438:54 | access to local variable obj : Object | ExternalFlow.cs:438:49:438:49 | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | provenance | MaD:41 | +| ExternalFlow.cs:439:17:439:18 | access to local variable o1 : Object | ExternalFlow.cs:440:18:440:19 | access to local variable o1 | provenance | | +| ExternalFlow.cs:439:22:439:59 | call to extension accessor get_GenericProperty1 : Object | ExternalFlow.cs:439:17:439:18 | access to local variable o1 : Object | provenance | | +| ExternalFlow.cs:439:58:439:58 | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | ExternalFlow.cs:439:22:439:59 | call to extension accessor get_GenericProperty1 : Object | provenance | MaD:40 | nodes | ExternalFlow.cs:9:20:9:23 | access to local variable arg1 : Object | semmle.label | access to local variable arg1 : Object | | ExternalFlow.cs:9:27:9:38 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | @@ -294,6 +369,80 @@ nodes | ExternalFlow.cs:344:24:344:24 | access to local variable o : Object | semmle.label | access to local variable o : Object | | ExternalFlow.cs:345:18:345:18 | access to local variable l : Library [synthetic X] : Object | semmle.label | access to local variable l : Library [synthetic X] : Object | | ExternalFlow.cs:345:18:345:29 | call to method GetValue | semmle.label | call to method GetValue | +| ExternalFlow.cs:373:17:373:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:373:23:373:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:374:17:374:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object | +| ExternalFlow.cs:374:22:374:24 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:374:22:374:34 | call to method Method1 : Object | semmle.label | call to method Method1 : Object | +| ExternalFlow.cs:375:18:375:19 | access to local variable o1 | semmle.label | access to local variable o1 | +| ExternalFlow.cs:377:17:377:18 | access to local variable o2 : Object | semmle.label | access to local variable o2 : Object | +| ExternalFlow.cs:377:22:377:48 | call to method Method1 : Object | semmle.label | call to method Method1 : Object | +| ExternalFlow.cs:377:45:377:47 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:378:18:378:19 | access to local variable o2 | semmle.label | access to local variable o2 | +| ExternalFlow.cs:383:17:383:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:383:23:383:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:384:17:384:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object | +| ExternalFlow.cs:384:22:384:46 | call to method StaticMethod1 : Object | semmle.label | call to method StaticMethod1 : Object | +| ExternalFlow.cs:384:43:384:45 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:385:18:385:19 | access to local variable o1 | semmle.label | access to local variable o1 | +| ExternalFlow.cs:387:17:387:18 | access to local variable o2 : Object | semmle.label | access to local variable o2 : Object | +| ExternalFlow.cs:387:22:387:54 | call to method StaticMethod1 : Object | semmle.label | call to method StaticMethod1 : Object | +| ExternalFlow.cs:387:51:387:53 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:388:18:388:19 | access to local variable o2 | semmle.label | access to local variable o2 | +| ExternalFlow.cs:393:17:393:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:393:23:393:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:394:13:394:13 | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | semmle.label | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | +| ExternalFlow.cs:394:27:394:29 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:395:17:395:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object | +| ExternalFlow.cs:395:22:395:22 | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | semmle.label | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | +| ExternalFlow.cs:395:22:395:32 | access to property Property1 : Object | semmle.label | access to property Property1 : Object | +| ExternalFlow.cs:396:18:396:19 | access to local variable o1 | semmle.label | access to local variable o1 | +| ExternalFlow.cs:401:17:401:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:401:23:401:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:402:42:402:42 | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | semmle.label | [post] access to parameter o : Object [synthetic TestExtensions.Property1] : Object | +| ExternalFlow.cs:402:45:402:47 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:403:17:403:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object | +| ExternalFlow.cs:403:22:403:52 | call to extension accessor get_Property1 : Object | semmle.label | call to extension accessor get_Property1 : Object | +| ExternalFlow.cs:403:51:403:51 | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | semmle.label | access to parameter o : Object [synthetic TestExtensions.Property1] : Object | +| ExternalFlow.cs:404:18:404:19 | access to local variable o1 | semmle.label | access to local variable o1 | +| ExternalFlow.cs:409:17:409:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:409:23:409:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:410:17:410:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object | +| ExternalFlow.cs:410:22:410:24 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:410:22:410:41 | call to method GenericMethod1 : Object | semmle.label | call to method GenericMethod1 : Object | +| ExternalFlow.cs:411:18:411:19 | access to local variable o1 | semmle.label | access to local variable o1 | +| ExternalFlow.cs:413:17:413:18 | access to local variable o2 : Object | semmle.label | access to local variable o2 : Object | +| ExternalFlow.cs:413:22:413:55 | call to method GenericMethod1 : Object | semmle.label | call to method GenericMethod1 : Object | +| ExternalFlow.cs:413:52:413:54 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:414:18:414:19 | access to local variable o2 | semmle.label | access to local variable o2 | +| ExternalFlow.cs:419:17:419:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:419:23:419:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:420:17:420:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object | +| ExternalFlow.cs:420:22:420:53 | call to method GenericStaticMethod1 : Object | semmle.label | call to method GenericStaticMethod1 : Object | +| ExternalFlow.cs:420:50:420:52 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:421:18:421:19 | access to local variable o1 | semmle.label | access to local variable o1 | +| ExternalFlow.cs:423:17:423:18 | access to local variable o2 : Object | semmle.label | access to local variable o2 : Object | +| ExternalFlow.cs:423:22:423:61 | call to method GenericStaticMethod1 : Object | semmle.label | call to method GenericStaticMethod1 : Object | +| ExternalFlow.cs:423:58:423:60 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:424:18:424:19 | access to local variable o2 | semmle.label | access to local variable o2 | +| ExternalFlow.cs:429:17:429:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:429:23:429:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:430:13:430:13 | [post] access to parameter o : Object [property GenericProperty1] : Object | semmle.label | [post] access to parameter o : Object [property GenericProperty1] : Object | +| ExternalFlow.cs:430:13:430:13 | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | semmle.label | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | +| ExternalFlow.cs:430:34:430:36 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:431:17:431:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object | +| ExternalFlow.cs:431:22:431:22 | access to parameter o : Object [property GenericProperty1] : Object | semmle.label | access to parameter o : Object [property GenericProperty1] : Object | +| ExternalFlow.cs:431:22:431:22 | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | semmle.label | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | +| ExternalFlow.cs:431:22:431:39 | access to property GenericProperty1 : Object | semmle.label | access to property GenericProperty1 : Object | +| ExternalFlow.cs:432:18:432:19 | access to local variable o1 | semmle.label | access to local variable o1 | +| ExternalFlow.cs:437:17:437:19 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:437:23:437:34 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:438:49:438:49 | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | semmle.label | [post] access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | +| ExternalFlow.cs:438:52:438:54 | access to local variable obj : Object | semmle.label | access to local variable obj : Object | +| ExternalFlow.cs:439:17:439:18 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object | +| ExternalFlow.cs:439:22:439:59 | call to extension accessor get_GenericProperty1 : Object | semmle.label | call to extension accessor get_GenericProperty1 : Object | +| ExternalFlow.cs:439:58:439:58 | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | semmle.label | access to parameter o : Object [synthetic TestExtensions.GenericProperty1] : Object | +| ExternalFlow.cs:440:18:440:19 | access to local variable o1 | semmle.label | access to local variable o1 | subpaths | ExternalFlow.cs:84:29:84:32 | access to local variable objs : null [element] : Object | ExternalFlow.cs:84:35:84:35 | o : Object | ExternalFlow.cs:84:40:84:40 | access to parameter o : Object | ExternalFlow.cs:84:25:84:41 | call to method Map : T[] [element] : Object | invalidModelRow @@ -328,3 +477,15 @@ invalidModelRow | ExternalFlow.cs:324:18:324:44 | call to method GetMyNestedSyntheticField | ExternalFlow.cs:322:21:322:32 | object creation of type Object : Object | ExternalFlow.cs:324:18:324:44 | call to method GetMyNestedSyntheticField | $@ | ExternalFlow.cs:322:21:322:32 | object creation of type Object : Object | object creation of type Object : Object | | ExternalFlow.cs:331:18:331:45 | call to method GetMyFieldOnSyntheticField | ExternalFlow.cs:329:21:329:32 | object creation of type Object : Object | ExternalFlow.cs:331:18:331:45 | call to method GetMyFieldOnSyntheticField | $@ | ExternalFlow.cs:329:21:329:32 | object creation of type Object : Object | object creation of type Object : Object | | ExternalFlow.cs:345:18:345:29 | call to method GetValue | ExternalFlow.cs:343:21:343:32 | object creation of type Object : Object | ExternalFlow.cs:345:18:345:29 | call to method GetValue | $@ | ExternalFlow.cs:343:21:343:32 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:375:18:375:19 | access to local variable o1 | ExternalFlow.cs:373:23:373:34 | object creation of type Object : Object | ExternalFlow.cs:375:18:375:19 | access to local variable o1 | $@ | ExternalFlow.cs:373:23:373:34 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:378:18:378:19 | access to local variable o2 | ExternalFlow.cs:373:23:373:34 | object creation of type Object : Object | ExternalFlow.cs:378:18:378:19 | access to local variable o2 | $@ | ExternalFlow.cs:373:23:373:34 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:385:18:385:19 | access to local variable o1 | ExternalFlow.cs:383:23:383:34 | object creation of type Object : Object | ExternalFlow.cs:385:18:385:19 | access to local variable o1 | $@ | ExternalFlow.cs:383:23:383:34 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:388:18:388:19 | access to local variable o2 | ExternalFlow.cs:383:23:383:34 | object creation of type Object : Object | ExternalFlow.cs:388:18:388:19 | access to local variable o2 | $@ | ExternalFlow.cs:383:23:383:34 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:396:18:396:19 | access to local variable o1 | ExternalFlow.cs:393:23:393:34 | object creation of type Object : Object | ExternalFlow.cs:396:18:396:19 | access to local variable o1 | $@ | ExternalFlow.cs:393:23:393:34 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:404:18:404:19 | access to local variable o1 | ExternalFlow.cs:401:23:401:34 | object creation of type Object : Object | ExternalFlow.cs:404:18:404:19 | access to local variable o1 | $@ | ExternalFlow.cs:401:23:401:34 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:411:18:411:19 | access to local variable o1 | ExternalFlow.cs:409:23:409:34 | object creation of type Object : Object | ExternalFlow.cs:411:18:411:19 | access to local variable o1 | $@ | ExternalFlow.cs:409:23:409:34 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:414:18:414:19 | access to local variable o2 | ExternalFlow.cs:409:23:409:34 | object creation of type Object : Object | ExternalFlow.cs:414:18:414:19 | access to local variable o2 | $@ | ExternalFlow.cs:409:23:409:34 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:421:18:421:19 | access to local variable o1 | ExternalFlow.cs:419:23:419:34 | object creation of type Object : Object | ExternalFlow.cs:421:18:421:19 | access to local variable o1 | $@ | ExternalFlow.cs:419:23:419:34 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:424:18:424:19 | access to local variable o2 | ExternalFlow.cs:419:23:419:34 | object creation of type Object : Object | ExternalFlow.cs:424:18:424:19 | access to local variable o2 | $@ | ExternalFlow.cs:419:23:419:34 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:432:18:432:19 | access to local variable o1 | ExternalFlow.cs:429:23:429:34 | object creation of type Object : Object | ExternalFlow.cs:432:18:432:19 | access to local variable o1 | $@ | ExternalFlow.cs:429:23:429:34 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:440:18:440:19 | access to local variable o1 | ExternalFlow.cs:437:23:437:34 | object creation of type Object : Object | ExternalFlow.cs:440:18:440:19 | access to local variable o1 | $@ | ExternalFlow.cs:437:23:437:34 | object creation of type Object : Object | object creation of type Object : Object | diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ext.yml b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ext.yml index a582a581cf12..21e66b840669 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ext.yml +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ext.yml @@ -45,6 +45,14 @@ extensions: - ["My.Qltest", "K", false, "GetMyFieldOnSyntheticField", "()", "", "Argument[this].SyntheticField[My.Qltest.K.MySyntheticField2].Field[My.Qltest.K.MyField]", "ReturnValue", "value", "manual"] - ["My.Qltest", "Library", false, "SetValue", "(System.Object)", "", "Argument[0]", "Argument[this].SyntheticField[X]", "value", "dfc-generated"] - ["My.Qltest", "Library", false, "GetValue", "()", "", "Argument[this].SyntheticField[X]", "ReturnValue", "value", "dfc-generated"] + - ["My.Qltest", "TestExtensions+extension(System.Object)", false, "Method1", "(System.Object)", "", "Argument[0]", "ReturnValue", "value", "manual"] + - ["My.Qltest", "TestExtensions+extension(System.Object)", false, "StaticMethod1", "(System.Object)", "", "Argument[0]", "ReturnValue", "value", "manual"] + - ["My.Qltest", "TestExtensions+extension(System.Object)", false, "get_Property1", "(System.Object)", "", "Argument[0].SyntheticField[TestExtensions.Property1]", "ReturnValue", "value", "manual"] + - ["My.Qltest", "TestExtensions+extension(System.Object)", false, "set_Property1", "(System.Object,System.Object)", "", "Argument[1]", "Argument[0].SyntheticField[TestExtensions.Property1]", "value", "manual"] + - ["My.Qltest", "TestExtensions+extension(T)", false, "GenericMethod1", "(T)", "", "Argument[0]", "ReturnValue", "value", "manual"] + - ["My.Qltest", "TestExtensions+extension(T)", false, "GenericStaticMethod1", "(T)", "", "Argument[0]", "ReturnValue", "value", "manual"] + - ["My.Qltest", "TestExtensions+extension(T)", false, "get_GenericProperty1", "(T)", "", "Argument[0].SyntheticField[TestExtensions.GenericProperty1]", "ReturnValue", "value", "manual"] + - ["My.Qltest", "TestExtensions+extension(T)", false, "set_GenericProperty1", "(T,T)", "", "Argument[1]", "Argument[0].SyntheticField[TestExtensions.GenericProperty1]", "value", "manual"] - addsTo: pack: codeql/csharp-all diff --git a/csharp/ql/test/library-tests/dataflow/external-models/Sources.cs b/csharp/ql/test/library-tests/dataflow/external-models/Sources.cs index 6f73f096ef9c..10b8a37cc0f8 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/Sources.cs +++ b/csharp/ql/test/library-tests/dataflow/external-models/Sources.cs @@ -21,6 +21,9 @@ void Foo() x = TaggedSrcPropertyGetter; x = this[0]; + + S s; + StructSrc(s); } [SourceAttribute] @@ -65,7 +68,10 @@ void SrcArg(object src) { } [SourceAttribute] object this[int i] => null; + + void StructSrc(S s) { } } + struct S { } class SourceAttribute : System.Attribute { } } diff --git a/csharp/ql/test/library-tests/dataflow/external-models/srcs.expected b/csharp/ql/test/library-tests/dataflow/external-models/srcs.expected index 855e51fca562..063626c07265 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/srcs.expected +++ b/csharp/ql/test/library-tests/dataflow/external-models/srcs.expected @@ -11,9 +11,10 @@ invalidModelRow | Sources.cs:20:17:20:33 | call to method SrcTwoArg | local | | Sources.cs:22:17:22:39 | access to property TaggedSrcPropertyGetter | local | | Sources.cs:23:17:23:23 | access to indexer | local | -| Sources.cs:27:14:27:20 | this | local | -| Sources.cs:27:29:27:45 | taggedMethodParam | local | -| Sources.cs:31:47:31:60 | taggedSrcParam | local | -| Sources.cs:43:45:43:45 | p | local | -| Sources.cs:50:50:50:50 | p | local | -| Sources.cs:56:16:56:30 | this | local | +| Sources.cs:26:23:26:23 | [post] access to local variable s | local | +| Sources.cs:30:14:30:20 | this | local | +| Sources.cs:30:29:30:45 | taggedMethodParam | local | +| Sources.cs:34:47:34:60 | taggedSrcParam | local | +| Sources.cs:46:45:46:45 | p | local | +| Sources.cs:53:50:53:50 | p | local | +| Sources.cs:59:16:59:30 | this | local | diff --git a/csharp/ql/test/library-tests/dataflow/external-models/srcs.ext.yml b/csharp/ql/test/library-tests/dataflow/external-models/srcs.ext.yml index ca5103b1cd5e..b4dcd75be26e 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/srcs.ext.yml +++ b/csharp/ql/test/library-tests/dataflow/external-models/srcs.ext.yml @@ -19,3 +19,4 @@ extensions: - ["My.Qltest", "SourceAttribute", false, "", "", "Attribute", "", "local", "manual"] - ["My.Qltest", "SourceAttribute", false, "", "", "Attribute.Getter", "ReturnValue", "local", "manual"] - ["My.Qltest", "A", false, "SrcTwoArg", "(System.String,System.String)", "", "ReturnValue", "local", "manual"] + - ["My.Qltest", "A", false, "StructSrc", "", "", "Argument[0]", "local", "manual"] diff --git a/csharp/ql/test/library-tests/dataflow/fields/D.cs b/csharp/ql/test/library-tests/dataflow/fields/D.cs index 7f07cf5ca0b9..45dfbffc8017 100644 --- a/csharp/ql/test/library-tests/dataflow/fields/D.cs +++ b/csharp/ql/test/library-tests/dataflow/fields/D.cs @@ -89,3 +89,65 @@ public static void Sink(object o) { } static T Source(object source) => throw null; } + +public class DFieldProps +{ + object FieldProp0 + { + get { return field; } + set { field = value; } + } = Source(0); + + object FieldProp1 + { + get { return field; } + set { field = value; } + } + + object FieldProp2 + { + get { return field; } + set + { + var x = value; + field = x; + } + } + + static object StaticFieldProp + { + get { return field; } + set { field = value; } + } + + private void M() + { + var d0 = new DFieldProps(); + Sink(d0.FieldProp0); // $ hasValueFlow=0 + Sink(d0.FieldProp1); // no flow + Sink(d0.FieldProp2); // no flow + + var d1 = new DFieldProps(); + var o1 = Source(1); + d1.FieldProp1 = o1; + Sink(d1.FieldProp0); // $ hasValueFlow=0 + Sink(d1.FieldProp1); // $ hasValueFlow=1 + Sink(d1.FieldProp2); // no flow + + var d2 = new DFieldProps(); + var o2 = Source(2); + d2.FieldProp2 = o2; + Sink(d2.FieldProp0); // $ hasValueFlow=0 + Sink(d2.FieldProp1); // no flow + Sink(d2.FieldProp2); // $ hasValueFlow=2 + + var o3 = Source(3); + DFieldProps.StaticFieldProp = o3; + Sink(DFieldProps.StaticFieldProp); // $ hasValueFlow=3 + } + + public static void Sink(object o) { } + + static T Source(object source) => throw null; + +} diff --git a/csharp/ql/test/library-tests/dataflow/fields/FieldFlow.expected b/csharp/ql/test/library-tests/dataflow/fields/FieldFlow.expected index 4e469e118870..44789d1f8475 100644 --- a/csharp/ql/test/library-tests/dataflow/fields/FieldFlow.expected +++ b/csharp/ql/test/library-tests/dataflow/fields/FieldFlow.expected @@ -532,6 +532,118 @@ edges | D.cs:84:14:84:14 | access to local variable d : DPartial [field _backingField] : Object | D.cs:60:9:60:11 | this : DPartial [field _backingField] : Object | provenance | | | D.cs:84:14:84:14 | access to local variable d : DPartial [field _backingField] : Object | D.cs:84:14:84:27 | access to property PartialProp1 | provenance | | | D.cs:84:14:84:14 | access to local variable d : DPartial [field _backingField] : Object | D.cs:84:14:84:27 | access to property PartialProp1 | provenance | | +| D.cs:93:14:93:24 | [post] this access : DFieldProps [field FieldProp0.field] : Object | D.cs:125:18:125:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:93:14:93:24 | [post] this access : DFieldProps [field FieldProp0.field] : Object | D.cs:125:18:125:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:93:14:93:24 | [post] this access : DFieldProps [field FieldProp0.field] : Object | D.cs:130:18:130:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:93:14:93:24 | [post] this access : DFieldProps [field FieldProp0.field] : Object | D.cs:130:18:130:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:93:14:93:24 | [post] this access : DFieldProps [field FieldProp0.field] : Object | D.cs:137:18:137:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:93:14:93:24 | [post] this access : DFieldProps [field FieldProp0.field] : Object | D.cs:137:18:137:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:95:12:95:21 | [post] this access : DFieldProps [field FieldProp0.field] : Object | D.cs:93:14:93:24 | [post] this access : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:95:12:95:21 | [post] this access : DFieldProps [field FieldProp0.field] : Object | D.cs:93:14:93:24 | [post] this access : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | D.cs:97:22:97:26 | this access : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | D.cs:97:22:97:26 | this access : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:97:22:97:26 | this access : DFieldProps [field FieldProp0.field] : Object | D.cs:97:22:97:26 | access to field FieldProp0.field : Object | provenance | | +| D.cs:97:22:97:26 | this access : DFieldProps [field FieldProp0.field] : Object | D.cs:97:22:97:26 | access to field FieldProp0.field : Object | provenance | | +| D.cs:98:9:98:11 | value : Object | D.cs:98:23:98:27 | access to parameter value : Object | provenance | | +| D.cs:98:9:98:11 | value : Object | D.cs:98:23:98:27 | access to parameter value : Object | provenance | | +| D.cs:98:15:98:19 | [post] this access : DFieldProps [field FieldProp0.field] : Object | D.cs:98:9:98:11 | this [Return] : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:98:15:98:19 | [post] this access : DFieldProps [field FieldProp0.field] : Object | D.cs:98:9:98:11 | this [Return] : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:98:23:98:27 | access to parameter value : Object | D.cs:98:15:98:19 | [post] this access : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:98:23:98:27 | access to parameter value : Object | D.cs:98:15:98:19 | [post] this access : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:99:9:99:25 | call to method Source : Object | D.cs:95:12:95:21 | [post] this access : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:99:9:99:25 | call to method Source : Object | D.cs:95:12:95:21 | [post] this access : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:99:9:99:25 | call to method Source : Object | D.cs:98:9:98:11 | value : Object | provenance | | +| D.cs:99:9:99:25 | call to method Source : Object | D.cs:98:9:98:11 | value : Object | provenance | | +| D.cs:103:9:103:11 | this : DFieldProps [field FieldProp1.field] : Object | D.cs:103:22:103:26 | this access : DFieldProps [field FieldProp1.field] : Object | provenance | | +| D.cs:103:9:103:11 | this : DFieldProps [field FieldProp1.field] : Object | D.cs:103:22:103:26 | this access : DFieldProps [field FieldProp1.field] : Object | provenance | | +| D.cs:103:22:103:26 | this access : DFieldProps [field FieldProp1.field] : Object | D.cs:103:22:103:26 | access to field FieldProp1.field : Object | provenance | | +| D.cs:103:22:103:26 | this access : DFieldProps [field FieldProp1.field] : Object | D.cs:103:22:103:26 | access to field FieldProp1.field : Object | provenance | | +| D.cs:104:9:104:11 | value : Object | D.cs:104:23:104:27 | access to parameter value : Object | provenance | | +| D.cs:104:9:104:11 | value : Object | D.cs:104:23:104:27 | access to parameter value : Object | provenance | | +| D.cs:104:15:104:19 | [post] this access : DFieldProps [field FieldProp1.field] : Object | D.cs:104:9:104:11 | this [Return] : DFieldProps [field FieldProp1.field] : Object | provenance | | +| D.cs:104:15:104:19 | [post] this access : DFieldProps [field FieldProp1.field] : Object | D.cs:104:9:104:11 | this [Return] : DFieldProps [field FieldProp1.field] : Object | provenance | | +| D.cs:104:23:104:27 | access to parameter value : Object | D.cs:104:15:104:19 | [post] this access : DFieldProps [field FieldProp1.field] : Object | provenance | | +| D.cs:104:23:104:27 | access to parameter value : Object | D.cs:104:15:104:19 | [post] this access : DFieldProps [field FieldProp1.field] : Object | provenance | | +| D.cs:109:9:109:11 | this : DFieldProps [field FieldProp2.field] : Object | D.cs:109:22:109:26 | this access : DFieldProps [field FieldProp2.field] : Object | provenance | | +| D.cs:109:9:109:11 | this : DFieldProps [field FieldProp2.field] : Object | D.cs:109:22:109:26 | this access : DFieldProps [field FieldProp2.field] : Object | provenance | | +| D.cs:109:22:109:26 | this access : DFieldProps [field FieldProp2.field] : Object | D.cs:109:22:109:26 | access to field FieldProp2.field : Object | provenance | | +| D.cs:109:22:109:26 | this access : DFieldProps [field FieldProp2.field] : Object | D.cs:109:22:109:26 | access to field FieldProp2.field : Object | provenance | | +| D.cs:110:9:110:11 | value : Object | D.cs:112:17:112:17 | access to local variable x : Object | provenance | | +| D.cs:110:9:110:11 | value : Object | D.cs:112:17:112:17 | access to local variable x : Object | provenance | | +| D.cs:112:17:112:17 | access to local variable x : Object | D.cs:113:21:113:21 | access to local variable x : Object | provenance | | +| D.cs:112:17:112:17 | access to local variable x : Object | D.cs:113:21:113:21 | access to local variable x : Object | provenance | | +| D.cs:113:13:113:17 | [post] this access : DFieldProps [field FieldProp2.field] : Object | D.cs:110:9:110:11 | this [Return] : DFieldProps [field FieldProp2.field] : Object | provenance | | +| D.cs:113:13:113:17 | [post] this access : DFieldProps [field FieldProp2.field] : Object | D.cs:110:9:110:11 | this [Return] : DFieldProps [field FieldProp2.field] : Object | provenance | | +| D.cs:113:21:113:21 | access to local variable x : Object | D.cs:113:13:113:17 | [post] this access : DFieldProps [field FieldProp2.field] : Object | provenance | | +| D.cs:113:21:113:21 | access to local variable x : Object | D.cs:113:13:113:17 | [post] this access : DFieldProps [field FieldProp2.field] : Object | provenance | | +| D.cs:119:22:119:26 | access to field StaticFieldProp.field : Object | D.cs:146:14:146:40 | access to property StaticFieldProp | provenance | | +| D.cs:119:22:119:26 | access to field StaticFieldProp.field : Object | D.cs:146:14:146:40 | access to property StaticFieldProp | provenance | | +| D.cs:120:9:120:11 | value : Object | D.cs:120:23:120:27 | access to parameter value : Object | provenance | | +| D.cs:120:9:120:11 | value : Object | D.cs:120:23:120:27 | access to parameter value : Object | provenance | | +| D.cs:120:23:120:27 | access to parameter value : Object | D.cs:119:22:119:26 | access to field StaticFieldProp.field : Object | provenance | | +| D.cs:120:23:120:27 | access to parameter value : Object | D.cs:119:22:119:26 | access to field StaticFieldProp.field : Object | provenance | | +| D.cs:125:13:125:14 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | D.cs:126:14:126:15 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:125:13:125:14 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | D.cs:126:14:126:15 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:125:18:125:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | D.cs:125:13:125:14 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:125:18:125:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | D.cs:125:13:125:14 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:126:14:126:15 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:126:14:126:15 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:126:14:126:15 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | D.cs:126:14:126:26 | access to property FieldProp0 | provenance | | +| D.cs:126:14:126:15 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | D.cs:126:14:126:26 | access to property FieldProp0 | provenance | | +| D.cs:130:13:130:14 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | D.cs:133:14:133:15 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:130:13:130:14 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | D.cs:133:14:133:15 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:130:18:130:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | D.cs:130:13:130:14 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:130:18:130:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | D.cs:130:13:130:14 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:131:13:131:14 | access to local variable o1 : Object | D.cs:132:25:132:26 | access to local variable o1 : Object | provenance | | +| D.cs:131:13:131:14 | access to local variable o1 : Object | D.cs:132:25:132:26 | access to local variable o1 : Object | provenance | | +| D.cs:131:18:131:34 | call to method Source : Object | D.cs:131:13:131:14 | access to local variable o1 : Object | provenance | | +| D.cs:131:18:131:34 | call to method Source : Object | D.cs:131:13:131:14 | access to local variable o1 : Object | provenance | | +| D.cs:132:9:132:10 | [post] access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | D.cs:134:14:134:15 | access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | provenance | | +| D.cs:132:9:132:10 | [post] access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | D.cs:134:14:134:15 | access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | provenance | | +| D.cs:132:25:132:26 | access to local variable o1 : Object | D.cs:104:9:104:11 | value : Object | provenance | | +| D.cs:132:25:132:26 | access to local variable o1 : Object | D.cs:104:9:104:11 | value : Object | provenance | | +| D.cs:132:25:132:26 | access to local variable o1 : Object | D.cs:132:9:132:10 | [post] access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | provenance | | +| D.cs:132:25:132:26 | access to local variable o1 : Object | D.cs:132:9:132:10 | [post] access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | provenance | | +| D.cs:133:14:133:15 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:133:14:133:15 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:133:14:133:15 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | D.cs:133:14:133:26 | access to property FieldProp0 | provenance | | +| D.cs:133:14:133:15 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | D.cs:133:14:133:26 | access to property FieldProp0 | provenance | | +| D.cs:134:14:134:15 | access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | D.cs:103:9:103:11 | this : DFieldProps [field FieldProp1.field] : Object | provenance | | +| D.cs:134:14:134:15 | access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | D.cs:103:9:103:11 | this : DFieldProps [field FieldProp1.field] : Object | provenance | | +| D.cs:134:14:134:15 | access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | D.cs:134:14:134:26 | access to property FieldProp1 | provenance | | +| D.cs:134:14:134:15 | access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | D.cs:134:14:134:26 | access to property FieldProp1 | provenance | | +| D.cs:137:13:137:14 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | D.cs:140:14:140:15 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:137:13:137:14 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | D.cs:140:14:140:15 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:137:18:137:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | D.cs:137:13:137:14 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:137:18:137:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | D.cs:137:13:137:14 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:138:13:138:14 | access to local variable o2 : Object | D.cs:139:25:139:26 | access to local variable o2 : Object | provenance | | +| D.cs:138:13:138:14 | access to local variable o2 : Object | D.cs:139:25:139:26 | access to local variable o2 : Object | provenance | | +| D.cs:138:18:138:34 | call to method Source : Object | D.cs:138:13:138:14 | access to local variable o2 : Object | provenance | | +| D.cs:138:18:138:34 | call to method Source : Object | D.cs:138:13:138:14 | access to local variable o2 : Object | provenance | | +| D.cs:139:9:139:10 | [post] access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | D.cs:142:14:142:15 | access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | provenance | | +| D.cs:139:9:139:10 | [post] access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | D.cs:142:14:142:15 | access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | provenance | | +| D.cs:139:25:139:26 | access to local variable o2 : Object | D.cs:110:9:110:11 | value : Object | provenance | | +| D.cs:139:25:139:26 | access to local variable o2 : Object | D.cs:110:9:110:11 | value : Object | provenance | | +| D.cs:139:25:139:26 | access to local variable o2 : Object | D.cs:139:9:139:10 | [post] access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | provenance | | +| D.cs:139:25:139:26 | access to local variable o2 : Object | D.cs:139:9:139:10 | [post] access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | provenance | | +| D.cs:140:14:140:15 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:140:14:140:15 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | provenance | | +| D.cs:140:14:140:15 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | D.cs:140:14:140:26 | access to property FieldProp0 | provenance | | +| D.cs:140:14:140:15 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | D.cs:140:14:140:26 | access to property FieldProp0 | provenance | | +| D.cs:142:14:142:15 | access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | D.cs:109:9:109:11 | this : DFieldProps [field FieldProp2.field] : Object | provenance | | +| D.cs:142:14:142:15 | access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | D.cs:109:9:109:11 | this : DFieldProps [field FieldProp2.field] : Object | provenance | | +| D.cs:142:14:142:15 | access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | D.cs:142:14:142:26 | access to property FieldProp2 | provenance | | +| D.cs:142:14:142:15 | access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | D.cs:142:14:142:26 | access to property FieldProp2 | provenance | | +| D.cs:144:13:144:14 | access to local variable o3 : Object | D.cs:145:9:145:35 | access to property StaticFieldProp : Object | provenance | | +| D.cs:144:13:144:14 | access to local variable o3 : Object | D.cs:145:9:145:35 | access to property StaticFieldProp : Object | provenance | | +| D.cs:144:13:144:14 | access to local variable o3 : Object | D.cs:145:39:145:40 | access to local variable o3 : Object | provenance | | +| D.cs:144:13:144:14 | access to local variable o3 : Object | D.cs:145:39:145:40 | access to local variable o3 : Object | provenance | | +| D.cs:144:18:144:34 | call to method Source : Object | D.cs:144:13:144:14 | access to local variable o3 : Object | provenance | | +| D.cs:144:18:144:34 | call to method Source : Object | D.cs:144:13:144:14 | access to local variable o3 : Object | provenance | | +| D.cs:145:9:145:35 | access to property StaticFieldProp : Object | D.cs:146:14:146:40 | access to property StaticFieldProp | provenance | | +| D.cs:145:9:145:35 | access to property StaticFieldProp : Object | D.cs:146:14:146:40 | access to property StaticFieldProp | provenance | | +| D.cs:145:39:145:40 | access to local variable o3 : Object | D.cs:120:9:120:11 | value : Object | provenance | | +| D.cs:145:39:145:40 | access to local variable o3 : Object | D.cs:120:9:120:11 | value : Object | provenance | | | E.cs:8:29:8:29 | o : Object | E.cs:11:21:11:21 | access to parameter o : Object | provenance | | | E.cs:8:29:8:29 | o : Object | E.cs:11:21:11:21 | access to parameter o : Object | provenance | | | E.cs:11:9:11:11 | [post] access to local variable ret : S [field Field] : Object | E.cs:12:16:12:18 | access to local variable ret : S [field Field] : Object | provenance | | @@ -1807,6 +1919,120 @@ nodes | D.cs:84:14:84:14 | access to local variable d : DPartial [field _backingField] : Object | semmle.label | access to local variable d : DPartial [field _backingField] : Object | | D.cs:84:14:84:27 | access to property PartialProp1 | semmle.label | access to property PartialProp1 | | D.cs:84:14:84:27 | access to property PartialProp1 | semmle.label | access to property PartialProp1 | +| D.cs:93:14:93:24 | [post] this access : DFieldProps [field FieldProp0.field] : Object | semmle.label | [post] this access : DFieldProps [field FieldProp0.field] : Object | +| D.cs:93:14:93:24 | [post] this access : DFieldProps [field FieldProp0.field] : Object | semmle.label | [post] this access : DFieldProps [field FieldProp0.field] : Object | +| D.cs:95:12:95:21 | [post] this access : DFieldProps [field FieldProp0.field] : Object | semmle.label | [post] this access : DFieldProps [field FieldProp0.field] : Object | +| D.cs:95:12:95:21 | [post] this access : DFieldProps [field FieldProp0.field] : Object | semmle.label | [post] this access : DFieldProps [field FieldProp0.field] : Object | +| D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | semmle.label | this : DFieldProps [field FieldProp0.field] : Object | +| D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | semmle.label | this : DFieldProps [field FieldProp0.field] : Object | +| D.cs:97:22:97:26 | access to field FieldProp0.field : Object | semmle.label | access to field FieldProp0.field : Object | +| D.cs:97:22:97:26 | access to field FieldProp0.field : Object | semmle.label | access to field FieldProp0.field : Object | +| D.cs:97:22:97:26 | this access : DFieldProps [field FieldProp0.field] : Object | semmle.label | this access : DFieldProps [field FieldProp0.field] : Object | +| D.cs:97:22:97:26 | this access : DFieldProps [field FieldProp0.field] : Object | semmle.label | this access : DFieldProps [field FieldProp0.field] : Object | +| D.cs:98:9:98:11 | this [Return] : DFieldProps [field FieldProp0.field] : Object | semmle.label | this [Return] : DFieldProps [field FieldProp0.field] : Object | +| D.cs:98:9:98:11 | this [Return] : DFieldProps [field FieldProp0.field] : Object | semmle.label | this [Return] : DFieldProps [field FieldProp0.field] : Object | +| D.cs:98:9:98:11 | value : Object | semmle.label | value : Object | +| D.cs:98:9:98:11 | value : Object | semmle.label | value : Object | +| D.cs:98:15:98:19 | [post] this access : DFieldProps [field FieldProp0.field] : Object | semmle.label | [post] this access : DFieldProps [field FieldProp0.field] : Object | +| D.cs:98:15:98:19 | [post] this access : DFieldProps [field FieldProp0.field] : Object | semmle.label | [post] this access : DFieldProps [field FieldProp0.field] : Object | +| D.cs:98:23:98:27 | access to parameter value : Object | semmle.label | access to parameter value : Object | +| D.cs:98:23:98:27 | access to parameter value : Object | semmle.label | access to parameter value : Object | +| D.cs:99:9:99:25 | call to method Source : Object | semmle.label | call to method Source : Object | +| D.cs:99:9:99:25 | call to method Source : Object | semmle.label | call to method Source : Object | +| D.cs:103:9:103:11 | this : DFieldProps [field FieldProp1.field] : Object | semmle.label | this : DFieldProps [field FieldProp1.field] : Object | +| D.cs:103:9:103:11 | this : DFieldProps [field FieldProp1.field] : Object | semmle.label | this : DFieldProps [field FieldProp1.field] : Object | +| D.cs:103:22:103:26 | access to field FieldProp1.field : Object | semmle.label | access to field FieldProp1.field : Object | +| D.cs:103:22:103:26 | access to field FieldProp1.field : Object | semmle.label | access to field FieldProp1.field : Object | +| D.cs:103:22:103:26 | this access : DFieldProps [field FieldProp1.field] : Object | semmle.label | this access : DFieldProps [field FieldProp1.field] : Object | +| D.cs:103:22:103:26 | this access : DFieldProps [field FieldProp1.field] : Object | semmle.label | this access : DFieldProps [field FieldProp1.field] : Object | +| D.cs:104:9:104:11 | this [Return] : DFieldProps [field FieldProp1.field] : Object | semmle.label | this [Return] : DFieldProps [field FieldProp1.field] : Object | +| D.cs:104:9:104:11 | this [Return] : DFieldProps [field FieldProp1.field] : Object | semmle.label | this [Return] : DFieldProps [field FieldProp1.field] : Object | +| D.cs:104:9:104:11 | value : Object | semmle.label | value : Object | +| D.cs:104:9:104:11 | value : Object | semmle.label | value : Object | +| D.cs:104:15:104:19 | [post] this access : DFieldProps [field FieldProp1.field] : Object | semmle.label | [post] this access : DFieldProps [field FieldProp1.field] : Object | +| D.cs:104:15:104:19 | [post] this access : DFieldProps [field FieldProp1.field] : Object | semmle.label | [post] this access : DFieldProps [field FieldProp1.field] : Object | +| D.cs:104:23:104:27 | access to parameter value : Object | semmle.label | access to parameter value : Object | +| D.cs:104:23:104:27 | access to parameter value : Object | semmle.label | access to parameter value : Object | +| D.cs:109:9:109:11 | this : DFieldProps [field FieldProp2.field] : Object | semmle.label | this : DFieldProps [field FieldProp2.field] : Object | +| D.cs:109:9:109:11 | this : DFieldProps [field FieldProp2.field] : Object | semmle.label | this : DFieldProps [field FieldProp2.field] : Object | +| D.cs:109:22:109:26 | access to field FieldProp2.field : Object | semmle.label | access to field FieldProp2.field : Object | +| D.cs:109:22:109:26 | access to field FieldProp2.field : Object | semmle.label | access to field FieldProp2.field : Object | +| D.cs:109:22:109:26 | this access : DFieldProps [field FieldProp2.field] : Object | semmle.label | this access : DFieldProps [field FieldProp2.field] : Object | +| D.cs:109:22:109:26 | this access : DFieldProps [field FieldProp2.field] : Object | semmle.label | this access : DFieldProps [field FieldProp2.field] : Object | +| D.cs:110:9:110:11 | this [Return] : DFieldProps [field FieldProp2.field] : Object | semmle.label | this [Return] : DFieldProps [field FieldProp2.field] : Object | +| D.cs:110:9:110:11 | this [Return] : DFieldProps [field FieldProp2.field] : Object | semmle.label | this [Return] : DFieldProps [field FieldProp2.field] : Object | +| D.cs:110:9:110:11 | value : Object | semmle.label | value : Object | +| D.cs:110:9:110:11 | value : Object | semmle.label | value : Object | +| D.cs:112:17:112:17 | access to local variable x : Object | semmle.label | access to local variable x : Object | +| D.cs:112:17:112:17 | access to local variable x : Object | semmle.label | access to local variable x : Object | +| D.cs:113:13:113:17 | [post] this access : DFieldProps [field FieldProp2.field] : Object | semmle.label | [post] this access : DFieldProps [field FieldProp2.field] : Object | +| D.cs:113:13:113:17 | [post] this access : DFieldProps [field FieldProp2.field] : Object | semmle.label | [post] this access : DFieldProps [field FieldProp2.field] : Object | +| D.cs:113:21:113:21 | access to local variable x : Object | semmle.label | access to local variable x : Object | +| D.cs:113:21:113:21 | access to local variable x : Object | semmle.label | access to local variable x : Object | +| D.cs:119:22:119:26 | access to field StaticFieldProp.field : Object | semmle.label | access to field StaticFieldProp.field : Object | +| D.cs:119:22:119:26 | access to field StaticFieldProp.field : Object | semmle.label | access to field StaticFieldProp.field : Object | +| D.cs:120:9:120:11 | value : Object | semmle.label | value : Object | +| D.cs:120:9:120:11 | value : Object | semmle.label | value : Object | +| D.cs:120:23:120:27 | access to parameter value : Object | semmle.label | access to parameter value : Object | +| D.cs:120:23:120:27 | access to parameter value : Object | semmle.label | access to parameter value : Object | +| D.cs:125:13:125:14 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | semmle.label | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | +| D.cs:125:13:125:14 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | semmle.label | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | +| D.cs:125:18:125:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | semmle.label | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | +| D.cs:125:18:125:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | semmle.label | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | +| D.cs:126:14:126:15 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | semmle.label | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | +| D.cs:126:14:126:15 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | semmle.label | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | +| D.cs:126:14:126:26 | access to property FieldProp0 | semmle.label | access to property FieldProp0 | +| D.cs:126:14:126:26 | access to property FieldProp0 | semmle.label | access to property FieldProp0 | +| D.cs:130:13:130:14 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | semmle.label | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | +| D.cs:130:13:130:14 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | semmle.label | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | +| D.cs:130:18:130:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | semmle.label | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | +| D.cs:130:18:130:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | semmle.label | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | +| D.cs:131:13:131:14 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object | +| D.cs:131:13:131:14 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object | +| D.cs:131:18:131:34 | call to method Source : Object | semmle.label | call to method Source : Object | +| D.cs:131:18:131:34 | call to method Source : Object | semmle.label | call to method Source : Object | +| D.cs:132:9:132:10 | [post] access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | semmle.label | [post] access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | +| D.cs:132:9:132:10 | [post] access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | semmle.label | [post] access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | +| D.cs:132:25:132:26 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object | +| D.cs:132:25:132:26 | access to local variable o1 : Object | semmle.label | access to local variable o1 : Object | +| D.cs:133:14:133:15 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | semmle.label | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | +| D.cs:133:14:133:15 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | semmle.label | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | +| D.cs:133:14:133:26 | access to property FieldProp0 | semmle.label | access to property FieldProp0 | +| D.cs:133:14:133:26 | access to property FieldProp0 | semmle.label | access to property FieldProp0 | +| D.cs:134:14:134:15 | access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | semmle.label | access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | +| D.cs:134:14:134:15 | access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | semmle.label | access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | +| D.cs:134:14:134:26 | access to property FieldProp1 | semmle.label | access to property FieldProp1 | +| D.cs:134:14:134:26 | access to property FieldProp1 | semmle.label | access to property FieldProp1 | +| D.cs:137:13:137:14 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | semmle.label | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | +| D.cs:137:13:137:14 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | semmle.label | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | +| D.cs:137:18:137:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | semmle.label | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | +| D.cs:137:18:137:34 | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | semmle.label | object creation of type DFieldProps : DFieldProps [field FieldProp0.field] : Object | +| D.cs:138:13:138:14 | access to local variable o2 : Object | semmle.label | access to local variable o2 : Object | +| D.cs:138:13:138:14 | access to local variable o2 : Object | semmle.label | access to local variable o2 : Object | +| D.cs:138:18:138:34 | call to method Source : Object | semmle.label | call to method Source : Object | +| D.cs:138:18:138:34 | call to method Source : Object | semmle.label | call to method Source : Object | +| D.cs:139:9:139:10 | [post] access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | semmle.label | [post] access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | +| D.cs:139:9:139:10 | [post] access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | semmle.label | [post] access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | +| D.cs:139:25:139:26 | access to local variable o2 : Object | semmle.label | access to local variable o2 : Object | +| D.cs:139:25:139:26 | access to local variable o2 : Object | semmle.label | access to local variable o2 : Object | +| D.cs:140:14:140:15 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | semmle.label | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | +| D.cs:140:14:140:15 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | semmle.label | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | +| D.cs:140:14:140:26 | access to property FieldProp0 | semmle.label | access to property FieldProp0 | +| D.cs:140:14:140:26 | access to property FieldProp0 | semmle.label | access to property FieldProp0 | +| D.cs:142:14:142:15 | access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | semmle.label | access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | +| D.cs:142:14:142:15 | access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | semmle.label | access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | +| D.cs:142:14:142:26 | access to property FieldProp2 | semmle.label | access to property FieldProp2 | +| D.cs:142:14:142:26 | access to property FieldProp2 | semmle.label | access to property FieldProp2 | +| D.cs:144:13:144:14 | access to local variable o3 : Object | semmle.label | access to local variable o3 : Object | +| D.cs:144:13:144:14 | access to local variable o3 : Object | semmle.label | access to local variable o3 : Object | +| D.cs:144:18:144:34 | call to method Source : Object | semmle.label | call to method Source : Object | +| D.cs:144:18:144:34 | call to method Source : Object | semmle.label | call to method Source : Object | +| D.cs:145:9:145:35 | access to property StaticFieldProp : Object | semmle.label | access to property StaticFieldProp : Object | +| D.cs:145:9:145:35 | access to property StaticFieldProp : Object | semmle.label | access to property StaticFieldProp : Object | +| D.cs:145:39:145:40 | access to local variable o3 : Object | semmle.label | access to local variable o3 : Object | +| D.cs:145:39:145:40 | access to local variable o3 : Object | semmle.label | access to local variable o3 : Object | +| D.cs:146:14:146:40 | access to property StaticFieldProp | semmle.label | access to property StaticFieldProp | +| D.cs:146:14:146:40 | access to property StaticFieldProp | semmle.label | access to property StaticFieldProp | | E.cs:8:29:8:29 | o : Object | semmle.label | o : Object | | E.cs:8:29:8:29 | o : Object | semmle.label | o : Object | | E.cs:11:9:11:11 | [post] access to local variable ret : S [field Field] : Object | semmle.label | [post] access to local variable ret : S [field Field] : Object | @@ -2648,6 +2874,22 @@ subpaths | D.cs:81:26:81:26 | access to local variable o : Object | D.cs:61:9:61:11 | value : Object | D.cs:61:9:61:11 | this [Return] : DPartial [field _backingField] : Object | D.cs:81:9:81:9 | [post] access to local variable d : DPartial [field _backingField] : Object | | D.cs:84:14:84:14 | access to local variable d : DPartial [field _backingField] : Object | D.cs:60:9:60:11 | this : DPartial [field _backingField] : Object | D.cs:60:22:60:34 | access to field _backingField : Object | D.cs:84:14:84:27 | access to property PartialProp1 | | D.cs:84:14:84:14 | access to local variable d : DPartial [field _backingField] : Object | D.cs:60:9:60:11 | this : DPartial [field _backingField] : Object | D.cs:60:22:60:34 | access to field _backingField : Object | D.cs:84:14:84:27 | access to property PartialProp1 | +| D.cs:99:9:99:25 | call to method Source : Object | D.cs:98:9:98:11 | value : Object | D.cs:98:9:98:11 | this [Return] : DFieldProps [field FieldProp0.field] : Object | D.cs:95:12:95:21 | [post] this access : DFieldProps [field FieldProp0.field] : Object | +| D.cs:99:9:99:25 | call to method Source : Object | D.cs:98:9:98:11 | value : Object | D.cs:98:9:98:11 | this [Return] : DFieldProps [field FieldProp0.field] : Object | D.cs:95:12:95:21 | [post] this access : DFieldProps [field FieldProp0.field] : Object | +| D.cs:126:14:126:15 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | D.cs:97:22:97:26 | access to field FieldProp0.field : Object | D.cs:126:14:126:26 | access to property FieldProp0 | +| D.cs:126:14:126:15 | access to local variable d0 : DFieldProps [field FieldProp0.field] : Object | D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | D.cs:97:22:97:26 | access to field FieldProp0.field : Object | D.cs:126:14:126:26 | access to property FieldProp0 | +| D.cs:132:25:132:26 | access to local variable o1 : Object | D.cs:104:9:104:11 | value : Object | D.cs:104:9:104:11 | this [Return] : DFieldProps [field FieldProp1.field] : Object | D.cs:132:9:132:10 | [post] access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | +| D.cs:132:25:132:26 | access to local variable o1 : Object | D.cs:104:9:104:11 | value : Object | D.cs:104:9:104:11 | this [Return] : DFieldProps [field FieldProp1.field] : Object | D.cs:132:9:132:10 | [post] access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | +| D.cs:133:14:133:15 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | D.cs:97:22:97:26 | access to field FieldProp0.field : Object | D.cs:133:14:133:26 | access to property FieldProp0 | +| D.cs:133:14:133:15 | access to local variable d1 : DFieldProps [field FieldProp0.field] : Object | D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | D.cs:97:22:97:26 | access to field FieldProp0.field : Object | D.cs:133:14:133:26 | access to property FieldProp0 | +| D.cs:134:14:134:15 | access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | D.cs:103:9:103:11 | this : DFieldProps [field FieldProp1.field] : Object | D.cs:103:22:103:26 | access to field FieldProp1.field : Object | D.cs:134:14:134:26 | access to property FieldProp1 | +| D.cs:134:14:134:15 | access to local variable d1 : DFieldProps [field FieldProp1.field] : Object | D.cs:103:9:103:11 | this : DFieldProps [field FieldProp1.field] : Object | D.cs:103:22:103:26 | access to field FieldProp1.field : Object | D.cs:134:14:134:26 | access to property FieldProp1 | +| D.cs:139:25:139:26 | access to local variable o2 : Object | D.cs:110:9:110:11 | value : Object | D.cs:110:9:110:11 | this [Return] : DFieldProps [field FieldProp2.field] : Object | D.cs:139:9:139:10 | [post] access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | +| D.cs:139:25:139:26 | access to local variable o2 : Object | D.cs:110:9:110:11 | value : Object | D.cs:110:9:110:11 | this [Return] : DFieldProps [field FieldProp2.field] : Object | D.cs:139:9:139:10 | [post] access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | +| D.cs:140:14:140:15 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | D.cs:97:22:97:26 | access to field FieldProp0.field : Object | D.cs:140:14:140:26 | access to property FieldProp0 | +| D.cs:140:14:140:15 | access to local variable d2 : DFieldProps [field FieldProp0.field] : Object | D.cs:97:9:97:11 | this : DFieldProps [field FieldProp0.field] : Object | D.cs:97:22:97:26 | access to field FieldProp0.field : Object | D.cs:140:14:140:26 | access to property FieldProp0 | +| D.cs:142:14:142:15 | access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | D.cs:109:9:109:11 | this : DFieldProps [field FieldProp2.field] : Object | D.cs:109:22:109:26 | access to field FieldProp2.field : Object | D.cs:142:14:142:26 | access to property FieldProp2 | +| D.cs:142:14:142:15 | access to local variable d2 : DFieldProps [field FieldProp2.field] : Object | D.cs:109:9:109:11 | this : DFieldProps [field FieldProp2.field] : Object | D.cs:109:22:109:26 | access to field FieldProp2.field : Object | D.cs:142:14:142:26 | access to property FieldProp2 | | E.cs:23:25:23:25 | access to local variable o : Object | E.cs:8:29:8:29 | o : Object | E.cs:12:16:12:18 | access to local variable ret : S [field Field] : Object | E.cs:23:17:23:26 | call to method CreateS : S [field Field] : Object | | E.cs:23:25:23:25 | access to local variable o : Object | E.cs:8:29:8:29 | o : Object | E.cs:12:16:12:18 | access to local variable ret : S [field Field] : Object | E.cs:23:17:23:26 | call to method CreateS : S [field Field] : Object | | E.cs:55:29:55:33 | access to local variable taint : Object | E.cs:43:46:43:46 | o : Object | E.cs:43:36:43:36 | s [Return] : RefS [field RefField] : Object | E.cs:55:23:55:26 | [post] access to local variable refs : RefS [field RefField] : Object | @@ -2758,6 +3000,18 @@ testFailures | D.cs:47:14:47:26 | access to property ComplexProp | D.cs:43:32:43:48 | call to method Source : Object | D.cs:47:14:47:26 | access to property ComplexProp | $@ | D.cs:43:32:43:48 | call to method Source : Object | call to method Source : Object | | D.cs:84:14:84:27 | access to property PartialProp1 | D.cs:78:17:78:33 | call to method Source : Object | D.cs:84:14:84:27 | access to property PartialProp1 | $@ | D.cs:78:17:78:33 | call to method Source : Object | call to method Source : Object | | D.cs:84:14:84:27 | access to property PartialProp1 | D.cs:78:17:78:33 | call to method Source : Object | D.cs:84:14:84:27 | access to property PartialProp1 | $@ | D.cs:78:17:78:33 | call to method Source : Object | call to method Source : Object | +| D.cs:126:14:126:26 | access to property FieldProp0 | D.cs:99:9:99:25 | call to method Source : Object | D.cs:126:14:126:26 | access to property FieldProp0 | $@ | D.cs:99:9:99:25 | call to method Source : Object | call to method Source : Object | +| D.cs:126:14:126:26 | access to property FieldProp0 | D.cs:99:9:99:25 | call to method Source : Object | D.cs:126:14:126:26 | access to property FieldProp0 | $@ | D.cs:99:9:99:25 | call to method Source : Object | call to method Source : Object | +| D.cs:133:14:133:26 | access to property FieldProp0 | D.cs:99:9:99:25 | call to method Source : Object | D.cs:133:14:133:26 | access to property FieldProp0 | $@ | D.cs:99:9:99:25 | call to method Source : Object | call to method Source : Object | +| D.cs:133:14:133:26 | access to property FieldProp0 | D.cs:99:9:99:25 | call to method Source : Object | D.cs:133:14:133:26 | access to property FieldProp0 | $@ | D.cs:99:9:99:25 | call to method Source : Object | call to method Source : Object | +| D.cs:134:14:134:26 | access to property FieldProp1 | D.cs:131:18:131:34 | call to method Source : Object | D.cs:134:14:134:26 | access to property FieldProp1 | $@ | D.cs:131:18:131:34 | call to method Source : Object | call to method Source : Object | +| D.cs:134:14:134:26 | access to property FieldProp1 | D.cs:131:18:131:34 | call to method Source : Object | D.cs:134:14:134:26 | access to property FieldProp1 | $@ | D.cs:131:18:131:34 | call to method Source : Object | call to method Source : Object | +| D.cs:140:14:140:26 | access to property FieldProp0 | D.cs:99:9:99:25 | call to method Source : Object | D.cs:140:14:140:26 | access to property FieldProp0 | $@ | D.cs:99:9:99:25 | call to method Source : Object | call to method Source : Object | +| D.cs:140:14:140:26 | access to property FieldProp0 | D.cs:99:9:99:25 | call to method Source : Object | D.cs:140:14:140:26 | access to property FieldProp0 | $@ | D.cs:99:9:99:25 | call to method Source : Object | call to method Source : Object | +| D.cs:142:14:142:26 | access to property FieldProp2 | D.cs:138:18:138:34 | call to method Source : Object | D.cs:142:14:142:26 | access to property FieldProp2 | $@ | D.cs:138:18:138:34 | call to method Source : Object | call to method Source : Object | +| D.cs:142:14:142:26 | access to property FieldProp2 | D.cs:138:18:138:34 | call to method Source : Object | D.cs:142:14:142:26 | access to property FieldProp2 | $@ | D.cs:138:18:138:34 | call to method Source : Object | call to method Source : Object | +| D.cs:146:14:146:40 | access to property StaticFieldProp | D.cs:144:18:144:34 | call to method Source : Object | D.cs:146:14:146:40 | access to property StaticFieldProp | $@ | D.cs:144:18:144:34 | call to method Source : Object | call to method Source : Object | +| D.cs:146:14:146:40 | access to property StaticFieldProp | D.cs:144:18:144:34 | call to method Source : Object | D.cs:146:14:146:40 | access to property StaticFieldProp | $@ | D.cs:144:18:144:34 | call to method Source : Object | call to method Source : Object | | E.cs:24:14:24:20 | access to field Field | E.cs:22:17:22:33 | call to method Source : Object | E.cs:24:14:24:20 | access to field Field | $@ | E.cs:22:17:22:33 | call to method Source : Object | call to method Source : Object | | E.cs:24:14:24:20 | access to field Field | E.cs:22:17:22:33 | call to method Source : Object | E.cs:24:14:24:20 | access to field Field | $@ | E.cs:22:17:22:33 | call to method Source : Object | call to method Source : Object | | E.cs:57:14:57:26 | access to field RefField | E.cs:54:21:54:37 | call to method Source : Object | E.cs:57:14:57:26 | access to field RefField | $@ | E.cs:54:21:54:37 | call to method Source : Object | call to method Source : Object | diff --git a/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected b/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected index be6a2302cc35..b7ae291bf0fb 100644 --- a/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected +++ b/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected @@ -18591,6 +18591,10 @@ summary | System.Web;HttpUtility;JavaScriptStringEncode;(System.String,System.Boolean);Argument[0];ReturnValue;taint;manual | | System.Web;HttpUtility;ParseQueryString;(System.String);Argument[0];ReturnValue;taint;manual | | System.Web;HttpUtility;ParseQueryString;(System.String,System.Text.Encoding);Argument[0];ReturnValue;taint;manual | +| System.Web;HttpUtility;UrlDecode;(System.Byte[],System.Int32,System.Int32,System.Text.Encoding);Argument[0];ReturnValue;taint;manual | +| System.Web;HttpUtility;UrlDecode;(System.Byte[],System.Text.Encoding);Argument[0];ReturnValue;taint;manual | +| System.Web;HttpUtility;UrlDecode;(System.String);Argument[0];ReturnValue;taint;manual | +| System.Web;HttpUtility;UrlDecode;(System.String,System.Text.Encoding);Argument[0];ReturnValue;taint;manual | | System.Web;HttpUtility;UrlEncode;(System.Byte[]);Argument[0];ReturnValue;taint;manual | | System.Web;HttpUtility;UrlEncode;(System.Byte[],System.Int32,System.Int32);Argument[0];ReturnValue;taint;manual | | System.Web;HttpUtility;UrlEncode;(System.String);Argument[0];ReturnValue;taint;manual | diff --git a/csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected b/csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected index c88c901bd75b..8aff8d0e1788 100644 --- a/csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected +++ b/csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected @@ -14340,6 +14340,10 @@ | System.Web;HttpUtility;JavaScriptStringEncode;(System.String,System.Boolean);Argument[0];ReturnValue;taint;manual | | System.Web;HttpUtility;ParseQueryString;(System.String);Argument[0];ReturnValue;taint;manual | | System.Web;HttpUtility;ParseQueryString;(System.String,System.Text.Encoding);Argument[0];ReturnValue;taint;manual | +| System.Web;HttpUtility;UrlDecode;(System.Byte[],System.Int32,System.Int32,System.Text.Encoding);Argument[0];ReturnValue;taint;manual | +| System.Web;HttpUtility;UrlDecode;(System.Byte[],System.Text.Encoding);Argument[0];ReturnValue;taint;manual | +| System.Web;HttpUtility;UrlDecode;(System.String);Argument[0];ReturnValue;taint;manual | +| System.Web;HttpUtility;UrlDecode;(System.String,System.Text.Encoding);Argument[0];ReturnValue;taint;manual | | System.Web;HttpUtility;UrlEncode;(System.Byte[]);Argument[0];ReturnValue;taint;manual | | System.Web;HttpUtility;UrlEncode;(System.Byte[],System.Int32,System.Int32);Argument[0];ReturnValue;taint;manual | | System.Web;HttpUtility;UrlEncode;(System.String);Argument[0];ReturnValue;taint;manual | diff --git a/csharp/ql/test/library-tests/dataflow/methods/MethodFlow.expected b/csharp/ql/test/library-tests/dataflow/methods/MethodFlow.expected new file mode 100644 index 000000000000..c000c4393716 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/methods/MethodFlow.expected @@ -0,0 +1,40 @@ +models +edges +| Methods.cs:8:48:8:48 | o : Object | Methods.cs:10:16:10:16 | access to parameter o : Object | provenance | | +| Methods.cs:8:48:8:48 | o : Object | Methods.cs:10:16:10:16 | access to parameter o : Object | provenance | | +| Methods.cs:17:13:17:13 | access to local variable o : Object | Methods.cs:19:38:19:38 | access to local variable o : Object | provenance | | +| Methods.cs:17:13:17:13 | access to local variable o : Object | Methods.cs:19:38:19:38 | access to local variable o : Object | provenance | | +| Methods.cs:17:17:17:33 | call to method Source : Object | Methods.cs:17:13:17:13 | access to local variable o : Object | provenance | | +| Methods.cs:17:17:17:33 | call to method Source : Object | Methods.cs:17:13:17:13 | access to local variable o : Object | provenance | | +| Methods.cs:19:13:19:18 | access to local variable result : Object | Methods.cs:20:14:20:19 | access to local variable result | provenance | | +| Methods.cs:19:13:19:18 | access to local variable result : Object | Methods.cs:20:14:20:19 | access to local variable result | provenance | | +| Methods.cs:19:22:19:39 | call to method PartialMethod : Object | Methods.cs:19:13:19:18 | access to local variable result : Object | provenance | | +| Methods.cs:19:22:19:39 | call to method PartialMethod : Object | Methods.cs:19:13:19:18 | access to local variable result : Object | provenance | | +| Methods.cs:19:38:19:38 | access to local variable o : Object | Methods.cs:8:48:8:48 | o : Object | provenance | | +| Methods.cs:19:38:19:38 | access to local variable o : Object | Methods.cs:8:48:8:48 | o : Object | provenance | | +| Methods.cs:19:38:19:38 | access to local variable o : Object | Methods.cs:19:22:19:39 | call to method PartialMethod : Object | provenance | | +| Methods.cs:19:38:19:38 | access to local variable o : Object | Methods.cs:19:22:19:39 | call to method PartialMethod : Object | provenance | | +nodes +| Methods.cs:8:48:8:48 | o : Object | semmle.label | o : Object | +| Methods.cs:8:48:8:48 | o : Object | semmle.label | o : Object | +| Methods.cs:10:16:10:16 | access to parameter o : Object | semmle.label | access to parameter o : Object | +| Methods.cs:10:16:10:16 | access to parameter o : Object | semmle.label | access to parameter o : Object | +| Methods.cs:17:13:17:13 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| Methods.cs:17:13:17:13 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| Methods.cs:17:17:17:33 | call to method Source : Object | semmle.label | call to method Source : Object | +| Methods.cs:17:17:17:33 | call to method Source : Object | semmle.label | call to method Source : Object | +| Methods.cs:19:13:19:18 | access to local variable result : Object | semmle.label | access to local variable result : Object | +| Methods.cs:19:13:19:18 | access to local variable result : Object | semmle.label | access to local variable result : Object | +| Methods.cs:19:22:19:39 | call to method PartialMethod : Object | semmle.label | call to method PartialMethod : Object | +| Methods.cs:19:22:19:39 | call to method PartialMethod : Object | semmle.label | call to method PartialMethod : Object | +| Methods.cs:19:38:19:38 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| Methods.cs:19:38:19:38 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| Methods.cs:20:14:20:19 | access to local variable result | semmle.label | access to local variable result | +| Methods.cs:20:14:20:19 | access to local variable result | semmle.label | access to local variable result | +subpaths +| Methods.cs:19:38:19:38 | access to local variable o : Object | Methods.cs:8:48:8:48 | o : Object | Methods.cs:10:16:10:16 | access to parameter o : Object | Methods.cs:19:22:19:39 | call to method PartialMethod : Object | +| Methods.cs:19:38:19:38 | access to local variable o : Object | Methods.cs:8:48:8:48 | o : Object | Methods.cs:10:16:10:16 | access to parameter o : Object | Methods.cs:19:22:19:39 | call to method PartialMethod : Object | +testFailures +#select +| Methods.cs:20:14:20:19 | access to local variable result | Methods.cs:17:17:17:33 | call to method Source : Object | Methods.cs:20:14:20:19 | access to local variable result | $@ | Methods.cs:17:17:17:33 | call to method Source : Object | call to method Source : Object | +| Methods.cs:20:14:20:19 | access to local variable result | Methods.cs:17:17:17:33 | call to method Source : Object | Methods.cs:20:14:20:19 | access to local variable result | $@ | Methods.cs:17:17:17:33 | call to method Source : Object | call to method Source : Object | diff --git a/csharp/ql/test/library-tests/dataflow/methods/MethodFlow.ql b/csharp/ql/test/library-tests/dataflow/methods/MethodFlow.ql new file mode 100644 index 000000000000..9ab95f59caf3 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/methods/MethodFlow.ql @@ -0,0 +1,12 @@ +/** + * @kind path-problem + */ + +import csharp +import utils.test.InlineFlowTest +import DefaultFlowTest +import PathGraph + +from PathNode source, PathNode sink +where flowPath(source, sink) +select sink, source, sink, "$@", source, source.toString() diff --git a/csharp/ql/test/library-tests/dataflow/methods/Methods.cs b/csharp/ql/test/library-tests/dataflow/methods/Methods.cs new file mode 100644 index 000000000000..15e39d5f260c --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/methods/Methods.cs @@ -0,0 +1,26 @@ +public partial class Partial +{ + public partial object PartialMethod(object o); +} + +public partial class Partial +{ + public partial object PartialMethod(object o) + { + return o; + } +} +public class C +{ + public void M() + { + var o = Source(1); + var p = new Partial(); + var result = p.PartialMethod(o); + Sink(result); // $ hasValueFlow=1 + } + + public static void Sink(object o) { } + + static T Source(object source) => throw null; +} diff --git a/csharp/ql/test/library-tests/dataflow/operators/ImplicitConversionOperator.cs b/csharp/ql/test/library-tests/dataflow/operators/ImplicitConversionOperator.cs new file mode 100644 index 000000000000..05be934ecb37 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/operators/ImplicitConversionOperator.cs @@ -0,0 +1,14 @@ +using System; + +public class TestImplicitConversionOperator +{ + static void Sink(object o) { } + static void TaintArgument(ArraySegment segment) { } + + public void M1() + { + byte[] bytes = new byte[1]; + TaintArgument(bytes); + Sink(bytes); + } +} diff --git a/csharp/ql/test/library-tests/dataflow/operators/implicitConversionOperatorFlow.expected b/csharp/ql/test/library-tests/dataflow/operators/implicitConversionOperatorFlow.expected new file mode 100644 index 000000000000..e9daee309cc5 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/operators/implicitConversionOperatorFlow.expected @@ -0,0 +1,8 @@ +edges +| ImplicitConversionOperator.cs:11:23:11:27 | [post] call to operator implicit conversion : ArraySegment | ImplicitConversionOperator.cs:12:14:12:18 | access to local variable bytes | provenance | | +nodes +| ImplicitConversionOperator.cs:11:23:11:27 | [post] call to operator implicit conversion : ArraySegment | semmle.label | [post] call to operator implicit conversion : ArraySegment | +| ImplicitConversionOperator.cs:12:14:12:18 | access to local variable bytes | semmle.label | access to local variable bytes | +subpaths +#select +| ImplicitConversionOperator.cs:12:14:12:18 | access to local variable bytes | ImplicitConversionOperator.cs:11:23:11:27 | [post] call to operator implicit conversion : ArraySegment | ImplicitConversionOperator.cs:12:14:12:18 | access to local variable bytes | $@ | ImplicitConversionOperator.cs:11:23:11:27 | [post] call to operator implicit conversion : ArraySegment | [post] call to operator implicit conversion : ArraySegment | diff --git a/csharp/ql/test/library-tests/dataflow/operators/implicitConversionOperatorFlow.ql b/csharp/ql/test/library-tests/dataflow/operators/implicitConversionOperatorFlow.ql new file mode 100644 index 000000000000..74f7947a7c81 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/operators/implicitConversionOperatorFlow.ql @@ -0,0 +1,29 @@ +/** + * @kind path-problem + */ + +import csharp +import semmle.code.csharp.dataflow.internal.DataFlowPrivate as DataFlowPrivate +import Taint::PathGraph + +module TaintConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node src) { + exists(MethodCall mc | + mc.getTarget().hasName("TaintArgument") and + mc.getAnArgument() = src.(DataFlowPrivate::PostUpdateNode).getPreUpdateNode().asExpr() + ) + } + + predicate isSink(DataFlow::Node sink) { + exists(MethodCall mc | + mc.getTarget().hasName("Sink") and + mc.getAnArgument() = sink.asExpr() + ) + } +} + +module Taint = TaintTracking::Global; + +from Taint::PathNode source, Taint::PathNode sink +where Taint::flowPath(source, sink) +select sink, source, sink, "$@", source, source.toString() diff --git a/csharp/ql/test/library-tests/dataflow/structs/StructFlow.expected b/csharp/ql/test/library-tests/dataflow/structs/StructFlow.expected new file mode 100644 index 000000000000..be27c832f117 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/structs/StructFlow.expected @@ -0,0 +1,92 @@ +models +edges +| structs.cs:10:27:10:30 | args : Object[] [element] : Object | structs.cs:12:25:12:28 | access to parameter args : Object[] [element] : Object | provenance | | +| structs.cs:10:27:10:30 | args : Object[] [element] : Object | structs.cs:12:25:12:28 | access to parameter args : Object[] [element] : Object | provenance | | +| structs.cs:12:13:12:16 | [post] this access : S [field args, element] : Object | structs.cs:10:16:10:16 | this [Return] : S [field args, element] : Object | provenance | | +| structs.cs:12:13:12:16 | [post] this access : S [field args, element] : Object | structs.cs:10:16:10:16 | this [Return] : S [field args, element] : Object | provenance | | +| structs.cs:12:25:12:28 | access to parameter args : Object[] [element] : Object | structs.cs:12:13:12:16 | [post] this access : S [field args, element] : Object | provenance | | +| structs.cs:12:25:12:28 | access to parameter args : Object[] [element] : Object | structs.cs:12:13:12:16 | [post] this access : S [field args, element] : Object | provenance | | +| structs.cs:16:30:16:30 | s [Return] : S [field args, element] : Object | structs.cs:32:20:32:20 | [post] access to local variable s : S [field args, element] : Object | provenance | | +| structs.cs:16:30:16:30 | s [Return] : S [field args, element] : Object | structs.cs:32:20:32:20 | [post] access to local variable s : S [field args, element] : Object | provenance | | +| structs.cs:18:9:18:9 | [post] access to parameter s : S [field args, element] : Object | structs.cs:16:30:16:30 | s [Return] : S [field args, element] : Object | provenance | | +| structs.cs:18:9:18:9 | [post] access to parameter s : S [field args, element] : Object | structs.cs:16:30:16:30 | s [Return] : S [field args, element] : Object | provenance | | +| structs.cs:18:9:18:14 | [post] access to field args : Object[] [element] : Object | structs.cs:18:9:18:9 | [post] access to parameter s : S [field args, element] : Object | provenance | | +| structs.cs:18:9:18:14 | [post] access to field args : Object[] [element] : Object | structs.cs:18:9:18:9 | [post] access to parameter s : S [field args, element] : Object | provenance | | +| structs.cs:18:21:18:37 | call to method Source : Object | structs.cs:18:9:18:14 | [post] access to field args : Object[] [element] : Object | provenance | | +| structs.cs:18:21:18:37 | call to method Source : Object | structs.cs:18:9:18:14 | [post] access to field args : Object[] [element] : Object | provenance | | +| structs.cs:24:13:24:13 | access to local variable o : Object | structs.cs:25:24:25:24 | access to local variable o : Object | provenance | | +| structs.cs:24:13:24:13 | access to local variable o : Object | structs.cs:25:24:25:24 | access to local variable o : Object | provenance | | +| structs.cs:24:17:24:33 | call to method Source : Object | structs.cs:24:13:24:13 | access to local variable o : Object | provenance | | +| structs.cs:24:17:24:33 | call to method Source : Object | structs.cs:24:13:24:13 | access to local variable o : Object | provenance | | +| structs.cs:25:13:25:13 | access to local variable s : S [field args, element] : Object | structs.cs:26:14:26:14 | access to local variable s : S [field args, element] : Object | provenance | | +| structs.cs:25:13:25:13 | access to local variable s : S [field args, element] : Object | structs.cs:26:14:26:14 | access to local variable s : S [field args, element] : Object | provenance | | +| structs.cs:25:17:25:26 | object creation of type S : S [field args, element] : Object | structs.cs:25:13:25:13 | access to local variable s : S [field args, element] : Object | provenance | | +| structs.cs:25:17:25:26 | object creation of type S : S [field args, element] : Object | structs.cs:25:13:25:13 | access to local variable s : S [field args, element] : Object | provenance | | +| structs.cs:25:23:25:25 | [...] : Object[] [element] : Object | structs.cs:10:27:10:30 | args : Object[] [element] : Object | provenance | | +| structs.cs:25:23:25:25 | [...] : Object[] [element] : Object | structs.cs:10:27:10:30 | args : Object[] [element] : Object | provenance | | +| structs.cs:25:23:25:25 | [...] : Object[] [element] : Object | structs.cs:25:17:25:26 | object creation of type S : S [field args, element] : Object | provenance | | +| structs.cs:25:23:25:25 | [...] : Object[] [element] : Object | structs.cs:25:17:25:26 | object creation of type S : S [field args, element] : Object | provenance | | +| structs.cs:25:24:25:24 | access to local variable o : Object | structs.cs:25:23:25:25 | [...] : Object[] [element] : Object | provenance | | +| structs.cs:25:24:25:24 | access to local variable o : Object | structs.cs:25:23:25:25 | [...] : Object[] [element] : Object | provenance | | +| structs.cs:26:14:26:14 | access to local variable s : S [field args, element] : Object | structs.cs:26:14:26:19 | access to field args : Object[] [element] : Object | provenance | | +| structs.cs:26:14:26:14 | access to local variable s : S [field args, element] : Object | structs.cs:26:14:26:19 | access to field args : Object[] [element] : Object | provenance | | +| structs.cs:26:14:26:19 | access to field args : Object[] [element] : Object | structs.cs:26:14:26:22 | access to array element | provenance | | +| structs.cs:26:14:26:19 | access to field args : Object[] [element] : Object | structs.cs:26:14:26:22 | access to array element | provenance | | +| structs.cs:32:20:32:20 | [post] access to local variable s : S [field args, element] : Object | structs.cs:33:14:33:14 | access to local variable s : S [field args, element] : Object | provenance | | +| structs.cs:32:20:32:20 | [post] access to local variable s : S [field args, element] : Object | structs.cs:33:14:33:14 | access to local variable s : S [field args, element] : Object | provenance | | +| structs.cs:33:14:33:14 | access to local variable s : S [field args, element] : Object | structs.cs:33:14:33:19 | access to field args : Object[] [element] : Object | provenance | | +| structs.cs:33:14:33:14 | access to local variable s : S [field args, element] : Object | structs.cs:33:14:33:19 | access to field args : Object[] [element] : Object | provenance | | +| structs.cs:33:14:33:19 | access to field args : Object[] [element] : Object | structs.cs:33:14:33:22 | access to array element | provenance | | +| structs.cs:33:14:33:19 | access to field args : Object[] [element] : Object | structs.cs:33:14:33:22 | access to array element | provenance | | +nodes +| structs.cs:10:16:10:16 | this [Return] : S [field args, element] : Object | semmle.label | this [Return] : S [field args, element] : Object | +| structs.cs:10:16:10:16 | this [Return] : S [field args, element] : Object | semmle.label | this [Return] : S [field args, element] : Object | +| structs.cs:10:27:10:30 | args : Object[] [element] : Object | semmle.label | args : Object[] [element] : Object | +| structs.cs:10:27:10:30 | args : Object[] [element] : Object | semmle.label | args : Object[] [element] : Object | +| structs.cs:12:13:12:16 | [post] this access : S [field args, element] : Object | semmle.label | [post] this access : S [field args, element] : Object | +| structs.cs:12:13:12:16 | [post] this access : S [field args, element] : Object | semmle.label | [post] this access : S [field args, element] : Object | +| structs.cs:12:25:12:28 | access to parameter args : Object[] [element] : Object | semmle.label | access to parameter args : Object[] [element] : Object | +| structs.cs:12:25:12:28 | access to parameter args : Object[] [element] : Object | semmle.label | access to parameter args : Object[] [element] : Object | +| structs.cs:16:30:16:30 | s [Return] : S [field args, element] : Object | semmle.label | s [Return] : S [field args, element] : Object | +| structs.cs:16:30:16:30 | s [Return] : S [field args, element] : Object | semmle.label | s [Return] : S [field args, element] : Object | +| structs.cs:18:9:18:9 | [post] access to parameter s : S [field args, element] : Object | semmle.label | [post] access to parameter s : S [field args, element] : Object | +| structs.cs:18:9:18:9 | [post] access to parameter s : S [field args, element] : Object | semmle.label | [post] access to parameter s : S [field args, element] : Object | +| structs.cs:18:9:18:14 | [post] access to field args : Object[] [element] : Object | semmle.label | [post] access to field args : Object[] [element] : Object | +| structs.cs:18:9:18:14 | [post] access to field args : Object[] [element] : Object | semmle.label | [post] access to field args : Object[] [element] : Object | +| structs.cs:18:21:18:37 | call to method Source : Object | semmle.label | call to method Source : Object | +| structs.cs:18:21:18:37 | call to method Source : Object | semmle.label | call to method Source : Object | +| structs.cs:24:13:24:13 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| structs.cs:24:13:24:13 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| structs.cs:24:17:24:33 | call to method Source : Object | semmle.label | call to method Source : Object | +| structs.cs:24:17:24:33 | call to method Source : Object | semmle.label | call to method Source : Object | +| structs.cs:25:13:25:13 | access to local variable s : S [field args, element] : Object | semmle.label | access to local variable s : S [field args, element] : Object | +| structs.cs:25:13:25:13 | access to local variable s : S [field args, element] : Object | semmle.label | access to local variable s : S [field args, element] : Object | +| structs.cs:25:17:25:26 | object creation of type S : S [field args, element] : Object | semmle.label | object creation of type S : S [field args, element] : Object | +| structs.cs:25:17:25:26 | object creation of type S : S [field args, element] : Object | semmle.label | object creation of type S : S [field args, element] : Object | +| structs.cs:25:23:25:25 | [...] : Object[] [element] : Object | semmle.label | [...] : Object[] [element] : Object | +| structs.cs:25:23:25:25 | [...] : Object[] [element] : Object | semmle.label | [...] : Object[] [element] : Object | +| structs.cs:25:24:25:24 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| structs.cs:25:24:25:24 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| structs.cs:26:14:26:14 | access to local variable s : S [field args, element] : Object | semmle.label | access to local variable s : S [field args, element] : Object | +| structs.cs:26:14:26:14 | access to local variable s : S [field args, element] : Object | semmle.label | access to local variable s : S [field args, element] : Object | +| structs.cs:26:14:26:19 | access to field args : Object[] [element] : Object | semmle.label | access to field args : Object[] [element] : Object | +| structs.cs:26:14:26:19 | access to field args : Object[] [element] : Object | semmle.label | access to field args : Object[] [element] : Object | +| structs.cs:26:14:26:22 | access to array element | semmle.label | access to array element | +| structs.cs:26:14:26:22 | access to array element | semmle.label | access to array element | +| structs.cs:32:20:32:20 | [post] access to local variable s : S [field args, element] : Object | semmle.label | [post] access to local variable s : S [field args, element] : Object | +| structs.cs:32:20:32:20 | [post] access to local variable s : S [field args, element] : Object | semmle.label | [post] access to local variable s : S [field args, element] : Object | +| structs.cs:33:14:33:14 | access to local variable s : S [field args, element] : Object | semmle.label | access to local variable s : S [field args, element] : Object | +| structs.cs:33:14:33:14 | access to local variable s : S [field args, element] : Object | semmle.label | access to local variable s : S [field args, element] : Object | +| structs.cs:33:14:33:19 | access to field args : Object[] [element] : Object | semmle.label | access to field args : Object[] [element] : Object | +| structs.cs:33:14:33:19 | access to field args : Object[] [element] : Object | semmle.label | access to field args : Object[] [element] : Object | +| structs.cs:33:14:33:22 | access to array element | semmle.label | access to array element | +| structs.cs:33:14:33:22 | access to array element | semmle.label | access to array element | +subpaths +| structs.cs:25:23:25:25 | [...] : Object[] [element] : Object | structs.cs:10:27:10:30 | args : Object[] [element] : Object | structs.cs:10:16:10:16 | this [Return] : S [field args, element] : Object | structs.cs:25:17:25:26 | object creation of type S : S [field args, element] : Object | +| structs.cs:25:23:25:25 | [...] : Object[] [element] : Object | structs.cs:10:27:10:30 | args : Object[] [element] : Object | structs.cs:10:16:10:16 | this [Return] : S [field args, element] : Object | structs.cs:25:17:25:26 | object creation of type S : S [field args, element] : Object | +testFailures +#select +| structs.cs:26:14:26:22 | access to array element | structs.cs:24:17:24:33 | call to method Source : Object | structs.cs:26:14:26:22 | access to array element | $@ | structs.cs:24:17:24:33 | call to method Source : Object | call to method Source : Object | +| structs.cs:26:14:26:22 | access to array element | structs.cs:24:17:24:33 | call to method Source : Object | structs.cs:26:14:26:22 | access to array element | $@ | structs.cs:24:17:24:33 | call to method Source : Object | call to method Source : Object | +| structs.cs:33:14:33:22 | access to array element | structs.cs:18:21:18:37 | call to method Source : Object | structs.cs:33:14:33:22 | access to array element | $@ | structs.cs:18:21:18:37 | call to method Source : Object | call to method Source : Object | +| structs.cs:33:14:33:22 | access to array element | structs.cs:18:21:18:37 | call to method Source : Object | structs.cs:33:14:33:22 | access to array element | $@ | structs.cs:18:21:18:37 | call to method Source : Object | call to method Source : Object | diff --git a/csharp/ql/test/library-tests/dataflow/structs/StructFlow.ql b/csharp/ql/test/library-tests/dataflow/structs/StructFlow.ql new file mode 100644 index 000000000000..9ab95f59caf3 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/structs/StructFlow.ql @@ -0,0 +1,12 @@ +/** + * @kind path-problem + */ + +import csharp +import utils.test.InlineFlowTest +import DefaultFlowTest +import PathGraph + +from PathNode source, PathNode sink +where flowPath(source, sink) +select sink, source, sink, "$@", source, source.toString() diff --git a/csharp/ql/test/library-tests/dataflow/structs/structs.cs b/csharp/ql/test/library-tests/dataflow/structs/structs.cs new file mode 100644 index 000000000000..275e27512e42 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/structs/structs.cs @@ -0,0 +1,40 @@ +using System; + +public class Test +{ + public struct S + { + public int field; + public object[] args; + + public S(object[] args) + { + this.args = args; + } + } + + public void SetTainted(S s) + { + s.args[0] = Source(2); + s.field = Source(3); + } + + public void M1() + { + var o = Source(1); + var s = new S([o]); + Sink(s.args[0]); // $ hasValueFlow=1 + } + + public void M2() + { + var s = new S(new object[1]); + SetTainted(s); + Sink(s.args[0]); // $ hasValueFlow=2 + Sink(s.field); // $ no flow. + } + + public static void Sink(object o) { } + + static T Source(object source) => throw null; +} diff --git a/csharp/ql/test/library-tests/dispatch/CallGraph.expected b/csharp/ql/test/library-tests/dispatch/CallGraph.expected index 4eed880f0a3e..31e2a99ae24c 100644 --- a/csharp/ql/test/library-tests/dispatch/CallGraph.expected +++ b/csharp/ql/test/library-tests/dispatch/CallGraph.expected @@ -270,7 +270,10 @@ | ViableCallable.cs:679:17:679:20 | Run3 | ViableCallable.cs:637:21:637:21 | M | | ViableCallable.cs:679:17:679:20 | Run3 | ViableCallable.cs:646:21:646:21 | M | | ViableCallable.cs:679:17:679:20 | Run3 | ViableCallable.cs:648:21:648:21 | M | -| ViableCallable.cs:707:17:707:20 | Run1 | ViableCallable.cs:702:42:702:44 | get_Property | -| ViableCallable.cs:707:17:707:20 | Run1 | ViableCallable.cs:702:63:702:65 | set_Property | -| ViableCallable.cs:707:17:707:20 | Run1 | ViableCallable.cs:704:49:704:51 | get_Item | -| ViableCallable.cs:707:17:707:20 | Run1 | ViableCallable.cs:704:70:704:72 | set_Item | +| ViableCallable.cs:711:17:711:20 | Run1 | ViableCallable.cs:704:24:704:31 | Partial1 | +| ViableCallable.cs:711:17:711:20 | Run1 | ViableCallable.cs:705:42:705:44 | get_Property | +| ViableCallable.cs:711:17:711:20 | Run1 | ViableCallable.cs:705:63:705:65 | set_Property | +| ViableCallable.cs:711:17:711:20 | Run1 | ViableCallable.cs:707:49:707:51 | get_Item | +| ViableCallable.cs:711:17:711:20 | Run1 | ViableCallable.cs:707:70:707:72 | set_Item | +| ViableCallable.cs:711:17:711:20 | Run1 | ViableCallable.cs:708:51:708:53 | add_Event | +| ViableCallable.cs:711:17:711:20 | Run1 | ViableCallable.cs:708:59:708:64 | remove_Event | diff --git a/csharp/ql/test/library-tests/dispatch/GetADynamicTarget.expected b/csharp/ql/test/library-tests/dispatch/GetADynamicTarget.expected index b38eed691b9c..84dc17b073aa 100644 --- a/csharp/ql/test/library-tests/dispatch/GetADynamicTarget.expected +++ b/csharp/ql/test/library-tests/dispatch/GetADynamicTarget.expected @@ -518,7 +518,10 @@ | ViableCallable.cs:683:9:683:16 | call to method M | C22+TestOverloadResolution2.M(Int32[]) | | ViableCallable.cs:687:9:687:16 | call to method M | C22+TestOverloadResolution1.M(List) | | ViableCallable.cs:687:9:687:16 | call to method M | C22+TestOverloadResolution2.M(List) | -| ViableCallable.cs:712:9:712:18 | access to property Property | C23+Partial1.set_Property(object) | -| ViableCallable.cs:715:13:715:22 | access to property Property | C23+Partial1.get_Property() | -| ViableCallable.cs:718:9:718:12 | access to indexer | C23+Partial1.set_Item(int, object) | -| ViableCallable.cs:721:13:721:16 | access to indexer | C23+Partial1.get_Item(int) | +| ViableCallable.cs:716:9:716:18 | access to property Property | C23+Partial1.set_Property(object) | +| ViableCallable.cs:719:13:719:22 | access to property Property | C23+Partial1.get_Property() | +| ViableCallable.cs:722:9:722:12 | access to indexer | C23+Partial1.set_Item(int, object) | +| ViableCallable.cs:725:13:725:16 | access to indexer | C23+Partial1.get_Item(int) | +| ViableCallable.cs:728:9:728:15 | access to event Event | C23+Partial1.add_Event(EventHandler) | +| ViableCallable.cs:731:9:731:15 | access to event Event | C23+Partial1.remove_Event(EventHandler) | +| ViableCallable.cs:734:18:734:43 | object creation of type Partial1 | C23+Partial1.Partial1(object) | diff --git a/csharp/ql/test/library-tests/dispatch/ViableCallable.cs b/csharp/ql/test/library-tests/dispatch/ViableCallable.cs index 99b4ec54a99d..dee8d9b0d1d6 100644 --- a/csharp/ql/test/library-tests/dispatch/ViableCallable.cs +++ b/csharp/ql/test/library-tests/dispatch/ViableCallable.cs @@ -692,16 +692,20 @@ public class C23 { public partial class Partial1 { + public partial Partial1(object obj); public partial object Property { get; set; } public partial object this[int index] { get; set; } + public partial event EventHandler Event; } public partial class Partial1 { + public partial Partial1(object obj) { } public partial object Property { get { return null; } set { } } public partial object this[int index] { get { return null; } set { } } + public partial event EventHandler Event { add { } remove { } } } public void Run1(Partial1 p) @@ -719,5 +723,14 @@ public void Run1(Partial1 p) // Viable callable: Partial1.get_Item(int) o = p[0]; + + // Viable callable: Partial1.add_Event + p.Event += (sender, e) => { }; + + // Viable callable: Partial1.remove_Event + p.Event -= (sender, e) => { }; + + // Viable callable: Partial1.Partial1(object) + var p0 = new Partial1(new object()); } } diff --git a/csharp/ql/test/library-tests/extension/PrintAst.expected b/csharp/ql/test/library-tests/extension/PrintAst.expected new file mode 100644 index 000000000000..5016665c08b2 --- /dev/null +++ b/csharp/ql/test/library-tests/extension/PrintAst.expected @@ -0,0 +1,481 @@ +extensionTypes.cs: +# 4| [Class] MyExtensionTypes +# 6| 4: [ExtensionType] extension(String) +#-----| 2: (Parameters) +# 6| 0: [Parameter] s +# 6| -1: [TypeMention] string +#-----| 0: (Attributes) +# 6| 1: [DefaultAttribute] [NotNull(...)] +# 6| 0: [TypeMention] NotNullAttribute +# 8| 4: [ExtensionMethod] M11 +# 8| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 6| 0: [Parameter] s +# 6| -1: [TypeMention] string +# 8| 4: [BlockStmt] {...} +# 10| 5: [ExtensionType] extension(Int32) +#-----| 2: (Parameters) +# 10| 0: [Parameter] i1 +# 10| -1: [TypeMention] int +# 12| 4: [ExtensionMethod] M21 +# 12| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 10| 0: [Parameter] i1 +# 10| -1: [TypeMention] int +# 12| 4: [BlockStmt] {...} +# 14| 6: [ExtensionType] extension(Int32) +#-----| 2: (Parameters) +# 14| 0: [Parameter] i2 +# 14| -1: [TypeMention] int +# 16| 4: [ExtensionMethod] M31 +# 16| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 14| 0: [Parameter] i2 +# 14| -1: [TypeMention] int +# 16| 4: [BlockStmt] {...} +# 18| 7: [ExtensionType] extension(Int32) +#-----| 2: (Parameters) +# 18| 0: [Parameter] i3 +# 18| -1: [TypeMention] int +# 20| 4: [ExtensionMethod] M41 +# 20| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 18| 0: [Parameter] i3 +# 18| -1: [TypeMention] int +# 20| 4: [BlockStmt] {...} +# 22| 8: [ExtensionType] extension(String) +#-----| 2: (Parameters) +# 22| 0: [Parameter] s +# 22| -1: [TypeMention] string +# 24| 4: [ExtensionMethod] M51 +# 24| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 22| 0: [Parameter] s +# 22| -1: [TypeMention] string +# 24| 4: [BlockStmt] {...} +# 26| 9: [ExtensionType] extension(T1)`1 +#-----| 1: (Type parameters) +# 26| 0: [TypeParameter] T1 +#-----| 2: (Parameters) +# 26| 0: [Parameter] t1 +# 26| -1: [TypeMention] T1 +#-----| 0: (Attributes) +# 26| 1: [DefaultAttribute] [NotNullWhen(...)] +# 26| -1: [TypeMention] NotNullWhenAttribute +# 26| 0: [BoolLiteral] true +# 28| 4: [ExtensionMethod] M61`1 +# 28| -1: [TypeMention] Void +#-----| 1: (Type parameters) +# 28| 0: [TypeParameter] T2 +#-----| 2: (Parameters) +# 26| 0: [Parameter] t1 +# 26| -1: [TypeMention] T1 +# 28| 1: [Parameter] o +# 28| -1: [TypeMention] object +# 28| 2: [Parameter] t2 +# 28| -1: [TypeMention] T2 +# 28| 4: [BlockStmt] {...} +extensions.cs: +# 4| [Class] MyExtensions +# 6| 4: [ExtensionType] extension(String) +#-----| 2: (Parameters) +# 6| 0: [Parameter] s +# 6| -1: [TypeMention] string +# 8| 4: [Property] Prop1 +# 8| -1: [TypeMention] bool +# 8| 3: [ExtensionCallable,Getter] get_Prop1 +#-----| 2: (Parameters) +# 6| 0: [Parameter] s +# 6| -1: [TypeMention] string +# 8| 4: [GTExpr] ... > ... +# 8| 0: [PropertyCall] access to property Length +# 8| -1: [SyntheticExtensionParameterAccess] access to extension synthetic parameter s +# 8| 1: [IntLiteral] 0 +# 9| 5: [Property] Prop2 +# 9| -1: [TypeMention] bool +# 9| 3: [ExtensionCallable,Getter] get_Prop2 +#-----| 2: (Parameters) +# 6| 0: [Parameter] s +# 6| -1: [TypeMention] string +# 9| 4: [BlockStmt] {...} +# 9| 0: [ReturnStmt] return ...; +# 9| 0: [BoolLiteral] true +# 9| 4: [ExtensionCallable,Setter] set_Prop2 +#-----| 2: (Parameters) +# 6| 0: [Parameter] s +# 6| -1: [TypeMention] string +# 9| 1: [Parameter] value +# 9| 4: [BlockStmt] {...} +# 10| 6: [Property] StaticProp1 +# 10| -1: [TypeMention] bool +# 10| 3: [ExtensionCallable,Getter] get_StaticProp1 +# 10| 4: [BlockStmt] {...} +# 10| 0: [ReturnStmt] return ...; +# 10| 0: [BoolLiteral] false +# 11| 7: [ExtensionMethod] M1 +# 11| -1: [TypeMention] bool +#-----| 2: (Parameters) +# 6| 0: [Parameter] s +# 6| -1: [TypeMention] string +# 11| 4: [IsExpr] ... is ... +# 11| 0: [SyntheticExtensionParameterAccess] access to extension synthetic parameter s +# 11| 1: [NotPatternExpr] not ... +# 11| 0: [ConstantPatternExpr,NullLiteral] null +# 12| 8: [ExtensionMethod] M2 +# 12| -1: [TypeMention] string +#-----| 2: (Parameters) +# 6| 0: [Parameter] s +# 6| -1: [TypeMention] string +# 12| 1: [Parameter] other +# 12| -1: [TypeMention] string +# 12| 4: [BlockStmt] {...} +# 12| 0: [ReturnStmt] return ...; +# 12| 0: [AddExpr] ... + ... +# 12| 0: [SyntheticExtensionParameterAccess] access to extension synthetic parameter s +# 12| 1: [ParameterAccess] access to parameter other +# 13| 9: [ExtensionMethod] StaticM1 +# 13| -1: [TypeMention] int +# 13| 4: [BlockStmt] {...} +# 13| 0: [ReturnStmt] return ...; +# 13| 0: [IntLiteral] 0 +# 14| 10: [ExtensionMethod] StaticM2 +# 14| -1: [TypeMention] int +#-----| 2: (Parameters) +# 14| 0: [Parameter] x +# 14| -1: [TypeMention] string +# 14| 4: [BlockStmt] {...} +# 14| 0: [ReturnStmt] return ...; +# 14| 0: [PropertyCall] access to property Length +# 14| -1: [ParameterAccess] access to parameter x +# 15| 11: [ExtensionCallable,MulOperator] * +# 15| -1: [TypeMention] string +#-----| 2: (Parameters) +# 15| 0: [Parameter] a +# 15| -1: [TypeMention] int +# 15| 1: [Parameter] b +# 15| -1: [TypeMention] string +# 15| 4: [BlockStmt] {...} +# 15| 0: [ReturnStmt] return ...; +# 15| 0: [StringLiteralUtf16] "" +# 16| 14: [ExtensionMethod] StringGenericM1`1 +# 16| -1: [TypeMention] T +#-----| 1: (Type parameters) +# 16| 0: [TypeParameter] T +#-----| 2: (Parameters) +# 6| 0: [Parameter] s +# 6| -1: [TypeMention] string +# 16| 1: [Parameter] t +# 16| -1: [TypeMention] T +# 16| 2: [Parameter] o +# 16| -1: [TypeMention] object +# 16| 4: [BlockStmt] {...} +# 16| 0: [ReturnStmt] return ...; +# 16| 0: [ParameterAccess] access to parameter t +# 19| 5: [ExtensionType] extension(Object) +# 21| 4: [ExtensionMethod] StaticObjectM1 +# 21| -1: [TypeMention] int +# 21| 4: [BlockStmt] {...} +# 21| 0: [ReturnStmt] return ...; +# 21| 0: [IntLiteral] 0 +# 22| 5: [ExtensionMethod] StaticObjectM2 +# 22| -1: [TypeMention] int +#-----| 2: (Parameters) +# 22| 0: [Parameter] s +# 22| -1: [TypeMention] string +# 22| 4: [BlockStmt] {...} +# 22| 0: [ReturnStmt] return ...; +# 22| 0: [PropertyCall] access to property Length +# 22| -1: [ParameterAccess] access to parameter s +# 23| 6: [Property] StaticProp +# 23| -1: [TypeMention] bool +# 23| 3: [ExtensionCallable,Getter] get_StaticProp +# 23| 4: [BoolLiteral] true +# 26| 8: [ExtensionType] extension(T)`1 +#-----| 1: (Type parameters) +# 26| 0: [TypeParameter] T +#-----| 2: (Parameters) +# 26| 0: [Parameter] t +# 26| -1: [TypeMention] T +# 28| 4: [Property] GenericProp1 +# 28| -1: [TypeMention] bool +# 28| 3: [ExtensionCallable,Getter] get_GenericProp1 +#-----| 2: (Parameters) +# 26| 0: [Parameter] t +# 26| -1: [TypeMention] T +# 28| 4: [IsExpr] ... is ... +# 28| 0: [SyntheticExtensionParameterAccess] access to extension synthetic parameter t +# 28| 1: [NotPatternExpr] not ... +# 28| 0: [ConstantPatternExpr,NullLiteral] null +# 29| 5: [Property] GenericProp2 +# 29| -1: [TypeMention] bool +# 29| 3: [ExtensionCallable,Getter] get_GenericProp2 +#-----| 2: (Parameters) +# 26| 0: [Parameter] t +# 26| -1: [TypeMention] T +# 29| 4: [BlockStmt] {...} +# 29| 0: [ReturnStmt] return ...; +# 29| 0: [BoolLiteral] true +# 29| 4: [ExtensionCallable,Setter] set_GenericProp2 +#-----| 2: (Parameters) +# 26| 0: [Parameter] t +# 26| -1: [TypeMention] T +# 29| 1: [Parameter] value +# 29| 4: [BlockStmt] {...} +# 30| 6: [ExtensionMethod] GenericM1 +# 30| -1: [TypeMention] bool +#-----| 2: (Parameters) +# 26| 0: [Parameter] t +# 26| -1: [TypeMention] T +# 30| 4: [IsExpr] ... is ... +# 30| 0: [SyntheticExtensionParameterAccess] access to extension synthetic parameter t +# 30| 1: [NotPatternExpr] not ... +# 30| 0: [ConstantPatternExpr,NullLiteral] null +# 31| 7: [ExtensionMethod] GenericM2`1 +# 31| -1: [TypeMention] Void +#-----| 1: (Type parameters) +# 31| 0: [TypeParameter] S +#-----| 2: (Parameters) +# 26| 0: [Parameter] t +# 26| -1: [TypeMention] T +# 31| 1: [Parameter] other +# 31| -1: [TypeMention] S +# 31| 4: [BlockStmt] {...} +# 32| 8: [ExtensionMethod] GenericStaticM1 +# 32| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 26| 0: [Parameter] t +# 26| -1: [TypeMention] T +# 32| 4: [BlockStmt] {...} +# 33| 9: [ExtensionMethod] GenericStaticM2`1 +# 33| -1: [TypeMention] Void +#-----| 1: (Type parameters) +# 33| 0: [TypeParameter] S +#-----| 2: (Parameters) +# 33| 0: [Parameter] other +# 33| -1: [TypeMention] S +# 33| 4: [BlockStmt] {...} +# 34| 10: [AddOperator,ExtensionCallable] + +# 34| -1: [TypeMention] T +#-----| 2: (Parameters) +# 34| 0: [Parameter] a +# 34| -1: [TypeMention] T +# 34| 1: [Parameter] b +# 34| -1: [TypeMention] T +# 34| 4: [BlockStmt] {...} +# 34| 0: [ReturnStmt] return ...; +# 34| 0: [NullLiteral] null +# 38| [Class] ClassicExtensions +# 40| 4: [ExtensionMethod] M3 +# 40| -1: [TypeMention] bool +#-----| 2: (Parameters) +# 40| 0: [Parameter] s +# 40| -1: [TypeMention] string +# 40| 4: [IsExpr] ... is ... +# 40| 0: [ParameterAccess] access to parameter s +# 40| 1: [NotPatternExpr] not ... +# 40| 0: [ConstantPatternExpr,NullLiteral] null +# 43| [Class] C +# 45| 6: [Method] CallingExtensions +# 45| -1: [TypeMention] Void +# 46| 4: [BlockStmt] {...} +# 47| 0: [LocalVariableDeclStmt] ... ...; +# 47| 0: [LocalVariableDeclAndInitExpr] String s = ... +# 47| -1: [TypeMention] string +# 47| 0: [LocalVariableAccess] access to local variable s +# 47| 1: [StringLiteralUtf16] "Hello World." +# 50| 1: [LocalVariableDeclStmt] ... ...; +# 50| 0: [LocalVariableDeclAndInitExpr] Boolean x11 = ... +# 50| -1: [TypeMention] bool +# 50| 0: [LocalVariableAccess] access to local variable x11 +# 50| 1: [ExtensionPropertyCall] access to property Prop1 +# 50| -1: [LocalVariableAccess] access to local variable s +# 51| 2: [LocalVariableDeclStmt] ... ...; +# 51| 0: [LocalVariableDeclAndInitExpr] Boolean x12 = ... +# 51| -1: [TypeMention] bool +# 51| 0: [LocalVariableAccess] access to local variable x12 +# 51| 1: [ExtensionPropertyCall] access to property Prop2 +# 51| -1: [LocalVariableAccess] access to local variable s +# 52| 3: [ExprStmt] ...; +# 52| 0: [AssignExpr] ... = ... +# 52| 0: [ExtensionPropertyCall] access to property Prop2 +# 52| -1: [LocalVariableAccess] access to local variable s +# 52| 1: [BoolLiteral] true +# 53| 4: [LocalVariableDeclStmt] ... ...; +# 53| 0: [LocalVariableDeclAndInitExpr] Boolean x13 = ... +# 53| -1: [TypeMention] bool +# 53| 0: [LocalVariableAccess] access to local variable x13 +# 53| 1: [ExtensionPropertyCall] access to property StaticProp1 +# 53| -1: [TypeAccess] access to type String +# 53| 0: [TypeMention] string +# 54| 5: [LocalVariableDeclStmt] ... ...; +# 54| 0: [LocalVariableDeclAndInitExpr] Boolean x14 = ... +# 54| -1: [TypeMention] bool +# 54| 0: [LocalVariableAccess] access to local variable x14 +# 54| 1: [ExtensionPropertyCall] access to property StaticProp +# 54| -1: [TypeAccess] access to type Object +# 54| 0: [TypeMention] object +# 57| 6: [LocalVariableDeclStmt] ... ...; +# 57| 0: [LocalVariableDeclAndInitExpr] Boolean x21 = ... +# 57| -1: [TypeMention] bool +# 57| 0: [LocalVariableAccess] access to local variable x21 +# 57| 1: [MethodCall] call to method M1 +# 57| -1: [LocalVariableAccess] access to local variable s +# 58| 7: [LocalVariableDeclStmt] ... ...; +# 58| 0: [LocalVariableDeclAndInitExpr] String x22 = ... +# 58| -1: [TypeMention] string +# 58| 0: [LocalVariableAccess] access to local variable x22 +# 58| 1: [MethodCall] call to method M2 +# 58| -1: [LocalVariableAccess] access to local variable s +# 58| 0: [StringLiteralUtf16] "!!!" +# 59| 8: [LocalVariableDeclStmt] ... ...; +# 59| 0: [LocalVariableDeclAndInitExpr] Int32 x23 = ... +# 59| -1: [TypeMention] int +# 59| 0: [LocalVariableAccess] access to local variable x23 +# 59| 1: [MethodCall] call to method StaticM1 +# 59| -1: [TypeAccess] access to type String +# 59| 0: [TypeMention] string +# 60| 9: [LocalVariableDeclStmt] ... ...; +# 60| 0: [LocalVariableDeclAndInitExpr] Int32 x24 = ... +# 60| -1: [TypeMention] int +# 60| 0: [LocalVariableAccess] access to local variable x24 +# 60| 1: [MethodCall] call to method StaticM2 +# 60| -1: [TypeAccess] access to type String +# 60| 0: [TypeMention] string +# 60| 0: [LocalVariableAccess] access to local variable s +# 61| 10: [LocalVariableDeclStmt] ... ...; +# 61| 0: [LocalVariableDeclAndInitExpr] Int32 x25 = ... +# 61| -1: [TypeMention] int +# 61| 0: [LocalVariableAccess] access to local variable x25 +# 61| 1: [MethodCall] call to method StaticObjectM1 +# 61| -1: [TypeAccess] access to type Object +# 61| 0: [TypeMention] object +# 62| 11: [LocalVariableDeclStmt] ... ...; +# 62| 0: [LocalVariableDeclAndInitExpr] Int32 x26 = ... +# 62| -1: [TypeMention] int +# 62| 0: [LocalVariableAccess] access to local variable x26 +# 62| 1: [MethodCall] call to method StaticObjectM2 +# 62| -1: [TypeAccess] access to type Object +# 62| 0: [TypeMention] object +# 62| 0: [LocalVariableAccess] access to local variable s +# 65| 12: [LocalVariableDeclStmt] ... ...; +# 65| 0: [LocalVariableDeclAndInitExpr] String x30 = ... +# 65| -1: [TypeMention] string +# 65| 0: [LocalVariableAccess] access to local variable x30 +# 65| 1: [ExtensionOperatorCall] call to operator * +# 65| 0: [IntLiteral] 3 +# 65| 1: [LocalVariableAccess] access to local variable s +# 68| 13: [LocalVariableDeclStmt] ... ...; +# 68| 0: [LocalVariableDeclAndInitExpr] Boolean y = ... +# 68| -1: [TypeMention] bool +# 68| 0: [LocalVariableAccess] access to local variable y +# 68| 1: [MethodCall] call to method M3 +# 68| -1: [LocalVariableAccess] access to local variable s +# 71| 14: [ExprStmt] ...; +# 71| 0: [MethodCall] call to method M1 +# 71| -1: [TypeAccess] access to type MyExtensions +# 71| 0: [TypeMention] MyExtensions +# 71| 0: [LocalVariableAccess] access to local variable s +# 72| 15: [ExprStmt] ...; +# 72| 0: [MethodCall] call to method M2 +# 72| -1: [TypeAccess] access to type MyExtensions +# 72| 0: [TypeMention] MyExtensions +# 72| 0: [LocalVariableAccess] access to local variable s +# 72| 1: [StringLiteralUtf16] "!!!" +# 73| 16: [ExprStmt] ...; +# 73| 0: [MethodCall] call to method StaticM1 +# 73| -1: [TypeAccess] access to type MyExtensions +# 73| 0: [TypeMention] MyExtensions +# 74| 17: [ExprStmt] ...; +# 74| 0: [MethodCall] call to method StaticM2 +# 74| -1: [TypeAccess] access to type MyExtensions +# 74| 0: [TypeMention] MyExtensions +# 74| 0: [LocalVariableAccess] access to local variable s +# 75| 18: [ExprStmt] ...; +# 75| 0: [MethodCall] call to method StaticObjectM1 +# 75| -1: [TypeAccess] access to type MyExtensions +# 75| 0: [TypeMention] MyExtensions +# 76| 19: [ExprStmt] ...; +# 76| 0: [MethodCall] call to method StaticObjectM2 +# 76| -1: [TypeAccess] access to type MyExtensions +# 76| 0: [TypeMention] MyExtensions +# 76| 0: [LocalVariableAccess] access to local variable s +# 79| 20: [ExprStmt] ...; +# 79| 0: [ExtensionOperatorCall] call to operator * +# 79| -1: [TypeAccess] access to type MyExtensions +# 79| 0: [TypeMention] MyExtensions +# 79| 0: [IntLiteral] 3 +# 79| 1: [LocalVariableAccess] access to local variable s +# 82| 21: [ExprStmt] ...; +# 82| 0: [MethodCall] call to extension accessor get_Prop1 +# 82| -1: [TypeAccess] access to type MyExtensions +# 82| 0: [TypeMention] MyExtensions +# 82| 0: [LocalVariableAccess] access to local variable s +# 83| 22: [ExprStmt] ...; +# 83| 0: [MethodCall] call to extension accessor get_Prop2 +# 83| -1: [TypeAccess] access to type MyExtensions +# 83| 0: [TypeMention] MyExtensions +# 83| 0: [LocalVariableAccess] access to local variable s +# 84| 23: [ExprStmt] ...; +# 84| 0: [MethodCall] call to extension accessor set_Prop2 +# 84| -1: [TypeAccess] access to type MyExtensions +# 84| 0: [TypeMention] MyExtensions +# 84| 0: [LocalVariableAccess] access to local variable s +# 84| 1: [BoolLiteral] false +# 85| 24: [ExprStmt] ...; +# 85| 0: [MethodCall] call to extension accessor get_StaticProp +# 85| -1: [TypeAccess] access to type MyExtensions +# 85| 0: [TypeMention] MyExtensions +# 88| 7: [Method] CallingGenericExtensions +# 88| -1: [TypeMention] Void +# 89| 4: [BlockStmt] {...} +# 90| 0: [LocalVariableDeclStmt] ... ...; +# 90| 0: [LocalVariableDeclAndInitExpr] String s = ... +# 90| -1: [TypeMention] string +# 90| 0: [LocalVariableAccess] access to local variable s +# 90| 1: [StringLiteralUtf16] "Hello Generic World." +# 91| 1: [LocalVariableDeclStmt] ... ...; +# 91| 0: [LocalVariableDeclAndInitExpr] Object o = ... +# 91| -1: [TypeMention] object +# 91| 0: [LocalVariableAccess] access to local variable o +# 91| 1: [ObjectCreation] object creation of type Object +# 91| 0: [TypeMention] object +# 94| 2: [ExprStmt] ...; +# 94| 0: [MethodCall] call to method GenericM1 +# 94| -1: [LocalVariableAccess] access to local variable o +# 95| 3: [ExprStmt] ...; +# 95| 0: [MethodCall] call to method GenericM1 +# 95| -1: [LocalVariableAccess] access to local variable s +# 98| 4: [ExprStmt] ...; +# 98| 0: [MethodCall] call to method GenericM1 +# 98| -1: [TypeAccess] access to type MyExtensions +# 98| 0: [TypeMention] MyExtensions +# 98| 0: [LocalVariableAccess] access to local variable o +# 99| 5: [ExprStmt] ...; +# 99| 0: [MethodCall] call to method GenericM1 +# 99| -1: [TypeAccess] access to type MyExtensions +# 99| 0: [TypeMention] MyExtensions +# 99| 0: [LocalVariableAccess] access to local variable s +# 101| 6: [ExprStmt] ...; +# 101| 0: [MethodCall] call to method GenericM2 +# 101| -1: [LocalVariableAccess] access to local variable o +# 101| 0: [IntLiteral] 42 +# 102| 7: [ExprStmt] ...; +# 102| 0: [MethodCall] call to method GenericM2 +# 102| -1: [TypeAccess] access to type MyExtensions +# 102| 0: [TypeMention] MyExtensions +# 102| 0: [LocalVariableAccess] access to local variable o +# 102| 1: [IntLiteral] 42 +# 104| 8: [ExprStmt] ...; +# 104| 0: [MethodCall] call to method StringGenericM1 +# 104| -1: [LocalVariableAccess] access to local variable s +# 104| 0: [IntLiteral] 7 +# 104| 1: [ObjectCreation] object creation of type Object +# 104| 0: [TypeMention] object +# 105| 9: [ExprStmt] ...; +# 105| 0: [MethodCall] call to method StringGenericM1 +# 105| -1: [TypeAccess] access to type MyExtensions +# 105| 0: [TypeMention] MyExtensions +# 105| 0: [LocalVariableAccess] access to local variable s +# 105| 1: [StringLiteralUtf16] "test" +# 105| 2: [ObjectCreation] object creation of type Object +# 105| 0: [TypeMention] object diff --git a/csharp/ql/test/library-tests/extension/PrintAst.qlref b/csharp/ql/test/library-tests/extension/PrintAst.qlref new file mode 100644 index 000000000000..f867dd01f9f8 --- /dev/null +++ b/csharp/ql/test/library-tests/extension/PrintAst.qlref @@ -0,0 +1 @@ +shared/PrintAst.ql \ No newline at end of file diff --git a/csharp/ql/test/library-tests/extension/extensionTypes.cs b/csharp/ql/test/library-tests/extension/extensionTypes.cs new file mode 100644 index 000000000000..06047af375af --- /dev/null +++ b/csharp/ql/test/library-tests/extension/extensionTypes.cs @@ -0,0 +1,30 @@ +using System; +using System.Diagnostics.CodeAnalysis; + +public static class MyExtensionTypes +{ + extension([NotNull] string s) + { + public void M11() { } + } + extension(ref readonly int i1) + { + public void M21() { } + } + extension(in int i2) + { + public void M31() { } + } + extension(ref int i3) + { + public void M41() { } + } + extension(string? s) + { + public void M51() { } + } + extension([NotNullWhen(true)] T1 t1) where T1 : class + { + public void M61(object o, T2 t2) { } + } +} diff --git a/csharp/ql/test/library-tests/extension/extensionTypes.expected b/csharp/ql/test/library-tests/extension/extensionTypes.expected new file mode 100644 index 000000000000..b27ff095a4be --- /dev/null +++ b/csharp/ql/test/library-tests/extension/extensionTypes.expected @@ -0,0 +1,37 @@ +extensionTypeReceiverParameter +| extensionTypes.cs:6:5:9:5 | extension(String) | extensionTypes.cs:6:32:6:32 | s | +| extensionTypes.cs:10:5:13:5 | extension(Int32) | extensionTypes.cs:10:32:10:33 | i1 | +| extensionTypes.cs:14:5:17:5 | extension(Int32) | extensionTypes.cs:14:22:14:23 | i2 | +| extensionTypes.cs:18:5:21:5 | extension(Int32) | extensionTypes.cs:18:23:18:24 | i3 | +| extensionTypes.cs:22:5:25:5 | extension(String) | extensionTypes.cs:22:23:22:23 | s | +| extensionTypes.cs:26:5:29:5 | extension(T1)`1 | extensionTypes.cs:26:42:26:43 | t1 | +| extensions.cs:6:5:17:5 | extension(String) | extensions.cs:6:22:6:22 | s | +| extensions.cs:26:5:35:5 | extension(Object) | extensions.cs:26:20:26:20 | t | +| extensions.cs:26:5:35:5 | extension(String) | extensions.cs:26:20:26:20 | t | +| extensions.cs:26:5:35:5 | extension(T)`1 | extensions.cs:26:20:26:20 | t | +extensionTypeExtendedType +| extensionTypes.cs:6:5:9:5 | extension(String) | string | +| extensionTypes.cs:10:5:13:5 | extension(Int32) | int | +| extensionTypes.cs:14:5:17:5 | extension(Int32) | int | +| extensionTypes.cs:18:5:21:5 | extension(Int32) | int | +| extensionTypes.cs:22:5:25:5 | extension(String) | string | +| extensionTypes.cs:26:5:29:5 | extension(T1)`1 | T1 | +| extensions.cs:6:5:17:5 | extension(String) | string | +| extensions.cs:19:5:24:5 | extension(Object) | object | +| extensions.cs:26:5:35:5 | extension(Object) | object | +| extensions.cs:26:5:35:5 | extension(String) | string | +| extensions.cs:26:5:35:5 | extension(T)`1 | T | +extensionTypeReceiverParameterAttribute +| extensionTypes.cs:6:5:9:5 | extension(String) | extensionTypes.cs:6:32:6:32 | s | extensionTypes.cs:6:16:6:22 | [NotNull(...)] | +| extensionTypes.cs:26:5:29:5 | extension(T1)`1 | extensionTypes.cs:26:42:26:43 | t1 | extensionTypes.cs:26:20:26:30 | [NotNullWhen(...)] | +extensionTypeReceiverParameterModifier +| extensionTypes.cs:10:5:13:5 | extension(Int32) | extensionTypes.cs:10:32:10:33 | i1 | ref readonly | +| extensionTypes.cs:14:5:17:5 | extension(Int32) | extensionTypes.cs:14:22:14:23 | i2 | in | +| extensionTypes.cs:18:5:21:5 | extension(Int32) | extensionTypes.cs:18:23:18:24 | i3 | ref | +extensionTypeParameterConstraints +| extensionTypes.cs:26:5:29:5 | extension(T1)`1 | extensionTypes.cs:26:15:26:16 | T1 | file://:0:0:0:0 | where T1: ... | +| extensions.cs:26:5:35:5 | extension(T)`1 | extensions.cs:26:15:26:15 | T | file://:0:0:0:0 | where T: ... | +syntheticParameterModifier +| extensionTypes.cs:10:5:13:5 | extension(Int32) | extensionTypes.cs:12:21:12:23 | M21 | extensionTypes.cs:10:32:10:33 | i1 | ref readonly | +| extensionTypes.cs:14:5:17:5 | extension(Int32) | extensionTypes.cs:16:21:16:23 | M31 | extensionTypes.cs:14:22:14:23 | i2 | in | +| extensionTypes.cs:18:5:21:5 | extension(Int32) | extensionTypes.cs:20:21:20:23 | M41 | extensionTypes.cs:18:23:18:24 | i3 | ref | diff --git a/csharp/ql/test/library-tests/extension/extensionTypes.ql b/csharp/ql/test/library-tests/extension/extensionTypes.ql new file mode 100644 index 000000000000..f4d3fe5bbd53 --- /dev/null +++ b/csharp/ql/test/library-tests/extension/extensionTypes.ql @@ -0,0 +1,56 @@ +import csharp + +private predicate inTestFile(ExtensionType et) { + et.getFile().getBaseName() = ["extensions.cs", "extensionTypes.cs"] +} + +private string getModifier(Parameter p) { + p.isIn() and result = "in" + or + p.isRef() and result = "ref" + or + p.isReadonlyRef() and result = "ref readonly" +} + +query predicate extensionTypeReceiverParameter(ExtensionType et, Parameter p) { + inTestFile(et) and + p = et.getReceiverParameter() +} + +query predicate extensionTypeExtendedType(ExtensionType et, string t) { + inTestFile(et) and + t = et.getExtendedType().toStringWithTypes() +} + +query predicate extensionTypeReceiverParameterAttribute(ExtensionType et, Parameter p, Attribute a) { + inTestFile(et) and + et.getReceiverParameter() = p and + p.getAnAttribute() = a +} + +query predicate extensionTypeReceiverParameterModifier( + ExtensionType et, Parameter p, string modifier +) { + inTestFile(et) and + et.getReceiverParameter() = p and + modifier = getModifier(p) +} + +query predicate extensionTypeParameterConstraints( + UnboundGeneric ug, TypeParameter tp, TypeParameterConstraints c +) { + inTestFile(ug) and + ug instanceof ExtensionType and + tp = ug.getATypeParameter() and + tp.getConstraints() = c +} + +query predicate syntheticParameterModifier( + ExtensionType et, ExtensionMethod em, Parameter p, string modifier +) { + inTestFile(et) and + em.getDeclaringType() = et and + p = em.getParameter(0) and + not em.isStatic() and + modifier = getModifier(p) +} diff --git a/csharp/ql/test/library-tests/extension/extensions.cs b/csharp/ql/test/library-tests/extension/extensions.cs new file mode 100644 index 000000000000..1117a98f8a07 --- /dev/null +++ b/csharp/ql/test/library-tests/extension/extensions.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; + +public static class MyExtensions +{ + extension(string s) + { + public bool Prop1 => s.Length > 0; + public bool Prop2 { get { return true; } set { } } + public static bool StaticProp1 { get { return false; } } + public bool M1() => s is not null; + public string M2(string other) { return s + other; } + public static int StaticM1() { return 0; } + public static int StaticM2(string x) { return x.Length; } + public static string operator *(int a, string b) { return ""; } + public T StringGenericM1(T t, object o) { return t; } + } + + extension(object) + { + public static int StaticObjectM1() { return 0; } + public static int StaticObjectM2(string s) { return s.Length; } + public static bool StaticProp => true; + } + + extension(T t) where T : class + { + public bool GenericProp1 => t is not null; + public bool GenericProp2 { get { return true; } set { } } + public bool GenericM1() => t is not null; + public void GenericM2(S other) { } + public void GenericStaticM1() { } + public static void GenericStaticM2(S other) { } + public static T operator +(T a, T b) { return null; } + } +} + +public static class ClassicExtensions +{ + public static bool M3(this string s) => s is not null; +} + +public class C +{ + public static void CallingExtensions() + { + var s = "Hello World."; + + // Calling the extensions properties + var x11 = s.Prop1; + var x12 = s.Prop2; + s.Prop2 = true; + var x13 = string.StaticProp1; + var x14 = object.StaticProp; + + // Calling the extensions methods. + var x21 = s.M1(); + var x22 = s.M2("!!!"); + var x23 = string.StaticM1(); + var x24 = string.StaticM2(s); + var x25 = object.StaticObjectM1(); + var x26 = object.StaticObjectM2(s); + + // Calling the extension operator. + var x30 = 3 * s; + + // Calling the classic extension method. + var y = s.M3(); + + // Calling the compiler generated static extension methods. + MyExtensions.M1(s); + MyExtensions.M2(s, "!!!"); + MyExtensions.StaticM1(); + MyExtensions.StaticM2(s); + MyExtensions.StaticObjectM1(); + MyExtensions.StaticObjectM2(s); + + // Calling the compiler generated operator method. + MyExtensions.op_Multiply(3, s); + + // Calling the compiler generated methods used by the extension property accessors. + MyExtensions.get_Prop1(s); + MyExtensions.get_Prop2(s); + MyExtensions.set_Prop2(s, false); + MyExtensions.get_StaticProp(); + } + + public static void CallingGenericExtensions() + { + var s = "Hello Generic World."; + var o = new object(); + + // Calling generic extension method + o.GenericM1(); + s.GenericM1(); + + // Calling the compiler generated static extension methods. + MyExtensions.GenericM1(o); + MyExtensions.GenericM1(s); + + o.GenericM2(42); + MyExtensions.GenericM2(o, 42); + + s.StringGenericM1(7, new object()); + MyExtensions.StringGenericM1(s, "test", new object()); + } +} diff --git a/csharp/ql/test/library-tests/extension/extensions.expected b/csharp/ql/test/library-tests/extension/extensions.expected new file mode 100644 index 000000000000..45b557a96352 --- /dev/null +++ b/csharp/ql/test/library-tests/extension/extensions.expected @@ -0,0 +1,111 @@ +extensionMethodCallArgument +| extensions.cs:57:19:57:24 | call to method M1 | extensions.cs:11:21:11:22 | M1 | extensions.cs:6:22:6:22 | s | 0 | extensions.cs:57:19:57:19 | access to local variable s | +| extensions.cs:58:19:58:29 | call to method M2 | extensions.cs:12:23:12:24 | M2 | extensions.cs:6:22:6:22 | s | 0 | extensions.cs:58:19:58:19 | access to local variable s | +| extensions.cs:58:19:58:29 | call to method M2 | extensions.cs:12:23:12:24 | M2 | extensions.cs:12:33:12:37 | other | 1 | extensions.cs:58:24:58:28 | "!!!" | +| extensions.cs:60:19:60:36 | call to method StaticM2 | extensions.cs:14:27:14:34 | StaticM2 | extensions.cs:14:43:14:43 | x | 0 | extensions.cs:60:35:60:35 | access to local variable s | +| extensions.cs:62:19:62:42 | call to method StaticObjectM2 | extensions.cs:22:27:22:40 | StaticObjectM2 | extensions.cs:22:49:22:49 | s | 0 | extensions.cs:62:41:62:41 | access to local variable s | +| extensions.cs:68:17:68:22 | call to method M3 | extensions.cs:40:24:40:25 | M3 | extensions.cs:40:39:40:39 | s | 0 | extensions.cs:68:17:68:17 | access to local variable s | +| extensions.cs:71:9:71:26 | call to method M1 | extensions.cs:11:21:11:22 | M1 | extensions.cs:6:22:6:22 | s | 0 | extensions.cs:71:25:71:25 | access to local variable s | +| extensions.cs:72:9:72:33 | call to method M2 | extensions.cs:12:23:12:24 | M2 | extensions.cs:6:22:6:22 | s | 0 | extensions.cs:72:25:72:25 | access to local variable s | +| extensions.cs:72:9:72:33 | call to method M2 | extensions.cs:12:23:12:24 | M2 | extensions.cs:12:33:12:37 | other | 1 | extensions.cs:72:28:72:32 | "!!!" | +| extensions.cs:74:9:74:32 | call to method StaticM2 | extensions.cs:14:27:14:34 | StaticM2 | extensions.cs:14:43:14:43 | x | 0 | extensions.cs:74:31:74:31 | access to local variable s | +| extensions.cs:76:9:76:38 | call to method StaticObjectM2 | extensions.cs:22:27:22:40 | StaticObjectM2 | extensions.cs:22:49:22:49 | s | 0 | extensions.cs:76:37:76:37 | access to local variable s | +| extensions.cs:94:9:94:21 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | extensions.cs:94:9:94:9 | access to local variable o | +| extensions.cs:95:9:95:21 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | extensions.cs:95:9:95:9 | access to local variable s | +| extensions.cs:98:9:98:33 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | extensions.cs:98:32:98:32 | access to local variable o | +| extensions.cs:99:9:99:33 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | extensions.cs:99:32:99:32 | access to local variable s | +| extensions.cs:101:9:101:23 | call to method GenericM2 | extensions.cs:31:21:31:32 | GenericM2 | extensions.cs:26:20:26:20 | t | 0 | extensions.cs:101:9:101:9 | access to local variable o | +| extensions.cs:101:9:101:23 | call to method GenericM2 | extensions.cs:31:21:31:32 | GenericM2 | extensions.cs:31:36:31:40 | other | 1 | extensions.cs:101:21:101:22 | 42 | +| extensions.cs:102:9:102:37 | call to method GenericM2 | extensions.cs:31:21:31:32 | GenericM2 | extensions.cs:26:20:26:20 | t | 0 | extensions.cs:102:32:102:32 | access to local variable o | +| extensions.cs:102:9:102:37 | call to method GenericM2 | extensions.cs:31:21:31:32 | GenericM2 | extensions.cs:31:36:31:40 | other | 1 | extensions.cs:102:35:102:36 | 42 | +| extensions.cs:104:9:104:47 | call to method StringGenericM1 | extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:6:22:6:22 | s | 0 | extensions.cs:104:9:104:9 | access to local variable s | +| extensions.cs:104:9:104:47 | call to method StringGenericM1 | extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:16:39:16:39 | t | 1 | extensions.cs:104:32:104:32 | 7 | +| extensions.cs:104:9:104:47 | call to method StringGenericM1 | extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:16:49:16:49 | o | 2 | extensions.cs:104:35:104:46 | object creation of type Object | +| extensions.cs:105:9:105:69 | call to method StringGenericM1 | extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:6:22:6:22 | s | 0 | extensions.cs:105:46:105:46 | access to local variable s | +| extensions.cs:105:9:105:69 | call to method StringGenericM1 | extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:16:39:16:39 | t | 1 | extensions.cs:105:49:105:54 | "test" | +| extensions.cs:105:9:105:69 | call to method StringGenericM1 | extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:16:49:16:49 | o | 2 | extensions.cs:105:57:105:68 | object creation of type Object | +extensionMethodCalls +| extensions.cs:57:19:57:24 | call to method M1 | extensions.cs:11:21:11:22 | M1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).M1 | +| extensions.cs:58:19:58:29 | call to method M2 | extensions.cs:12:23:12:24 | M2 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).M2 | +| extensions.cs:59:19:59:35 | call to method StaticM1 | extensions.cs:13:27:13:34 | StaticM1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StaticM1 | +| extensions.cs:60:19:60:36 | call to method StaticM2 | extensions.cs:14:27:14:34 | StaticM2 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StaticM2 | +| extensions.cs:61:19:61:41 | call to method StaticObjectM1 | extensions.cs:21:27:21:40 | StaticObjectM1 | extensions.cs:19:5:24:5 | extension(Object) | MyExtensions+extension(System.Object).StaticObjectM1 | +| extensions.cs:62:19:62:42 | call to method StaticObjectM2 | extensions.cs:22:27:22:40 | StaticObjectM2 | extensions.cs:19:5:24:5 | extension(Object) | MyExtensions+extension(System.Object).StaticObjectM2 | +| extensions.cs:68:17:68:22 | call to method M3 | extensions.cs:40:24:40:25 | M3 | extensions.cs:38:21:38:37 | ClassicExtensions | ClassicExtensions.M3 | +| extensions.cs:71:9:71:26 | call to method M1 | extensions.cs:11:21:11:22 | M1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).M1 | +| extensions.cs:72:9:72:33 | call to method M2 | extensions.cs:12:23:12:24 | M2 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).M2 | +| extensions.cs:73:9:73:31 | call to method StaticM1 | extensions.cs:13:27:13:34 | StaticM1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StaticM1 | +| extensions.cs:74:9:74:32 | call to method StaticM2 | extensions.cs:14:27:14:34 | StaticM2 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StaticM2 | +| extensions.cs:75:9:75:37 | call to method StaticObjectM1 | extensions.cs:21:27:21:40 | StaticObjectM1 | extensions.cs:19:5:24:5 | extension(Object) | MyExtensions+extension(System.Object).StaticObjectM1 | +| extensions.cs:76:9:76:38 | call to method StaticObjectM2 | extensions.cs:22:27:22:40 | StaticObjectM2 | extensions.cs:19:5:24:5 | extension(Object) | MyExtensions+extension(System.Object).StaticObjectM2 | +| extensions.cs:94:9:94:21 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:5:35:5 | extension(Object) | MyExtensions+extension(System.Object).GenericM1 | +| extensions.cs:95:9:95:21 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:5:35:5 | extension(String) | MyExtensions+extension(System.String).GenericM1 | +| extensions.cs:98:9:98:33 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:5:35:5 | extension(Object) | MyExtensions+extension(System.Object).GenericM1 | +| extensions.cs:99:9:99:33 | call to method GenericM1 | extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:5:35:5 | extension(String) | MyExtensions+extension(System.String).GenericM1 | +| extensions.cs:101:9:101:23 | call to method GenericM2 | extensions.cs:31:21:31:32 | GenericM2 | extensions.cs:26:5:35:5 | extension(Object) | MyExtensions+extension(System.Object).GenericM2 | +| extensions.cs:102:9:102:37 | call to method GenericM2 | extensions.cs:31:21:31:32 | GenericM2 | extensions.cs:26:5:35:5 | extension(Object) | MyExtensions+extension(System.Object).GenericM2 | +| extensions.cs:104:9:104:47 | call to method StringGenericM1 | extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StringGenericM1 | +| extensions.cs:105:9:105:69 | call to method StringGenericM1 | extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StringGenericM1 | +extensionParameter +| extensions.cs:11:21:11:22 | M1 | extensions.cs:6:22:6:22 | s | 0 | string | extensions.cs:6:22:6:22 | s | +| extensions.cs:12:23:12:24 | M2 | extensions.cs:6:22:6:22 | s | 0 | string | extensions.cs:6:22:6:22 | s | +| extensions.cs:12:23:12:24 | M2 | extensions.cs:12:33:12:37 | other | 1 | string | extensions.cs:12:33:12:37 | other | +| extensions.cs:14:27:14:34 | StaticM2 | extensions.cs:14:43:14:43 | x | 0 | string | extensions.cs:14:43:14:43 | x | +| extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:6:22:6:22 | s | 0 | string | extensions.cs:6:22:6:22 | s | +| extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:16:39:16:39 | t | 1 | int | extensions.cs:16:39:16:39 | t | +| extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:16:49:16:49 | o | 2 | object | extensions.cs:16:49:16:49 | o | +| extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:6:22:6:22 | s | 0 | string | extensions.cs:6:22:6:22 | s | +| extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:16:39:16:39 | t | 1 | string | extensions.cs:16:39:16:39 | t | +| extensions.cs:16:18:16:35 | StringGenericM1 | extensions.cs:16:49:16:49 | o | 2 | object | extensions.cs:16:49:16:49 | o | +| extensions.cs:16:18:16:35 | StringGenericM1`1 | extensions.cs:6:22:6:22 | s | 0 | string | extensions.cs:6:22:6:22 | s | +| extensions.cs:16:18:16:35 | StringGenericM1`1 | extensions.cs:16:39:16:39 | t | 1 | T | extensions.cs:16:39:16:39 | t | +| extensions.cs:16:18:16:35 | StringGenericM1`1 | extensions.cs:16:49:16:49 | o | 2 | object | extensions.cs:16:49:16:49 | o | +| extensions.cs:22:27:22:40 | StaticObjectM2 | extensions.cs:22:49:22:49 | s | 0 | string | extensions.cs:22:49:22:49 | s | +| extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | T | extensions.cs:26:20:26:20 | t | +| extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | object | extensions.cs:26:20:26:20 | t | +| extensions.cs:30:21:30:29 | GenericM1 | extensions.cs:26:20:26:20 | t | 0 | string | extensions.cs:26:20:26:20 | t | +| extensions.cs:31:21:31:32 | GenericM2 | extensions.cs:26:20:26:20 | t | 0 | object | extensions.cs:26:20:26:20 | t | +| extensions.cs:31:21:31:32 | GenericM2 | extensions.cs:31:36:31:40 | other | 1 | int | extensions.cs:31:36:31:40 | other | +| extensions.cs:31:21:31:32 | GenericM2`1 | extensions.cs:26:20:26:20 | t | 0 | T | extensions.cs:26:20:26:20 | t | +| extensions.cs:31:21:31:32 | GenericM2`1 | extensions.cs:26:20:26:20 | t | 0 | object | extensions.cs:26:20:26:20 | t | +| extensions.cs:31:21:31:32 | GenericM2`1 | extensions.cs:26:20:26:20 | t | 0 | string | extensions.cs:26:20:26:20 | t | +| extensions.cs:31:21:31:32 | GenericM2`1 | extensions.cs:31:36:31:40 | other | 1 | S | extensions.cs:31:36:31:40 | other | +| extensions.cs:31:21:31:32 | GenericM2`1 | extensions.cs:31:36:31:40 | other | 1 | S | extensions.cs:31:36:31:40 | other | +| extensions.cs:31:21:31:32 | GenericM2`1 | extensions.cs:31:36:31:40 | other | 1 | S | extensions.cs:31:36:31:40 | other | +| extensions.cs:32:21:32:35 | GenericStaticM1 | extensions.cs:26:20:26:20 | t | 0 | T | extensions.cs:26:20:26:20 | t | +| extensions.cs:32:21:32:35 | GenericStaticM1 | extensions.cs:26:20:26:20 | t | 0 | object | extensions.cs:26:20:26:20 | t | +| extensions.cs:32:21:32:35 | GenericStaticM1 | extensions.cs:26:20:26:20 | t | 0 | string | extensions.cs:26:20:26:20 | t | +| extensions.cs:33:28:33:45 | GenericStaticM2`1 | extensions.cs:33:49:33:53 | other | 0 | S | extensions.cs:33:49:33:53 | other | +| extensions.cs:33:28:33:45 | GenericStaticM2`1 | extensions.cs:33:49:33:53 | other | 0 | S | extensions.cs:33:49:33:53 | other | +| extensions.cs:33:28:33:45 | GenericStaticM2`1 | extensions.cs:33:49:33:53 | other | 0 | S | extensions.cs:33:49:33:53 | other | +| extensions.cs:40:24:40:25 | M3 | extensions.cs:40:39:40:39 | s | 0 | string | extensions.cs:40:39:40:39 | s | +extensionOperatorCallArgument +| extensions.cs:15:39:15:39 | * | extensions.cs:65:19:65:23 | call to operator * | extensions.cs:15:45:15:45 | a | 0 | extensions.cs:65:19:65:19 | 3 | +| extensions.cs:15:39:15:39 | * | extensions.cs:65:19:65:23 | call to operator * | extensions.cs:15:55:15:55 | b | 1 | extensions.cs:65:23:65:23 | access to local variable s | +| extensions.cs:15:39:15:39 | * | extensions.cs:79:9:79:38 | call to operator * | extensions.cs:15:45:15:45 | a | 0 | extensions.cs:79:34:79:34 | 3 | +| extensions.cs:15:39:15:39 | * | extensions.cs:79:9:79:38 | call to operator * | extensions.cs:15:55:15:55 | b | 1 | extensions.cs:79:37:79:37 | access to local variable s | +extensionOperatorCalls +| extensions.cs:65:19:65:23 | call to operator * | extensions.cs:15:39:15:39 | * | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).op_Multiply | +| extensions.cs:79:9:79:38 | call to operator * | extensions.cs:15:39:15:39 | * | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).op_Multiply | +extensionProperty +| extensions.cs:8:21:8:25 | Prop1 | extensions.cs:6:5:17:5 | extension(String) | +| extensions.cs:9:21:9:25 | Prop2 | extensions.cs:6:5:17:5 | extension(String) | +| extensions.cs:10:28:10:38 | StaticProp1 | extensions.cs:6:5:17:5 | extension(String) | +| extensions.cs:23:28:23:37 | StaticProp | extensions.cs:19:5:24:5 | extension(Object) | +| extensions.cs:28:21:28:32 | GenericProp1 | extensions.cs:26:5:35:5 | extension(Object) | +| extensions.cs:28:21:28:32 | GenericProp1 | extensions.cs:26:5:35:5 | extension(String) | +| extensions.cs:28:21:28:32 | GenericProp1 | extensions.cs:26:5:35:5 | extension(T)`1 | +| extensions.cs:29:21:29:32 | GenericProp2 | extensions.cs:26:5:35:5 | extension(Object) | +| extensions.cs:29:21:29:32 | GenericProp2 | extensions.cs:26:5:35:5 | extension(String) | +| extensions.cs:29:21:29:32 | GenericProp2 | extensions.cs:26:5:35:5 | extension(T)`1 | +extensionPropertyCall +| extensions.cs:50:19:50:25 | access to property Prop1 | extensions.cs:8:21:8:25 | Prop1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).Prop1 | +| extensions.cs:51:19:51:25 | access to property Prop2 | extensions.cs:9:21:9:25 | Prop2 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).Prop2 | +| extensions.cs:52:9:52:15 | access to property Prop2 | extensions.cs:9:21:9:25 | Prop2 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).Prop2 | +| extensions.cs:53:19:53:36 | access to property StaticProp1 | extensions.cs:10:28:10:38 | StaticProp1 | extensions.cs:6:5:17:5 | extension(String) | MyExtensions+extension(System.String).StaticProp1 | +| extensions.cs:54:19:54:35 | access to property StaticProp | extensions.cs:23:28:23:37 | StaticProp | extensions.cs:19:5:24:5 | extension(Object) | MyExtensions+extension(System.Object).StaticProp | +extensionAccessorCall +| extensions.cs:82:9:82:33 | call to extension accessor get_Prop1 | extensions.cs:8:30:8:41 | get_Prop1 | extensions.cs:8:21:8:25 | Prop1 | MyExtensions+extension(System.String).get_Prop1 | +| extensions.cs:83:9:83:33 | call to extension accessor get_Prop2 | extensions.cs:9:29:9:31 | get_Prop2 | extensions.cs:9:21:9:25 | Prop2 | MyExtensions+extension(System.String).get_Prop2 | +| extensions.cs:84:9:84:40 | call to extension accessor set_Prop2 | extensions.cs:9:50:9:52 | set_Prop2 | extensions.cs:9:21:9:25 | Prop2 | MyExtensions+extension(System.String).set_Prop2 | +| extensions.cs:85:9:85:37 | call to extension accessor get_StaticProp | extensions.cs:23:42:23:45 | get_StaticProp | extensions.cs:23:28:23:37 | StaticProp | MyExtensions+extension(System.Object).get_StaticProp | diff --git a/csharp/ql/test/library-tests/extension/extensions.ql b/csharp/ql/test/library-tests/extension/extensions.ql new file mode 100644 index 000000000000..03830c5851d0 --- /dev/null +++ b/csharp/ql/test/library-tests/extension/extensions.ql @@ -0,0 +1,69 @@ +import csharp + +query predicate extensionMethodCallArgument( + ExtensionMethodCall emc, ExtensionMethod em, Parameter p, int i, Expr e +) { + em.getFile().getBaseName() = "extensions.cs" and + emc.getTarget() = em and + em.getParameter(i) = p and + emc.getArgument(i) = e +} + +query predicate extensionMethodCalls( + ExtensionMethodCall emc, ExtensionMethod em, Type t, string type +) { + em.getFile().getBaseName() = "extensions.cs" and + emc.getTarget() = em and + em.getDeclaringType() = t and + em.getFullyQualifiedNameDebug() = type +} + +query predicate extensionParameter( + ExtensionMethod em, Parameter p, int i, string type, Parameter unbound +) { + em.getFile().getBaseName() = "extensions.cs" and + p = em.getParameter(i) and + type = p.getType().toStringWithTypes() and + unbound = p.getUnboundDeclaration() +} + +query predicate extensionOperatorCallArgument( + ExtensionOperator op, ExtensionOperatorCall opc, Parameter p, int pos, Expr e +) { + opc.getTarget() = op and + op.getFile().getBaseName() = "extensions.cs" and + p = op.getParameter(pos) and + e = opc.getArgument(pos) +} + +query predicate extensionOperatorCalls( + ExtensionOperatorCall opc, ExtensionOperator op, Type t, string type +) { + op.getFile().getBaseName() = "extensions.cs" and + opc.getTarget() = op and + op.getDeclaringType() = t and + op.getFullyQualifiedNameDebug() = type +} + +query predicate extensionProperty(ExtensionProperty p, Type t) { + p.getFile().getBaseName() = "extensions.cs" and + p.getDeclaringType() = t +} + +query predicate extensionPropertyCall( + ExtensionPropertyCall pc, ExtensionProperty p, Type t, string type +) { + p.getFile().getBaseName() = "extensions.cs" and + pc.getProperty() = p and + p.getDeclaringType() = t and + p.getFullyQualifiedNameDebug() = type +} + +query predicate extensionAccessorCall( + MethodCall m, ExtensionAccessor a, ExtensionProperty p, string type +) { + p.getFile().getBaseName() = "extensions.cs" and + (a.(Getter).getDeclaration() = p or a.(Setter).getDeclaration() = p) and + m.getTargetAccessor() = a and + a.getFullyQualifiedNameDebug() = type +} diff --git a/csharp/ql/test/library-tests/extension/options b/csharp/ql/test/library-tests/extension/options new file mode 100644 index 000000000000..77b22963f5c8 --- /dev/null +++ b/csharp/ql/test/library-tests/extension/options @@ -0,0 +1,2 @@ +semmle-extractor-options: /nostdlib /noconfig +semmle-extractor-options: --load-sources-from-project:${testdir}/../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj diff --git a/csharp/ql/test/library-tests/parameters/LambdaParameterModifiers.cs b/csharp/ql/test/library-tests/parameters/LambdaParameterModifiers.cs new file mode 100644 index 000000000000..fa5bd7c7ce9a --- /dev/null +++ b/csharp/ql/test/library-tests/parameters/LambdaParameterModifiers.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +public class LambdaParameterModifiers +{ + delegate void MyRef(ref int i1); + delegate void MyOut(out int i2); + delegate void MyIn(in int i3); + delegate void MyRefReadonly(ref readonly int i4); + + delegate void MyScopedRef(scoped ref int i5); + + public void M() + { + // Explicitly typed lambda parameters with modifiers. + var l1 = (ref int x1) => x1; + var l2 = (out int x2) => x2 = 0; + var l3 = (in int x3) => x3; + var l4 = (ref readonly int x4) => x4; + var l5 = (scoped ref int x5) => x5; + var l6 = (params IEnumerable x6) => x6; + + // Implicitly typed lambda parameters with modifiers. + MyRef l7 = (ref i1) => { }; + MyOut l8 = (out i2) => i2 = 0; + MyIn l9 = (in i3) => { }; + MyRefReadonly l10 = (ref readonly i4) => { }; + MyScopedRef l11 = (scoped ref i5) => { }; + } +} diff --git a/csharp/ql/test/library-tests/parameters/ParameterModifiers.expected b/csharp/ql/test/library-tests/parameters/ParameterModifiers.expected index c6b38eac9c8f..b8d1283d8d19 100644 --- a/csharp/ql/test/library-tests/parameters/ParameterModifiers.expected +++ b/csharp/ql/test/library-tests/parameters/ParameterModifiers.expected @@ -1,4 +1,15 @@ parameterModifier +| LambdaParameterModifiers.cs:16:27:16:28 | x1 | 1 | +| LambdaParameterModifiers.cs:17:27:17:28 | x2 | 2 | +| LambdaParameterModifiers.cs:18:26:18:27 | x3 | 5 | +| LambdaParameterModifiers.cs:19:36:19:37 | x4 | 6 | +| LambdaParameterModifiers.cs:20:34:20:35 | x5 | 1 | +| LambdaParameterModifiers.cs:21:43:21:44 | x6 | 3 | +| LambdaParameterModifiers.cs:24:25:24:26 | i1 | 1 | +| LambdaParameterModifiers.cs:25:25:25:26 | i2 | 2 | +| LambdaParameterModifiers.cs:26:23:26:24 | i3 | 5 | +| LambdaParameterModifiers.cs:27:43:27:44 | i4 | 6 | +| LambdaParameterModifiers.cs:28:39:28:40 | i5 | 1 | | ParameterModifiers.cs:6:27:6:28 | p1 | 0 | | ParameterModifiers.cs:7:30:7:31 | p2 | 5 | | ParameterModifiers.cs:9:31:9:32 | p3 | 2 | @@ -9,13 +20,24 @@ parameterModifier parameterIsValue | ParameterModifiers.cs:6:27:6:28 | p1 | parameterIsIn +| LambdaParameterModifiers.cs:18:26:18:27 | x3 | +| LambdaParameterModifiers.cs:26:23:26:24 | i3 | | ParameterModifiers.cs:7:30:7:31 | p2 | parameterIsOut +| LambdaParameterModifiers.cs:17:27:17:28 | x2 | +| LambdaParameterModifiers.cs:25:25:25:26 | i2 | | ParameterModifiers.cs:9:31:9:32 | p3 | parameterIsRef +| LambdaParameterModifiers.cs:16:27:16:28 | x1 | +| LambdaParameterModifiers.cs:20:34:20:35 | x5 | +| LambdaParameterModifiers.cs:24:25:24:26 | i1 | +| LambdaParameterModifiers.cs:28:39:28:40 | i5 | | ParameterModifiers.cs:14:31:14:32 | p4 | parameterIsParams +| LambdaParameterModifiers.cs:21:43:21:44 | x6 | | ParameterModifiers.cs:16:36:16:37 | p5 | | ParameterModifiers.cs:20:47:20:48 | p7 | parameterIsReadonlyRef +| LambdaParameterModifiers.cs:19:36:19:37 | x4 | +| LambdaParameterModifiers.cs:27:43:27:44 | i4 | | ParameterModifiers.cs:18:40:18:41 | p6 | diff --git a/csharp/ql/test/library-tests/parameters/ParameterModifiers.ql b/csharp/ql/test/library-tests/parameters/ParameterModifiers.ql index b83eb2021611..72425994faec 100644 --- a/csharp/ql/test/library-tests/parameters/ParameterModifiers.ql +++ b/csharp/ql/test/library-tests/parameters/ParameterModifiers.ql @@ -1,7 +1,12 @@ import csharp class TestParameter extends Parameter { - TestParameter() { this.getFile().getBaseName() = "ParameterModifiers.cs" } + TestParameter() { + this.getFile().getBaseName() = "ParameterModifiers.cs" + or + this.getFile().getBaseName() = "LambdaParameterModifiers.cs" and + this.getCallable() instanceof LambdaExpr + } } query predicate parameterModifier(TestParameter p, int kind) { params(p, _, _, _, kind, _, _) } diff --git a/csharp/ql/test/library-tests/partial/MethodIsPartial.expected b/csharp/ql/test/library-tests/partial/MethodIsPartial.expected index 4c0e905d8c56..484540d72b2e 100644 --- a/csharp/ql/test/library-tests/partial/MethodIsPartial.expected +++ b/csharp/ql/test/library-tests/partial/MethodIsPartial.expected @@ -1,7 +1,8 @@ -| Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 | true | -| Partial.cs:5:17:5:23 | Method2 | false | -| Partial.cs:14:18:14:39 | PartialMethodWithBody1 | true | -| Partial.cs:15:17:15:23 | Method3 | false | -| Partial.cs:34:18:34:42 | PartialMethodWithoutBody2 | true | -| Partial.cs:35:17:35:23 | Method4 | false | -| Partial.cs:40:17:40:23 | Method5 | false | +| Partial.cs:9:18:9:42 | PartialMethodWithoutBody1 | true | +| Partial.cs:10:17:10:23 | Method2 | false | +| Partial.cs:23:18:23:39 | PartialMethodWithBody1 | true | +| Partial.cs:24:27:24:48 | PartialMethodWithBody2 | true | +| Partial.cs:28:17:28:23 | Method3 | false | +| Partial.cs:50:18:50:42 | PartialMethodWithoutBody2 | true | +| Partial.cs:51:17:51:23 | Method4 | false | +| Partial.cs:57:17:57:23 | Method5 | false | diff --git a/csharp/ql/test/library-tests/partial/Partial.cs b/csharp/ql/test/library-tests/partial/Partial.cs index 5a3e4af2e8c0..6ab87c95e8bb 100644 --- a/csharp/ql/test/library-tests/partial/Partial.cs +++ b/csharp/ql/test/library-tests/partial/Partial.cs @@ -1,17 +1,30 @@ +using System; + partial class TwoPartClass { + // Declaring declaration. + public partial TwoPartClass(object obj); partial void PartialMethodWithBody1(); + public partial object PartialMethodWithBody2(object obj); partial void PartialMethodWithoutBody1(); public void Method2() { } // Declaring declaration. public partial object PartialProperty1 { get; set; } // Declaring declaration. public partial object this[int index] { get; set; } + // Declaring declaration. + public partial event EventHandler PartialEvent1; } partial class TwoPartClass { + // Implementation declaration. + public partial TwoPartClass(object obj) { } partial void PartialMethodWithBody1() { } + public partial object PartialMethodWithBody2(object obj) + { + return obj; + } public void Method3() { } private object _backingField; // Implementation declaration. @@ -27,6 +40,9 @@ public partial object this[int index] get { return _backingArray[index]; } set { _backingArray[index] = value; } } + + // Implementation declaration. + public partial event EventHandler PartialEvent1 { add { } remove { } } } partial class OnePartPartialClass @@ -37,6 +53,7 @@ public void Method4() { } class NonPartialClass { + public NonPartialClass(object obj) { } public void Method5() { } public object Property { get; set; } public object this[int index] @@ -44,4 +61,5 @@ public object this[int index] get { return null; } set { } } + public event EventHandler Event; } diff --git a/csharp/ql/test/library-tests/partial/Partial1.expected b/csharp/ql/test/library-tests/partial/Partial1.expected index 55dcaabcea7d..b5421182c8df 100644 --- a/csharp/ql/test/library-tests/partial/Partial1.expected +++ b/csharp/ql/test/library-tests/partial/Partial1.expected @@ -1,14 +1,19 @@ -| Partial.cs:1:15:1:26 | TwoPartClass | -| Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 | -| Partial.cs:12:15:12:26 | TwoPartClass | -| Partial.cs:14:18:14:39 | PartialMethodWithBody1 | -| Partial.cs:18:27:18:42 | PartialProperty1 | -| Partial.cs:20:9:20:11 | get_PartialProperty1 | -| Partial.cs:21:9:21:11 | set_PartialProperty1 | -| Partial.cs:25:27:25:30 | Item | -| Partial.cs:27:9:27:11 | get_Item | -| Partial.cs:28:9:28:11 | set_Item | -| Partial.cs:32:15:32:33 | OnePartPartialClass | -| Partial.cs:34:18:34:42 | PartialMethodWithoutBody2 | +| Partial.cs:3:15:3:26 | TwoPartClass | +| Partial.cs:9:18:9:42 | PartialMethodWithoutBody1 | +| Partial.cs:19:15:19:26 | TwoPartClass | +| Partial.cs:22:20:22:31 | TwoPartClass | +| Partial.cs:23:18:23:39 | PartialMethodWithBody1 | +| Partial.cs:24:27:24:48 | PartialMethodWithBody2 | +| Partial.cs:31:27:31:42 | PartialProperty1 | +| Partial.cs:33:9:33:11 | get_PartialProperty1 | +| Partial.cs:34:9:34:11 | set_PartialProperty1 | +| Partial.cs:38:27:38:30 | Item | +| Partial.cs:40:9:40:11 | get_Item | +| Partial.cs:41:9:41:11 | set_Item | +| Partial.cs:45:39:45:51 | PartialEvent1 | +| Partial.cs:45:55:45:57 | add_PartialEvent1 | +| Partial.cs:45:63:45:68 | remove_PartialEvent1 | +| Partial.cs:48:15:48:33 | OnePartPartialClass | +| Partial.cs:50:18:50:42 | PartialMethodWithoutBody2 | | PartialMultipleFiles1.cs:1:22:1:41 | PartialMultipleFiles | | PartialMultipleFiles2.cs:1:22:1:41 | PartialMultipleFiles | diff --git a/csharp/ql/test/library-tests/partial/Partial2.expected b/csharp/ql/test/library-tests/partial/Partial2.expected index 87194dd3f9eb..4d5e0aa79a49 100644 --- a/csharp/ql/test/library-tests/partial/Partial2.expected +++ b/csharp/ql/test/library-tests/partial/Partial2.expected @@ -1,15 +1,17 @@ -| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:1:15:1:26 | | -| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 | -| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:5:17:5:23 | Method2 | -| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:14:18:14:39 | PartialMethodWithBody1 | -| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:15:17:15:23 | Method3 | -| Partial.cs:12:15:12:26 | TwoPartClass | Partial.cs:1:15:1:26 | | -| Partial.cs:12:15:12:26 | TwoPartClass | Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 | -| Partial.cs:12:15:12:26 | TwoPartClass | Partial.cs:5:17:5:23 | Method2 | -| Partial.cs:12:15:12:26 | TwoPartClass | Partial.cs:14:18:14:39 | PartialMethodWithBody1 | -| Partial.cs:12:15:12:26 | TwoPartClass | Partial.cs:15:17:15:23 | Method3 | -| Partial.cs:32:15:32:33 | OnePartPartialClass | Partial.cs:32:15:32:33 | | -| Partial.cs:32:15:32:33 | OnePartPartialClass | Partial.cs:34:18:34:42 | PartialMethodWithoutBody2 | -| Partial.cs:32:15:32:33 | OnePartPartialClass | Partial.cs:35:17:35:23 | Method4 | +| Partial.cs:3:15:3:26 | TwoPartClass | Partial.cs:3:15:3:26 | | +| Partial.cs:3:15:3:26 | TwoPartClass | Partial.cs:9:18:9:42 | PartialMethodWithoutBody1 | +| Partial.cs:3:15:3:26 | TwoPartClass | Partial.cs:10:17:10:23 | Method2 | +| Partial.cs:3:15:3:26 | TwoPartClass | Partial.cs:23:18:23:39 | PartialMethodWithBody1 | +| Partial.cs:3:15:3:26 | TwoPartClass | Partial.cs:24:27:24:48 | PartialMethodWithBody2 | +| Partial.cs:3:15:3:26 | TwoPartClass | Partial.cs:28:17:28:23 | Method3 | +| Partial.cs:19:15:19:26 | TwoPartClass | Partial.cs:3:15:3:26 | | +| Partial.cs:19:15:19:26 | TwoPartClass | Partial.cs:9:18:9:42 | PartialMethodWithoutBody1 | +| Partial.cs:19:15:19:26 | TwoPartClass | Partial.cs:10:17:10:23 | Method2 | +| Partial.cs:19:15:19:26 | TwoPartClass | Partial.cs:23:18:23:39 | PartialMethodWithBody1 | +| Partial.cs:19:15:19:26 | TwoPartClass | Partial.cs:24:27:24:48 | PartialMethodWithBody2 | +| Partial.cs:19:15:19:26 | TwoPartClass | Partial.cs:28:17:28:23 | Method3 | +| Partial.cs:48:15:48:33 | OnePartPartialClass | Partial.cs:48:15:48:33 | | +| Partial.cs:48:15:48:33 | OnePartPartialClass | Partial.cs:50:18:50:42 | PartialMethodWithoutBody2 | +| Partial.cs:48:15:48:33 | OnePartPartialClass | Partial.cs:51:17:51:23 | Method4 | | PartialMultipleFiles1.cs:1:22:1:41 | PartialMultipleFiles | PartialMultipleFiles1.cs:1:22:1:41 | | | PartialMultipleFiles2.cs:1:22:1:41 | PartialMultipleFiles | PartialMultipleFiles1.cs:1:22:1:41 | | diff --git a/csharp/ql/test/library-tests/partial/PartialAccessors.expected b/csharp/ql/test/library-tests/partial/PartialAccessors.expected index 2c69ed620ae6..c09756d252e7 100644 --- a/csharp/ql/test/library-tests/partial/PartialAccessors.expected +++ b/csharp/ql/test/library-tests/partial/PartialAccessors.expected @@ -1,8 +1,12 @@ -| Partial.cs:20:9:20:11 | get_PartialProperty1 | true | -| Partial.cs:21:9:21:11 | set_PartialProperty1 | true | -| Partial.cs:27:9:27:11 | get_Item | true | -| Partial.cs:28:9:28:11 | set_Item | true | -| Partial.cs:41:30:41:32 | get_Property | false | -| Partial.cs:41:35:41:37 | set_Property | false | -| Partial.cs:44:9:44:11 | get_Item | false | -| Partial.cs:45:9:45:11 | set_Item | false | +| Partial.cs:33:9:33:11 | get_PartialProperty1 | true | +| Partial.cs:34:9:34:11 | set_PartialProperty1 | true | +| Partial.cs:40:9:40:11 | get_Item | true | +| Partial.cs:41:9:41:11 | set_Item | true | +| Partial.cs:45:55:45:57 | add_PartialEvent1 | true | +| Partial.cs:45:63:45:68 | remove_PartialEvent1 | true | +| Partial.cs:58:30:58:32 | get_Property | false | +| Partial.cs:58:35:58:37 | set_Property | false | +| Partial.cs:61:9:61:11 | get_Item | false | +| Partial.cs:62:9:62:11 | set_Item | false | +| Partial.cs:64:31:64:35 | add_Event | false | +| Partial.cs:64:31:64:35 | remove_Event | false | diff --git a/csharp/ql/test/library-tests/partial/PartialConstructors.expected b/csharp/ql/test/library-tests/partial/PartialConstructors.expected index 01779f1b81ed..943ac0ae4b6d 100644 --- a/csharp/ql/test/library-tests/partial/PartialConstructors.expected +++ b/csharp/ql/test/library-tests/partial/PartialConstructors.expected @@ -1,4 +1,4 @@ -| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:1:15:1:26 | {...} | -| Partial.cs:32:15:32:33 | OnePartPartialClass | Partial.cs:32:15:32:33 | {...} | -| Partial.cs:38:7:38:21 | NonPartialClass | Partial.cs:38:7:38:21 | {...} | +| Partial.cs:22:20:22:31 | TwoPartClass | Partial.cs:22:45:22:47 | {...} | +| Partial.cs:48:15:48:33 | OnePartPartialClass | Partial.cs:48:15:48:33 | {...} | +| Partial.cs:56:12:56:26 | NonPartialClass | Partial.cs:56:40:56:42 | {...} | | PartialMultipleFiles1.cs:1:22:1:41 | PartialMultipleFiles | PartialMultipleFiles1.cs:1:22:1:41 | {...} | diff --git a/csharp/ql/test/library-tests/partial/PartialEvents.expected b/csharp/ql/test/library-tests/partial/PartialEvents.expected new file mode 100644 index 000000000000..4c7e610c37d3 --- /dev/null +++ b/csharp/ql/test/library-tests/partial/PartialEvents.expected @@ -0,0 +1,2 @@ +| Partial.cs:45:39:45:51 | PartialEvent1 | true | +| Partial.cs:64:31:64:35 | Event | false | diff --git a/csharp/ql/test/library-tests/partial/PartialEvents.ql b/csharp/ql/test/library-tests/partial/PartialEvents.ql new file mode 100644 index 000000000000..e9f452502667 --- /dev/null +++ b/csharp/ql/test/library-tests/partial/PartialEvents.ql @@ -0,0 +1,7 @@ +import csharp + +private boolean isPartial(Event e) { if e.isPartial() then result = true else result = false } + +from Event e +where e.fromSource() +select e, isPartial(e) diff --git a/csharp/ql/test/library-tests/partial/PartialIndexers.expected b/csharp/ql/test/library-tests/partial/PartialIndexers.expected index 151ed5aad03a..425a9897a478 100644 --- a/csharp/ql/test/library-tests/partial/PartialIndexers.expected +++ b/csharp/ql/test/library-tests/partial/PartialIndexers.expected @@ -1,2 +1,2 @@ -| Partial.cs:25:27:25:30 | Item | true | -| Partial.cs:42:19:42:22 | Item | false | +| Partial.cs:38:27:38:30 | Item | true | +| Partial.cs:59:19:59:22 | Item | false | diff --git a/csharp/ql/test/library-tests/partial/PartialMethodBody.expected b/csharp/ql/test/library-tests/partial/PartialMethodBody.expected index b75a105bea05..c15189262cad 100644 --- a/csharp/ql/test/library-tests/partial/PartialMethodBody.expected +++ b/csharp/ql/test/library-tests/partial/PartialMethodBody.expected @@ -1,3 +1,4 @@ -| Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 | false | -| Partial.cs:14:18:14:39 | PartialMethodWithBody1 | true | -| Partial.cs:34:18:34:42 | PartialMethodWithoutBody2 | false | +| Partial.cs:9:18:9:42 | PartialMethodWithoutBody1 | false | 0 | +| Partial.cs:23:18:23:39 | PartialMethodWithBody1 | true | 1 | +| Partial.cs:24:27:24:48 | PartialMethodWithBody2 | true | 1 | +| Partial.cs:50:18:50:42 | PartialMethodWithoutBody2 | false | 0 | diff --git a/csharp/ql/test/library-tests/partial/PartialMethodBody.ql b/csharp/ql/test/library-tests/partial/PartialMethodBody.ql index 53cb9be250a7..9b01ffa0a690 100644 --- a/csharp/ql/test/library-tests/partial/PartialMethodBody.ql +++ b/csharp/ql/test/library-tests/partial/PartialMethodBody.ql @@ -4,4 +4,4 @@ private boolean hasBody(Method m) { if m.hasBody() then result = true else resul from Method m where m.fromSource() and m.isPartial() -select m, hasBody(m) +select m, hasBody(m), count(m.getBody()) diff --git a/csharp/ql/test/library-tests/partial/PartialProperties.expected b/csharp/ql/test/library-tests/partial/PartialProperties.expected index 8d2dfc01e74a..5510fd53ad64 100644 --- a/csharp/ql/test/library-tests/partial/PartialProperties.expected +++ b/csharp/ql/test/library-tests/partial/PartialProperties.expected @@ -1,2 +1,2 @@ -| Partial.cs:18:27:18:42 | PartialProperty1 | true | -| Partial.cs:41:19:41:26 | Property | false | +| Partial.cs:31:27:31:42 | PartialProperty1 | true | +| Partial.cs:58:19:58:26 | Property | false | diff --git a/csharp/ql/test/library-tests/partial/PrintAst.expected b/csharp/ql/test/library-tests/partial/PrintAst.expected index 0729946b18be..c49afdc169f7 100644 --- a/csharp/ql/test/library-tests/partial/PrintAst.expected +++ b/csharp/ql/test/library-tests/partial/PrintAst.expected @@ -1,94 +1,126 @@ Partial.cs: -# 1| [Class] TwoPartClass -# 4| 6: [Method] PartialMethodWithoutBody1 -# 4| -1: [TypeMention] Void -# 5| 7: [Method] Method2 -# 5| -1: [TypeMention] Void -# 5| 4: [BlockStmt] {...} -# 14| 8: [Method] PartialMethodWithBody1 -# 3| -1: [TypeMention] Void -# 14| 4: [BlockStmt] {...} -# 15| 9: [Method] Method3 -# 15| -1: [TypeMention] Void -# 15| 4: [BlockStmt] {...} -# 16| 10: [Field] _backingField -# 16| -1: [TypeMention] object -# 18| 11: [Property] PartialProperty1 -# 7| -1: [TypeMention] object -# 18| -1: [TypeMention] object -# 20| 3: [Getter] get_PartialProperty1 -# 20| 4: [BlockStmt] {...} -# 20| 0: [ReturnStmt] return ...; -# 20| 0: [FieldAccess] access to field _backingField -# 21| 4: [Setter] set_PartialProperty1 +# 3| [Class] TwoPartClass +# 9| 5: [Method] PartialMethodWithoutBody1 +# 9| -1: [TypeMention] Void +# 10| 6: [Method] Method2 +# 10| -1: [TypeMention] Void +# 10| 4: [BlockStmt] {...} +# 22| 7: [InstanceConstructor] TwoPartClass +#-----| 2: (Parameters) +# 22| 0: [Parameter] obj +# 22| -1: [TypeMention] object +# 22| 4: [BlockStmt] {...} +# 23| 8: [Method] PartialMethodWithBody1 +# 23| -1: [TypeMention] Void +# 23| 4: [BlockStmt] {...} +# 24| 9: [Method] PartialMethodWithBody2 +# 24| -1: [TypeMention] object +#-----| 2: (Parameters) +# 24| 0: [Parameter] obj +# 24| -1: [TypeMention] object +# 25| 4: [BlockStmt] {...} +# 26| 0: [ReturnStmt] return ...; +# 26| 0: [ParameterAccess] access to parameter obj +# 28| 10: [Method] Method3 +# 28| -1: [TypeMention] Void +# 28| 4: [BlockStmt] {...} +# 29| 11: [Field] _backingField +# 29| -1: [TypeMention] object +# 31| 12: [Property] PartialProperty1 +# 31| -1: [TypeMention] object +# 33| 3: [Getter] get_PartialProperty1 +# 33| 4: [BlockStmt] {...} +# 33| 0: [ReturnStmt] return ...; +# 33| 0: [FieldAccess] access to field _backingField +# 34| 4: [Setter] set_PartialProperty1 #-----| 2: (Parameters) -# 21| 0: [Parameter] value -# 21| 4: [BlockStmt] {...} -# 21| 0: [ExprStmt] ...; -# 21| 0: [AssignExpr] ... = ... -# 21| 0: [FieldAccess] access to field _backingField -# 21| 1: [ParameterAccess] access to parameter value -# 23| 12: [Field] _backingArray -# 23| -1: [TypeMention] Object[] -# 23| 1: [TypeMention] object -# 25| 13: [Indexer] Item -# 9| -1: [TypeMention] object -# 25| -1: [TypeMention] object +# 34| 0: [Parameter] value +# 34| 4: [BlockStmt] {...} +# 34| 0: [ExprStmt] ...; +# 34| 0: [AssignExpr] ... = ... +# 34| 0: [FieldAccess] access to field _backingField +# 34| 1: [ParameterAccess] access to parameter value +# 36| 13: [Field] _backingArray +# 36| -1: [TypeMention] Object[] +# 36| 1: [TypeMention] object +# 38| 14: [Indexer] Item +# 38| -1: [TypeMention] object #-----| 1: (Parameters) -# 9| 0: [Parameter] index -# 9| -1: [TypeMention] int -# 25| -1: [TypeMention] int -# 27| 3: [Getter] get_Item +# 38| 0: [Parameter] index +# 38| -1: [TypeMention] int +# 40| 3: [Getter] get_Item #-----| 2: (Parameters) -# 25| 0: [Parameter] index -# 27| 4: [BlockStmt] {...} -# 27| 0: [ReturnStmt] return ...; -# 27| 0: [ArrayAccess] access to array element -# 27| -1: [FieldAccess] access to field _backingArray -# 27| 0: [ParameterAccess] access to parameter index -# 28| 4: [Setter] set_Item +# 38| 0: [Parameter] index +# 40| 4: [BlockStmt] {...} +# 40| 0: [ReturnStmt] return ...; +# 40| 0: [ArrayAccess] access to array element +# 40| -1: [FieldAccess] access to field _backingArray +# 40| 0: [ParameterAccess] access to parameter index +# 41| 4: [Setter] set_Item #-----| 2: (Parameters) -# 25| 0: [Parameter] index -# 28| 1: [Parameter] value -# 28| 4: [BlockStmt] {...} -# 28| 0: [ExprStmt] ...; -# 28| 0: [AssignExpr] ... = ... -# 28| 0: [ArrayAccess] access to array element -# 28| -1: [FieldAccess] access to field _backingArray -# 28| 0: [ParameterAccess] access to parameter index -# 28| 1: [ParameterAccess] access to parameter value -# 32| [Class] OnePartPartialClass -# 34| 6: [Method] PartialMethodWithoutBody2 -# 34| -1: [TypeMention] Void -# 35| 7: [Method] Method4 -# 35| -1: [TypeMention] Void -# 35| 4: [BlockStmt] {...} -# 38| [Class] NonPartialClass -# 40| 6: [Method] Method5 -# 40| -1: [TypeMention] Void -# 40| 4: [BlockStmt] {...} -# 41| 7: [Property] Property -# 41| -1: [TypeMention] object -# 41| 3: [Getter] get_Property -# 41| 4: [Setter] set_Property +# 38| 0: [Parameter] index +# 41| 1: [Parameter] value +# 41| 4: [BlockStmt] {...} +# 41| 0: [ExprStmt] ...; +# 41| 0: [AssignExpr] ... = ... +# 41| 0: [ArrayAccess] access to array element +# 41| -1: [FieldAccess] access to field _backingArray +# 41| 0: [ParameterAccess] access to parameter index +# 41| 1: [ParameterAccess] access to parameter value +# 45| 15: [Event] PartialEvent1 +# 45| 3: [AddEventAccessor] add_PartialEvent1 #-----| 2: (Parameters) -# 41| 0: [Parameter] value -# 42| 8: [Indexer] Item -# 42| -1: [TypeMention] object +# 45| 0: [Parameter] value +# 45| 4: [BlockStmt] {...} +# 45| 4: [RemoveEventAccessor] remove_PartialEvent1 +#-----| 2: (Parameters) +# 45| 0: [Parameter] value +# 45| 4: [BlockStmt] {...} +# 48| [Class] OnePartPartialClass +# 50| 6: [Method] PartialMethodWithoutBody2 +# 50| -1: [TypeMention] Void +# 51| 7: [Method] Method4 +# 51| -1: [TypeMention] Void +# 51| 4: [BlockStmt] {...} +# 54| [Class] NonPartialClass +# 56| 5: [InstanceConstructor] NonPartialClass +#-----| 2: (Parameters) +# 56| 0: [Parameter] obj +# 56| -1: [TypeMention] object +# 56| 4: [BlockStmt] {...} +# 57| 6: [Method] Method5 +# 57| -1: [TypeMention] Void +# 57| 4: [BlockStmt] {...} +# 58| 7: [Property] Property +# 58| -1: [TypeMention] object +# 58| 3: [Getter] get_Property +# 58| 4: [Setter] set_Property +#-----| 2: (Parameters) +# 58| 0: [Parameter] value +# 59| 8: [Indexer] Item +# 59| -1: [TypeMention] object #-----| 1: (Parameters) -# 42| 0: [Parameter] index -# 42| -1: [TypeMention] int -# 44| 3: [Getter] get_Item +# 59| 0: [Parameter] index +# 59| -1: [TypeMention] int +# 61| 3: [Getter] get_Item #-----| 2: (Parameters) -# 42| 0: [Parameter] index -# 44| 4: [BlockStmt] {...} -# 44| 0: [ReturnStmt] return ...; -# 44| 0: [NullLiteral] null -# 45| 4: [Setter] set_Item +# 59| 0: [Parameter] index +# 61| 4: [BlockStmt] {...} +# 61| 0: [ReturnStmt] return ...; +# 61| 0: [NullLiteral] null +# 62| 4: [Setter] set_Item #-----| 2: (Parameters) -# 42| 0: [Parameter] index -# 45| 1: [Parameter] value -# 45| 4: [BlockStmt] {...} +# 59| 0: [Parameter] index +# 62| 1: [Parameter] value +# 62| 4: [BlockStmt] {...} +# 64| 9: [Event] Event +# 64| -1: [TypeMention] EventHandler +# 64| 3: [AddEventAccessor] add_Event +#-----| 2: (Parameters) +# 64| 0: [Parameter] value +# 64| 4: [RemoveEventAccessor] remove_Event +#-----| 2: (Parameters) +# 64| 0: [Parameter] value PartialMultipleFiles1.cs: # 1| [Class] PartialMultipleFiles PartialMultipleFiles2.cs: diff --git a/csharp/ql/test/library-tests/properties/PrintAst.expected b/csharp/ql/test/library-tests/properties/PrintAst.expected index 2df3ee3f5e85..711e417558ed 100644 --- a/csharp/ql/test/library-tests/properties/PrintAst.expected +++ b/csharp/ql/test/library-tests/properties/PrintAst.expected @@ -230,3 +230,19 @@ properties.cs: #-----| 2: (Parameters) # 124| 0: [Parameter] value # 124| 4: [BlockStmt] {...} +# 128| 10: [Class] UseFieldKeyword +# 130| 6: [Property] Prop +# 130| -1: [TypeMention] object +# 132| 3: [Getter] get_Prop +# 132| 4: [BlockStmt] {...} +# 132| 0: [ReturnStmt] return ...; +# 132| 0: [FieldAccess] access to field Prop.field +# 133| 4: [Setter] set_Prop +#-----| 2: (Parameters) +# 133| 0: [Parameter] value +# 133| 4: [BlockStmt] {...} +# 133| 0: [ExprStmt] ...; +# 133| 0: [AssignExpr] ... = ... +# 133| 0: [FieldAccess] access to field Prop.field +# 133| 1: [ParameterAccess] access to parameter value +# 130| 7: [Field] Prop.field diff --git a/csharp/ql/test/library-tests/properties/Properties17.expected b/csharp/ql/test/library-tests/properties/Properties17.expected index 47b563e26761..ee817a63df94 100644 --- a/csharp/ql/test/library-tests/properties/Properties17.expected +++ b/csharp/ql/test/library-tests/properties/Properties17.expected @@ -1,3 +1,4 @@ +| Prop.field | | caption | | next | | y | diff --git a/csharp/ql/test/library-tests/properties/Properties17.ql b/csharp/ql/test/library-tests/properties/Properties17.ql index ca53f5423aa2..6bd668ec1189 100644 --- a/csharp/ql/test/library-tests/properties/Properties17.ql +++ b/csharp/ql/test/library-tests/properties/Properties17.ql @@ -1,5 +1,5 @@ /** - * @name Test that there are no backing fields + * @name Test that there are no backing fields except for properties that use the `field` keyword in their getter or setter. */ import csharp diff --git a/csharp/ql/test/library-tests/properties/properties.cs b/csharp/ql/test/library-tests/properties/properties.cs index 57ffa7a31a58..2f88214ec755 100644 --- a/csharp/ql/test/library-tests/properties/properties.cs +++ b/csharp/ql/test/library-tests/properties/properties.cs @@ -124,4 +124,13 @@ int InterfaceWithProperties.Prop2 set { } } } + + class UseFieldKeyword + { + public object Prop + { + get { return field; } + set { field = value; } + } + } } diff --git a/csharp/ql/test/query-tests/API Abuse/ClassDoesNotImplementEquals/NullableTest.cs b/csharp/ql/test/query-tests/API Abuse/ClassDoesNotImplementEquals/NullableTest.cs new file mode 100644 index 000000000000..a66ffbec9a0f --- /dev/null +++ b/csharp/ql/test/query-tests/API Abuse/ClassDoesNotImplementEquals/NullableTest.cs @@ -0,0 +1,86 @@ +using System; + +#nullable enable + +namespace Test +{ + class TestClass1 : IEquatable + { + private int field1; + + public bool Equals(TestClass1? param1) + { + return param1 != null && field1 == param1.field1; + } + + public override bool Equals(object? param2) + { + return param2 is TestClass1 tc && Equals(tc); + } + + public override int GetHashCode() + { + return field1; + } + } + + class TestClass2 : IEquatable + { + private int field1; + + public bool Equals(TestClass2 param1) + { + return param1 != null && field1 == param1.field1; + } + + public override bool Equals(object? param2) + { + return param2 is TestClass2 tc && Equals(tc); + } + + public override int GetHashCode() + { + return field1; + } + } + + class TestClass3 : IEquatable + { + private int field1; + + public bool Equals(TestClass3? param1) + { + return param1 != null && field1 == param1.field1; + } + + public override bool Equals(object param2) + { + return param2 is TestClass3 tc && Equals(tc); + } + + public override int GetHashCode() + { + return field1; + } + } + + class TestClass4 : IEquatable + { + private int field1; + + public bool Equals(TestClass4 param1) + { + return param1 != null && field1 == param1.field1; + } + + public override bool Equals(object param2) + { + return param2 is TestClass4 tc && Equals(tc); + } + + public override int GetHashCode() + { + return field1; + } + } +} \ No newline at end of file diff --git a/csharp/ql/test/query-tests/API Abuse/IncorrectEqualsSignature/NullableTest.cs b/csharp/ql/test/query-tests/API Abuse/IncorrectEqualsSignature/NullableTest.cs new file mode 100644 index 000000000000..a66ffbec9a0f --- /dev/null +++ b/csharp/ql/test/query-tests/API Abuse/IncorrectEqualsSignature/NullableTest.cs @@ -0,0 +1,86 @@ +using System; + +#nullable enable + +namespace Test +{ + class TestClass1 : IEquatable + { + private int field1; + + public bool Equals(TestClass1? param1) + { + return param1 != null && field1 == param1.field1; + } + + public override bool Equals(object? param2) + { + return param2 is TestClass1 tc && Equals(tc); + } + + public override int GetHashCode() + { + return field1; + } + } + + class TestClass2 : IEquatable + { + private int field1; + + public bool Equals(TestClass2 param1) + { + return param1 != null && field1 == param1.field1; + } + + public override bool Equals(object? param2) + { + return param2 is TestClass2 tc && Equals(tc); + } + + public override int GetHashCode() + { + return field1; + } + } + + class TestClass3 : IEquatable + { + private int field1; + + public bool Equals(TestClass3? param1) + { + return param1 != null && field1 == param1.field1; + } + + public override bool Equals(object param2) + { + return param2 is TestClass3 tc && Equals(tc); + } + + public override int GetHashCode() + { + return field1; + } + } + + class TestClass4 : IEquatable + { + private int field1; + + public bool Equals(TestClass4 param1) + { + return param1 != null && field1 == param1.field1; + } + + public override bool Equals(object param2) + { + return param2 is TestClass4 tc && Equals(tc); + } + + public override int GetHashCode() + { + return field1; + } + } +} \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.cs b/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.cs index 84d904f900d3..e9e5202b40ab 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.cs +++ b/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.cs @@ -29,3 +29,34 @@ public void UtilityMethod() { } } + +// GOOD: Base class has AutoValidateAntiforgeryToken attribute +[AutoValidateAntiforgeryToken] +public abstract class BaseController : Controller +{ +} + +public class DerivedController : BaseController +{ + // GOOD: Inherits antiforgery validation from base class + [HttpPost] + public ActionResult InheritedValidation() + { + return View(); + } +} + +// BAD: Base class without antiforgery attribute +public abstract class UnprotectedBaseController : Controller +{ +} + +public class DerivedUnprotectedController : UnprotectedBaseController +{ + // BAD: No antiforgery validation on this or any base class + [HttpPost] + public ActionResult NoInheritedValidation() + { + return View(); + } +} diff --git a/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.expected b/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.expected index 859fd4be9200..360b909cd0fa 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.expected +++ b/csharp/ql/test/query-tests/Security Features/CWE-352/missing-aspnetcore/MissingAntiForgeryTokenValidation.expected @@ -1 +1,2 @@ | MissingAntiForgeryTokenValidation.cs:7:25:7:29 | Login | Method 'Login' handles a POST request without performing CSRF token validation. | +| MissingAntiForgeryTokenValidation.cs:58:25:58:45 | NoInheritedValidation | Method 'NoInheritedValidation' handles a POST request without performing CSRF token validation. | diff --git a/csharp/ql/test/query-tests/Security Features/CWE-352/missing/MissingAntiForgeryTokenValidation.cs b/csharp/ql/test/query-tests/Security Features/CWE-352/missing/MissingAntiForgeryTokenValidation.cs index 69024e57a2e9..a86800e51529 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-352/missing/MissingAntiForgeryTokenValidation.cs +++ b/csharp/ql/test/query-tests/Security Features/CWE-352/missing/MissingAntiForgeryTokenValidation.cs @@ -29,3 +29,34 @@ public void UtilityMethod() { } } + +// GOOD: Base class has ValidateAntiForgeryToken attribute +[ValidateAntiForgeryToken] +public abstract class BaseController : Controller +{ +} + +public class DerivedController : BaseController +{ + // GOOD: Inherits antiforgery validation from base class + [HttpPost] + public ActionResult InheritedValidation() + { + return View(); + } +} + +// BAD: Base class without antiforgery attribute +public abstract class UnprotectedBaseController : Controller +{ +} + +public class DerivedUnprotectedController : UnprotectedBaseController +{ + // BAD: No antiforgery validation on this or any base class + [HttpPost] + public ActionResult NoInheritedValidation() + { + return View(); + } +} diff --git a/csharp/ql/test/query-tests/Security Features/CWE-352/missing/MissingAntiForgeryTokenValidation.expected b/csharp/ql/test/query-tests/Security Features/CWE-352/missing/MissingAntiForgeryTokenValidation.expected index 859fd4be9200..360b909cd0fa 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-352/missing/MissingAntiForgeryTokenValidation.expected +++ b/csharp/ql/test/query-tests/Security Features/CWE-352/missing/MissingAntiForgeryTokenValidation.expected @@ -1 +1,2 @@ | MissingAntiForgeryTokenValidation.cs:7:25:7:29 | Login | Method 'Login' handles a POST request without performing CSRF token validation. | +| MissingAntiForgeryTokenValidation.cs:58:25:58:45 | NoInheritedValidation | Method 'NoInheritedValidation' handles a POST request without performing CSRF token validation. | diff --git a/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.24.1.rst b/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.24.1.rst new file mode 100644 index 000000000000..71a2b3fb47ec --- /dev/null +++ b/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.24.1.rst @@ -0,0 +1,132 @@ +.. _codeql-cli-2.24.1: + +========================== +CodeQL 2.24.1 (2026-02-05) +========================== + +.. contents:: Contents + :depth: 2 + :local: + :backlinks: none + +This is an overview of changes in the CodeQL CLI and relevant CodeQL query and library packs. For additional updates on changes to the CodeQL code scanning experience, check out the `code scanning section on the GitHub blog `__, `relevant GitHub Changelog updates `__, `changes in the CodeQL extension for Visual Studio Code `__, and the `CodeQL Action changelog `__. + +Security Coverage +----------------- + +CodeQL 2.24.1 runs a total of 491 security queries when configured with the Default suite (covering 166 CWE). The Extended suite enables an additional 135 queries (covering 35 more CWE). + +CodeQL CLI +---------- + +Miscellaneous +~~~~~~~~~~~~~ + +* The vulnerable xwork-core 2.3.37 test dependency (CVE-2025-68493) has been removed. The CodeQL Java library has been updated to support both legacy Struts 2.x-6.x package names and Struts 7.x package names for analyzing user code. + +Language Libraries +------------------ + +Bug Fixes +~~~~~~~~~ + +C/C++ +""""" + +* Fixed a bug in the :code:`GuardCondition` library which sometimes prevented binary logical operators from being recognized as guard conditions. As a result, queries using :code:`GuardCondition` may see improved results. +* Fixed a bug which caused :code:`Node.asDefinition()` to not have a result for certain assignments. + +Java/Kotlin +""""""""""" + +* Kotlin: The Kotlin extractor now registers as the last IR generation extension, ensuring that code generated by other compiler plugins (such as kotlinx.serialization) is correctly captured. + +GitHub Actions +"""""""""""""" + +* Fixed a crash when analysing a :code:`${{ ... }}` expression over around 300 characters in length. + +Breaking Changes +~~~~~~~~~~~~~~~~ + +Java/Kotlin +""""""""""" + +* Support for Kotlin 1.6.x and 1.7.x series has been dropped + +Minor Analysis Improvements +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +C/C++ +""""" + +* The :code:`Buffer.qll` library will no longer report incorrect buffer sizes on certain malformed databases. As a result, the queries :code:`cpp/static-buffer-overflow`, :code:`cpp/overflow-buffer`, :code:`cpp/badly-bounded-write`, :code:`cpp/overrunning-write`, :code:`cpp/overrunning-write-with-float`, and :code:`cpp/very-likely-overrunning-write` will report fewer false positives on such databases. +* Added :code:`taint` summary models and :code:`sql-injection` barrier models for the MySQL :code:`mysql_real_escape_string` and :code:`mysql_real_escape_string_quote` escaping functions. +* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed. + +C# +"" + +* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed. +* C# 14: Support for null-conditional assignments (such as :code:`c?.Prop = p`). Furthermore, the :code:`MaybeNullExpr` class now takes null-conditional access (such as :code:`?.`) into account when modeling potential null values. + +Golang +"""""" + +* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed. + +Java/Kotlin +""""""""""" + +* Added support for Struts 7.x package names in the Struts framework library. The library now recognizes both the legacy :code:`com.opensymphony.xwork2` package names (Struts 2.x-6.x) and the new :code:`org.apache.struts2` package names (Struts 7.x+), maintaining backward compatibility while enabling analysis of code using the latest Struts versions. +* The query :code:`java/unreleased-lock` no longer applies to lock types with names ending in "Pool", as these typically manage a collection of resources and the :code:`lock` and :code:`unlock` methods typically only lock one resource at a time. This may lead to a reduction in false positives. +* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed. +* When Maven-compatible private package registries are configured for an organisation for Default Setup, CodeQL will now configure Maven to also use these as plugin repositories. CodeQL previously already configured Maven to use them as regular package repositories. This should now allow Maven plugins to be obtained from private registries. + +JavaScript/TypeScript +""""""""""""""""""""" + +* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed. + +Python +"""""" + +* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed. +* Added experimental query :code:`py/prompt-injection` to detect potential prompt injection vulnerabilities in code using LLMs. +* Added taint flow model and type model for :code:`agents` and :code:`openai` modules. +* Remote flow sources for the :code:`websockets` package have been modeled. + +Ruby +"""" + +* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed. + +Swift +""""" + +* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed. + +Rust +"""" + +* The predicate :code:`SummarizedCallable.propagatesFlow` has been extended with the columns :code:`Provenance p` and :code:`boolean isExact`, and as a consequence the predicates :code:`SummarizedCallable.hasProvenance` and :code:`SummarizedCallable.hasExactModel` have been removed. +* Added type inference support for the :code:`FnMut(..) -> ..` and :code:`Fn(..) -> ..` traits. They now work in type parameter bounds and are implemented by closures. + +New Features +~~~~~~~~~~~~ + +C/C++ +""""" + +* Added a subclass :code:`Embed` of :code:`PreprocessorDirective` for C23 and C++26 :code:`#embed` preprocessor directives. +* Added modules :code:`DataFlow::ParameterizedBarrierGuard` and :code:`DataFlow::ParameterizedInstructionBarrierGuard`. These modules provide the same features as :code:`DataFlow::BarrierGuard` and :code:`DataFlow::InstructionBarrierGuard`, but allow for an additional parameter to support properly using them in dataflow configurations that uses flow states. + +Java/Kotlin +""""""""""" + +* Kotlin versions up to 2.3.0 are now supported. + +Python +"""""" + +* It is now possible to refer to list elements in the Python models-as-data language, via the :code:`ListElement` path. diff --git a/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.24.2.rst b/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.24.2.rst new file mode 100644 index 000000000000..27da2f3eaf99 --- /dev/null +++ b/docs/codeql/codeql-overview/codeql-changelog/codeql-cli-2.24.2.rst @@ -0,0 +1,109 @@ +.. _codeql-cli-2.24.2: + +========================== +CodeQL 2.24.2 (2026-02-20) +========================== + +.. contents:: Contents + :depth: 2 + :local: + :backlinks: none + +This is an overview of changes in the CodeQL CLI and relevant CodeQL query and library packs. For additional updates on changes to the CodeQL code scanning experience, check out the `code scanning section on the GitHub blog `__, `relevant GitHub Changelog updates `__, `changes in the CodeQL extension for Visual Studio Code `__, and the `CodeQL Action changelog `__. + +Security Coverage +----------------- + +CodeQL 2.24.2 runs a total of 491 security queries when configured with the Default suite (covering 166 CWE). The Extended suite enables an additional 135 queries (covering 35 more CWE). + +CodeQL CLI +---------- + +Bug Fixes +~~~~~~~~~ + +* Fixed SARIF output to generate RFC 1738 compatible file URIs. File URIs now always use the :code:`file:///` format instead of :code:`file:/` for better interoperability with SARIF consumers. + +Query Packs +----------- + +Bug Fixes +~~~~~~~~~ + +C# +"" + +* The :code:`cs/web/missing-token-validation` ("Missing cross-site request forgery token validation") query now recognizes antiforgery attributes on base controller classes, fixing false positives when :code:`[ValidateAntiForgeryToken]` or :code:`[AutoValidateAntiforgeryToken]` is applied to a parent class. + +Language Libraries +------------------ + +Bug Fixes +~~~~~~~~~ + +Python +"""""" + +* Using :code:`=` as a fill character in a format specifier (e.g. :code:`f"{x:=^20}"`) now no longer results in a syntax error during parsing. + +Breaking Changes +~~~~~~~~~~~~~~~~ + +Golang +"""""" + +* The :code:`BasicBlock` class is now defined using the shared basic blocks library. :code:`BasicBlock.getRoot` has been replaced by :code:`BasicBlock.getScope`. :code:`BasicBlock.getAPredecessor` and :code:`BasicBlock.getASuccessor` now take a :code:`SuccessorType` argument. :code:`ReachableJoinBlock.inDominanceFrontierOf` has been removed, so use :code:`BasicBlock.inDominanceFrontier` instead, swapping the receiver and the argument. + +Major Analysis Improvements +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Golang +"""""" + +* Go 1.26 is now supported. + +Minor Analysis Improvements +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +C/C++ +""""" + +* Added remote flow source models for the :code:`winhttp.h` windows header and the Azure SDK core library for C/C++. + +C# +"" + +* The model for :code:`System.Web.HttpUtility` has been modified to better model the flow of tainted URIs. +* C# 14: Added support for :code:`extension` members in the extractor, QL library, data flow, and Models as Data, covering extension methods, properties, and operators. + +Java/Kotlin +""""""""""" + +* Using a regular expression to check that a string doesn't contain any line breaks is already a sanitizer for :code:`java/log-injection`. Additional ways of doing the regular expression check are now recognised, including annotation with :code:`@javax.validation.constraints.Pattern`. +* More ways of checking that a string matches a regular expression are now considered as sanitizers for various queries, including :code:`java/ssrf` and :code:`java/path-injection`. In particular, being annotated with :code:`@javax.validation.constraints.Pattern` is now recognised as a sanitizer for those queries. +* Kotlin versions up to 2.3.10 are now supported. + +Python +"""""" + +* Added request forgery sink models for the Azure SDK. +* Made it so that models-as-data sinks with the kind :code:`request-forgery` contribute to the class :code:`Http::Client::Request` which represents HTTP client requests. + +Deprecated APIs +~~~~~~~~~~~~~~~ + +Java/Kotlin +""""""""""" + +* The :code:`UnreachableBlocks.qll` library has been deprecated. +* Renamed the following predicates to increase uniformity across languages. The :code:`getBody` predicate already existed on :code:`LoopStmt`, but is now properly inherited. + + * :code:`UnaryExpr.getExpr` to :code:`getOperand`. + * :code:`ConditionalExpr.getTrueExpr` to :code:`getThen`. + * :code:`ConditionalExpr.getFalseExpr` to :code:`getElse`. + * :code:`ReturnStmt.getResult` to :code:`getExpr`. + * :code:`WhileStmt.getStmt` to :code:`getBody`. + * :code:`DoStmt.getStmt` to :code:`getBody`. + * :code:`ForStmt.getStmt` to :code:`getBody`. + * :code:`EnhancedForStmt.getStmt` to :code:`getBody`. + diff --git a/docs/codeql/codeql-overview/codeql-changelog/index.rst b/docs/codeql/codeql-overview/codeql-changelog/index.rst index fbdaac4a7d8f..21671f1c9696 100644 --- a/docs/codeql/codeql-overview/codeql-changelog/index.rst +++ b/docs/codeql/codeql-overview/codeql-changelog/index.rst @@ -11,6 +11,8 @@ A list of queries for each suite and language `is available here `_,"``github.com/revel/revel*``, ``github.com/robfig/revel*``",46,20,4 `SendGrid `_,``github.com/sendgrid/sendgrid-go*``,,1, `Squirrel `_,"``github.com/Masterminds/squirrel*``, ``github.com/lann/squirrel*``, ``gopkg.in/Masterminds/squirrel``",81,,96 - `Standard library `_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``, ``weak``",52,609,104 + `Standard library `_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``, ``weak``",52,612,104 `XORM `_,"``github.com/go-xorm/xorm*``, ``xorm.io/xorm*``",,,68 `XPath `_,``github.com/antchfx/xpath*``,,,4 `appleboy/gin-jwt `_,``github.com/appleboy/gin-jwt*``,,,1 @@ -74,5 +74,5 @@ Go framework & library support `xpathparser `_,``github.com/santhosh-tekuri/xpathparser*``,,,2 `yaml `_,``gopkg.in/yaml*``,,9, `zap `_,``go.uber.org/zap*``,,11,33 - Totals,,688,1069,1557 + Totals,,688,1072,1557 diff --git a/go/extractor/BUILD.bazel b/go/extractor/BUILD.bazel index 860dcef5e73e..fbc53f20720b 100644 --- a/go/extractor/BUILD.bazel +++ b/go/extractor/BUILD.bazel @@ -1,4 +1,5 @@ load("@rules_go//go:def.bzl", "go_library") +load("@rules_java//java:defs.bzl", "java_library") load("@rules_pkg//pkg:mappings.bzl", "pkg_files") # gazelle:prefix github.com/github/codeql-go/extractor diff --git a/go/extractor/autobuilder/build-environment.go b/go/extractor/autobuilder/build-environment.go index 0a4c7e2983b4..c660373205b2 100644 --- a/go/extractor/autobuilder/build-environment.go +++ b/go/extractor/autobuilder/build-environment.go @@ -12,7 +12,7 @@ import ( ) var minGoVersion = util.NewSemVer("1.11") -var maxGoVersion = util.NewSemVer("1.25") +var maxGoVersion = util.NewSemVer("1.26") type versionInfo struct { goModVersion util.SemVer // The version of Go found in the go directive in the `go.mod` file. diff --git a/go/extractor/diagnostics/diagnostics.go b/go/extractor/diagnostics/diagnostics.go index a91a9efac0d1..e7ff86cb878b 100644 --- a/go/extractor/diagnostics/diagnostics.go +++ b/go/extractor/diagnostics/diagnostics.go @@ -568,3 +568,25 @@ func EmitExtractionFailedForProjects(path []string) { noLocation, ) } + +func EmitPrivateRegistryUsed(writer DiagnosticsWriter, configs []string) { + n := len(configs) + lines := make([]string, n) + + for i := range configs { + lines[i] = fmt.Sprintf("* %s", configs[i]) + } + + emitDiagnosticTo( + writer, + "go/autobuilder/analysis-using-private-registries", + "Go extraction used private package registries", + fmt.Sprintf( + "Go was extracted using the following private package registr%s:\n\n%s\n", + plural(n, "y", "ies"), + strings.Join(lines, "\n")), + severityNote, + fullVisibility, + noLocation, + ) +} diff --git a/go/extractor/diagnostics/diagnostics_test.go b/go/extractor/diagnostics/diagnostics_test.go index f2b560004bae..3c28a57d4b5b 100644 --- a/go/extractor/diagnostics/diagnostics_test.go +++ b/go/extractor/diagnostics/diagnostics_test.go @@ -83,3 +83,46 @@ func Test_EmitCannotFindPackages_Actions(t *testing.T) { // Custom build command suggestion assert.Contains(t, d.MarkdownMessage, "If any of the packages are already present in the repository") } + +func Test_EmitPrivateRegistryUsed_Single(t *testing.T) { + writer := newMemoryDiagnosticsWriter() + + testItems := []string{ + "https://github.com/github/example (Git Source)", + } + + EmitPrivateRegistryUsed(writer, testItems) + + assert.Len(t, writer.diagnostics, 1, "Expected one diagnostic to be emitted") + + d := writer.diagnostics[0] + assert.Equal(t, d.Source.Id, "go/autobuilder/analysis-using-private-registries") + assert.Equal(t, d.Severity, string(severityNote)) + assert.Contains(t, d.MarkdownMessage, "following private package registry") + + for i := range testItems { + assert.Contains(t, d.MarkdownMessage, testItems[i]) + } +} + +func Test_EmitPrivateRegistryUsed_Multiple(t *testing.T) { + writer := newMemoryDiagnosticsWriter() + + testItems := []string{ + "https://github.com/github/example (Git Source)", + "https://example.com/goproxy (GOPROXY Server)", + } + + EmitPrivateRegistryUsed(writer, testItems) + + assert.Len(t, writer.diagnostics, 1, "Expected one diagnostic to be emitted") + + d := writer.diagnostics[0] + assert.Equal(t, d.Source.Id, "go/autobuilder/analysis-using-private-registries") + assert.Equal(t, d.Severity, string(severityNote)) + assert.Contains(t, d.MarkdownMessage, "following private package registries") + + for i := range testItems { + assert.Contains(t, d.MarkdownMessage, testItems[i]) + } +} diff --git a/go/extractor/go.mod b/go/extractor/go.mod index c88573bb8c2b..46d189d005e5 100644 --- a/go/extractor/go.mod +++ b/go/extractor/go.mod @@ -1,22 +1,23 @@ module github.com/github/codeql-go/extractor -go 1.25 +go 1.26 -toolchain go1.25.0 +toolchain go1.26.0 // when updating this, run // bazel run @rules_go//go -- mod tidy // when adding or removing dependencies, run // bazel mod tidy require ( - golang.org/x/mod v0.32.0 - golang.org/x/tools v0.41.0 + golang.org/x/mod v0.33.0 + golang.org/x/tools v0.42.0 ) +require github.com/stretchr/testify v1.11.1 + require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.11.1 // indirect golang.org/x/sync v0.19.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go/extractor/go.sum b/go/extractor/go.sum index 838db152fd67..ade080a41ad3 100644 --- a/go/extractor/go.sum +++ b/go/extractor/go.sum @@ -6,12 +6,13 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= -golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= +golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= +golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= -golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= -golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= +golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= +golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/go/extractor/registries/BUILD.bazel b/go/extractor/registries/BUILD.bazel new file mode 100644 index 000000000000..7947556ee5d8 --- /dev/null +++ b/go/extractor/registries/BUILD.bazel @@ -0,0 +1,17 @@ +# generated running `bazel run //go/gazelle`, do not edit + +load("@rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "registries", + srcs = ["registryproxy.go"], + importpath = "github.com/github/codeql-go/extractor/registries", + visibility = ["//visibility:public"], + deps = ["//go/extractor/diagnostics"], +) + +go_test( + name = "registries_test", + srcs = ["registryproxy_test.go"], + embed = [":registries"], +) diff --git a/go/extractor/util/registryproxy.go b/go/extractor/registries/registryproxy.go similarity index 85% rename from go/extractor/util/registryproxy.go rename to go/extractor/registries/registryproxy.go index 1f20832e8d81..39578af476be 100644 --- a/go/extractor/util/registryproxy.go +++ b/go/extractor/registries/registryproxy.go @@ -1,4 +1,4 @@ -package util +package registries import ( "encoding/json" @@ -8,6 +8,8 @@ import ( "os" "os/exec" "strings" + + "github.com/github/codeql-go/extractor/diagnostics" ) const PROXY_HOST = "CODEQL_PROXY_HOST" @@ -22,6 +24,19 @@ type RegistryConfig struct { URL string `json:"url"` } +func (config *RegistryConfig) Pretty() string { + pretty_type := "other" + + switch config.Type { + case GIT_SOURCE: + pretty_type = "Git Source" + case GOPROXY_SERVER: + pretty_type = "GOPROXY Server" + } + + return fmt.Sprintf("`%s` (%s)", config.URL, pretty_type) +} + // The address of the proxy including protocol and port (e.g. http://localhost:1234) var proxy_address string @@ -97,24 +112,40 @@ func getEnvVars() []string { if err != nil { slog.Error("Unable to parse proxy configurations", slog.String("error", err.Error())) } else { + activeConfigs := make([]RegistryConfig, 0, len(val)) + // We only care about private registry configurations that are relevant to Go and // filter others out at this point. for _, cfg := range val { if cfg.Type == GOPROXY_SERVER { goproxy_servers = append(goproxy_servers, cfg.URL) slog.Info("Found GOPROXY server", slog.String("url", cfg.URL)) + activeConfigs = append(activeConfigs, cfg) } else if cfg.Type == GIT_SOURCE { parsed, err := url.Parse(cfg.URL) if err == nil && parsed.Hostname() != "" { git_source := parsed.Hostname() + parsed.Path + "*" git_sources = append(git_sources, git_source) slog.Info("Found Git source", slog.String("source", git_source)) + activeConfigs = append(activeConfigs, cfg) } else { slog.Warn("Not a valid URL for Git source", slog.String("url", cfg.URL)) } } } + // Emit a diagnostic to make it easy for users to see that private registry + // configurations were picked up by the Go analysis. + if len(activeConfigs) > 0 { + prettyConfigs := []string{} + for i := range activeConfigs { + prettyConfigs = append(prettyConfigs, activeConfigs[i].Pretty()) + } + + diagnostics.EmitPrivateRegistryUsed(diagnostics.DefaultWriter, prettyConfigs) + } + + // Assemble environment variables for Go. goprivate := []string{} if len(goproxy_servers) > 0 { diff --git a/go/extractor/util/registryproxy_test.go b/go/extractor/registries/registryproxy_test.go similarity index 99% rename from go/extractor/util/registryproxy_test.go rename to go/extractor/registries/registryproxy_test.go index ef63bd9d3f87..c564040ff1b6 100644 --- a/go/extractor/util/registryproxy_test.go +++ b/go/extractor/registries/registryproxy_test.go @@ -1,4 +1,4 @@ -package util +package registries import ( "testing" diff --git a/go/extractor/toolchain/BUILD.bazel b/go/extractor/toolchain/BUILD.bazel index 583749993239..16c591f2a96a 100644 --- a/go/extractor/toolchain/BUILD.bazel +++ b/go/extractor/toolchain/BUILD.bazel @@ -7,7 +7,10 @@ go_library( srcs = ["toolchain.go"], importpath = "github.com/github/codeql-go/extractor/toolchain", visibility = ["//visibility:public"], - deps = ["//go/extractor/util"], + deps = [ + "//go/extractor/registries", + "//go/extractor/util", + ], ) go_test( diff --git a/go/extractor/toolchain/toolchain.go b/go/extractor/toolchain/toolchain.go index 01b3ab813bd5..fb9d5512cd83 100644 --- a/go/extractor/toolchain/toolchain.go +++ b/go/extractor/toolchain/toolchain.go @@ -10,6 +10,7 @@ import ( "path/filepath" "strings" + "github.com/github/codeql-go/extractor/registries" "github.com/github/codeql-go/extractor/util" ) @@ -140,7 +141,7 @@ func SupportsWorkspaces() bool { // Constructs a `*exec.Cmd` for `go` with the specified arguments. func GoCommand(arg ...string) *exec.Cmd { cmd := exec.Command("go", arg...) - util.ApplyProxyEnvVars(cmd) + registries.ApplyProxyEnvVars(cmd) return cmd } diff --git a/go/extractor/util/BUILD.bazel b/go/extractor/util/BUILD.bazel index ee090607ced5..ccebf5ebd865 100644 --- a/go/extractor/util/BUILD.bazel +++ b/go/extractor/util/BUILD.bazel @@ -8,7 +8,6 @@ go_library( "extractvendordirs.go", "logging.go", "overlays.go", - "registryproxy.go", "semver.go", "util.go", ], @@ -21,7 +20,6 @@ go_test( name = "util_test", srcs = [ "logging_test.go", - "registryproxy_test.go", "semver_test.go", "util_test.go", ], diff --git a/go/ql/consistency-queries/CHANGELOG.md b/go/ql/consistency-queries/CHANGELOG.md index d0c8171cdf67..e91058f491a0 100644 --- a/go/ql/consistency-queries/CHANGELOG.md +++ b/go/ql/consistency-queries/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.42 + +No user-facing changes. + ## 1.0.41 No user-facing changes. diff --git a/go/ql/consistency-queries/change-notes/released/1.0.42.md b/go/ql/consistency-queries/change-notes/released/1.0.42.md new file mode 100644 index 000000000000..821c38854a26 --- /dev/null +++ b/go/ql/consistency-queries/change-notes/released/1.0.42.md @@ -0,0 +1,3 @@ +## 1.0.42 + +No user-facing changes. diff --git a/go/ql/consistency-queries/codeql-pack.release.yml b/go/ql/consistency-queries/codeql-pack.release.yml index d496eab6eb95..53e8667626ac 100644 --- a/go/ql/consistency-queries/codeql-pack.release.yml +++ b/go/ql/consistency-queries/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.41 +lastReleaseVersion: 1.0.42 diff --git a/go/ql/consistency-queries/qlpack.yml b/go/ql/consistency-queries/qlpack.yml index c07633f30b96..6f9302c9ac46 100644 --- a/go/ql/consistency-queries/qlpack.yml +++ b/go/ql/consistency-queries/qlpack.yml @@ -1,5 +1,5 @@ name: codeql-go-consistency-queries -version: 1.0.41 +version: 1.0.43-dev groups: - go - queries diff --git a/go/ql/lib/CHANGELOG.md b/go/ql/lib/CHANGELOG.md index 126058537cef..34751dc5d8ae 100644 --- a/go/ql/lib/CHANGELOG.md +++ b/go/ql/lib/CHANGELOG.md @@ -1,3 +1,13 @@ +## 7.0.0 + +### Breaking Changes + +* The `BasicBlock` class is now defined using the shared basic blocks library. `BasicBlock.getRoot` has been replaced by `BasicBlock.getScope`. `BasicBlock.getAPredecessor` and `BasicBlock.getASuccessor` now take a `SuccessorType` argument. `ReachableJoinBlock.inDominanceFrontierOf` has been removed, so use `BasicBlock.inDominanceFrontier` instead, swapping the receiver and the argument. + +### Major Analysis Improvements + +* Go 1.26 is now supported. + ## 6.0.1 ### Minor Analysis Improvements diff --git a/go/ql/lib/change-notes/released/7.0.0.md b/go/ql/lib/change-notes/released/7.0.0.md new file mode 100644 index 000000000000..602f9f36e35f --- /dev/null +++ b/go/ql/lib/change-notes/released/7.0.0.md @@ -0,0 +1,9 @@ +## 7.0.0 + +### Breaking Changes + +* The `BasicBlock` class is now defined using the shared basic blocks library. `BasicBlock.getRoot` has been replaced by `BasicBlock.getScope`. `BasicBlock.getAPredecessor` and `BasicBlock.getASuccessor` now take a `SuccessorType` argument. `ReachableJoinBlock.inDominanceFrontierOf` has been removed, so use `BasicBlock.inDominanceFrontier` instead, swapping the receiver and the argument. + +### Major Analysis Improvements + +* Go 1.26 is now supported. diff --git a/go/ql/lib/codeql-pack.release.yml b/go/ql/lib/codeql-pack.release.yml index d1f3c68c8120..e0db21c78694 100644 --- a/go/ql/lib/codeql-pack.release.yml +++ b/go/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 6.0.1 +lastReleaseVersion: 7.0.0 diff --git a/go/ql/lib/ext/builtin.model.yml b/go/ql/lib/ext/builtin.model.yml index 816c89008a84..616e6bc23b01 100644 --- a/go/ql/lib/ext/builtin.model.yml +++ b/go/ql/lib/ext/builtin.model.yml @@ -11,3 +11,4 @@ extensions: - ["", "", False, "copy", "", "", "Argument[1].ArrayElement", "Argument[0].ArrayElement", "value", "manual"] - ["", "", False, "max", "", "", "Argument[0..1000]", "ReturnValue", "value", "manual"] - ["", "", False, "min", "", "", "Argument[0..1000]", "ReturnValue", "value", "manual"] + - ["", "", False, "new", "", "", "Argument[0]", "ReturnValue.Dereference", "value", "manual"] diff --git a/go/ql/lib/ext/bytes.model.yml b/go/ql/lib/ext/bytes.model.yml index 762d0ca16ee6..b55749f828bf 100644 --- a/go/ql/lib/ext/bytes.model.yml +++ b/go/ql/lib/ext/bytes.model.yml @@ -43,6 +43,7 @@ extensions: - ["bytes", "", False, "TrimSuffix", "", "", "Argument[0]", "ReturnValue", "taint", "manual"] - ["bytes", "Buffer", True, "Bytes", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - ["bytes", "Buffer", True, "Next", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["bytes", "Buffer", True, "Peek", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"] - ["bytes", "Buffer", True, "ReadBytes", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"] - ["bytes", "Buffer", True, "ReadString", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"] - ["bytes", "Reader", True, "Reset", "", "", "Argument[0]", "Argument[receiver]", "taint", "manual"] diff --git a/go/ql/lib/ext/errors.model.yml b/go/ql/lib/ext/errors.model.yml index a94c8e558ff4..36b17a49ee02 100644 --- a/go/ql/lib/ext/errors.model.yml +++ b/go/ql/lib/ext/errors.model.yml @@ -4,5 +4,6 @@ extensions: extensible: summaryModel data: - ["errors", "", False, "As", "", "", "Argument[0]", "Argument[1]", "taint", "manual"] + - ["errors", "", False, "AsType", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"] - ["errors", "", False, "New", "", "", "Argument[0]", "ReturnValue", "taint", "manual"] - ["errors", "", False, "Unwrap", "", "", "Argument[0]", "ReturnValue", "taint", "manual"] diff --git a/go/ql/lib/qlpack.yml b/go/ql/lib/qlpack.yml index af34da5d7d5a..ac5f63a29bc5 100644 --- a/go/ql/lib/qlpack.yml +++ b/go/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-all -version: 6.0.1 +version: 7.0.1-dev groups: go dbscheme: go.dbscheme extractor: go @@ -7,6 +7,7 @@ library: true upgrades: upgrades dependencies: codeql/concepts: ${workspace} + codeql/controlflow: ${workspace} codeql/dataflow: ${workspace} codeql/mad: ${workspace} codeql/threat-models: ${workspace} diff --git a/go/ql/lib/semmle/go/AST.qll b/go/ql/lib/semmle/go/AST.qll index c5e388ba000f..6a840f81cbbe 100644 --- a/go/ql/lib/semmle/go/AST.qll +++ b/go/ql/lib/semmle/go/AST.qll @@ -84,6 +84,16 @@ class AstNode extends @node, Locatable { pragma[nomagic] FuncDef getEnclosingFunction() { result = this.getParent().parentInSameFunction*() } + /** Gets the innermost block statement to which this AST node belongs, if any. */ + BlockStmt getEnclosingBlock() { + exists(AstNode p | p = this.getParent() | + result = p + or + not p instanceof BlockStmt and + result = p.getEnclosingBlock() + ) + } + /** * Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs. */ diff --git a/go/ql/lib/semmle/go/controlflow/BasicBlocks.qll b/go/ql/lib/semmle/go/controlflow/BasicBlocks.qll index 8380c6d6d5d2..43b8c7e8dd39 100644 --- a/go/ql/lib/semmle/go/controlflow/BasicBlocks.qll +++ b/go/ql/lib/semmle/go/controlflow/BasicBlocks.qll @@ -4,140 +4,53 @@ import go private import ControlFlowGraphImpl +private import codeql.controlflow.BasicBlock as BB +private import codeql.controlflow.SuccessorType + +private module Input implements BB::InputSig { + /** A delineated part of the AST with its own CFG. */ + class CfgScope = ControlFlow::Root; + + /** The class of control flow nodes. */ + class Node = ControlFlowNode; + + /** Gets the CFG scope in which this node occurs. */ + CfgScope nodeGetCfgScope(Node node) { node.getRoot() = result } + + /** Gets an immediate successor of this node. */ + Node nodeGetASuccessor(Node node, SuccessorType t) { + result = node.getASuccessor() and + ( + not result instanceof ControlFlow::ConditionGuardNode and t instanceof DirectSuccessor + or + t.(BooleanSuccessor).getValue() = result.(ControlFlow::ConditionGuardNode).getOutcome() + ) + } -/** - * Holds if `nd` starts a new basic block. - */ -private predicate startsBB(ControlFlow::Node nd) { - count(nd.getAPredecessor()) != 1 - or - nd.getAPredecessor().isBranch() -} - -/** - * Holds if the first node of basic block `succ` is a control flow - * successor of the last node of basic block `bb`. - */ -private predicate succBB(BasicBlock bb, BasicBlock succ) { succ = bb.getLastNode().getASuccessor() } - -/** - * Holds if the first node of basic block `bb` is a control flow - * successor of the last node of basic block `pre`. - */ -private predicate predBB(BasicBlock bb, BasicBlock pre) { succBB(pre, bb) } - -/** Holds if `bb` is an entry basic block. */ -private predicate entryBB(BasicBlock bb) { bb.getFirstNode().isEntryNode() } - -/** Holds if `bb` is an exit basic block. */ -private predicate exitBB(BasicBlock bb) { bb.getLastNode().isExitNode() } - -cached -private module Internal { /** - * Holds if `succ` is a control flow successor of `nd` within the same basic block. + * Holds if `node` represents an entry node to be used when calculating + * dominance. */ - private predicate intraBBSucc(ControlFlow::Node nd, ControlFlow::Node succ) { - succ = nd.getASuccessor() and - not startsBB(succ) - } + predicate nodeIsDominanceEntry(Node node) { node instanceof EntryNode } /** - * Holds if `nd` is the `i`th node in basic block `bb`. - * - * In other words, `i` is the shortest distance from a node `bb` - * that starts a basic block to `nd` along the `intraBBSucc` relation. + * Holds if `node` represents an exit node to be used when calculating + * post dominance. */ - cached - predicate bbIndex(BasicBlock bb, ControlFlow::Node nd, int i) = - shortestDistances(startsBB/1, intraBBSucc/2)(bb, nd, i) - - cached - int bbLength(BasicBlock bb) { result = strictcount(ControlFlow::Node nd | bbIndex(bb, nd, _)) } - - cached - predicate reachableBB(BasicBlock bb) { - entryBB(bb) - or - exists(BasicBlock predBB | succBB(predBB, bb) | reachableBB(predBB)) - } + predicate nodeIsPostDominanceExit(Node node) { node instanceof ExitNode } } -private import Internal - -/** Holds if `dom` is an immediate dominator of `bb`. */ -cached -private predicate bbIDominates(BasicBlock dom, BasicBlock bb) = - idominance(entryBB/1, succBB/2)(_, dom, bb) - -/** Holds if `dom` is an immediate post-dominator of `bb`. */ -cached -private predicate bbIPostDominates(BasicBlock dom, BasicBlock bb) = - idominance(exitBB/1, predBB/2)(_, dom, bb) - -/** - * A basic block, that is, a maximal straight-line sequence of control flow nodes - * without branches or joins. - * - * At the database level, a basic block is represented by its first control flow node. - */ -class BasicBlock extends TControlFlowNode { - BasicBlock() { startsBB(this) } - - /** Gets a basic block succeeding this one. */ - BasicBlock getASuccessor() { succBB(this, result) } - - /** Gets a basic block preceding this one. */ - BasicBlock getAPredecessor() { result.getASuccessor() = this } - - /** Gets a node in this block. */ - ControlFlow::Node getANode() { result = this.getNode(_) } - - /** Gets the node at the given position in this block. */ - ControlFlow::Node getNode(int pos) { bbIndex(this, result, pos) } - - /** Gets the first node in this block. */ - ControlFlow::Node getFirstNode() { result = this } +private module BbImpl = BB::Make; - /** Gets the last node in this block. */ - ControlFlow::Node getLastNode() { result = this.getNode(this.length() - 1) } +class BasicBlock = BbImpl::BasicBlock; - /** Gets the length of this block. */ - int length() { result = bbLength(this) } +class EntryBasicBlock = BbImpl::EntryBasicBlock; - /** Gets the basic block that immediately dominates this basic block. */ - ReachableBasicBlock getImmediateDominator() { bbIDominates(result, this) } - - /** Gets the innermost function or file to which this basic block belongs. */ - ControlFlow::Root getRoot() { result = this.getFirstNode().getRoot() } - - /** Gets a textual representation of this basic block. */ - string toString() { result = "basic block" } - - /** Gets the source location for this element. */ - Location getLocation() { result = this.getFirstNode().getLocation() } - - /** - * DEPRECATED: Use `getLocation()` instead. - * - * Holds if this basic block is at the specified location. - * The location spans column `startcolumn` of line `startline` to - * column `endcolumn` of line `endline` in file `filepath`. - * For more information, see - * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). - */ - deprecated predicate hasLocationInfo( - string filepath, int startline, int startcolumn, int endline, int endcolumn - ) { - this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) - } -} - -/** - * An entry basic block, that is, a basic block whose first node is an entry node. - */ -class EntryBasicBlock extends BasicBlock { - EntryBasicBlock() { entryBB(this) } +cached +private predicate reachableBB(BasicBlock bb) { + bb instanceof EntryBasicBlock + or + exists(BasicBlock predBB | predBB.getASuccessor(_) = bb | reachableBB(predBB)) } /** @@ -145,38 +58,6 @@ class EntryBasicBlock extends BasicBlock { */ class ReachableBasicBlock extends BasicBlock { ReachableBasicBlock() { reachableBB(this) } - - /** - * Holds if this basic block strictly dominates `bb`. - */ - cached - predicate strictlyDominates(ReachableBasicBlock bb) { bbIDominates+(this, bb) } - - /** - * Holds if this basic block dominates `bb`. - * - * This predicate is reflexive: each reachable basic block dominates itself. - */ - predicate dominates(ReachableBasicBlock bb) { - bb = this or - this.strictlyDominates(bb) - } - - /** - * Holds if this basic block strictly post-dominates `bb`. - */ - cached - predicate strictlyPostDominates(ReachableBasicBlock bb) { bbIPostDominates+(this, bb) } - - /** - * Holds if this basic block post-dominates `bb`. - * - * This predicate is reflexive: each reachable basic block post-dominates itself. - */ - predicate postDominates(ReachableBasicBlock bb) { - bb = this or - this.strictlyPostDominates(bb) - } } /** @@ -184,21 +65,4 @@ class ReachableBasicBlock extends BasicBlock { */ class ReachableJoinBlock extends ReachableBasicBlock { ReachableJoinBlock() { this.getFirstNode().isJoin() } - - /** - * Holds if this basic block belongs to the dominance frontier of `b`, that is - * `b` dominates a predecessor of this block, but not this block itself. - * - * Algorithm from Cooper et al., "A Simple, Fast Dominance Algorithm" (Figure 5), - * who in turn attribute it to Ferrante et al., "The program dependence graph and - * its use in optimization". - */ - predicate inDominanceFrontierOf(ReachableBasicBlock b) { - b = this.getAPredecessor() and not b = this.getImmediateDominator() - or - exists(ReachableBasicBlock prev | this.inDominanceFrontierOf(prev) | - b = prev.getImmediateDominator() and - not b = this.getImmediateDominator() - ) - } } diff --git a/go/ql/lib/semmle/go/controlflow/ControlFlowGraph.qll b/go/ql/lib/semmle/go/controlflow/ControlFlowGraph.qll index 1e66bc61dc45..88adb88c0264 100644 --- a/go/ql/lib/semmle/go/controlflow/ControlFlowGraph.qll +++ b/go/ql/lib/semmle/go/controlflow/ControlFlowGraph.qll @@ -313,6 +313,9 @@ module ControlFlow { */ Expr getCondition() { result = cond } + /** Gets the value of the condition that this node corresponds to. */ + boolean getOutcome() { result = outcome } + override Root getRoot() { result.isRootOf(cond) } override string toString() { result = cond + " is " + outcome } @@ -350,4 +353,6 @@ module ControlFlow { } } +class ControlFlowNode = ControlFlow::Node; + class Write = ControlFlow::WriteNode; diff --git a/go/ql/lib/semmle/go/dataflow/ExternalFlow.qll b/go/ql/lib/semmle/go/dataflow/ExternalFlow.qll index 7467d6c1d6c0..388921224ad8 100644 --- a/go/ql/lib/semmle/go/dataflow/ExternalFlow.qll +++ b/go/ql/lib/semmle/go/dataflow/ExternalFlow.qll @@ -153,7 +153,10 @@ module ModelValidation { not part = "" and not (part = "Argument" and pred = "sink") and not parseArg(part, _) and - not part.getName() = "Field" + // If the database does not contain any fields/pointer types then no + // FieldContent/PointerContent exists, so we spuriously think that + // these spec components are invalid. + not part.getName() = ["Field", "Dereference"] or part = input.getToken(0) and parseParam(part, _) @@ -176,7 +179,10 @@ module ModelValidation { invalidSpecComponent(output, part) and not part = "" and not (part = ["Argument", "Parameter"] and pred = "source") and - not part.getName() = "Field" + // If the database does not contain any fields/pointer types then no + // FieldContent/PointerContent exists, so we spuriously think that + // these spec components are invalid. + not part.getName() = ["Field", "Dereference"] or invalidIndexComponent(output, part) ) and diff --git a/go/ql/lib/semmle/go/dataflow/SSA.qll b/go/ql/lib/semmle/go/dataflow/SSA.qll index 98dae5f3d014..69fffa393c19 100644 --- a/go/ql/lib/semmle/go/dataflow/SSA.qll +++ b/go/ql/lib/semmle/go/dataflow/SSA.qll @@ -144,7 +144,7 @@ class SsaDefinition extends TSsaDefinition { abstract string prettyPrintRef(); /** Gets the innermost function or file to which this SSA definition belongs. */ - ControlFlow::Root getRoot() { result = this.getBasicBlock().getRoot() } + ControlFlow::Root getRoot() { result = this.getBasicBlock().getScope() } /** Gets a textual representation of this element. */ string toString() { result = this.prettyPrintDef() } @@ -285,7 +285,7 @@ abstract class SsaPseudoDefinition extends SsaImplicitDefinition { */ class SsaPhiNode extends SsaPseudoDefinition, TPhi { override SsaVariable getAnInput() { - result = getDefReachingEndOf(this.getBasicBlock().getAPredecessor(), this.getSourceVariable()) + result = getDefReachingEndOf(this.getBasicBlock().getAPredecessor(_), this.getSourceVariable()) } override predicate definesAt(ReachableBasicBlock bb, int i, SsaSourceVariable v) { diff --git a/go/ql/lib/semmle/go/dataflow/SsaImpl.qll b/go/ql/lib/semmle/go/dataflow/SsaImpl.qll index 8549d9b497ad..026c8114f9fb 100644 --- a/go/ql/lib/semmle/go/dataflow/SsaImpl.qll +++ b/go/ql/lib/semmle/go/dataflow/SsaImpl.qll @@ -71,7 +71,7 @@ private module Internal { private predicate inDefDominanceFrontier(ReachableJoinBlock bb, SsaSourceVariable v) { exists(ReachableBasicBlock defbb, SsaDefinition def | def.definesAt(defbb, _, v) and - bb.inDominanceFrontierOf(defbb) + defbb.inDominanceFrontier(bb) ) } @@ -86,7 +86,7 @@ private module Internal { /** Holds if the `i`th node of `bb` in function `f` is an entry node. */ private predicate entryNode(FuncDef f, ReachableBasicBlock bb, int i) { - f = bb.getRoot() and + f = bb.getScope() and bb.getNode(i).isEntryNode() } @@ -94,7 +94,7 @@ private module Internal { * Holds if the `i`th node of `bb` in function `f` is a function call. */ private predicate callNode(FuncDef f, ReachableBasicBlock bb, int i) { - f = bb.getRoot() and + f = bb.getScope() and bb.getNode(i).(IR::EvalInstruction).getExpr() instanceof CallExpr } @@ -186,7 +186,7 @@ private module Internal { * Holds if `v` is live at the beginning of any successor of basic block `bb`. */ private predicate liveAtSuccEntry(ReachableBasicBlock bb, SsaSourceVariable v) { - liveAtEntry(bb.getASuccessor(), v) + liveAtEntry(bb.getASuccessor(_), v) } /** @@ -317,7 +317,7 @@ private module Internal { SsaSourceVariable v, ReachableBasicBlock b1, ReachableBasicBlock b2 ) { varOccursInBlock(v, b1) and - b2 = b1.getASuccessor() + b2 = b1.getASuccessor(_) } /** @@ -335,7 +335,7 @@ private module Internal { ) { varBlockReaches(v, b1, mid) and not varOccursInBlock(v, mid) and - b2 = mid.getASuccessor() + b2 = mid.getASuccessor(_) } /** diff --git a/go/ql/src/CHANGELOG.md b/go/ql/src/CHANGELOG.md index f2475a92207c..95f203839c54 100644 --- a/go/ql/src/CHANGELOG.md +++ b/go/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.5.6 + +No user-facing changes. + ## 1.5.5 No user-facing changes. diff --git a/go/ql/src/Security/CWE-020/IncompleteHostnameRegexp.ql b/go/ql/src/Security/CWE-020/IncompleteHostnameRegexp.ql index f6e3df7d1d91..a6321b7d7cb3 100644 --- a/go/ql/src/Security/CWE-020/IncompleteHostnameRegexp.ql +++ b/go/ql/src/Security/CWE-020/IncompleteHostnameRegexp.ql @@ -45,7 +45,7 @@ predicate writesHttpError(ReachableBasicBlock b) { predicate onlyErrors(BasicBlock block) { writesHttpError(block) or - forex(ReachableBasicBlock pred | pred = block.getAPredecessor() | onlyErrors(pred)) + forex(ReachableBasicBlock pred | pred = block.getAPredecessor(_) | onlyErrors(pred)) } /** Gets a node that refers to a handler that is considered to return an HTTP error. */ diff --git a/go/ql/src/change-notes/released/1.5.6.md b/go/ql/src/change-notes/released/1.5.6.md new file mode 100644 index 000000000000..17fb577dc9e3 --- /dev/null +++ b/go/ql/src/change-notes/released/1.5.6.md @@ -0,0 +1,3 @@ +## 1.5.6 + +No user-facing changes. diff --git a/go/ql/src/codeql-pack.release.yml b/go/ql/src/codeql-pack.release.yml index 1c73e9d9ce9e..9a0b3c9461b0 100644 --- a/go/ql/src/codeql-pack.release.yml +++ b/go/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.5.5 +lastReleaseVersion: 1.5.6 diff --git a/go/ql/src/qlpack.yml b/go/ql/src/qlpack.yml index 20e25202476b..bbac3ffc2124 100644 --- a/go/ql/src/qlpack.yml +++ b/go/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-queries -version: 1.5.5 +version: 1.5.7-dev groups: - go - queries diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/go.mod b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/go.mod index f5b1162fa7a7..d5f2af3e7879 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/go.mod +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/go.mod @@ -1,5 +1,5 @@ module semmle.go.Packages -go 1.13 +go 1.26 require github.com/nonexistent/test v0.0.0-20200203000000-0000000000000 diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/sinks.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/sinks.expected index b39135f827e3..e5966200370e 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/sinks.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/sinks.expected @@ -44,4 +44,6 @@ invalidModelRow | test.go:199:23:199:26 | arg2 | qltest | | test.go:199:29:199:32 | arg3 | qltest | | test.go:202:22:202:25 | temp | qltest | -| test.go:206:10:206:12 | src | qltest | +| test.go:204:10:204:17 | call to new | qltest | +| test.go:205:10:205:18 | star expression | qltest | +| test.go:209:10:209:12 | src | qltest | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/srcs.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/srcs.expected index f99ee92a4928..e04fcf753095 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/srcs.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/srcs.expected @@ -22,4 +22,4 @@ invalidModelRow | test.go:187:24:187:31 | call to Src1 | qltest | | test.go:191:24:191:31 | call to Src1 | qltest | | test.go:201:10:201:28 | selection of SourceVariable | qltest | -| test.go:205:15:205:17 | definition of src | qltest | +| test.go:208:15:208:17 | definition of src | qltest | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/test.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/test.go index c9d732e74002..d244bc676aab 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/test.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow/test.go @@ -200,6 +200,9 @@ func simpleflow() { temp := test.SourceVariable test.SinkVariable = temp // $ hasTaintFlow="temp" + + b.Sink1(new(src)) // $ hasTaintFlow="call to new" + b.Sink1(*new(src)) // $ hasTaintFlow="star expression" } func srcParam(src string, b test.B) { diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/go.mod b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/go.mod index 57813acac558..d5f2af3e7879 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/go.mod +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/go.mod @@ -1,5 +1,5 @@ module semmle.go.Packages -go 1.21 +go 1.26 require github.com/nonexistent/test v0.0.0-20200203000000-0000000000000 diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.expected index e7421a9ad147..f3fef94dfa6e 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/sinks.expected @@ -50,4 +50,6 @@ invalidModelRow | test.go:206:10:206:26 | call to min | qltest | | test.go:207:10:207:26 | call to min | qltest | | test.go:210:22:210:25 | temp | qltest | -| test.go:214:10:214:12 | src | qltest | +| test.go:212:10:212:17 | call to new | qltest | +| test.go:213:10:213:18 | star expression | qltest | +| test.go:217:10:217:12 | src | qltest | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.expected b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.expected index 009238baa4d8..f5768d49d1b5 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.expected +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/srcs.expected @@ -22,4 +22,4 @@ invalidModelRow | test.go:187:24:187:31 | call to Src1 | qltest | | test.go:191:24:191:31 | call to Src1 | qltest | | test.go:209:10:209:28 | selection of SourceVariable | qltest | -| test.go:213:15:213:17 | definition of src | qltest | +| test.go:216:15:216:17 | definition of src | qltest | diff --git a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/test.go b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/test.go index 3c172e6082d2..4e4b0527787c 100644 --- a/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/test.go +++ b/go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow/test.go @@ -208,6 +208,9 @@ func simpleflow() { temp := test.SourceVariable test.SinkVariable = temp // $ hasValueFlow="temp" + + b.Sink1(new(src)) + b.Sink1(*new(src)) // $ hasValueFlow="star expression" } func srcParam(src string, b test.B) { diff --git a/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/Builtin.go b/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/Builtin.go new file mode 100644 index 000000000000..f83dfa4ee23f --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/Builtin.go @@ -0,0 +1,116 @@ +package main + +// Also tested in go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow +// and go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow. + +func TaintStepTest_Append1(sourceCQL interface{}) interface{} { + from := sourceCQL.([]byte) + var intoInterface interface{} + intoInterface = append(from, "a string"...) + return intoInterface +} + +func TaintStepTest_Append2(sourceCQL interface{}) interface{} { + from := sourceCQL.(int) + slice := []int{from} + var intoInterface []int + intoInterface = append(slice, 0) + return intoInterface[0] +} + +func TaintStepTest_Append3(sourceCQL interface{}) interface{} { + from := sourceCQL.(string) + var intoInterface interface{} + intoInterface = append([]byte{}, from...) + return intoInterface +} + +func TaintStepTest_Append4(sourceCQL interface{}) interface{} { + from := sourceCQL.(int) + var intoInterface []int + intoInterface = append([]int{}, 0, from, 1) + return intoInterface[0] +} + +func TaintStepTest_Copy1(sourceCQL interface{}) interface{} { + from := sourceCQL.(string) + var intoInterface []byte + copy(intoInterface, from) + return intoInterface +} + +func TaintStepTest_Copy2(sourceCQL interface{}) interface{} { + from := []int{sourceCQL.(int)} + var intoInterface []int + copy(intoInterface, from) + return intoInterface[0] +} + +func TaintStepTest_Max(sourceCQL interface{}) interface{} { + from := sourceCQL.(int) + var intoInterface int + intoInterface = max(0, 1, from, 2, 3) + return intoInterface +} + +func TaintStepTest_Min(sourceCQL interface{}) interface{} { + from := sourceCQL.(int) + var intoInterface int + intoInterface = min(0, 1, from, 2, 3) + return intoInterface +} + +func TaintStepTest_New(sourceCQL interface{}) interface{} { + from := sourceCQL.(int) + var intoInterface *int + intoInterface = new(from) + return *intoInterface +} + +func RunAllTaints_Builtin() { + { + source := newSource(0) + out := TaintStepTest_Append1(source) + sink(0, out) + } + { + source := newSource(1) + out := TaintStepTest_Append2(source) + sink(1, out) + } + { + source := newSource(2) + out := TaintStepTest_Append3(source) + sink(2, out) + } + { + source := newSource(3) + out := TaintStepTest_Append4(source) + sink(3, out) + } + { + source := newSource(4) + out := TaintStepTest_Copy1(source) + sink(4, out) + } + { + source := newSource(5) + out := TaintStepTest_Copy2(source) + sink(5, out) + } + { + source := newSource(3) + out := TaintStepTest_Max(source) + sink(3, out) + } + { + source := newSource(4) + out := TaintStepTest_Min(source) + sink(4, out) + } + { + source := newSource(5) + out := TaintStepTest_New(source) + sink(5, out) + } +} diff --git a/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/Bytes.go b/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/Bytes.go index 8e31c32aba4f..ac528c46267d 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/Bytes.go +++ b/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/Bytes.go @@ -349,6 +349,12 @@ func TaintStepTest_CutSuffix(sourceCQL interface{}) interface{} { return result } +func TaintStepTest_BytesBufferPeek(sourceCQL interface{}) interface{} { + fromBuffer := sourceCQL.(bytes.Buffer) + intoByte, _ := fromBuffer.Peek(128) + return intoByte +} + func RunAllTaints_Bytes() { { source := newSource(0) @@ -625,4 +631,9 @@ func RunAllTaints_Bytes() { out := TaintStepTest_Clone(source) sink(54, out) } + { + source := newSource(55) + out := TaintStepTest_BytesBufferPeek(source) + sink(55, out) + } } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/Errors.go b/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/Errors.go index 324f1e36ae70..71b7f9441f81 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/Errors.go +++ b/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/Errors.go @@ -35,6 +35,13 @@ func TaintStepTest_ErrorsJoin2(sourceCQL interface{}) interface{} { return intoError957 } +func TaintStepTest_ErrorsAsType(sourceCQL interface{}) interface{} { + fromError := sourceCQL.(error) + var intoInterface interface{} + intoInterface, _ = errors.AsType[error](fromError) + return intoInterface +} + func RunAllTaints_Errors() { { source := newSource(0) @@ -61,4 +68,9 @@ func RunAllTaints_Errors() { out := TaintStepTest_ErrorsJoin2(source) sink(4, out) } + { + source := newSource(5) + out := TaintStepTest_ErrorsAsType(source) + sink(5, out) + } } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/go.mod b/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/go.mod index 5ba39421f3b8..1a8220297f27 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/go.mod +++ b/go/ql/test/library-tests/semmle/go/frameworks/StdlibTaintFlow/go.mod @@ -1,6 +1,6 @@ module example.com/m -go 1.24 +go 1.26 require ( golang.org/x/net v0.0.0-20201010224723-4f7140c49acb diff --git a/java/kotlin-extractor/dev/wrapper.py b/java/kotlin-extractor/dev/wrapper.py index 7785c623f4fb..8aa5b55ee672 100755 --- a/java/kotlin-extractor/dev/wrapper.py +++ b/java/kotlin-extractor/dev/wrapper.py @@ -27,7 +27,7 @@ import io import os -DEFAULT_VERSION = "2.3.0" +DEFAULT_VERSION = "2.3.10" def options(): diff --git a/java/ql/consistency-queries/CfgConsistency.ql b/java/ql/consistency-queries/CfgConsistency.ql new file mode 100644 index 000000000000..38ed20134d1b --- /dev/null +++ b/java/ql/consistency-queries/CfgConsistency.ql @@ -0,0 +1,2 @@ +import java +import ControlFlow::Consistency diff --git a/java/ql/consistency-queries/UnaryExpr.ql b/java/ql/consistency-queries/UnaryExpr.ql index 29a895eca6a2..f71d51f19d18 100644 --- a/java/ql/consistency-queries/UnaryExpr.ql +++ b/java/ql/consistency-queries/UnaryExpr.ql @@ -2,7 +2,7 @@ import java from UnaryExpr ue where - not exists(ue.getExpr()) + not exists(ue.getOperand()) or exists(Expr e, int i | e.isNthChildOf(ue, i) and i != 0) select ue diff --git a/java/ql/examples/snippets/returnstatement.ql b/java/ql/examples/snippets/returnstatement.ql index 14270dc87c20..f2b6c601fb56 100644 --- a/java/ql/examples/snippets/returnstatement.ql +++ b/java/ql/examples/snippets/returnstatement.ql @@ -10,5 +10,5 @@ import java from ReturnStmt r -where r.getResult() instanceof NullLiteral +where r.getExpr() instanceof NullLiteral select r diff --git a/java/ql/examples/snippets/ternaryconditional.ql b/java/ql/examples/snippets/ternaryconditional.ql index bbd82770a16f..867ea024674a 100644 --- a/java/ql/examples/snippets/ternaryconditional.ql +++ b/java/ql/examples/snippets/ternaryconditional.ql @@ -11,7 +11,7 @@ import java from ConditionalExpr e where - e.getTrueExpr().getType() != e.getFalseExpr().getType() and - not e.getTrueExpr().getType() instanceof NullType and - not e.getFalseExpr().getType() instanceof NullType + e.getThen().getType() != e.getElse().getType() and + not e.getThen().getType() instanceof NullType and + not e.getElse().getType() instanceof NullType select e diff --git a/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected index 5ef0ef541962..bbc580f1e48b 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected +++ b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 2.3.10.", + "markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 2.3.20.", "severity": "error", "source": { "extractorName": "java", diff --git a/java/ql/lib/CHANGELOG.md b/java/ql/lib/CHANGELOG.md index f238699b4e5b..fb2908a561ec 100644 --- a/java/ql/lib/CHANGELOG.md +++ b/java/ql/lib/CHANGELOG.md @@ -1,3 +1,24 @@ +## 8.1.0 + +### Deprecated APIs + +* The `UnreachableBlocks.qll` library has been deprecated. +* Renamed the following predicates to increase uniformity across languages. The `getBody` predicate already existed on `LoopStmt`, but is now properly inherited. + - `UnaryExpr.getExpr` to `getOperand`. + - `ConditionalExpr.getTrueExpr` to `getThen`. + - `ConditionalExpr.getFalseExpr` to `getElse`. + - `ReturnStmt.getResult` to `getExpr`. + - `WhileStmt.getStmt` to `getBody`. + - `DoStmt.getStmt` to `getBody`. + - `ForStmt.getStmt` to `getBody`. + - `EnhancedForStmt.getStmt` to `getBody`. + +### Minor Analysis Improvements + +* Using a regular expression to check that a string doesn't contain any line breaks is already a sanitizer for `java/log-injection`. Additional ways of doing the regular expression check are now recognised, including annotation with `@javax.validation.constraints.Pattern`. +* More ways of checking that a string matches a regular expression are now considered as sanitizers for various queries, including `java/ssrf` and `java/path-injection`. In particular, being annotated with `@javax.validation.constraints.Pattern` is now recognised as a sanitizer for those queries. +* Kotlin versions up to 2.3.10 are now supported. + ## 8.0.0 ### Breaking Changes @@ -6,7 +27,7 @@ ### New Features -* Kotlin versions up to 2.3.0*x* are now supported. +* Kotlin versions up to 2.3.0 are now supported. ### Minor Analysis Improvements diff --git a/java/ql/lib/change-notes/2026-02-12-jakarta.md b/java/ql/lib/change-notes/2026-02-12-jakarta.md new file mode 100644 index 000000000000..062e202cb8a5 --- /dev/null +++ b/java/ql/lib/change-notes/2026-02-12-jakarta.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Some modelling which previously only worked for Java EE packages beginning with "javax" will now also work for Java EE packages beginning with "jakarta" as well. This may lead to some alert changes. diff --git a/java/ql/lib/change-notes/2026-02-18-cfg.md b/java/ql/lib/change-notes/2026-02-18-cfg.md new file mode 100644 index 000000000000..27bd381ec0d5 --- /dev/null +++ b/java/ql/lib/change-notes/2026-02-18-cfg.md @@ -0,0 +1,16 @@ +--- +category: breaking +--- +* The Java control flow graph (CFG) implementation has been completely + rewritten. The CFG now includes additional nodes to more accurately represent + certain constructs. This also means that any existing code that implicitly + relies on very specific details about the CFG may need to be updated. + The CFG now only includes the nodes that are reachable from the entry point. + Additionally, the following breaking changes have been made: + - `ControlFlowNode.asCall` has been removed - use `Call.getControlFlowNode` instead. + - `ControlFlowNode.getEnclosingStmt` has been removed. + - `ControlFlow::ExprNode` has been removed. + - `ControlFlow::StmtNode` has been removed. + - `ControlFlow::Node` has been removed - this was merely an alias of + `ControlFlowNode`, which is still available. + - Previously deprecated predicates on `BasicBlock` have been removed. diff --git a/java/ql/lib/change-notes/released/8.1.0.md b/java/ql/lib/change-notes/released/8.1.0.md new file mode 100644 index 000000000000..e560747144d4 --- /dev/null +++ b/java/ql/lib/change-notes/released/8.1.0.md @@ -0,0 +1,20 @@ +## 8.1.0 + +### Deprecated APIs + +* The `UnreachableBlocks.qll` library has been deprecated. +* Renamed the following predicates to increase uniformity across languages. The `getBody` predicate already existed on `LoopStmt`, but is now properly inherited. + - `UnaryExpr.getExpr` to `getOperand`. + - `ConditionalExpr.getTrueExpr` to `getThen`. + - `ConditionalExpr.getFalseExpr` to `getElse`. + - `ReturnStmt.getResult` to `getExpr`. + - `WhileStmt.getStmt` to `getBody`. + - `DoStmt.getStmt` to `getBody`. + - `ForStmt.getStmt` to `getBody`. + - `EnhancedForStmt.getStmt` to `getBody`. + +### Minor Analysis Improvements + +* Using a regular expression to check that a string doesn't contain any line breaks is already a sanitizer for `java/log-injection`. Additional ways of doing the regular expression check are now recognised, including annotation with `@javax.validation.constraints.Pattern`. +* More ways of checking that a string matches a regular expression are now considered as sanitizers for various queries, including `java/ssrf` and `java/path-injection`. In particular, being annotated with `@javax.validation.constraints.Pattern` is now recognised as a sanitizer for those queries. +* Kotlin versions up to 2.3.10 are now supported. diff --git a/java/ql/lib/codeql-pack.release.yml b/java/ql/lib/codeql-pack.release.yml index 0f48687270dc..59984961848d 100644 --- a/java/ql/lib/codeql-pack.release.yml +++ b/java/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 8.0.0 +lastReleaseVersion: 8.1.0 diff --git a/java/ql/lib/experimental/quantum/JCA.qll b/java/ql/lib/experimental/quantum/JCA.qll index b1b536a3ccb6..feac5aaf0ea3 100644 --- a/java/ql/lib/experimental/quantum/JCA.qll +++ b/java/ql/lib/experimental/quantum/JCA.qll @@ -295,7 +295,7 @@ module JCAModel { class CipherGetInstanceCall extends MethodCall { CipherGetInstanceCall() { - this.getCallee().hasQualifiedName("javax.crypto", "Cipher", "getInstance") + this.getCallee().hasQualifiedName(javaxOrJakarta() + ".crypto", "Cipher", "getInstance") } Expr getAlgorithmArg() { result = this.getArgument(0) } @@ -307,7 +307,8 @@ module JCAModel { private class CipherOperationCall extends MethodCall { CipherOperationCall() { this.getMethod() - .hasQualifiedName("javax.crypto", "Cipher", ["update", "doFinal", "wrap", "unwrap"]) + .hasQualifiedName(javaxOrJakarta() + ".crypto", "Cipher", + ["update", "doFinal", "wrap", "unwrap"]) } predicate isIntermediate() { this.getMethod().getName() = "update" } @@ -474,7 +475,9 @@ module JCAModel { * An access to the `javax.crypto.Cipher` class. */ private class CipherAccess extends TypeAccess { - CipherAccess() { this.getType().(Class).hasQualifiedName("javax.crypto", "Cipher") } + CipherAccess() { + this.getType().(Class).hasQualifiedName(javaxOrJakarta() + ".crypto", "Cipher") + } } /** @@ -708,7 +711,9 @@ module JCAModel { // and through setter methods class IvParameterSpecInstance extends NonceParameterInstantiation { IvParameterSpecInstance() { - super.getConstructedType().hasQualifiedName("javax.crypto.spec", "IvParameterSpec") + super + .getConstructedType() + .hasQualifiedName(javaxOrJakarta() + ".crypto.spec", "IvParameterSpec") } override DataFlow::Node getInputNode() { result.asExpr() = super.getArgument(0) } @@ -717,7 +722,9 @@ module JCAModel { // TODO: this also specifies the tag length for GCM class GCMParameterSpecInstance extends NonceParameterInstantiation { GCMParameterSpecInstance() { - super.getConstructedType().hasQualifiedName("javax.crypto.spec", "GCMParameterSpec") + super + .getConstructedType() + .hasQualifiedName(javaxOrJakarta() + ".crypto.spec", "GCMParameterSpec") } override DataFlow::Node getInputNode() { result.asExpr() = super.getArgument(1) } @@ -725,7 +732,8 @@ module JCAModel { class IvParameterSpecGetIvCall extends MethodCall { IvParameterSpecGetIvCall() { - this.getMethod().hasQualifiedName("javax.crypto.spec", "IvParameterSpec", "getIV") + this.getMethod() + .hasQualifiedName(javaxOrJakarta() + ".crypto.spec", "IvParameterSpec", "getIV") } } @@ -797,7 +805,9 @@ module JCAModel { } class CipherInitCall extends MethodCall { - CipherInitCall() { this.getCallee().hasQualifiedName("javax.crypto", "Cipher", "init") } + CipherInitCall() { + this.getCallee().hasQualifiedName(javaxOrJakarta() + ".crypto", "Cipher", "init") + } /** * Returns the mode argument to the `init` method @@ -966,7 +976,9 @@ module JCAModel { class DHGenParameterSpecInstance extends KeyGeneratorParameterSpecClassInstanceExpr { DHGenParameterSpecInstance() { - super.getConstructedType().hasQualifiedName("javax.crypto.spec", "DHGenParameterSpec") + super + .getConstructedType() + .hasQualifiedName(javaxOrJakarta() + ".crypto.spec", "DHGenParameterSpec") } Expr getPrimeSizeArg() { result = this.getArgument(0) } @@ -1067,7 +1079,7 @@ module JCAModel { //TODO: Link getAlgorithm from KeyPairGenerator to algorithm instances or AVCs? High priority. class KeyGeneratorGetInstanceCall extends MethodCall { KeyGeneratorGetInstanceCall() { - this.getCallee().hasQualifiedName("javax.crypto", "KeyGenerator", "getInstance") + this.getCallee().hasQualifiedName(javaxOrJakarta() + ".crypto", "KeyGenerator", "getInstance") or this.getCallee().hasQualifiedName("java.security", "KeyPairGenerator", "getInstance") } @@ -1082,7 +1094,8 @@ module JCAModel { this.getCallee().hasQualifiedName("java.security", "KeyPairGenerator", "initialize") and keyType = Crypto::TAsymmetricKeyType() or - this.getCallee().hasQualifiedName("javax.crypto", "KeyGenerator", ["init", "initialize"]) and + this.getCallee() + .hasQualifiedName(javaxOrJakarta() + ".crypto", "KeyGenerator", ["init", "initialize"]) and keyType = Crypto::TSymmetricKeyType() } @@ -1111,7 +1124,7 @@ module JCAModel { Crypto::KeyArtifactType type; KeyGeneratorGenerateCall() { - this.getCallee().hasQualifiedName("javax.crypto", "KeyGenerator", "generateKey") and + this.getCallee().hasQualifiedName(javaxOrJakarta() + ".crypto", "KeyGenerator", "generateKey") and type instanceof Crypto::TSymmetricKeyType or this.getCallee() @@ -1176,7 +1189,7 @@ module JCAModel { class KeySpecInstantiation extends ClassInstanceExpr { KeySpecInstantiation() { this.getConstructedType() - .hasQualifiedName("javax.crypto.spec", + .hasQualifiedName(javaxOrJakarta() + ".crypto.spec", ["PBEKeySpec", "SecretKeySpec", "PBEKeySpec", "DESedeKeySpec"]) } @@ -1227,7 +1240,8 @@ module JCAModel { class SecretKeyFactoryGetInstanceCall extends MethodCall { SecretKeyFactoryGetInstanceCall() { - this.getCallee().hasQualifiedName("javax.crypto", "SecretKeyFactory", "getInstance") + this.getCallee() + .hasQualifiedName(javaxOrJakarta() + ".crypto", "SecretKeyFactory", "getInstance") } Expr getAlgorithmArg() { result = this.getArgument(0) } @@ -1235,7 +1249,8 @@ module JCAModel { class SecretKeyFactoryGenerateSecretCall extends MethodCall { SecretKeyFactoryGenerateSecretCall() { - this.getCallee().hasQualifiedName("javax.crypto", "SecretKeyFactory", "generateSecret") + this.getCallee() + .hasQualifiedName(javaxOrJakarta() + ".crypto", "SecretKeyFactory", "generateSecret") } Expr getKeySpecArg() { result = this.getArgument(0) } @@ -1430,7 +1445,7 @@ module JCAModel { class KeyAgreementInitCall extends MethodCall { KeyAgreementInitCall() { - this.getCallee().hasQualifiedName("javax.crypto", "KeyAgreement", "init") + this.getCallee().hasQualifiedName(javaxOrJakarta() + ".crypto", "KeyAgreement", "init") } Expr getServerKeyArg() { result = this.getArgument(0) } @@ -1438,7 +1453,7 @@ module JCAModel { class KeyAgreementGetInstanceCall extends MethodCall { KeyAgreementGetInstanceCall() { - this.getCallee().hasQualifiedName("javax.crypto", "KeyAgreement", "getInstance") + this.getCallee().hasQualifiedName(javaxOrJakarta() + ".crypto", "KeyAgreement", "getInstance") } Expr getAlgorithmArg() { result = super.getArgument(0) } @@ -1482,7 +1497,8 @@ module JCAModel { class KeyAgreementCall extends MethodCall { KeyAgreementCall() { this.getCallee() - .hasQualifiedName("javax.crypto", "KeyAgreement", ["generateSecret", "doPhase"]) + .hasQualifiedName(javaxOrJakarta() + ".crypto", "KeyAgreement", + ["generateSecret", "doPhase"]) } predicate isIntermediate() { this.getCallee().getName() = "doPhase" } @@ -1647,7 +1663,9 @@ module JCAModel { } class MacGetInstanceCall extends MethodCall { - MacGetInstanceCall() { this.getCallee().hasQualifiedName("javax.crypto", "Mac", "getInstance") } + MacGetInstanceCall() { + this.getCallee().hasQualifiedName(javaxOrJakarta() + ".crypto", "Mac", "getInstance") + } Expr getAlgorithmArg() { result = this.getArgument(0) } @@ -1663,7 +1681,7 @@ module JCAModel { } class MacInitCall extends MethodCall { - MacInitCall() { this.getCallee().hasQualifiedName("javax.crypto", "Mac", "init") } + MacInitCall() { this.getCallee().hasQualifiedName(javaxOrJakarta() + ".crypto", "Mac", "init") } Expr getKeyArg() { result = this.getArgument(0) and this.getMethod().getParameterType(0).hasName("Key") @@ -1691,7 +1709,7 @@ module JCAModel { Expr output; MacOperationCall() { - super.getMethod().getDeclaringType().hasQualifiedName("javax.crypto", "Mac") and + super.getMethod().getDeclaringType().hasQualifiedName(javaxOrJakarta() + ".crypto", "Mac") and ( super.getMethod().hasStringSignature(["doFinal()", "doFinal(byte[])"]) and this = output or diff --git a/java/ql/lib/java.qll b/java/ql/lib/java.qll index 9644343e93b6..7d0f0b7546db 100644 --- a/java/ql/lib/java.qll +++ b/java/ql/lib/java.qll @@ -9,6 +9,7 @@ import semmle.code.Unit import semmle.code.java.Annotation import semmle.code.java.Compilation import semmle.code.java.CompilationUnit +import semmle.code.java.Concepts import semmle.code.java.ControlFlowGraph import semmle.code.java.Dependency import semmle.code.java.Element diff --git a/java/ql/lib/printCfg.ql b/java/ql/lib/printCfg.ql new file mode 100644 index 000000000000..d90c4633de85 --- /dev/null +++ b/java/ql/lib/printCfg.ql @@ -0,0 +1,45 @@ +/** + * @name Print CFG + * @description Produces a representation of a file's Control Flow Graph. + * This query is used by the VS Code extension. + * @id java/print-cfg + * @kind graph + * @tags ide-contextual-queries/print-cfg + */ + +import java + +external string selectedSourceFile(); + +private predicate selectedSourceFileAlias = selectedSourceFile/0; + +external int selectedSourceLine(); + +private predicate selectedSourceLineAlias = selectedSourceLine/0; + +external int selectedSourceColumn(); + +private predicate selectedSourceColumnAlias = selectedSourceColumn/0; + +module ViewCfgQueryInput implements ControlFlow::ViewCfgQueryInputSig { + predicate selectedSourceFile = selectedSourceFileAlias/0; + + predicate selectedSourceLine = selectedSourceLineAlias/0; + + predicate selectedSourceColumn = selectedSourceColumnAlias/0; + + predicate cfgScopeSpan( + Callable callable, File file, int startLine, int startColumn, int endLine, int endColumn + ) { + file = callable.getFile() and + callable.getLocation().getStartLine() = startLine and + callable.getLocation().getStartColumn() = startColumn and + exists(Location loc | + loc.getEndLine() = endLine and + loc.getEndColumn() = endColumn and + loc = callable.getBody().getLocation() + ) + } +} + +import ControlFlow::ViewCfgQuery diff --git a/java/ql/lib/qlpack.yml b/java/ql/lib/qlpack.yml index eb1a7f632c7f..a1737f2d1cbb 100644 --- a/java/ql/lib/qlpack.yml +++ b/java/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-all -version: 8.0.0 +version: 8.1.1-dev groups: java dbscheme: config/semmlecode.dbscheme extractor: java diff --git a/java/ql/lib/semmle/code/java/Completion.qll b/java/ql/lib/semmle/code/java/Completion.qll deleted file mode 100644 index 35d3c83e2ee9..000000000000 --- a/java/ql/lib/semmle/code/java/Completion.qll +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Provides classes and predicates for representing completions. - */ -overlay[local?] -module; - -/* - * A completion represents how a statement or expression terminates. - * - * There are five kinds of completions: normal completion, - * `return` completion, `break` completion, - * `continue` completion, and `throw` completion. - * - * Normal completions are further subdivided into boolean completions and all - * other normal completions. A boolean completion adds the information that the - * cfg node terminated with the given boolean value due to a subexpression - * terminating with the other given boolean value. This is only - * relevant for conditional contexts in which the value controls the - * control-flow successor. - */ - -import java - -/** - * A label of a `LabeledStmt`. - */ -newtype Label = MkLabel(string l) { exists(LabeledStmt lbl | l = lbl.getLabel()) } - -/** - * Either a `Label` or nothing. - */ -newtype MaybeLabel = - JustLabel(Label l) or - NoLabel() - -/** - * A completion of a statement or an expression. - */ -newtype Completion = - /** - * The statement or expression completes normally and continues to the next statement. - */ - NormalCompletion() or - /** - * The statement or expression completes by returning from the function. - */ - ReturnCompletion() or - /** - * The expression completes with value `outerValue` overall and with the last control - * flow node having value `innerValue`. - */ - BooleanCompletion(boolean outerValue, boolean innerValue) { - (outerValue = true or outerValue = false) and - (innerValue = true or innerValue = false) - } or - /** - * The expression or statement completes via a `break` statement. - */ - BreakCompletion(MaybeLabel l) or - /** - * The expression or statement completes via a `yield` statement. - */ - YieldCompletion(NormalOrBooleanCompletion c) or - /** - * The expression or statement completes via a `continue` statement. - */ - ContinueCompletion(MaybeLabel l) or - /** - * The expression or statement completes by throwing a `ThrowableType`. - */ - ThrowCompletion(ThrowableType tt) - -/** A completion that is either a `NormalCompletion` or a `BooleanCompletion`. */ -class NormalOrBooleanCompletion extends Completion { - NormalOrBooleanCompletion() { - this instanceof NormalCompletion or this instanceof BooleanCompletion - } - - /** Gets a textual representation of this completion. */ - string toString() { result = "completion" } -} - -/** Gets the completion `ContinueCompletion(NoLabel())`. */ -ContinueCompletion anonymousContinueCompletion() { result = ContinueCompletion(NoLabel()) } - -/** Gets the completion `ContinueCompletion(JustLabel(l))`. */ -ContinueCompletion labelledContinueCompletion(Label l) { result = ContinueCompletion(JustLabel(l)) } - -/** Gets the completion `BreakCompletion(NoLabel())`. */ -BreakCompletion anonymousBreakCompletion() { result = BreakCompletion(NoLabel()) } - -/** Gets the completion `BreakCompletion(JustLabel(l))`. */ -BreakCompletion labelledBreakCompletion(Label l) { result = BreakCompletion(JustLabel(l)) } - -/** Gets the completion `BooleanCompletion(value, value)`. */ -Completion basicBooleanCompletion(boolean value) { result = BooleanCompletion(value, value) } diff --git a/java/ql/lib/semmle/code/java/Concepts.qll b/java/ql/lib/semmle/code/java/Concepts.qll new file mode 100644 index 000000000000..7ed61223ea83 --- /dev/null +++ b/java/ql/lib/semmle/code/java/Concepts.qll @@ -0,0 +1,75 @@ +/** + * Provides abstract classes representing generic concepts such as file system + * access or system command execution, for which individual framework libraries + * provide concrete subclasses. + */ +overlay[local?] +module; + +import java + +/** + * A module importing the frameworks that implement `RegexMatch`es, + * ensuring that they are visible to the concepts library. + */ +private module Frameworks { + private import semmle.code.java.JDK + private import semmle.code.java.frameworks.JavaxAnnotations +} + +/** + * An expression that represents a regular expression match. + * + * Extend this class to refine existing API models. If you want to model new APIs, + * extend `RegexMatch::Range` instead. + * + * These are either method calls, which return `true` when there is a match, or + * annotations, which are considered to match if they are present. + */ +class RegexMatch extends Expr instanceof RegexMatch::Range { + /** Gets the expression for the regex being executed by this node. */ + Expr getRegex() { result = super.getRegex() } + + /** Gets an expression for the string to be searched or matched against. */ + Expr getString() { result = super.getString() } + + /** Gets an expression to be sanitized. */ + Expr getASanitizedExpr() { result = [this.getString(), super.getAdditionalSanitizedExpr()] } + + /** + * Gets the name of this regex match, typically the name of an executing + * method. This is used for nice alert messages and should include the + * type-qualified name if possible. + */ + string getName() { result = super.getName() } +} + +/** Provides classes for modeling regular-expression execution APIs. */ +module RegexMatch { + /** + * An expression that executes a regular expression. + * + * Extend this class to model new APIs. If you want to refine existing API models, + * extend `RegexMatch` instead. + * + * These are either method calls, which return `true` when there is a match, or + * annotations, which are considered to match if they are present. + */ + abstract class Range extends Expr { + /** Gets the expression for the regex being executed by this node. */ + abstract Expr getRegex(); + + /** Gets an expression for the string to be searched or matched against. */ + abstract Expr getString(); + + /** Gets an additional expression to be sanitized, if any. */ + Expr getAdditionalSanitizedExpr() { none() } + + /** + * Gets the name of this regex match, typically the name of an executing + * method. This is used for nice alert messages and should include the + * type-qualified name if possible. + */ + abstract string getName(); + } +} diff --git a/java/ql/lib/semmle/code/java/Constants.qll b/java/ql/lib/semmle/code/java/Constants.qll index 0cad92b7fc6d..b515eaefb286 100644 --- a/java/ql/lib/semmle/code/java/Constants.qll +++ b/java/ql/lib/semmle/code/java/Constants.qll @@ -22,7 +22,7 @@ module CalculateConstants boolean calculateBooleanValue(Expr e) { // No casts relevant to booleans. // `!` is the only unary operator that evaluates to a boolean. - result = getBoolVal(e.(LogNotExpr).getExpr()).booleanNot() + result = getBoolVal(e.(LogNotExpr).getOperand()).booleanNot() or // Handle binary expressions that have integer operands and a boolean result. exists(BinaryExpr b, int left, int right | @@ -115,11 +115,11 @@ module CalculateConstants else result = val ) or - result = getIntVal(e.(PlusExpr).getExpr()) + result = getIntVal(e.(PlusExpr).getOperand()) or - result = -getIntVal(e.(MinusExpr).getExpr()) + result = -getIntVal(e.(MinusExpr).getOperand()) or - result = getIntVal(e.(BitNotExpr).getExpr()).bitNot() + result = getIntVal(e.(BitNotExpr).getOperand()).bitNot() or // No `int` value for `LogNotExpr`. exists(BinaryExpr b, int v1, int v2 | diff --git a/java/ql/lib/semmle/code/java/ControlFlowGraph.qll b/java/ql/lib/semmle/code/java/ControlFlowGraph.qll index a31101888da3..d6e675c8ab9b 100644 --- a/java/ql/lib/semmle/code/java/ControlFlowGraph.qll +++ b/java/ql/lib/semmle/code/java/ControlFlowGraph.qll @@ -1,543 +1,355 @@ /** - * Provides classes and predicates for computing expression-level intra-procedural control flow graphs. - * - * The only API exported by this library are the toplevel classes `ControlFlow::Node` - * and its subclass `ConditionNode`, which wrap the successor relation and the - * concept of true- and false-successors of conditions. A cfg node may either be a - * statement, an expression, or an exit node for a callable, indicating that - * execution of the callable terminates. + * Provides classes representing the control flow graph within callables. */ overlay[local?] module; -/* - * The implementation is centered around the concept of a _completion_, which - * models how the execution of a statement or expression terminates. - * Completions are represented as an algebraic data type `Completion` defined in - * `Completion.qll`. - * - * The CFG is built by structural recursion over the AST. To achieve this the - * CFG edges related to a given AST node, `n`, is divided into three categories: - * 1. The in-going edge that points to the first CFG node to execute when the - * `n` is going to be executed. - * 2. The out-going edges for control-flow leaving `n` that are going to some - * other node in the surrounding context of `n`. - * 3. The edges that have both of their end-points entirely within the AST - * node and its children. - * The edges in (1) and (2) are inherently non-local and are therefore - * initially calculated as half-edges, that is, the single node, `k`, of the - * edge contained within `n`, by the predicates `k = first(n)` and - * `last(n, k, _)`, respectively. The edges in (3) can then be enumerated - * directly by the predicate `succ` by calling `first` and `last` recursively - * on the children of `n` and connecting the end-points. This yields the entire - * CFG, since all edges are in (3) for _some_ AST node. - * - * The third parameter of `last` is the completion, which is necessary to - * distinguish the out-going edges from `n`. Note that the completion changes - * as the calculation of `last` proceeds outward through the AST; for example, - * a `breakCompletion` is caught up by its surrounding loop and turned into a - * `normalCompletion`, or a `normalCompletion` proceeds outward through the end - * of a `finally` block and is turned into whatever completion was caught by - * the `finally`, or a `booleanCompletion(false, _)` occurs in a loop condition - * and is turned into a `normalCompletion` of the entire loop. When the edge is - * eventually connected we use the completion at that level of the AST as the - * label of the edge, thus creating an edge-labelled CFG. - * - * An important goal of the CFG is to get the order of side-effects correct. - * Most expressions can have side-effects and must therefore be modeled in the - * CFG in AST post-order. For example, a `MethodCall` evaluates its arguments - * before the call. Most statements don't have side-effects, but merely affect - * the control-flow and some could therefore be excluded from the CFG. However, - * as a design choice, all statements are included in the CFG and generally - * serve as their own entry-points, thus executing in some version of AST - * pre-order. A few notable exceptions are `ReturnStmt`, `ThrowStmt`, - * `SynchronizedStmt`, `ThisConstructorInvocationStmt`, and - * `SuperConstructorInvocationStmt`, which all have side-effects and therefore - * are modeled in side-effect order. Loop statement nodes are only passed on - * entry, after which control goes back and forth between body and loop - * condition. - * - * Some out-going edges from boolean expressions have a known value and in some - * contexts this affects the possible successors. For example, in `if(A || B)` - * a short-circuit edge that skips `B` must be true and can therefore only lead - * to the then-branch. If the `||` is modeled in post-order then this - * information is lost, and consequently it is better to model `||` and `&&` in - * pre-order. The conditional expression `? :` is also modeled in pre-order to - * achieve consistent CFGs for the equivalent `A && B` and `A ? B : false`. - * Finally, the logical negation is also modeled in pre-order to achieve - * consistent CFGs for the equivalent `!(A || B)` and `!A && !B`. The boolean - * value `b` is tracked with the completion `booleanCompletion(b, _)`. - * - * Note that the second parameter in a `booleanCompletion` isn't needed to - * calculate the CFG. It is, however, needed to track the value of the - * sub-expression. For example, this ensures that the false-successor of the - * `ConditionNode` `A` in `if(!(A && B))` can be correctly identified as the - * then-branch (even though this completion turns into a - * `booleanCompletion(true, _)` from the perspective of the `if`-node). - * - * As a final note, expressions that aren't actually executed in the usual - * sense are excluded from the CFG. This covers, for example, parentheses, - * l-values that aren't r-values as well, and expressions in `ConstCase`s. - * For example, the `x` in `x=3` is not in the CFG, but the `x` in `x+=3` is. - */ - import java +private import codeql.controlflow.ControlFlowGraph private import codeql.controlflow.SuccessorType -private import codeql.util.Boolean -private import Completion private import controlflow.internal.Preconditions -private import controlflow.internal.SwitchCases - -/** Provides the definition of control flow nodes. */ -module ControlFlow { - private predicate hasControlFlow(Expr e) { - not exists(ConstCase cc | e = cc.getValue(_)) and - not e.getParent*() instanceof Annotation and - not e instanceof TypeAccess and - not e instanceof ArrayTypeAccess and - not e instanceof UnionTypeAccess and - not e instanceof IntersectionTypeAccess and - not e instanceof WildcardTypeAccess and - not exists(AssignExpr ae | ae.getDest() = e) - } - private newtype TNode = - TExprNode(Expr e) { hasControlFlow(e) } or - TStmtNode(Stmt s) or - TAnnotatedExitNode(Callable c, Boolean normal) { exists(c.getBody()) } or - TExitNode(Callable c) { exists(c.getBody()) } or - TAssertThrowNode(AssertStmt s) +private module Cfg0 = Make0; - /** A node in the expression-level control-flow graph. */ - class Node extends TNode { - /** Gets an immediate successor of this node. */ - Node getASuccessor() { result = succ(this) } +private module Cfg1 = Make1; - /** Gets an immediate predecessor of this node. */ - Node getAPredecessor() { this = succ(result) } +private module Cfg2 = Make2; - /** Gets an exception successor of this node. */ - Node getAnExceptionSuccessor() { result = succ(this, ThrowCompletion(_)) } +private import Cfg0 +private import Cfg1 +private import Cfg2 +import Public - /** Gets a successor of this node that is neither an exception successor nor a jump (break, continue, return). */ - Node getANormalSuccessor() { - result = succ(this, BooleanCompletion(_, _)) or - result = succ(this, NormalCompletion()) - } +/** Provides an implementation of the AST signature for Java. */ +private module Ast implements AstSig { + private import java as J - /** Gets an immediate successor of this node of a given type, if any. */ - Node getASuccessor(SuccessorType t) { - result = branchSuccessor(this, t.(BooleanSuccessor).getValue()) - or - exists(Completion completion | - result = succ(this, completion) and - not result = branchSuccessor(this, _) - | - completion = NormalCompletion() and t instanceof DirectSuccessor - or - completion = ReturnCompletion() and t instanceof ReturnSuccessor - or - completion = BreakCompletion(_) and t instanceof BreakSuccessor - or - completion = YieldCompletion(_) and t instanceof BreakSuccessor - or - completion = ContinueCompletion(_) and t instanceof ContinueSuccessor - or - completion = ThrowCompletion(_) and t instanceof ExceptionSuccessor - ) - } + class AstNode = ExprParent; - /** Gets the basic block that contains this node. */ - BasicBlock getBasicBlock() { result.getANode() = this } + private predicate skipControlFlow(AstNode e) { + e.(Expr).getParent*() instanceof Annotation or + e instanceof TypeAccess or + e instanceof ArrayTypeAccess or + e instanceof UnionTypeAccess or + e instanceof IntersectionTypeAccess or + e instanceof WildcardTypeAccess or + // Switch cases of the form `case e1 -> e2;` skip the ExprStmt and treat + // the right-hand side as an expression. See `SwitchCase.getRuleExpression()`. + any(SwitchCase sc).getRuleExpression() = e.(J::ExprStmt).getExpr() + } - /** Gets the statement containing this node, if any. */ - Stmt getEnclosingStmt() { none() } + AstNode getChild(AstNode n, int index) { + not skipControlFlow(result) and + not skipControlFlow(n) and + result.(Expr).isNthChildOf(n, index) + or + result.(Stmt).isNthChildOf(n, index) + or + result = n.(SwitchCase).getRuleExpression() and index = -1 + } - /** Gets the immediately enclosing callable whose body contains this node. */ - Callable getEnclosingCallable() { none() } + Callable getEnclosingCallable(AstNode node) { + result = node.(Expr).getEnclosingCallable() or + result = node.(Stmt).getEnclosingCallable() + } - /** Gets the statement this `Node` corresponds to, if any. */ - Stmt asStmt() { this = TStmtNode(result) } + class Callable = J::Callable; - /** Gets the expression this `Node` corresponds to, if any. */ - Expr asExpr() { this = TExprNode(result) } + AstNode callableGetBody(Callable c) { result = c.getBody() } - /** Gets the call this `Node` corresponds to, if any. */ - Call asCall() { - result = this.asExpr() or - result = this.asStmt() - } + class Stmt = J::Stmt; - /** Gets a textual representation of this element. */ - string toString() { none() } + class Expr = J::Expr; - /** Gets the source location for this element. */ - Location getLocation() { none() } + class BlockStmt = J::BlockStmt; - /** - * Gets the most appropriate AST node for this control flow node, if any. - */ - ExprParent getAstNode() { none() } + class ExprStmt extends J::ExprStmt { + ExprStmt() { not skipControlFlow(this) } } - /** A control-flow node that represents the evaluation of an expression. */ - class ExprNode extends Node, TExprNode { - Expr e; + class IfStmt = J::IfStmt; + + class LoopStmt = J::LoopStmt; + + class WhileStmt = J::WhileStmt; - ExprNode() { this = TExprNode(e) } + class DoStmt = J::DoStmt; - override Stmt getEnclosingStmt() { result = e.getEnclosingStmt() } + class ForStmt = J::ForStmt; - override Callable getEnclosingCallable() { result = e.getEnclosingCallable() } + final private class FinalEnhancedForStmt = J::EnhancedForStmt; - override ExprParent getAstNode() { result = e } + class ForeachStmt extends FinalEnhancedForStmt { + Expr getVariable() { result = super.getVariable() } - /** Gets a textual representation of this element. */ - override string toString() { result = e.toString() } + Expr getCollection() { result = super.getExpr() } + } - /** Gets the source location for this element. */ - override Location getLocation() { result = e.getLocation() } + class BreakStmt extends Stmt { + BreakStmt() { this instanceof J::BreakStmt or this instanceof YieldStmt } } - /** A control-flow node that represents a statement. */ - class StmtNode extends Node, TStmtNode { - Stmt s; + class ContinueStmt = J::ContinueStmt; - StmtNode() { this = TStmtNode(s) } + class ReturnStmt = J::ReturnStmt; - override Stmt getEnclosingStmt() { result = s } + class ThrowStmt = J::ThrowStmt; - override Callable getEnclosingCallable() { result = s.getEnclosingCallable() } + final private class FinalTryStmt = J::TryStmt; - override ExprParent getAstNode() { result = s } + class TryStmt extends FinalTryStmt { + Stmt getBody() { result = super.getBlock() } - override string toString() { result = s.toString() } + CatchClause getCatch(int index) { result = super.getCatchClause(index) } - override Location getLocation() { result = s.getLocation() } + Stmt getFinally() { result = super.getFinally() } } - /** A control flow node indicating the normal or exceptional termination of a callable. */ - class AnnotatedExitNode extends Node, TAnnotatedExitNode { - Callable c; - boolean normal; + AstNode getTryInit(TryStmt try, int index) { result = try.getResource(index) } - AnnotatedExitNode() { this = TAnnotatedExitNode(c, normal) } + final private class FinalCatchClause = J::CatchClause; - override Callable getEnclosingCallable() { result = c } + class CatchClause extends FinalCatchClause { + AstNode getVariable() { result = super.getVariable() } - override ExprParent getAstNode() { result = c } + Expr getCondition() { none() } - /** Gets a textual representation of this element. */ - override string toString() { - normal = true and result = "Normal Exit" - or - normal = false and result = "Exceptional Exit" + Stmt getBody() { result = super.getBlock() } + } + + class Switch extends AstNode { + Switch() { + this instanceof SwitchStmt or + this instanceof SwitchExpr } - /** Gets the source location for this element. */ - override Location getLocation() { result = c.getLocation() } - } + Expr getExpr() { + result = this.(SwitchStmt).getExpr() or + result = this.(SwitchExpr).getExpr() + } - /** A control flow node indicating normal termination of a callable. */ - class NormalExitNode extends AnnotatedExitNode { - NormalExitNode() { this = TAnnotatedExitNode(_, true) } + Case getCase(int index) { + result = this.(SwitchStmt).getCase(index) or + result = this.(SwitchExpr).getCase(index) + } } - /** A control flow node indicating exceptional termination of a callable. */ - class ExceptionalExitNode extends AnnotatedExitNode { - ExceptionalExitNode() { this = TAnnotatedExitNode(_, false) } + int getCaseControlFlowOrder(Switch s, Case c) { + exists(int pos | s.getCase(pos) = c | + // if a default case is not last in the AST, move it last in the CFG order + if c instanceof DefaultCase and exists(s.getCase(pos + 1)) + then result = strictcount(s.getCase(_)) + else result = pos + ) } - /** A control flow node indicating the termination of a callable. */ - class ExitNode extends Node, TExitNode { - Callable c; - - ExitNode() { this = TExitNode(c) } - - override Callable getEnclosingCallable() { result = c } - - override ExprParent getAstNode() { result = c } - - /** Gets a textual representation of this element. */ - override string toString() { result = "Exit" } - - /** Gets the source location for this element. */ - override Location getLocation() { result = c.getLocation() } + private Stmt getSwitchStmt(Switch s, int i) { + result = s.(SwitchStmt).getStmt(i) or + result = s.(SwitchExpr).getStmt(i) } - /** A control flow node indicating a failing assertion. */ - class AssertThrowNode extends Node, TAssertThrowNode { - AssertStmt s; - - AssertThrowNode() { this = TAssertThrowNode(s) } - - override Stmt getEnclosingStmt() { result = s } + private int numberOfStmts(Switch s) { result = strictcount(getSwitchStmt(s, _)) } - override Callable getEnclosingCallable() { result = s.getEnclosingCallable() } + private predicate caseIndex(Switch s, Case c, int caseIdx, int caseStmtPos) { + c = s.getCase(caseIdx) and + c = getSwitchStmt(s, caseStmtPos) + } - override ExprParent getAstNode() { result = s } + class Case extends AstNode instanceof J::SwitchCase { + /** Gets a pattern being matched by this case. */ + AstNode getAPattern() { + result = this.(PatternCase).getAPattern() or + result = this.(ConstCase).getValue(_) + } - /** Gets a textual representation of this element. */ - override string toString() { result = "Assert Throw" } + /** Gets the guard expression of this case, if any. */ + Expr getGuard() { result = this.(PatternCase).getGuard() } - /** Gets the source location for this element. */ - override Location getLocation() { result = s.getLocation() } + /** + * Gets the body element of this case at the specified (zero-based) `index`. + * + * This is either unique when the case has a single right-hand side, or it + * is the sequence of statements between this case and the next case. + */ + AstNode getBodyElement(int index) { + result = this.(J::SwitchCase).getRuleExpression() and index = 0 + or + result = this.(J::SwitchCase).getRuleStatement() and index = 0 + or + not this.(J::SwitchCase).isRule() and + exists(Switch s, int caseIdx, int caseStmtPos, int nextCaseStmtPos | + caseIndex(pragma[only_bind_into](s), this, caseIdx, caseStmtPos) and + ( + caseIndex(pragma[only_bind_into](s), _, caseIdx + 1, nextCaseStmtPos) + or + not exists(s.getCase(caseIdx + 1)) and + nextCaseStmtPos = numberOfStmts(s) + ) and + index = [0 .. nextCaseStmtPos - caseStmtPos - 2] and + result = getSwitchStmt(pragma[only_bind_into](s), caseStmtPos + 1 + index) + ) + } } -} -class ControlFlowNode = ControlFlow::Node; + predicate fallsThrough(Case c) { not c.(J::SwitchCase).isRule() } -/** Gets the intra-procedural successor of `n`. */ -private ControlFlowNode succ(ControlFlowNode n) { result = succ(n, _) } + class ConditionalExpr = J::ConditionalExpr; -cached -private module ControlFlowGraphImpl { - private import ControlFlow + class BinaryExpr = J::BinaryExpr; - private class AstNode extends ExprParent { - AstNode() { this instanceof Expr or this instanceof Stmt } + class LogicalAndExpr = AndLogicalExpr; - Stmt getEnclosingStmt() { - result = this or - result = this.(Expr).getEnclosingStmt() - } + class LogicalOrExpr = OrLogicalExpr; - Node getCfgNode() { result.asExpr() = this or result.asStmt() = this } + class NullCoalescingExpr extends BinaryExpr { + NullCoalescingExpr() { none() } } - /** - * Gets a label that applies to this statement. - */ - private Label getLabel(Stmt s) { - exists(LabeledStmt l | s = l.getStmt() | - result = MkLabel(l.getLabel()) or - result = getLabel(l) - ) - } + class UnaryExpr = J::UnaryExpr; - /** - * A throwable that's a (reflexive, transitive) supertype of an unchecked - * exception. Besides the unchecked exceptions themselves, this includes - * `java.lang.Throwable` and `java.lang.Exception`. - */ - private class UncheckedThrowableSuperType extends RefType { - UncheckedThrowableSuperType() { - this instanceof TypeThrowable or - this instanceof TypeException or - this instanceof UncheckedThrowableType - } + class LogicalNotExpr = LogNotExpr; - /** - * An unchecked throwable that is a subtype of this `UncheckedThrowableSuperType` and - * sits as high as possible in the type hierarchy. This is mostly unique except for - * `TypeThrowable` which results in both `TypeError` and `TypeRuntimeException`. - */ - UncheckedThrowableType getAnUncheckedSubtype() { - result = this - or - result instanceof TypeError and this instanceof TypeThrowable - or - result instanceof TypeRuntimeException and - (this instanceof TypeThrowable or this instanceof TypeException) - } - } + final private class FinalBooleanLiteral = J::BooleanLiteral; - /** - * Bind `t` to an exception type that may be thrown during execution of `n`, - * either because `n` is a `throw` statement, or because it is a call - * that may throw an exception, or because it is a cast and a - * `ClassCastException` is expected, or because it is a Kotlin not-null check - * and a `NullPointerException` is expected. - */ - private predicate mayThrow(AstNode n, ThrowableType t) { - t = n.(ThrowStmt).getThrownExceptionType() - or - exists(Call c | c = n | - t = c.getCallee().getAThrownExceptionType() or - uncheckedExceptionFromCatch(n, t) or - uncheckedExceptionFromFinally(n, t) or - uncheckedExceptionFromMethod(c, t) - ) - or - exists(CastExpr c | c = n | - t instanceof TypeClassCastException and - uncheckedExceptionFromCatch(n, t) - ) - or - exists(NotNullExpr nn | nn = n | - t instanceof TypeNullPointerException and - uncheckedExceptionFromCatch(n, t) - ) + class BooleanLiteral extends FinalBooleanLiteral { + boolean getValue() { result = this.getBooleanValue() } } +} - private predicate methodMayThrow(Method m, ThrowableType t) { - exists(AstNode n | - t = n.(ThrowStmt).getThrownExceptionType() and - not n.(ThrowStmt).getParent() = any(Method m0).getBody() +private module Exceptions { + private predicate methodMayThrow(Method m) { + exists(Stmt stmt | + stmt instanceof ThrowStmt and + not stmt.(ThrowStmt).getParent() = any(Method m0).getBody() or - uncheckedExceptionFromMethod(n, t) + uncheckedExceptionFromMethod(any(MethodCall call | call.getEnclosingStmt() = stmt)) | - n.getEnclosingStmt().getEnclosingCallable() = m and + stmt.getEnclosingCallable() = m and not exists(TryStmt try | - exists(try.getACatchClause()) and try.getBlock() = n.getEnclosingStmt().getEnclosingStmt*() + exists(try.getACatchClause()) and try.getBlock() = stmt.getEnclosingStmt*() ) ) } /** - * Bind `t` to an unchecked exception that may occur in a precondition check or guard wrapper. + * Holds if an unchecked exception may occur in a precondition check or guard wrapper. */ - private predicate uncheckedExceptionFromMethod(MethodCall ma, ThrowableType t) { - (methodCallChecksArgument(ma) or methodCallUnconditionallyThrows(ma)) and - (t instanceof TypeError or t instanceof TypeRuntimeException) + private predicate uncheckedExceptionFromMethod(MethodCall call) { + (methodCallChecksArgument(call) or methodCallUnconditionallyThrows(call)) or - methodMayThrow(ma.getMethod().getSourceDeclaration(), t) + methodMayThrow(call.getMethod().getSourceDeclaration()) } /** - * Bind `t` to an unchecked exception that may transfer control to a finally - * block inside which `n` is nested. + * Holds if an unchecked exception from `c` may transfer control to a finally + * block inside which `c` is nested. */ - private predicate uncheckedExceptionFromFinally(AstNode n, ThrowableType t) { + private predicate uncheckedExceptionFromFinally(Call c) { exists(TryStmt try | - n.getEnclosingStmt().getEnclosingStmt+() = try.getBlock() or - n.(Expr).getParent*() = try.getAResource() + c.getEnclosingStmt().getEnclosingStmt+() = try.getBlock() or + c.(Expr).getParent*() = try.getAResource() | - exists(try.getFinally()) and - (t instanceof TypeError or t instanceof TypeRuntimeException) + exists(try.getFinally()) ) } /** - * Bind `t` to all unchecked exceptions that may be caught by some - * `try-catch` inside which `n` is nested. + * A throwable that's a (reflexive, transitive) supertype of an unchecked + * exception. Besides the unchecked exceptions themselves, this includes + * `java.lang.Throwable` and `java.lang.Exception`. */ - private predicate uncheckedExceptionFromCatch(AstNode n, ThrowableType t) { - exists(TryStmt try, UncheckedThrowableSuperType caught | - n.getEnclosingStmt().getEnclosingStmt+() = try.getBlock() or - n.(Expr).getParent*() = try.getAResource() - | - t = caught.getAnUncheckedSubtype() and - try.getACatchClause().getACaughtType() = caught - ) - } - - private ThrowableType actualAssertionError() { - result.hasQualifiedName("java.lang", "AssertionError") - } - - private ThrowableType assertionError() { - result = actualAssertionError() - or - // In case `AssertionError` is not extracted, we use `Error` as a fallback. - not exists(actualAssertionError()) and - result.hasQualifiedName("java.lang", "Error") + private class UncheckedThrowableSuperType extends RefType { + UncheckedThrowableSuperType() { + this instanceof TypeThrowable or + this instanceof TypeException or + this instanceof UncheckedThrowableType + } } /** - * Gets an exception type that may be thrown during execution of the - * body or the resources (if any) of `try`. + * Holds if an unchecked exception from `n` may be caught by an enclosing + * catch clause. */ - private ThrowableType thrownInBody(TryStmt try) { - exists(AstNode n | - mayThrow(n, result) - or - n instanceof AssertStmt and result = assertionError() - | - n.getEnclosingStmt().getEnclosingStmt+() = try.getBlock() or + private predicate uncheckedExceptionFromCatch(Ast::AstNode n) { + exists(TryStmt try, UncheckedThrowableSuperType caught | + n.(Stmt).getEnclosingStmt+() = try.getBlock() or + n.(Expr).getEnclosingStmt().getEnclosingStmt+() = try.getBlock() or n.(Expr).getParent*() = try.getAResource() + | + try.getACatchClause().getACaughtType() = caught and + ( + caught instanceof TypeClassCastException and n instanceof CastExpr + or + caught instanceof TypeNullPointerException and n instanceof NotNullExpr + or + n instanceof Call + ) ) } /** - * Bind `thrown` to an exception type that may be thrown during execution - * of the body or the resource declarations of the `try` block to which - * `c` belongs, such that `c` definitely catches that exception (if no - * prior catch clause handles it). - */ - private predicate mustCatch(CatchClause c, ThrowableType thrown) { - thrown = thrownInBody(c.getTry()) and - hasDescendant(c.getACaughtType(), thrown) - } - - /** - * Bind `thrown` to an exception type that may be thrown during execution - * of the body or the resource declarations of the `try` block to which - * `c` belongs, such that `c` may _not_ catch that exception. - * - * This predicate computes the complement of `mustCatch` over those - * exception types that are thrown in the body/resource declarations of - * the corresponding `try`. + * Holds if a catch clause of `try` catches checked exceptions of type + * `caught`, and that `call` is contained within the try block. */ - private predicate mayNotCatch(CatchClause c, ThrowableType thrown) { - thrown = thrownInBody(c.getTry()) and - not hasDescendant(c.getACaughtType(), thrown) + private predicate checkedExceptionFromCatchCandidate(TryStmt try, RefType caught, Call call) { + ( + call.getEnclosingStmt().getEnclosingStmt+() = try.getBlock() or + call.(Expr).getParent*() = try.getAResource() + ) and + try.getACatchClause().getACaughtType() = caught and + not caught instanceof UncheckedThrowableSuperType } /** - * Bind `thrown` to an exception type that may be thrown during execution - * of the body or the resource declarations of the `try` block to which - * `c` belongs, such that `c` possibly catches that exception. + * Holds if a catch clause of `try` catches checked exceptions of type + * `caught`, and that there is a call within the try block that declares that + * it may throw `caught` or a subtype thereof. */ - private predicate mayCatch(CatchClause c, ThrowableType thrown) { - mustCatch(c, thrown) - or - mayNotCatch(c, thrown) and exists(c.getACaughtType().commonSubtype(thrown)) + private predicate declaredCheckedExceptionFromCatchCandidate(TryStmt try, RefType caught) { + exists(Call call | + checkedExceptionFromCatchCandidate(try, caught, call) and + call.getCallee().getAThrownExceptionType().getASourceSupertype*() = caught + ) } /** - * Given an exception type `thrown`, determine which catch clauses of - * `try` may possibly catch that exception. + * Holds if `call` is contained within a try block that has a catch clause + * that catches a checked exception, but there is no call within the try + * block that declares that it may throw that exception, and no throw + * statement either. In this case, it is likely that the throws declaration + * for some reason was not extracted, so we conseratively assume that `call` + * may throw such an exception. */ - private CatchClause handlingCatchClause(TryStmt try, ThrowableType thrown) { - exists(int i | result = try.getCatchClause(i) | - mayCatch(result, thrown) and - not exists(int j | j < i | mustCatch(try.getCatchClause(j), thrown)) + private predicate checkedExceptionFromCatchCandidate(Call call) { + exists(TryStmt try, RefType caught | + checkedExceptionFromCatchCandidate(try, caught, call) and + not declaredCheckedExceptionFromCatchCandidate(try, caught) and + not exists(ThrowStmt throwstmt | + throwstmt.getEnclosingStmt+() = try.getBlock() and + throwstmt.getThrownExceptionType().getASourceSupertype*() = caught + ) ) } /** - * Boolean expressions that occur in a context in which their value affect control flow. - * That is, contexts where the control-flow edges depend on `value` given that `b` ends - * with a `booleanCompletion(value, _)`. + * Holds if `n` is expected to possibly throw an exception. This can either + * be due to a declared (likely checked) exception on a call target + * or due to an enclosing try/catch/finally. */ - private predicate inBooleanContext(AstNode b) { - exists(LogicExpr logexpr | - logexpr.(BinaryExpr).getLeftOperand() = b - or - logexpr.getAnOperand() = b and inBooleanContext(logexpr) - ) - or - exists(ConditionalExpr condexpr | - condexpr.getCondition() = b - or - condexpr.getABranchExpr() = b and - inBooleanContext(condexpr) - ) + predicate mayThrow(Ast::AstNode n) { + exists(n.(Call).getCallee().getAThrownExceptionType()) or - exists(AssertStmt assertstmt | assertstmt.getExpr() = b) + checkedExceptionFromCatchCandidate(n) or - exists(SwitchExpr switch | - inBooleanContext(switch) and - switch.getAResult() = b - ) - or - exists(ConditionalStmt condstmt | condstmt.getCondition() = b) + uncheckedExceptionFromMethod(n) or - exists(WhenBranch whenbranch | whenbranch.getCondition() = b) + uncheckedExceptionFromFinally(n) or - exists(WhenExpr whenexpr | - inBooleanContext(whenexpr) and - whenexpr.getBranch(_).getAResult() = b - ) - or - b = any(PatternCase pc).getGuard() - or - inBooleanContext(b.(ExprStmt).getExpr()) - or - inBooleanContext(b.(StmtExpr).getStmt()) + uncheckedExceptionFromCatch(n) } +} +private module NonReturningCalls { /** * A virtual method with a unique implementation. That is, the method does not * participate in overriding and there are no call targets that could dispatch @@ -608,7 +420,7 @@ private module ControlFlowGraphImpl { /** * Gets a `MethodCall` that always throws an exception or calls `exit`. */ - private MethodCall nonReturningMethodCall() { + MethodCall nonReturningMethodCall() { methodCallUnconditionallyThrows(result) or result.getMethod().getSourceDeclaration() = nonReturningMethod() or result = likelyNonReturningMethod().getAnAccess() @@ -650,1127 +462,246 @@ private module ControlFlowGraphImpl { ) ) } +} - // Join order engineering -- first determine the switch block and the case indices required, then retrieve them. - bindingset[switch, i] - pragma[inline_late] - private predicate isNthCaseOf(SwitchBlock switch, SwitchCase c, int i) { - c.isNthCaseOf(switch, i) - } +private module Input implements InputSig1, InputSig2 { + private import java as J - /** - * Gets a `SwitchCase` that may be `pred`'s direct successor, where `pred` is declared in block `switch`. - * - * This means any switch case that comes after `pred` up to the next pattern case, if any, except for `case null`. - * - * Because we know the switch block contains at least one pattern, we know by https://docs.oracle.com/javase/specs/jls/se21/html/jls-14.html#jls-14.11 - * that any default case comes after the last pattern case. - */ - private SwitchCase getASuccessorSwitchCase(PatternCase pred, SwitchBlock switch) { - // Note we do include `case null, default` (as well as plain old `default`) here. - not result.(ConstCase).getValue(_) instanceof NullLiteral and - exists(int maxCaseIndex | - switch = pred.getParent() and - if exists(getNextPatternCase(pred)) - then maxCaseIndex = getNextPatternCase(pred).getCaseIndex() - else maxCaseIndex = lastCaseIndex(switch) - | - isNthCaseOf(switch, result, [pred.getCaseIndex() + 1 .. maxCaseIndex]) - ) - } + predicate cfgCachedStageRef() { CfgCachedStage::ref() } - /** - * Gets a `SwitchCase` that may occur first in `switch`. - * - * If the block contains at least one PatternCase, this is any case up to and including that case, or - * the case handling the null literal if any. - * - * Otherwise it is any case in the switch block. - */ - private SwitchCase getAFirstSwitchCase(SwitchBlock switch) { - result.getParent() = switch and - ( - result.(ConstCase).getValue(_) instanceof NullLiteral - or - result instanceof NullDefaultCase - or - not exists(getFirstPatternCase(switch)) - or - result.getIndex() <= getFirstPatternCase(switch).getIndex() + /** Holds if this catch clause catches all exceptions. */ + predicate catchAll(Ast::CatchClause catch) { + catch.getACaughtType() instanceof TypeThrowable + or + exists(TryStmt try, int last | + catch.getACaughtType() instanceof TypeException and + try.getCatchClause(last) = catch and + not exists(try.getCatchClause(last + 1)) ) } - private Stmt getSwitchStatement(SwitchBlock switch, int i) { result.isNthChildOf(switch, i) } - - /** - * Holds if `last` is the last node in any of pattern case `pc`'s succeeding bind-and-test operations, - * immediately before either falling through to execute successor statements or execute a rule body - * if present. `completion` is the completion kind of the last operation. - */ - private predicate lastPatternCaseMatchingOp(PatternCase pc, Node last, Completion completion) { - last(pc.getAPattern(), last, completion) and - completion = NormalCompletion() and - not exists(pc.getGuard()) + /** Holds if this case matches all possible values. */ + predicate matchAll(Ast::Case c) { + c instanceof DefaultCase or - last(pc.getGuard(), last, completion) and - completion = BooleanCompletion(true, _) + // Switch expressions and enhanced switch blocks (those that use pattern + // cases or match null) must be exhaustive, so the last case matches all + // remaining values. + // See https://docs.oracle.com/javase/specs/jls/se21/html/jls-14.html#jls-14.11.2 + exists(Ast::Switch switch, int last | + switch instanceof SwitchExpr or + exists(switch.(SwitchStmt).getAPatternCase()) or + switch.(SwitchStmt).hasNullCase() + | + switch.getCase(last) = c and + not exists(switch.getCase(last + 1)) + ) + or + c.(J::PatternCase).getAPattern().getType() instanceof TypeObject } - /** - * Expressions and statements with CFG edges in post-order AST traversal. - * - * This includes most expressions, except those that initiate or propagate branching control - * flow (`LogicExpr`, `ConditionalExpr`). - * Only a few statements are included; those with specific side-effects - * occurring after the evaluation of their children, that is, `Call`, `ReturnStmt`, - * and `ThrowStmt`. CFG nodes without child nodes in the CFG that may complete - * normally are also included. - */ - private class PostOrderNode extends AstNode { - PostOrderNode() { - // For VarAccess and ArrayAccess only read accesses (r-values) are included, - // as write accesses aren't included in the CFG. - this instanceof ArrayAccess and not exists(AssignExpr a | this = a.getDest()) - or - this instanceof ArrayCreationExpr - or - this instanceof ArrayInit - or - this instanceof Assignment - or - this instanceof BinaryExpr and not this instanceof LogicExpr - or - this instanceof UnaryExpr and not this instanceof LogNotExpr - or - this instanceof CastingExpr - or - this instanceof InstanceOfExpr and not this.(InstanceOfExpr).isPattern() - or - this instanceof NotInstanceOfExpr - or - this instanceof LocalVariableDeclExpr - or - this instanceof StringTemplateExpr - or - this instanceof ClassExpr - or - this instanceof VarRead - or - this instanceof Call // includes both expressions and statements - or - this instanceof ErrorExpr - or - this instanceof ReturnStmt - or - this instanceof ThrowStmt - or - this instanceof Literal - or - this instanceof TypeLiteral - or - this instanceof ThisAccess - or - this instanceof SuperAccess - or - this.(BlockStmt).getNumStmt() = 0 - or - this instanceof SwitchCase and - not this.(SwitchCase).isRule() and - not this instanceof PatternCase - or - this instanceof RecordPatternExpr - or - this instanceof EmptyStmt - or - this instanceof LocalTypeDeclStmt - } + private newtype TLabel = + TJavaLabel(string l) { exists(LabeledStmt lbl | l = lbl.getLabel()) } or + TYield() - /** Gets child nodes in their order of execution. Indexing starts at either -1 or 0. */ - AstNode getChildNode(int index) { - exists(ArrayAccess e | e = this | - index = 0 and result = e.getArray() - or - index = 1 and result = e.getIndexExpr() - ) - or - exists(ArrayCreationExpr e | e = this | - result = e.getDimension(index) - or - index = count(e.getADimension()) and result = e.getInit() - ) - or - result = this.(ArrayInit).getInit(index) and index >= 0 - or - exists(AssignExpr e, ArrayAccess lhs | e = this and lhs = e.getDest() | - index = 0 and result = lhs.getArray() - or - index = 1 and result = lhs.getIndexExpr() - or - index = 2 and result = e.getSource() - ) - or - exists(AssignExpr e, VarAccess lhs | e = this and lhs = e.getDest() | - index = -1 and result = lhs.getQualifier() and not result instanceof TypeAccess - or - index = 0 and result = e.getSource() - ) + class Label extends TLabel { + string toString() { + exists(string l | this = TJavaLabel(l) and result = l) or - exists(AssignOp e | e = this | - index = 0 and result = e.getDest() - or - index = 1 and result = e.getRhs() - ) - or - exists(BinaryExpr e | e = this | - index = 0 and result = e.getLeftOperand() - or - index = 1 and result = e.getRightOperand() - ) - or - index = 0 and result = this.(UnaryExpr).getExpr() - or - index = 0 and result = this.(CastingExpr).getExpr() - or - index = 0 and result = this.(InstanceOfExpr).getExpr() - or - index = 0 and result = this.(NotInstanceOfExpr).getExpr() - or - index = 0 and result = this.(LocalVariableDeclExpr).getInit() - or - index = 0 and result = this.(VarRead).getQualifier() and not result instanceof TypeAccess - or - exists(Call e | e = this | - index = -1 and result = e.getQualifier() and not result instanceof TypeAccess - or - result = e.getArgument(index) - ) - or - exists(StringTemplateExpr e | e = this | result = e.getComponent(index)) - or - index = 0 and result = this.(ClassExpr).getExpr() - or - index = 0 and result = this.(ReturnStmt).getResult() - or - index = 0 and result = this.(ThrowStmt).getExpr() - or - result = this.(RecordPatternExpr).getSubPattern(index) - } - - /** Gets the first child node, if any. */ - AstNode firstChild() { - result = this.getChildNode(-1) - or - result = this.getChildNode(0) and not exists(this.getChildNode(-1)) - } - - /** Holds if this CFG node has any child nodes. */ - predicate isLeafNode() { not exists(this.getChildNode(_)) } - - /** Holds if this node can finish with a `normalCompletion`. */ - predicate mayCompleteNormally() { - not this instanceof BooleanLiteral and - not this instanceof ReturnStmt and - not this instanceof ThrowStmt and - not this = nonReturningMethodCall() + this = TYield() and result = "yield" } } - /** - * If the body of `loop` finishes with `completion`, the loop will - * continue executing (provided the loop condition still holds). - */ - private predicate continues(Completion completion, LoopStmt loop) { - completion = NormalCompletion() - or - // only consider continue completions if there actually is a `continue` - // somewhere inside this loop; we don't particularly care whether that - // `continue` could actually target this loop, we just want to restrict - // the size of the predicate - exists(ContinueStmt cnt | cnt.getEnclosingStmt+() = loop | - completion = anonymousContinueCompletion() or - completion = labelledContinueCompletion(getLabel(loop)) + private Label getLabelOfLoop(Stmt s) { + exists(LabeledStmt l | s = l.getStmt() | + result = TJavaLabel(l.getLabel()) or + result = getLabelOfLoop(l) ) } - /** - * Determine the part of the AST node `n` that will be executed first. - */ - private Node first(AstNode n) { - result.asExpr() = n and n instanceof LogicExpr - or - result.asExpr() = n and n instanceof ConditionalExpr - or - result.asExpr() = n and n instanceof WhenExpr - or - result.asStmt() = n and n instanceof WhenBranch - or - result.asExpr() = n and n instanceof StmtExpr + predicate hasLabel(Ast::AstNode n, Label l) { + l = getLabelOfLoop(n) or - result = n.getCfgNode() and n.(PostOrderNode).isLeafNode() + l = TJavaLabel(n.(BreakStmt).getLabel()) or - result = first(n.(PostOrderNode).firstChild()) + l = TJavaLabel(n.(ContinueStmt).getLabel()) or - result = first(n.(InstanceOfExpr).getExpr()) - or - result = first(n.(SynchronizedStmt).getExpr()) - or - result = first(n.(AssertStmt).getExpr()) - or - result.asStmt() = n and - not n instanceof PostOrderNode and - not n instanceof SynchronizedStmt and - not n instanceof AssertStmt - or - result.asExpr() = n and n instanceof SwitchExpr - } - - /** - * Bind `last` to a node inside the body of `try` that may finish with `completion` - * such that control will be transferred to a `catch` block or the `finally` block of `try`. - * - * In other words, `last` is either a resource declaration that throws, or a - * node in the `try` block that may not complete normally, or a node in - * the `try` block that has no control flow successors inside the block. - */ - private predicate catchOrFinallyCompletion(TryStmt try, Node last, Completion completion) { - last(try.getBlock(), last, completion) + l = TYield() and n instanceof YieldStmt or - last(try.getAResource(), last, completion) and completion = ThrowCompletion(_) + l = TYield() and n instanceof SwitchExpr } - /** - * Bind `last` to a node inside the body of `try` that may finish with `completion` - * such that control may be transferred to the `finally` block (if it exists). - * - * In other words, if `last` throws an exception it is possibly not caught by any - * of the catch clauses. - */ - private predicate uncaught(TryStmt try, Node last, Completion completion) { - catchOrFinallyCompletion(try, last, completion) and + predicate inConditionalContext(Ast::AstNode n, ConditionKind kind) { + kind.isBoolean() and ( - exists(ThrowableType thrown | - thrown = thrownInBody(try) and - completion = ThrowCompletion(thrown) and - not mustCatch(try.getACatchClause(), thrown) - ) - or - completion = NormalCompletion() - or - completion = ReturnCompletion() - or - completion = anonymousBreakCompletion() - or - completion = labelledBreakCompletion(_) - or - completion = anonymousContinueCompletion() - or - completion = labelledContinueCompletion(_) + any(AssertStmt assertstmt).getExpr() = n or + any(WhenBranch whenbranch).getCondition() = n ) } - /** - * Bind `last` to a node inside `try` that may finish with `completion` such - * that control may be transferred to the `finally` block (if it exists). - * - * This is similar to `uncaught`, but also includes final statements of `catch` - * clauses. - */ - private predicate finallyPred(TryStmt try, Node last, Completion completion) { - uncaught(try, last, completion) or - last(try.getACatchClause(), last, completion) - } + predicate preOrderExpr(Expr e) { e instanceof WhenExpr } - private predicate lastInFinally(TryStmt try, Node last) { - last(try.getFinally(), last, NormalCompletion()) + predicate postOrInOrder(Ast::AstNode n) { + // expressions are already post-order, but we need the calls that are statements to be post-order as well + n instanceof Call + or + n instanceof SynchronizedStmt } - private predicate isNextNormalSwitchStmt(SwitchBlock switch, Stmt pred, Stmt succ) { - exists(int i, Stmt immediateSucc | - getSwitchStatement(switch, i) = pred and - getSwitchStatement(switch, i + 1) = immediateSucc and - ( - if immediateSucc instanceof PatternCase - then isNextNormalSwitchStmt(switch, immediateSucc, succ) - else succ = immediateSucc - ) - ) + private string assertThrowNodeTag() { result = "[assert-throw]" } + + private string instanceofTrueNodeTag() { result = "[instanceof-true]" } + + predicate additionalNode(Ast::AstNode n, string tag, NormalSuccessor t) { + n instanceof AssertStmt and tag = assertThrowNodeTag() and t instanceof DirectSuccessor + or + n.(InstanceOfExpr).isPattern() and + tag = instanceofTrueNodeTag() and + t.(BooleanSuccessor).getValue() = true } /** - * Bind `last` to a cfg node nested inside `n` (or, indeed, `n` itself) such - * that `last` may be the last node during an execution of `n` and finish - * with the given completion. - * - * A `booleanCompletion` implies that `n` is an `Expr`. Any abnormal - * completion besides `throwCompletion` implies that `n` is a `Stmt`. + * Holds if `ast` may result in an abrupt completion `c` originating at + * `n`. The boolean `always` indicates whether the abrupt completion + * always occurs or whether `n` may also terminate normally. */ - private predicate last(AstNode n, Node last, Completion completion) { - // Exceptions are propagated from any sub-expression. - // As are any break, yield, continue, or return completions. - exists(Expr e | e.getParent() = n | - last(e, last, completion) and not completion instanceof NormalOrBooleanCompletion - ) - or - // If an expression doesn't finish with a throw completion, then it executes normally with - // either a `normalCompletion` or a `booleanCompletion`. - // A boolean completion in a non-boolean context just indicates a normal completion - // and a normal completion in a boolean context indicates an arbitrary boolean completion. - last(n, last, NormalCompletion()) and - inBooleanContext(n) and - completion = basicBooleanCompletion(_) - or - last(n, last, BooleanCompletion(_, _)) and - not inBooleanContext(n) and - completion = NormalCompletion() and - // PatternCase has both a boolean-true completion (guard success) and a normal one - // (variable declaration completion, when no guard is present). - not n instanceof PatternCase - or - // Logic expressions and conditional expressions are executed in AST pre-order to facilitate - // proper short-circuit representation. All other expressions are executed in post-order. - // The last node of a logic expression is either in the right operand with an arbitrary - // completion, or in the left operand with the corresponding boolean completion. - exists(AndLogicalExpr andexpr | andexpr = n | - last(andexpr.getLeftOperand(), last, completion) and completion = BooleanCompletion(false, _) - or - last(andexpr.getRightOperand(), last, completion) - ) - or - exists(OrLogicalExpr orexpr | orexpr = n | - last(orexpr.getLeftOperand(), last, completion) and completion = BooleanCompletion(true, _) - or - last(orexpr.getRightOperand(), last, completion) - ) + predicate beginAbruptCompletion( + Ast::AstNode ast, PreControlFlowNode n, AbruptCompletion c, boolean always + ) { + ast instanceof AssertStmt and + n.isAdditional(ast, assertThrowNodeTag()) and + c.asSimpleAbruptCompletion() instanceof ExceptionSuccessor and + always = true or - // The last node of a `LogNotExpr` is in its sub-expression with an inverted boolean completion - // (or a `normalCompletion`). - exists(Completion subcompletion | last(n.(LogNotExpr).getExpr(), last, subcompletion) | - subcompletion = NormalCompletion() and - completion = NormalCompletion() and - not inBooleanContext(n) - or - exists(boolean outervalue, boolean innervalue | - subcompletion = BooleanCompletion(outervalue, innervalue) and - completion = BooleanCompletion(outervalue.booleanNot(), innervalue) - ) - ) - or - // The last node of a `ConditionalExpr` is in either of its branches. - exists(ConditionalExpr condexpr | condexpr = n | - last(condexpr.getABranchExpr(), last, completion) - ) - or - exists(InstanceOfExpr ioe | ioe.isPattern() and ioe = n | - last.asExpr() = n and completion = basicBooleanCompletion(false) - or - last(ioe.getPattern(), last, NormalCompletion()) and completion = basicBooleanCompletion(true) - ) + Exceptions::mayThrow(ast) and + n.isIn(ast) and + c.asSimpleAbruptCompletion() instanceof ExceptionSuccessor and + always = false or - // The last node of a node executed in post-order is the node itself. - exists(PostOrderNode p | p = n | - p.mayCompleteNormally() and last = p.getCfgNode() and completion = NormalCompletion() - ) - or - last.asExpr() = n and completion = basicBooleanCompletion(n.(BooleanLiteral).getBooleanValue()) - or - // The last statement in a block is any statement that does not complete normally, - // or the last statement. - exists(BlockStmt blk | blk = n | - last(blk.getAStmt(), last, completion) and completion != NormalCompletion() - or - last(blk.getStmt(blk.getNumStmt() - 1), last, completion) - ) - or - // The last node in an `if` statement is the last node in either of its branches or - // the last node of the condition with a false-completion in the absence of an else-branch. - exists(IfStmt ifstmt | ifstmt = n | - last(ifstmt.getCondition(), last, BooleanCompletion(false, _)) and - completion = NormalCompletion() and - not exists(ifstmt.getElse()) - or - last(ifstmt.getThen(), last, completion) - or - last(ifstmt.getElse(), last, completion) - ) - or - // A loop may terminate normally if its condition is false... - exists(LoopStmt loop | loop = n | - last(loop.getCondition(), last, BooleanCompletion(false, _)) and - completion = NormalCompletion() - or - // ...or if it's an enhanced for loop running out of items to iterate over... - // ...which may happen either immediately after the loop expression... - last(loop.(EnhancedForStmt).getExpr(), last, completion) and completion = NormalCompletion() - or - exists(Completion bodyCompletion | last(loop.getBody(), last, bodyCompletion) | - // ...or after the last node in the loop's body in an iteration that would otherwise continue. - loop instanceof EnhancedForStmt and - continues(bodyCompletion, loop) and - completion = NormalCompletion() - or - // Otherwise the last node is the last node in the loop's body... - // ...if it is an unlabelled `break` (causing the entire loop to complete normally) - ( - if bodyCompletion = anonymousBreakCompletion() - then completion = NormalCompletion() - else ( - // ...or if it is some other completion that does not continue the loop. - not continues(bodyCompletion, loop) and completion = bodyCompletion - ) - ) - ) - ) - or - // `try` statements are a bit more complicated: - exists(TryStmt try | try = n | - // the last node in a `try` is the last node in its `finally` block - // if the `finally` block completes normally, it resumes any completion that - // was current before the `finally` block was entered - lastInFinally(try, last) and - finallyPred(try, _, completion) - or - // otherwise, just take the completion of the `finally` block itself - last(try.getFinally(), last, completion) and - completion != NormalCompletion() - or - // if there is no `finally` block, take the last node of the body or - // any of the `catch` clauses - not exists(try.getFinally()) and finallyPred(try, last, completion) - ) - or - // handle `switch` statements - exists(SwitchStmt switch | switch = n | - // unlabelled `break` causes the whole `switch` to complete normally - last(switch.getAStmt(), last, anonymousBreakCompletion()) and - completion = NormalCompletion() - or - // any other abnormal completion is propagated - last(switch.getAStmt(), last, completion) and - completion != anonymousBreakCompletion() and - not completion instanceof NormalOrBooleanCompletion - or - // if a statement without a non-pattern-case successor completes normally (or for a pattern case - // the guard succeeds) then the switch completes normally. - exists(Stmt lastNormalStmt, Completion stmtCompletion | - lastNormalStmt = getSwitchStatement(switch, _) and - not isNextNormalSwitchStmt(switch, lastNormalStmt, _) and - last(lastNormalStmt, last, stmtCompletion) and - (stmtCompletion = NormalCompletion() or stmtCompletion = BooleanCompletion(true, _)) and - completion = NormalCompletion() - ) - or - // if no default case exists, then normal completion of the expression may terminate the switch - // Note this can't happen if there are pattern cases or a null literal, as - // https://docs.oracle.com/javase/specs/jls/se21/html/jls-14.html#jls-14.11.2 requires that such - // an enhanced switch block is exhaustive. - not exists(switch.getDefaultCase()) and - not exists(switch.getAPatternCase()) and - not switch.hasNullCase() and - last(switch.getExpr(), last, completion) and - completion = NormalCompletion() - ) - or - // handle `switch` expression - exists(SwitchExpr switch | switch = n | - // `yield` terminates the `switch` - last(switch.getAStmt(), last, YieldCompletion(completion)) - or - // any other abnormal completion is propagated - last(switch.getAStmt(), last, completion) and - not completion instanceof YieldCompletion and - not completion instanceof NormalOrBooleanCompletion - ) - or - // If a case rule right-hand-side completes then the switch breaks or yields, depending - // on whether this is a switch expression or statement. If it completes abruptly then the - // switch completes the same way. - exists(Completion caseCompletion, SwitchCase case | - case = n and - ( - last(case.getRuleStatement(), last, caseCompletion) - or - last(case.getRuleExpression(), last, caseCompletion) - ) - | - if caseCompletion instanceof NormalOrBooleanCompletion - then - case.getParent() instanceof SwitchStmt and completion = anonymousBreakCompletion() - or - case.getParent() instanceof SwitchExpr and completion = YieldCompletion(caseCompletion) - else completion = caseCompletion - ) - or - // A pattern case statement can complete: - // * On failure of its final type test (boolean false) - // * On failure of its guard test if any (boolean false) - // * On completion of one of its pattern variable declarations, if it is not a rule and has no guard (normal completion) - // * On success of its guard test, if it is not a rule (boolean true) - // (the latter two cases are accounted for by lastPatternCaseMatchingOp) - exists(PatternCase pc | n = pc | - last.asStmt() = pc and completion = basicBooleanCompletion(false) - or - last(pc.getGuard(), last, completion) and - completion = BooleanCompletion(false, _) - or - not pc.isRule() and - lastPatternCaseMatchingOp(pc, last, completion) - ) - or - // the last statement of a synchronized statement is the last statement of its body - last(n.(SynchronizedStmt).getBlock(), last, completion) - or - // `return` statements give rise to a `Return` completion - last.asStmt() = n.(ReturnStmt) and completion = ReturnCompletion() - or - exists(AssertStmt assertstmt | assertstmt = n | - // `assert` statements may complete normally - we use the `AssertStmt` itself - // to represent this outcome - last.asStmt() = assertstmt and completion = NormalCompletion() - or - // `assert` statements may throw - completion = ThrowCompletion(assertionError()) and - last.(AssertThrowNode).getAstNode() = assertstmt - ) - or - // `throw` statements or throwing calls give rise to `Throw` completion - exists(ThrowableType tt | mayThrow(n, tt) | - last = n.getCfgNode() and completion = ThrowCompletion(tt) - ) - or - // `break` statements give rise to a `Break` completion - exists(BreakStmt break | break = n and last.asStmt() = n | - completion = labelledBreakCompletion(MkLabel(break.getLabel())) - or - not exists(break.getLabel()) and completion = anonymousBreakCompletion() - ) - or - // yield statements get their completion wrapped as a yield - exists(Completion caseCompletion | - last(n.(YieldStmt).getValue(), last, caseCompletion) and - if caseCompletion instanceof NormalOrBooleanCompletion - then completion = YieldCompletion(caseCompletion) - else completion = caseCompletion - ) - or - // `continue` statements give rise to a `Continue` completion - exists(ContinueStmt cont | cont = n and last.asStmt() = n | - completion = labelledContinueCompletion(MkLabel(cont.getLabel())) - or - not exists(cont.getLabel()) and completion = anonymousContinueCompletion() - ) - or - // the last node in an `ExprStmt` is the last node in the expression - last(n.(ExprStmt).getExpr(), last, completion) and - completion instanceof NormalOrBooleanCompletion - or - // the last node in a `StmtExpr` is the last node in the statement - last(n.(StmtExpr).getStmt(), last, completion) - or - // the last statement of a labeled statement is the last statement of its body... - exists(LabeledStmt lbl, Completion bodyCompletion | - lbl = n and last(lbl.getStmt(), last, bodyCompletion) - | - // ...except if it's a `break` that refers to this labelled statement - if bodyCompletion = labelledBreakCompletion(MkLabel(lbl.getLabel())) - then completion = NormalCompletion() - else completion = bodyCompletion - ) - or - // the last statement of a `catch` clause is the last statement of its block - last(n.(CatchClause).getBlock(), last, completion) - or - // the last node in a variable declaration statement is in the last of its individual declarations - exists(LocalVariableDeclStmt s | s = n | - last(s.getVariable(count(s.getAVariable())), last, completion) and - completion = NormalCompletion() - ) - or - // The last node in a `when` expression is the last node in any of its branches or - // the last node of the condition of the last branch in the absence of an else-branch. - exists(WhenExpr whenexpr | whenexpr = n | - // If we have no branches then we are the last node - last.asExpr() = n and - completion = NormalCompletion() and - not exists(whenexpr.getBranch(_)) - or - // If our last branch condition is false then we are done - exists(int i | - last(whenexpr.getBranch(i), last, BooleanCompletion(false, _)) and - completion = NormalCompletion() and - not exists(whenexpr.getBranch(i + 1)) - ) - or - // Any branch getting an abnormal completion is propagated - last(whenexpr.getBranch(_), last, completion) and - not completion instanceof YieldCompletion and - not completion instanceof NormalOrBooleanCompletion - or - // The last node in any branch. This will be wrapped up as a - // YieldCompletion, so we need to unwrap it here. - last(whenexpr.getBranch(_), last, YieldCompletion(completion)) - ) - or - exists(WhenBranch whenbranch | whenbranch = n | - // If the condition completes with anything other than true - // (or "normal", which we will also see if we don't know how - // to make specific true/false edges for the condition) - // (e.g. false or an exception), then the branch is done. - last(whenbranch.getCondition(), last, completion) and - not completion = BooleanCompletion(true, _) and - not completion = NormalCompletion() - or - // Similarly any non-normal completion of the RHS - // should propagate outwards: - last(whenbranch.getRhs(), last, completion) and - not completion instanceof NormalOrBooleanCompletion - or - // Otherwise we wrap the completion up in a YieldCompletion - // so that the `when` expression can tell that we have finished, - // and it shouldn't go on to the next branch. - exists(Completion branchCompletion | - last(whenbranch.getRhs(), last, branchCompletion) and - completion = YieldCompletion(branchCompletion) - ) - ) + ast = NonReturningCalls::nonReturningMethodCall() and + n.isIn(ast) and + c.asSimpleAbruptCompletion() instanceof ExceptionSuccessor and + always = true } /** - * Compute the intra-procedural successors of cfg node `n`, assuming its - * execution finishes with the given completion. + * Holds if an abrupt completion `c` from within `ast` is caught with + * flow continuing at `n`. */ - cached - Node succ(Node n, Completion completion) { - // After executing the callable body, the final nodes are first the - // annotated exit node and then the final exit node. - exists(Callable c | last(c.getBody(), n, completion) | - if completion instanceof ThrowCompletion - then result.(ExceptionalExitNode).getEnclosingCallable() = c - else result.(NormalExitNode).getEnclosingCallable() = c - ) - or - completion = NormalCompletion() and - n.(AnnotatedExitNode).getEnclosingCallable() = result.(ExitNode).getEnclosingCallable() - or - // Logic expressions and conditional expressions execute in AST pre-order. - completion = NormalCompletion() and - ( - result = first(n.asExpr().(AndLogicalExpr).getLeftOperand()) or - result = first(n.asExpr().(OrLogicalExpr).getLeftOperand()) or - result = first(n.asExpr().(LogNotExpr).getExpr()) or - result = first(n.asExpr().(ConditionalExpr).getCondition()) - ) - or - // If a logic expression doesn't short-circuit then control flows from its left operand to its right. - exists(AndLogicalExpr e | - last(e.getLeftOperand(), n, completion) and - completion = BooleanCompletion(true, _) and - result = first(e.getRightOperand()) - ) - or - exists(OrLogicalExpr e | - last(e.getLeftOperand(), n, completion) and - completion = BooleanCompletion(false, _) and - result = first(e.getRightOperand()) - ) - or - // Control flows to the corresponding branch depending on the boolean completion of the condition. - exists(ConditionalExpr e, boolean branch | - last(e.getCondition(), n, completion) and - completion = BooleanCompletion(branch, _) and - result = first(e.getBranchExpr(branch)) + predicate endAbruptCompletion(Ast::AstNode ast, PreControlFlowNode n, AbruptCompletion c) { + exists(LabeledStmt lbl | + ast = lbl.getStmt() and + n.isAfter(lbl) and + c.getSuccessorType() instanceof BreakSuccessor and + c.hasLabel(TJavaLabel(lbl.getLabel())) ) - or - exists(InstanceOfExpr ioe | ioe.isPattern() | - last(ioe.getExpr(), n, completion) and - completion = NormalCompletion() and - result.asExpr() = ioe - or - n.asExpr() = ioe and - result = first(ioe.getPattern()) and - completion = basicBooleanCompletion(true) - ) - or - // In other expressions control flows from left to right and ends in the node itself. - exists(PostOrderNode p, int i | - last(p.getChildNode(i), n, completion) and completion = NormalCompletion() - | - result = first(p.getChildNode(i + 1)) - or - not exists(p.getChildNode(i + 1)) and result = p.getCfgNode() - ) - or - // Statements within a block execute sequentially. - result = first(n.asStmt().(BlockStmt).getStmt(0)) and completion = NormalCompletion() - or - exists(BlockStmt blk, int i | - last(blk.getStmt(i), n, completion) and - completion = NormalCompletion() and - result = first(blk.getStmt(i + 1)) - ) - or - // Control flows to the corresponding branch depending on the boolean completion of the condition. - exists(IfStmt s | - n.asStmt() = s and result = first(s.getCondition()) and completion = NormalCompletion() - or - last(s.getCondition(), n, completion) and - completion = BooleanCompletion(true, _) and - result = first(s.getThen()) - or - last(s.getCondition(), n, completion) and - completion = BooleanCompletion(false, _) and - result = first(s.getElse()) - ) - or - // For statements: - exists(ForStmt for, Node condentry | - // Any part of the control flow that aims for the condition needs to hit either the condition... - condentry = first(for.getCondition()) - or - // ...or the body if the for doesn't include a condition. - not exists(for.getCondition()) and condentry = first(for.getStmt()) - | - // From the entry point, which is the for statement itself, control goes to either the first init expression... - n.asStmt() = for and result = first(for.getInit(0)) and completion = NormalCompletion() - or - // ...or the condition if the for doesn't include init expressions. - n.asStmt() = for and - not exists(for.getAnInit()) and - result = condentry and - completion = NormalCompletion() - or - // Init expressions execute sequentially, after which control is transferred to the condition. - exists(int i | last(for.getInit(i), n, completion) and completion = NormalCompletion() | - result = first(for.getInit(i + 1)) - or - not exists(for.getInit(i + 1)) and result = condentry - ) - or - // The true-successor of the condition is the body of the for loop. - last(for.getCondition(), n, completion) and - completion = BooleanCompletion(true, _) and - result = first(for.getStmt()) + } + + /** Holds if there is a local non-abrupt step from `n1` to `n2`. */ + predicate step(PreControlFlowNode n1, PreControlFlowNode n2) { + exists(InstanceOfExpr ioe | + // common + n1.isBefore(ioe) and + n2.isBefore(ioe.getExpr()) or - // The updates execute sequentially, after which control is transferred to the condition. - exists(int i | last(for.getUpdate(i), n, completion) and completion = NormalCompletion() | - result = first(for.getUpdate(i + 1)) - or - not exists(for.getUpdate(i + 1)) and result = condentry - ) + n1.isAfter(ioe.getExpr()) and + n2.isIn(ioe) or - // The back edge of the loop: control goes to either the first update or the condition if no updates exist. - last(for.getStmt(), n, completion) and - continues(completion, for) and - ( - result = first(for.getUpdate(0)) - or - result = condentry and not exists(for.getAnUpdate()) - ) - ) - or - // Enhanced for statements: - exists(EnhancedForStmt for | - // First the expression gets evaluated... - n.asStmt() = for and result = first(for.getExpr()) and completion = NormalCompletion() + // std postorder: + not ioe.isPattern() and + n1.isIn(ioe) and + n2.isAfter(ioe) or - // ...then the variable gets assigned... - last(for.getExpr(), n, completion) and - completion = NormalCompletion() and - result.asExpr() = for.getVariable() + // pattern case: + ioe.isPattern() and + n1.isIn(ioe) and + n2.isAfterValue(ioe, any(BooleanSuccessor s | s.getValue() = false)) or - // ...and then control goes to the body of the loop. - n.asExpr() = for.getVariable() and - result = first(for.getStmt()) and - completion = NormalCompletion() + n1.isIn(ioe) and + n2.isAdditional(ioe, instanceofTrueNodeTag()) or - // Finally, the back edge of the loop goes to reassign the variable. - last(for.getStmt(), n, completion) and - continues(completion, for) and - result.asExpr() = for.getVariable() - ) - or - // While loops start at the condition... - result = first(n.asStmt().(WhileStmt).getCondition()) and completion = NormalCompletion() - or - // ...and do-while loops start at the body. - result = first(n.asStmt().(DoStmt).getStmt()) and completion = NormalCompletion() - or - exists(LoopStmt loop | loop instanceof WhileStmt or loop instanceof DoStmt | - // Control goes from the condition via a true-completion to the body... - last(loop.getCondition(), n, completion) and - completion = BooleanCompletion(true, _) and - result = first(loop.getBody()) + n1.isAdditional(ioe, instanceofTrueNodeTag()) and + n2.isBefore(ioe.getPattern()) or - // ...and through the back edge from the body back to the condition. - last(loop.getBody(), n, completion) and - continues(completion, loop) and - result = first(loop.getCondition()) + n1.isAfter(ioe.getPattern()) and + n2.isAfterValue(ioe, any(BooleanSuccessor s | s.getValue() = true)) ) or - // Resource declarations in a try-with-resources execute sequentially. - exists(TryStmt try, int i | - last(try.getResource(i), n, completion) and completion = NormalCompletion() - | - result = first(try.getResource(i + 1)) + exists(AssertStmt assertstmt | + n1.isBefore(assertstmt) and + n2.isBefore(assertstmt.getExpr()) or - not exists(try.getResource(i + 1)) and result = first(try.getBlock()) - ) - or - // After the last resource declaration, control transfers to the body. - exists(TryStmt try | n.asStmt() = try and completion = NormalCompletion() | - result = first(try.getResource(0)) + n1.isAfterValue(assertstmt.getExpr(), any(BooleanSuccessor s | s.getValue() = true)) and + n2.isAfter(assertstmt) or - not exists(try.getAResource()) and result = first(try.getBlock()) - ) - or - // exceptional control flow - exists(TryStmt try | catchOrFinallyCompletion(try, n, completion) | - // if the body of the `try` throws... - exists(ThrowableType tt | completion = ThrowCompletion(tt) | - // ...control transfers to a catch clause... - result = first(handlingCatchClause(try, tt)) + n1.isAfterValue(assertstmt.getExpr(), any(BooleanSuccessor s | s.getValue() = false)) and + ( + n2.isBefore(assertstmt.getMessage()) or - // ...or to the finally block - not mustCatch(try.getACatchClause(), tt) and result = first(try.getFinally()) + not exists(assertstmt.getMessage()) and + n2.isAdditional(assertstmt, assertThrowNodeTag()) ) or - // if the body completes normally, control transfers to the finally block - not completion = ThrowCompletion(_) and result = first(try.getFinally()) - ) - or - // after each catch clause, control transfers to the finally block - exists(TryStmt try | last(try.getACatchClause(), n, completion) | - result = first(try.getFinally()) + n1.isAfter(assertstmt.getMessage()) and + n2.isAdditional(assertstmt, assertThrowNodeTag()) ) or - // Catch clauses first assign their variable and then execute their block - exists(CatchClause cc | completion = NormalCompletion() | - n.asStmt() = cc and result = first(cc.getVariable()) + // Synchronized statements execute their expression _before_ synchronization, so the CFG reflects that. + exists(SynchronizedStmt synch | + n1.isBefore(synch) and + n2.isBefore(synch.getExpr()) or - last(cc.getVariable(), n, completion) and result = first(cc.getBlock()) - ) - or - // Switch statements and expressions - exists(SwitchBlock switch | - exists(Expr switchExpr | - switchExpr = switch.(SwitchStmt).getExpr() or switchExpr = switch.(SwitchExpr).getExpr() - | - // From the entry point control is transferred first to the expression... - n.getAstNode() = switch and - result = first(switchExpr) and - completion = NormalCompletion() - or - // ...and then to any case up to and including the first pattern case, if any. - last(switchExpr, n, completion) and - result = first(getAFirstSwitchCase(switch)) and - completion = NormalCompletion() - ) + n1.isAfter(synch.getExpr()) and + n2.isIn(synch) or - // Statements within a switch body execute sequentially. - // Note this includes non-rule case statements and the successful pattern match successor - // of a non-rule pattern case statement. Rule case statements do not complete normally - // (they always break or yield). - // Exception: falling through into a pattern case statement (which necessarily does not - // declare any named variables) must skip one or more such statements, otherwise we would - // incorrectly apply their type test and/or guard. - exists(Stmt pred, Stmt succ | - isNextNormalSwitchStmt(switch, pred, succ) and - last(pred, n, completion) and - result = first(succ) and - (completion = NormalCompletion() or completion = BooleanCompletion(true, _)) - ) + n1.isIn(synch) and + n2.isBefore(synch.getBlock()) or - // A pattern case that completes boolean false (type test or guard failure) continues to consider other cases: - exists(PatternCase case | completion = BooleanCompletion(false, _) | - last(case, n, completion) and result.asStmt() = getASuccessorSwitchCase(case, switch) - ) + n1.isAfter(synch.getBlock()) and + n2.isAfter(synch) ) or - // Pattern cases have internal edges: - // * Type test success -true-> one of the possible sets of variable declarations - // n.b. for unnamed patterns (e.g. case A _, B _) this means that *one* of the - // type tests has succeeded. There aren't enough nodes in the AST to describe - // a sequential test in detail, so CFG consumers have to watch out for this case. - // * Variable declarations -normal-> guard evaluation - // * Variable declarations -normal-> rule execution (when there is no guard) - // * Guard success -true-> rule execution - exists(PatternCase pc | - n.asStmt() = pc and - completion = basicBooleanCompletion(true) and - result = first(pc.getAPattern()) - or - last(pc.getAPattern(), n, completion) and - completion = NormalCompletion() and - result = first(pc.getGuard()) + exists(WhenExpr whenexpr | + n1.isBefore(whenexpr) and + n2.isBefore(whenexpr.getBranch(0)) or - lastPatternCaseMatchingOp(pc, n, completion) and - ( - result = first(pc.getRuleExpression()) + exists(int i, WhenBranch branch | branch = whenexpr.getBranch(i) | + // The `.isAfter(branch)` nodes are not needed, so they're simply skipped. + n1.isBefore(branch) and + n2.isBefore(branch.getCondition()) or - result = first(pc.getRuleStatement()) - ) - ) - or - // Non-pattern cases have an internal edge leading to their rule body if any when the case matches. - exists(SwitchCase case | n.asStmt() = case | - not case instanceof PatternCase and - completion = NormalCompletion() and - ( - result = first(case.getRuleExpression()) + n1.isAfterTrue(branch.getCondition()) and + n2.isBefore(branch.getRhs()) or - result = first(case.getRuleStatement()) - ) - ) - or - // Yield - exists(YieldStmt yield | completion = NormalCompletion() | - n.asStmt() = yield and result = first(yield.getValue()) - ) - or - // Synchronized statements execute their expression _before_ synchronization, so the CFG reflects that. - exists(SynchronizedStmt synch | completion = NormalCompletion() | - last(synch.getExpr(), n, completion) and result.asStmt() = synch - or - n.asStmt() = synch and result = first(synch.getBlock()) - ) - or - result = first(n.asStmt().(ExprStmt).getExpr()) and completion = NormalCompletion() - or - result = first(n.asExpr().(StmtExpr).getStmt()) and completion = NormalCompletion() - or - result = first(n.asStmt().(LabeledStmt).getStmt()) and completion = NormalCompletion() - or - // Variable declarations in a variable declaration statement are executed sequentially. - exists(LocalVariableDeclStmt s | completion = NormalCompletion() | - n.asStmt() = s and result = first(s.getVariable(1)) - or - exists(int i | last(s.getVariable(i), n, completion) and result = first(s.getVariable(i + 1))) - ) - or - // Assert statements: - exists(AssertStmt assertstmt | - last(assertstmt.getExpr(), n, completion) and - completion = BooleanCompletion(true, _) and - result.asStmt() = assertstmt - or - last(assertstmt.getExpr(), n, completion) and - completion = BooleanCompletion(false, _) and - ( - result = first(assertstmt.getMessage()) + n1.isAfterFalse(branch.getCondition()) and + ( + n2.isBefore(whenexpr.getBranch(i + 1)) + or + not exists(whenexpr.getBranch(i + 1)) and + n2.isAfter(whenexpr) + ) or - not exists(assertstmt.getMessage()) and - result.(AssertThrowNode).getAstNode() = assertstmt + n1.isAfter(branch.getRhs()) and + n2.isAfter(whenexpr) ) - or - last(assertstmt.getMessage(), n, completion) and - completion = NormalCompletion() and - result.(AssertThrowNode).getAstNode() = assertstmt - ) - or - // When expressions: - exists(WhenExpr whenexpr | - n.asExpr() = whenexpr and - result = first(whenexpr.getBranch(0)) and - completion = NormalCompletion() - or - exists(int i | - last(whenexpr.getBranch(i), n, completion) and - completion = BooleanCompletion(false, _) and - result = first(whenexpr.getBranch(i + 1)) - ) - ) - or - // When branches: - exists(WhenBranch whenbranch | - n.asStmt() = whenbranch and - completion = NormalCompletion() and - result = first(whenbranch.getCondition()) - or - last(whenbranch.getCondition(), n, completion) and - completion = BooleanCompletion(true, _) and - result = first(whenbranch.getRhs()) - ) - } - - /* - * Conditions give rise to nodes with two normal successors, a true successor - * and a false successor. At least one of them is completely contained in the - * AST node of the branching construct and is therefore tagged with the - * corresponding `booleanCompletion` in the `succ` relation (for example, the - * then-branch of an if-statement, or the right operand of a binary logic - * expression). The other successor may be tagged with either the corresponding - * `booleanCompletion` (for example in an if-statement with an else-branch or - * in a `ConditionalExpr`) or a `normalCompletion` (for example in an - * if-statement without an else-part). - * - * If the other successor ends a finally block it may also be tagged with an - * abnormal completion instead of a `normalCompletion`. This completion is - * calculated by the `resumption` predicate. In this case the successor might - * no longer be unique, as there can be multiple completions to be resumed - * after the finally block. - */ - - /** - * Gets the _resumption_ for cfg node `n`, that is, the completion according - * to which control flow is determined if `n` completes normally. - * - * In most cases, the resumption is simply the normal completion, except if - * `n` is the last node of a `finally` block, in which case it is the - * completion of any predecessors of the `finally` block as determined by - * predicate `finallyPred`, since their completion is resumed after normal - * completion of the `finally`. - */ - private Completion resumption(Node n) { - exists(TryStmt try | lastInFinally(try, n) and finallyPred(try, _, result)) - or - not lastInFinally(_, n) and result = NormalCompletion() - } - - /** - * A true- or false-successor that is tagged with the corresponding `booleanCompletion`. - * - * That is, the `booleanCompletion` is the label of the edge in the CFG. - */ - private Node mainBranchSucc(Node n, boolean b) { result = succ(n, BooleanCompletion(_, b)) } - - /** - * A true- or false-successor that is not tagged with a `booleanCompletion`. - * - * That is, the label of the edge in the CFG is a `normalCompletion` or - * some other completion if `n` occurs as the last node in a finally block. - * - * In the latter case, when `n` occurs as the last node in a finally block, there might be - * multiple different such successors. - */ - private Node otherBranchSucc(Node n, boolean b) { - exists(Node main | main = mainBranchSucc(n, b.booleanNot()) | - result = succ(n, resumption(n)) and - not result = main and - (b = true or b = false) ) } - - /** Gets a true- or false-successor of `n`. */ - cached - Node branchSuccessor(Node n, boolean branch) { - result = mainBranchSucc(n, branch) or - result = otherBranchSucc(n, branch) - } } -private import ControlFlowGraphImpl - -/** A control-flow node that branches based on a condition. */ -class ConditionNode extends ControlFlow::Node { - ConditionNode() { exists(branchSuccessor(this, _)) } +/** A control-flow node that branches based on a boolean condition. */ +class ConditionNode extends ControlFlowNode { + ConditionNode() { exists(this.getASuccessor(any(BooleanSuccessor t))) } /** Gets a true- or false-successor of the `ConditionNode`. */ - ControlFlow::Node getABranchSuccessor(boolean branch) { result = branchSuccessor(this, branch) } + ControlFlowNode getABranchSuccessor(boolean branch) { + result = this.getASuccessor(any(BooleanSuccessor t | t.getValue() = branch)) + } /** Gets a true-successor of the `ConditionNode`. */ - ControlFlow::Node getATrueSuccessor() { result = this.getABranchSuccessor(true) } + ControlFlowNode getATrueSuccessor() { result = this.getABranchSuccessor(true) } /** Gets a false-successor of the `ConditionNode`. */ - ControlFlow::Node getAFalseSuccessor() { result = this.getABranchSuccessor(false) } + ControlFlowNode getAFalseSuccessor() { result = this.getABranchSuccessor(false) } /** Gets the condition of this `ConditionNode`. */ ExprParent getCondition() { result = this.asExpr() or result = this.asStmt() } diff --git a/java/ql/lib/semmle/code/java/Conversions.qll b/java/ql/lib/semmle/code/java/Conversions.qll index 779eb7620bec..1855b7af54a1 100644 --- a/java/ql/lib/semmle/code/java/Conversions.qll +++ b/java/ql/lib/semmle/code/java/Conversions.qll @@ -69,7 +69,7 @@ class AssignmentConversionContext extends ConversionSite { class ReturnConversionSite extends ConversionSite { ReturnStmt r; - ReturnConversionSite() { this = r.getResult() } + ReturnConversionSite() { this = r.getExpr() } override Type getConversionTarget() { result = r.getEnclosingCallable().getReturnType() } diff --git a/java/ql/lib/semmle/code/java/Expr.qll b/java/ql/lib/semmle/code/java/Expr.qll index 4b03375c69ee..068ba100be98 100644 --- a/java/ql/lib/semmle/code/java/Expr.qll +++ b/java/ql/lib/semmle/code/java/Expr.qll @@ -113,7 +113,7 @@ class Expr extends ExprParent, @expr { if this instanceof CastingExpr or this instanceof NotNullExpr then result = this.(CastingExpr).getExpr().getUnderlyingExpr() or - result = this.(NotNullExpr).getExpr().getUnderlyingExpr() + result = this.(NotNullExpr).getOperand().getUnderlyingExpr() else result = this } } @@ -144,13 +144,13 @@ class CompileTimeConstantExpr extends Expr { this.(CastingExpr).getExpr().isCompileTimeConstant() or // The unary operators `+`, `-`, `~`, and `!` (but not `++` or `--`). - this.(PlusExpr).getExpr().isCompileTimeConstant() + this.(PlusExpr).getOperand().isCompileTimeConstant() or - this.(MinusExpr).getExpr().isCompileTimeConstant() + this.(MinusExpr).getOperand().isCompileTimeConstant() or - this.(BitNotExpr).getExpr().isCompileTimeConstant() + this.(BitNotExpr).getOperand().isCompileTimeConstant() or - this.(LogNotExpr).getExpr().isCompileTimeConstant() + this.(LogNotExpr).getOperand().isCompileTimeConstant() or // The multiplicative operators `*`, `/`, and `%`, // the additive operators `+` and `-`, @@ -166,8 +166,8 @@ class CompileTimeConstantExpr extends Expr { // The ternary conditional operator ` ? : `. exists(ConditionalExpr e | this = e | e.getCondition().isCompileTimeConstant() and - e.getTrueExpr().isCompileTimeConstant() and - e.getFalseExpr().isCompileTimeConstant() + e.getThen().isCompileTimeConstant() and + e.getElse().isCompileTimeConstant() ) or // Access to a final variable initialized by a compile-time constant. @@ -943,7 +943,7 @@ class LogicExpr extends Expr { /** Gets an operand of this logical expression. */ Expr getAnOperand() { this.(BinaryExpr).getAnOperand() = result or - this.(UnaryExpr).getExpr() = result + this.(UnaryExpr).getOperand() = result } } @@ -1039,8 +1039,15 @@ class ReferenceEqualityTest extends EqualityTest { /** A common super-class that represents unary operator expressions. */ class UnaryExpr extends Expr, @unaryexpr { + /** + * DEPRECATED: Use `getOperand()` instead. + * + * Gets the operand expression. + */ + deprecated Expr getExpr() { result.getParent() = this } + /** Gets the operand expression. */ - Expr getExpr() { result.getParent() = this } + Expr getOperand() { result.getParent() = this } } /** @@ -1238,6 +1245,9 @@ class ClassInstanceExpr extends Expr, ConstructorCall, @classinstancexpr { /** Gets the immediately enclosing statement of this class instance creation expression. */ override Stmt getEnclosingStmt() { result = Expr.super.getEnclosingStmt() } + /** Gets the `ControlFlowNode` corresponding to this call. */ + override ControlFlowNode getControlFlowNode() { result = Expr.super.getControlFlowNode() } + /** Gets a printable representation of this expression. */ override string toString() { result = "new " + this.getConstructor().getName() + "(...)" @@ -1305,7 +1315,7 @@ class LambdaExpr extends FunctionalExpr, @lambdaexpr { /** Gets the body of this lambda expression, if it is an expression. */ Expr getExprBody() { - this.hasExprBody() and result = this.asMethod().getBody().getAChild().(ReturnStmt).getResult() + this.hasExprBody() and result = this.asMethod().getBody().getAChild().(ReturnStmt).getExpr() } /** Gets the body of this lambda expression, if it is a statement. */ @@ -1340,7 +1350,7 @@ class MemberRefExpr extends FunctionalExpr, @memberref { exists(Stmt stmt | stmt = this.asMethod().getBody().(SingletonBlock).getStmt() and ( - result = stmt.(ReturnStmt).getResult() + result = stmt.(ReturnStmt).getExpr() or // Note: Currently never an ExprStmt, but might change once https://github.com/github/codeql/issues/3605 is fixed result = stmt.(ExprStmt).getExpr() @@ -1456,27 +1466,43 @@ class ConditionalExpr extends Expr, @conditionalexpr { /** Gets the condition of this conditional expression. */ Expr getCondition() { result.isNthChildOf(this, 0) } + /** + * DEPRECATED: Use `getThen()` instead. + * + * Gets the expression that is evaluated if the condition of this + * conditional expression evaluates to `true`. + */ + deprecated Expr getTrueExpr() { result.isNthChildOf(this, 1) } + + /** + * DEPRECATED: Use `getElse()` instead. + * + * Gets the expression that is evaluated if the condition of this + * conditional expression evaluates to `false`. + */ + deprecated Expr getFalseExpr() { result.isNthChildOf(this, 2) } + /** * Gets the expression that is evaluated if the condition of this * conditional expression evaluates to `true`. */ - Expr getTrueExpr() { result.isNthChildOf(this, 1) } + Expr getThen() { result.isNthChildOf(this, 1) } /** * Gets the expression that is evaluated if the condition of this * conditional expression evaluates to `false`. */ - Expr getFalseExpr() { result.isNthChildOf(this, 2) } + Expr getElse() { result.isNthChildOf(this, 2) } /** * Gets the expression that is evaluated by the specific branch of this - * conditional expression. If `true` that is `getTrueExpr()`, if `false` - * it is `getFalseExpr()`. + * conditional expression. If `true` that is `getThen()`, if `false` + * it is `getElse()`. */ Expr getBranchExpr(boolean branch) { - branch = true and result = this.getTrueExpr() + branch = true and result = this.getThen() or - branch = false and result = this.getFalseExpr() + branch = false and result = this.getElse() } /** @@ -1773,14 +1799,14 @@ class VariableUpdate extends Expr { VariableUpdate() { this.(Assignment).getDest() instanceof VarAccess or this instanceof LocalVariableDeclExpr or - this.(UnaryAssignExpr).getExpr() instanceof VarAccess + this.(UnaryAssignExpr).getOperand() instanceof VarAccess } /** Gets the destination of this variable update. */ Variable getDestVar() { result.getAnAccess() = this.(Assignment).getDest() or result = this.(LocalVariableDeclExpr).getVariable() or - result.getAnAccess() = this.(UnaryAssignExpr).getExpr() + result.getAnAccess() = this.(UnaryAssignExpr).getOperand() } } @@ -1970,7 +1996,7 @@ class VarAccess extends Expr, @varaccess { */ predicate isVarWrite() { exists(Assignment a | a.getDest() = this) or - exists(UnaryAssignExpr e | e.getExpr() = this) + exists(UnaryAssignExpr e | e.getOperand() = this) } /** @@ -2090,6 +2116,9 @@ class MethodCall extends Expr, Call, @methodaccess { /** Gets the immediately enclosing statement that contains this method access. */ override Stmt getEnclosingStmt() { result = Expr.super.getEnclosingStmt() } + /** Gets the `ControlFlowNode` corresponding to this call. */ + override ControlFlowNode getControlFlowNode() { result = Expr.super.getControlFlowNode() } + /** Gets a printable representation of this expression. */ override string toString() { if exists(this.getMethod()) @@ -2282,6 +2311,9 @@ class Call extends ExprParent, @caller { /** Gets the enclosing statement of this call. */ /*abstract*/ Stmt getEnclosingStmt() { none() } + /** Gets the `ControlFlowNode` corresponding to this call. */ + /*abstract*/ ControlFlowNode getControlFlowNode() { none() } + /** Gets the number of arguments provided in this call. */ int getNumArgument() { count(this.getAnArgument()) = result } diff --git a/java/ql/lib/semmle/code/java/J2EE.qll b/java/ql/lib/semmle/code/java/J2EE.qll index 4412b3715e34..4cfffcdfa9fa 100644 --- a/java/ql/lib/semmle/code/java/J2EE.qll +++ b/java/ql/lib/semmle/code/java/J2EE.qll @@ -6,52 +6,67 @@ module; import Type +/** Gets "java" or "jakarta". */ +string javaxOrJakarta() { result = ["javax", "jakarta"] } + /** An entity bean. */ class EntityBean extends Class { EntityBean() { - exists(Interface i | i.hasQualifiedName("javax.ejb", "EntityBean") | this.hasSupertype+(i)) + exists(Interface i | i.hasQualifiedName(javaxOrJakarta() + ".ejb", "EntityBean") | + this.hasSupertype+(i) + ) } } /** An enterprise bean. */ class EnterpriseBean extends RefType { EnterpriseBean() { - exists(Interface i | i.hasQualifiedName("javax.ejb", "EnterpriseBean") | this.hasSupertype+(i)) + exists(Interface i | i.hasQualifiedName(javaxOrJakarta() + ".ejb", "EnterpriseBean") | + this.hasSupertype+(i) + ) } } /** A local EJB home interface. */ class LocalEjbHomeInterface extends Interface { LocalEjbHomeInterface() { - exists(Interface i | i.hasQualifiedName("javax.ejb", "EJBLocalHome") | this.hasSupertype+(i)) + exists(Interface i | i.hasQualifiedName(javaxOrJakarta() + ".ejb", "EJBLocalHome") | + this.hasSupertype+(i) + ) } } /** A remote EJB home interface. */ class RemoteEjbHomeInterface extends Interface { RemoteEjbHomeInterface() { - exists(Interface i | i.hasQualifiedName("javax.ejb", "EJBHome") | this.hasSupertype+(i)) + exists(Interface i | i.hasQualifiedName(javaxOrJakarta() + ".ejb", "EJBHome") | + this.hasSupertype+(i) + ) } } /** A local EJB interface. */ class LocalEjbInterface extends Interface { LocalEjbInterface() { - exists(Interface i | i.hasQualifiedName("javax.ejb", "EJBLocalObject") | this.hasSupertype+(i)) + exists(Interface i | i.hasQualifiedName(javaxOrJakarta() + ".ejb", "EJBLocalObject") | + this.hasSupertype+(i) + ) } } /** A remote EJB interface. */ class RemoteEjbInterface extends Interface { RemoteEjbInterface() { - exists(Interface i | i.hasQualifiedName("javax.ejb", "EJBObject") | this.hasSupertype+(i)) + exists(Interface i | i.hasQualifiedName(javaxOrJakarta() + ".ejb", "EJBObject") | + this.hasSupertype+(i) + ) } } /** A message bean. */ class MessageBean extends Class { MessageBean() { - exists(Interface i | i.hasQualifiedName("javax.ejb", "MessageDrivenBean") | + exists(Interface i | i.hasQualifiedName(javaxOrJakarta() + ".ejb", "MessageDrivenBean") | this.hasSupertype+(i) ) } @@ -60,6 +75,8 @@ class MessageBean extends Class { /** A session bean. */ class SessionBean extends Class { SessionBean() { - exists(Interface i | i.hasQualifiedName("javax.ejb", "SessionBean") | this.hasSupertype+(i)) + exists(Interface i | i.hasQualifiedName(javaxOrJakarta() + ".ejb", "SessionBean") | + this.hasSupertype+(i) + ) } } diff --git a/java/ql/lib/semmle/code/java/JDK.qll b/java/ql/lib/semmle/code/java/JDK.qll index f965fbfe6ba6..93562c7c3d80 100644 --- a/java/ql/lib/semmle/code/java/JDK.qll +++ b/java/ql/lib/semmle/code/java/JDK.qll @@ -48,13 +48,19 @@ class StringContainsMethod extends Method { } /** A call to the `java.lang.String.matches` method. */ -class StringMatchesCall extends MethodCall { +class StringMatchesCall extends MethodCall, RegexMatch::Range { StringMatchesCall() { exists(Method m | m = this.getMethod() | m.getDeclaringType() instanceof TypeString and m.hasName("matches") ) } + + override Expr getRegex() { result = this.getArgument(0) } + + override Expr getString() { result = this.getQualifier() } + + override string getName() { result = "String.matches" } } /** A call to the `java.lang.String.replaceAll` method. */ diff --git a/java/ql/lib/semmle/code/java/JMX.qll b/java/ql/lib/semmle/code/java/JMX.qll index 3f18e0ecf3d3..a951b2a7d1a2 100644 --- a/java/ql/lib/semmle/code/java/JMX.qll +++ b/java/ql/lib/semmle/code/java/JMX.qll @@ -18,7 +18,7 @@ class MBean extends ManagedBean { class MXBean extends ManagedBean { MXBean() { this.getQualifiedName().matches("%MXBean%") or - this.getAnAnnotation().getType().hasQualifiedName("javax.management", "MXBean") + this.getAnAnnotation().getType().hasQualifiedName(javaxOrJakarta() + ".management", "MXBean") } } @@ -61,7 +61,7 @@ class JmxRegistrationCall extends MethodCall { class JmxRegistrationMethod extends Method { JmxRegistrationMethod() { // A direct registration with the `MBeanServer`. - this.getDeclaringType().hasQualifiedName("javax.management", "MBeanServer") and + this.getDeclaringType().hasQualifiedName(javaxOrJakarta() + ".management", "MBeanServer") and this.getName() = "registerMBean" or // The `MBeanServer` is often wrapped by an application specific management class, so identify @@ -78,7 +78,7 @@ class JmxRegistrationMethod extends Method { */ int getObjectPosition() { // Passed as the first argument to `registerMBean`. - this.getDeclaringType().hasQualifiedName("javax.management", "MBeanServer") and + this.getDeclaringType().hasQualifiedName(javaxOrJakarta() + ".management", "MBeanServer") and this.getName() = "registerMBean" and result = 0 or @@ -92,16 +92,20 @@ class JmxRegistrationMethod extends Method { /** The class `javax.management.remote.JMXConnectorFactory`. */ class TypeJmxConnectorFactory extends Class { TypeJmxConnectorFactory() { - this.hasQualifiedName("javax.management.remote", "JMXConnectorFactory") + this.hasQualifiedName(javaxOrJakarta() + ".management.remote", "JMXConnectorFactory") } } /** The class `javax.management.remote.JMXServiceURL`. */ class TypeJmxServiceUrl extends Class { - TypeJmxServiceUrl() { this.hasQualifiedName("javax.management.remote", "JMXServiceURL") } + TypeJmxServiceUrl() { + this.hasQualifiedName(javaxOrJakarta() + ".management.remote", "JMXServiceURL") + } } /** The class `javax.management.remote.rmi.RMIConnector`. */ class TypeRmiConnector extends Class { - TypeRmiConnector() { this.hasQualifiedName("javax.management.remote.rmi", "RMIConnector") } + TypeRmiConnector() { + this.hasQualifiedName(javaxOrJakarta() + ".management.remote.rmi", "RMIConnector") + } } diff --git a/java/ql/lib/semmle/code/java/Member.qll b/java/ql/lib/semmle/code/java/Member.qll index 17fe696972f6..23e08c4e6b60 100644 --- a/java/ql/lib/semmle/code/java/Member.qll +++ b/java/ql/lib/semmle/code/java/Member.qll @@ -680,13 +680,13 @@ class GetterMethod extends Method { GetterMethod() { this.hasNoParameters() and exists(ReturnStmt s, Field f | s = this.getBody().(SingletonBlock).getStmt() | - s.getResult() = f.getAnAccess() + s.getExpr() = f.getAnAccess() ) } /** Gets the field whose value is returned by this getter method. */ Field getField() { - exists(ReturnStmt r | r.getEnclosingCallable() = this | r.getResult() = result.getAnAccess()) + exists(ReturnStmt r | r.getEnclosingCallable() = this | r.getExpr() = result.getAnAccess()) } } diff --git a/java/ql/lib/semmle/code/java/PrettyPrintAst.qll b/java/ql/lib/semmle/code/java/PrettyPrintAst.qll index 3d907a5a0991..59a59cd9cdd0 100644 --- a/java/ql/lib/semmle/code/java/PrettyPrintAst.qll +++ b/java/ql/lib/semmle/code/java/PrettyPrintAst.qll @@ -257,7 +257,7 @@ private class PpUnaryExpr extends PpAst, UnaryExpr { i = 2 and result = "--" and this instanceof PostDecExpr } - override PpAst getChild(int i) { i = 1 and result = this.getExpr() } + override PpAst getChild(int i) { i = 1 and result = this.getOperand() } } private class PpCastExpr extends PpAst, CastExpr { @@ -351,9 +351,9 @@ private class PpConditionalExpr extends PpAst, ConditionalExpr { override PpAst getChild(int i) { i = 0 and result = this.getCondition() or - i = 2 and result = this.getTrueExpr() + i = 2 and result = this.getThen() or - i = 4 and result = this.getFalseExpr() + i = 4 and result = this.getElse() } } @@ -577,7 +577,7 @@ private class PpForStmt extends PpAst, ForStmt { or i = 1 + this.lastUpdateIndex() and result = ")" or - i = 2 + this.lastUpdateIndex() and result = " " and this.getStmt() instanceof BlockStmt + i = 2 + this.lastUpdateIndex() and result = " " and this.getBody() instanceof BlockStmt } private int lastInitIndex() { result = 3 + 2 * max(int j | exists(this.getInit(j))) } @@ -587,7 +587,7 @@ private class PpForStmt extends PpAst, ForStmt { } override predicate newline(int i) { - i = 2 + this.lastUpdateIndex() and not this.getStmt() instanceof BlockStmt + i = 2 + this.lastUpdateIndex() and not this.getBody() instanceof BlockStmt } override PpAst getChild(int i) { @@ -599,11 +599,11 @@ private class PpForStmt extends PpAst, ForStmt { or exists(int j | result = this.getUpdate(j) and i = 4 + this.lastInitIndex() + 2 * j) or - i = 3 + this.lastUpdateIndex() and result = this.getStmt() + i = 3 + this.lastUpdateIndex() and result = this.getBody() } override predicate indents(int i) { - i = 3 + this.lastUpdateIndex() and not this.getStmt() instanceof BlockStmt + i = 3 + this.lastUpdateIndex() and not this.getBody() instanceof BlockStmt } } @@ -616,7 +616,7 @@ private class PpEnhancedForStmt extends PpAst, EnhancedForStmt { i = 4 and result = " : " or i = 6 and - if this.getStmt() instanceof BlockStmt then result = ") " else result = ")" + if this.getBody() instanceof BlockStmt then result = ") " else result = ")" } override PpAst getChild(int i) { @@ -626,10 +626,10 @@ private class PpEnhancedForStmt extends PpAst, EnhancedForStmt { or i = 5 and result = this.getExpr() or - i = 7 and result = this.getStmt() + i = 7 and result = this.getBody() } - override predicate indents(int i) { i = 7 and not this.getStmt() instanceof BlockStmt } + override predicate indents(int i) { i = 7 and not this.getBody() instanceof BlockStmt } } private class PpWhileStmt extends PpAst, WhileStmt { @@ -638,40 +638,40 @@ private class PpWhileStmt extends PpAst, WhileStmt { or i = 2 and result = ")" or - i = 3 and result = " " and this.getStmt() instanceof BlockStmt + i = 3 and result = " " and this.getBody() instanceof BlockStmt } - override predicate newline(int i) { i = 3 and not this.getStmt() instanceof BlockStmt } + override predicate newline(int i) { i = 3 and not this.getBody() instanceof BlockStmt } override PpAst getChild(int i) { i = 1 and result = this.getCondition() or - i = 4 and result = this.getStmt() + i = 4 and result = this.getBody() } - override predicate indents(int i) { i = 4 and not this.getStmt() instanceof BlockStmt } + override predicate indents(int i) { i = 4 and not this.getBody() instanceof BlockStmt } } private class PpDoStmt extends PpAst, DoStmt { override string getPart(int i) { i = 0 and result = "do" or - i in [1, 3] and result = " " and this.getStmt() instanceof BlockStmt + i in [1, 3] and result = " " and this.getBody() instanceof BlockStmt or i = 4 and result = "while (" or i = 6 and result = ");" } - override predicate newline(int i) { i in [1, 3] and not this.getStmt() instanceof BlockStmt } + override predicate newline(int i) { i in [1, 3] and not this.getBody() instanceof BlockStmt } override PpAst getChild(int i) { - i = 2 and result = this.getStmt() + i = 2 and result = this.getBody() or i = 5 and result = this.getCondition() } - override predicate indents(int i) { i = 2 and not this.getStmt() instanceof BlockStmt } + override predicate indents(int i) { i = 2 and not this.getBody() instanceof BlockStmt } } private class PpTryStmt extends PpAst, TryStmt { @@ -854,7 +854,7 @@ private class PpSynchronizedStmt extends PpAst, SynchronizedStmt { private class PpReturnStmt extends PpAst, ReturnStmt { override string getPart(int i) { - if exists(this.getResult()) + if exists(this.getExpr()) then i = 0 and result = "return " or @@ -864,7 +864,7 @@ private class PpReturnStmt extends PpAst, ReturnStmt { ) } - override PpAst getChild(int i) { i = 1 and result = this.getResult() } + override PpAst getChild(int i) { i = 1 and result = this.getExpr() } } private class PpThrowStmt extends PpAst, ThrowStmt { diff --git a/java/ql/lib/semmle/code/java/Statement.qll b/java/ql/lib/semmle/code/java/Statement.qll index 2aea8b006ae1..e2c7779b43cb 100644 --- a/java/ql/lib/semmle/code/java/Statement.qll +++ b/java/ql/lib/semmle/code/java/Statement.qll @@ -61,7 +61,7 @@ class Stmt extends StmtParent, ExprParent, @stmt { } /** A statement parent is any element that can have a statement as its child. */ -class StmtParent extends @stmtparent, Top { } +class StmtParent extends @stmtparent, ExprParent { } /** * An error statement. @@ -140,7 +140,7 @@ class IfStmt extends ConditionalStmt, @ifstmt { } /** A `for` loop. */ -class ForStmt extends ConditionalStmt, @forstmt { +class ForStmt extends ConditionalStmt, LoopStmtImpl, @forstmt { /** * Gets an initializer expression of the loop. * @@ -167,8 +167,15 @@ class ForStmt extends ConditionalStmt, @forstmt { index = result.getIndex() - 3 } + /** + * DEPRECATED: Use `getBody()` instead. + * + * Gets the body of this `for` loop. + */ + deprecated Stmt getStmt() { result.getParent() = this and result.getIndex() = 2 } + /** Gets the body of this `for` loop. */ - Stmt getStmt() { result.getParent() = this and result.getIndex() = 2 } + override Stmt getBody() { result.getParent() = this and result.getIndex() = 2 } /** * Gets a variable that is used as an iteration variable: it is defined, @@ -184,14 +191,14 @@ class ForStmt extends ConditionalStmt, @forstmt { Variable getAnIterationVariable() { // Check that the variable is assigned to, incremented or decremented in the update expression, and... exists(Expr update | update = this.getAnUpdate().getAChildExpr*() | - update.(UnaryAssignExpr).getExpr() = result.getAnAccess() or + update.(UnaryAssignExpr).getOperand() = result.getAnAccess() or update = result.getAnAssignedValue() ) and // ...that it is checked or used in the condition. this.getCondition().getAChildExpr*() = result.getAnAccess() } - override string pp() { result = "for (...;...;...) " + this.getStmt().pp() } + override string pp() { result = "for (...;...;...) " + this.getBody().pp() } override string toString() { result = "for (...;...;...)" } @@ -201,17 +208,24 @@ class ForStmt extends ConditionalStmt, @forstmt { } /** An enhanced `for` loop. (Introduced in Java 5.) */ -class EnhancedForStmt extends Stmt, @enhancedforstmt { +class EnhancedForStmt extends LoopStmtImpl, @enhancedforstmt { /** Gets the local variable declaration expression of this enhanced `for` loop. */ LocalVariableDeclExpr getVariable() { result.getParent() = this } /** Gets the expression over which this enhanced `for` loop iterates. */ Expr getExpr() { result.isNthChildOf(this, 1) } + /** + * DEPRECATED: Use `getBody()` instead. + * + * Gets the body of this enhanced `for` loop. + */ + deprecated Stmt getStmt() { result.getParent() = this } + /** Gets the body of this enhanced `for` loop. */ - Stmt getStmt() { result.getParent() = this } + override Stmt getBody() { result.getParent() = this } - override string pp() { result = "for (... : ...) " + this.getStmt().pp() } + override string pp() { result = "for (... : ...) " + this.getBody().pp() } override string toString() { result = "for (... : ...)" } @@ -221,14 +235,21 @@ class EnhancedForStmt extends Stmt, @enhancedforstmt { } /** A `while` loop. */ -class WhileStmt extends ConditionalStmt, @whilestmt { +class WhileStmt extends ConditionalStmt, LoopStmtImpl, @whilestmt { /** Gets the boolean condition of this `while` loop. */ override Expr getCondition() { result.getParent() = this } + /** + * DEPRECATED: Use `getBody()` instead. + * + * Gets the body of this `while` loop. + */ + deprecated Stmt getStmt() { result.getParent() = this } + /** Gets the body of this `while` loop. */ - Stmt getStmt() { result.getParent() = this } + override Stmt getBody() { result.getParent() = this } - override string pp() { result = "while (...) " + this.getStmt().pp() } + override string pp() { result = "while (...) " + this.getBody().pp() } override string toString() { result = "while (...)" } @@ -238,14 +259,21 @@ class WhileStmt extends ConditionalStmt, @whilestmt { } /** A `do` loop. */ -class DoStmt extends ConditionalStmt, @dostmt { +class DoStmt extends ConditionalStmt, LoopStmtImpl, @dostmt { /** Gets the condition of this `do` loop. */ override Expr getCondition() { result.getParent() = this } + /** + * DEPRECATED: Use `getBody()` instead. + * + * Gets the body of this `do` loop. + */ + deprecated Stmt getStmt() { result.getParent() = this } + /** Gets the body of this `do` loop. */ - Stmt getStmt() { result.getParent() = this } + override Stmt getBody() { result.getParent() = this } - override string pp() { result = "do " + this.getStmt().pp() + " while (...)" } + override string pp() { result = "do " + this.getBody().pp() + " while (...)" } override string toString() { result = "do ... while (...)" } @@ -258,30 +286,16 @@ class DoStmt extends ConditionalStmt, @dostmt { * A loop statement, including `for`, enhanced `for`, * `while` and `do` statements. */ -class LoopStmt extends Stmt { - LoopStmt() { - this instanceof ForStmt or - this instanceof EnhancedForStmt or - this instanceof WhileStmt or - this instanceof DoStmt - } - +abstract private class LoopStmtImpl extends Stmt { /** Gets the body of this loop statement. */ - Stmt getBody() { - result = this.(ForStmt).getStmt() or - result = this.(EnhancedForStmt).getStmt() or - result = this.(WhileStmt).getStmt() or - result = this.(DoStmt).getStmt() - } + abstract Stmt getBody(); /** Gets the boolean condition of this loop statement. */ - Expr getCondition() { - result = this.(ForStmt).getCondition() or - result = this.(WhileStmt).getCondition() or - result = this.(DoStmt).getCondition() - } + Expr getCondition() { none() } } +final class LoopStmt = LoopStmtImpl; + /** A `try` statement. */ class TryStmt extends Stmt, @trystmt { /** Gets the block of the `try` statement. */ @@ -627,8 +641,15 @@ class SynchronizedStmt extends Stmt, @synchronizedstmt { /** A `return` statement. */ class ReturnStmt extends Stmt, @returnstmt { + /** + * DEPRECATED: Use `getExpr()` instead. + * + * Gets the expression returned by this `return` statement, if any. + */ + deprecated Expr getResult() { result.getParent() = this } + /** Gets the expression returned by this `return` statement, if any. */ - Expr getResult() { result.getParent() = this } + Expr getExpr() { result.getParent() = this } override string pp() { result = "return ..." } @@ -939,6 +960,9 @@ class ThisConstructorInvocationStmt extends Stmt, ConstructorCall, @constructori /** Gets the immediately enclosing statement of this constructor invocation. */ override Stmt getEnclosingStmt() { result = this } + /** Gets the `ControlFlowNode` corresponding to this call. */ + override ControlFlowNode getControlFlowNode() { result = Stmt.super.getControlFlowNode() } + override string pp() { result = "this(...)" } override string toString() { result = "this(...)" } @@ -980,6 +1004,9 @@ class SuperConstructorInvocationStmt extends Stmt, ConstructorCall, @superconstr /** Gets the immediately enclosing statement of this constructor invocation. */ override Stmt getEnclosingStmt() { result = this } + /** Gets the `ControlFlowNode` corresponding to this call. */ + override ControlFlowNode getControlFlowNode() { result = Stmt.super.getControlFlowNode() } + override string pp() { result = "super(...)" } override string toString() { result = "super(...)" } diff --git a/java/ql/lib/semmle/code/java/arithmetic/Overflow.qll b/java/ql/lib/semmle/code/java/arithmetic/Overflow.qll index 471f271eb866..e82192b0fbaf 100644 --- a/java/ql/lib/semmle/code/java/arithmetic/Overflow.qll +++ b/java/ql/lib/semmle/code/java/arithmetic/Overflow.qll @@ -93,7 +93,7 @@ class ArithExpr extends Expr { ) and forall(Expr e | e = this.(BinaryExpr).getAnOperand() or - e = this.(UnaryAssignExpr).getExpr() or + e = this.(UnaryAssignExpr).getOperand() or e = this.(AssignOp).getSource() | e.getType() instanceof NumType @@ -114,7 +114,7 @@ class ArithExpr extends Expr { */ Expr getLeftOperand() { result = this.(BinaryExpr).getLeftOperand() or - result = this.(UnaryAssignExpr).getExpr() or + result = this.(UnaryAssignExpr).getOperand() or result = this.(AssignOp).getDest() } @@ -128,7 +128,7 @@ class ArithExpr extends Expr { /** Gets an operand of this arithmetic expression. */ Expr getAnOperand() { result = this.(BinaryExpr).getAnOperand() or - result = this.(UnaryAssignExpr).getExpr() or + result = this.(UnaryAssignExpr).getOperand() or result = this.(AssignOp).getSource() } } diff --git a/java/ql/lib/semmle/code/java/comparison/Comparison.qll b/java/ql/lib/semmle/code/java/comparison/Comparison.qll index 7aea0f6fb258..4a2601678e2f 100644 --- a/java/ql/lib/semmle/code/java/comparison/Comparison.qll +++ b/java/ql/lib/semmle/code/java/comparison/Comparison.qll @@ -9,7 +9,7 @@ import java * Used as basis for the transitive closure in `exprImplies`. */ private predicate exprImpliesStep(Expr e1, boolean b1, Expr e2, boolean b2) { - e1.(LogNotExpr).getExpr() = e2 and + e1.(LogNotExpr).getOperand() = e2 and b2 = b1.booleanNot() and (b1 = true or b1 = false) or diff --git a/java/ql/lib/semmle/code/java/controlflow/BasicBlocks.qll b/java/ql/lib/semmle/code/java/controlflow/BasicBlocks.qll index f214cbbd0b1a..a5229bea590b 100644 --- a/java/ql/lib/semmle/code/java/controlflow/BasicBlocks.qll +++ b/java/ql/lib/semmle/code/java/controlflow/BasicBlocks.qll @@ -6,151 +6,8 @@ module; import java import Dominance -private import codeql.controlflow.BasicBlock as BB -private import codeql.controlflow.SuccessorType - -private module Input implements BB::InputSig { - /** Hold if `t` represents a conditional successor type. */ - predicate successorTypeIsCondition(SuccessorType t) { none() } - - /** A delineated part of the AST with its own CFG. */ - class CfgScope = Callable; - - /** The class of control flow nodes. */ - class Node = ControlFlowNode; - - /** Gets the CFG scope in which this node occurs. */ - CfgScope nodeGetCfgScope(Node node) { node.getEnclosingCallable() = result } - - /** Gets an immediate successor of this node. */ - Node nodeGetASuccessor(Node node, SuccessorType t) { result = node.getASuccessor(t) } - - /** - * Holds if `node` represents an entry node to be used when calculating - * dominance. - */ - predicate nodeIsDominanceEntry(Node node) { - exists(Stmt entrystmt | entrystmt = node.asStmt() | - exists(Callable c | entrystmt = c.getBody()) - or - // This disjunct is technically superfluous, but safeguards against extractor problems. - entrystmt instanceof BlockStmt and - not exists(entrystmt.getEnclosingCallable()) and - not entrystmt.getParent() instanceof Stmt - ) - } - - /** - * Holds if `node` represents an exit node to be used when calculating - * post dominance. - */ - predicate nodeIsPostDominanceExit(Node node) { node instanceof ControlFlow::NormalExitNode } -} - -private module BbImpl = BB::Make; - -import BbImpl - -/** Holds if the dominance relation is calculated for `bb`. */ -predicate hasDominanceInformation(BasicBlock bb) { - exists(BasicBlock entry | - Input::nodeIsDominanceEntry(entry.getFirstNode()) and entry.getASuccessor*() = bb - ) -} - -/** - * A basic block, that is, a maximal straight-line sequence of control flow nodes - * without branches or joins. - */ -class BasicBlock extends BbImpl::BasicBlock { - /** Gets the immediately enclosing callable whose body contains this node. */ - Callable getEnclosingCallable() { result = this.getScope() } - - /** - * Holds if this basic block dominates basic block `bb`. - * - * That is, all paths reaching `bb` from the entry point basic block must - * go through this basic block. - */ - predicate dominates(BasicBlock bb) { super.dominates(bb) } - - /** - * Holds if this basic block strictly dominates basic block `bb`. - * - * That is, all paths reaching `bb` from the entry point basic block must - * go through this basic block and this basic block is different from `bb`. - */ - predicate strictlyDominates(BasicBlock bb) { super.strictlyDominates(bb) } - - /** Gets an immediate successor of this basic block of a given type, if any. */ - BasicBlock getASuccessor(SuccessorType t) { result = super.getASuccessor(t) } - - BasicBlock getASuccessor() { result = super.getASuccessor() } - - BasicBlock getImmediateDominator() { result = super.getImmediateDominator() } - - predicate inDominanceFrontier(BasicBlock df) { super.inDominanceFrontier(df) } - - predicate strictlyPostDominates(BasicBlock bb) { super.strictlyPostDominates(bb) } - - predicate postDominates(BasicBlock bb) { super.postDominates(bb) } - - /** - * DEPRECATED: Use `getASuccessor` instead. - * - * Gets an immediate successor of this basic block. - */ - deprecated BasicBlock getABBSuccessor() { result = this.getASuccessor() } - - /** - * DEPRECATED: Use `getAPredecessor` instead. - * - * Gets an immediate predecessor of this basic block. - */ - deprecated BasicBlock getABBPredecessor() { result.getASuccessor() = this } - - /** - * DEPRECATED: Use `strictlyDominates` instead. - * - * Holds if this basic block strictly dominates `node`. - */ - deprecated predicate bbStrictlyDominates(BasicBlock node) { this.strictlyDominates(node) } - - /** - * DEPRECATED: Use `dominates` instead. - * - * Holds if this basic block dominates `node`. (This is reflexive.) - */ - deprecated predicate bbDominates(BasicBlock node) { this.dominates(node) } - - /** - * DEPRECATED: Use `strictlyPostDominates` instead. - * - * Holds if this basic block strictly post-dominates `node`. - */ - deprecated predicate bbStrictlyPostDominates(BasicBlock node) { this.strictlyPostDominates(node) } - - /** - * DEPRECATED: Use `postDominates` instead. - * - * Holds if this basic block post-dominates `node`. (This is reflexive.) - */ - deprecated predicate bbPostDominates(BasicBlock node) { this.postDominates(node) } -} /** A basic block that ends in an exit node. */ class ExitBlock extends BasicBlock { ExitBlock() { this.getLastNode() instanceof ControlFlow::ExitNode } } - -private class BasicBlockAlias = BasicBlock; - -module Cfg implements BB::CfgSig { - class ControlFlowNode = BbImpl::ControlFlowNode; - - class BasicBlock = BasicBlockAlias; - - class EntryBasicBlock extends BasicBlock instanceof BbImpl::EntryBasicBlock { } - - predicate dominatingEdge(BasicBlock bb1, BasicBlock bb2) { BbImpl::dominatingEdge(bb1, bb2) } -} diff --git a/java/ql/lib/semmle/code/java/controlflow/Guards.qll b/java/ql/lib/semmle/code/java/controlflow/Guards.qll index 0e1db1600949..5c0d0666f155 100644 --- a/java/ql/lib/semmle/code/java/controlflow/Guards.qll +++ b/java/ql/lib/semmle/code/java/controlflow/Guards.qll @@ -10,6 +10,7 @@ private import semmle.code.java.controlflow.Dominance private import semmle.code.java.controlflow.internal.Preconditions private import semmle.code.java.controlflow.internal.SwitchCases private import codeql.controlflow.Guards as SharedGuards +private import codeql.controlflow.SuccessorType /** * A basic block that terminates in a condition, splitting the subsequent control flow. @@ -75,70 +76,6 @@ class ConditionBlock extends BasicBlock { } } -// Join order engineering -- first determine the switch block and the case indices required, then retrieve them. -bindingset[switch, i] -pragma[inline_late] -private predicate isNthCaseOf(SwitchBlock switch, SwitchCase c, int i) { c.isNthCaseOf(switch, i) } - -/** - * Gets a switch case >= pred, up to but not including `pred`'s successor pattern case, - * where `pred` is declared on `switch`. - */ -private SwitchCase getACaseUpToNextPattern(PatternCase pred, SwitchBlock switch) { - // Note we do include `case null, default` (as well as plain old `default`) here. - not result.(ConstCase).getValue(_) instanceof NullLiteral and - exists(int maxCaseIndex | - switch = pred.getParent() and - if exists(getNextPatternCase(pred)) - then maxCaseIndex = getNextPatternCase(pred).getCaseIndex() - 1 - else maxCaseIndex = lastCaseIndex(switch) - | - isNthCaseOf(switch, result, [pred.getCaseIndex() .. maxCaseIndex]) - ) -} - -/** - * Gets the closest pattern case preceding `case`, including `case` itself, if any. - */ -private PatternCase getClosestPrecedingPatternCase(SwitchCase case) { - case = getACaseUpToNextPattern(result, _) -} - -/** - * Holds if `pred` is a control-flow predecessor of switch case `sc` that is not a - * fall-through from a previous case. - * - * For classic switches that means flow from the selector expression; for switches - * involving pattern cases it can also mean flow from a previous pattern case's type - * test or guard failing and proceeding to then consider subsequent cases. - */ -private predicate isNonFallThroughPredecessor(SwitchCase sc, ControlFlowNode pred) { - pred = sc.getControlFlowNode().getAPredecessor() and - ( - pred.asExpr().getParent*() = sc.getSelectorExpr() - or - // Ambiguous: in the case of `case String _ when x: case "SomeConstant":`, the guard `x` - // passing edge will fall through into the constant case, and the guard failing edge - // will test if the selector equals `"SomeConstant"` and if so branch to the same - // case statement. Therefore don't label this a non-fall-through predecessor. - exists(PatternCase previousPatternCase | - previousPatternCase = getClosestPrecedingPatternCase(sc) - | - pred.asExpr().getParent*() = previousPatternCase.getGuard() and - // Check there is any statement in between the previous pattern case and this one, - // or the case is a rule, so there is no chance of a fall-through. - ( - previousPatternCase.isRule() or - not previousPatternCase.getIndex() = sc.getIndex() - 1 - ) - ) - or - // Unambigious: on the test-passing edge there must be at least one intervening - // declaration node, including anonymous `_` declarations. - pred.asStmt() = getClosestPrecedingPatternCase(sc) - ) -} - private module GuardsInput implements SharedGuards::InputSig { private import java as J private import semmle.code.java.dataflow.internal.BaseSSA as Base @@ -231,29 +168,14 @@ private module GuardsInput implements SharedGuards::InputSig { } class NegateExpr extends UnaryExpr instanceof MinusExpr { - override Expr getOperand() { result = super.getExpr() } + override Expr getOperand() { result = MinusExpr.super.getOperand() } } class PreIncExpr extends UnaryExpr instanceof J::PreIncExpr { - override Expr getOperand() { result = super.getExpr() } + override Expr getOperand() { result = J::PreIncExpr.super.getOperand() } } class PreDecExpr extends UnaryExpr instanceof J::PreDecExpr { - override Expr getOperand() { result = super.getExpr() } + override Expr getOperand() { result = J::PreDecExpr.super.getOperand() } } class PostIncExpr extends UnaryExpr instanceof J::PostIncExpr { - override Expr getOperand() { result = super.getExpr() } + override Expr getOperand() { result = J::PostIncExpr.super.getOperand() } } class PostDecExpr extends UnaryExpr instanceof J::PostDecExpr { - override Expr getOperand() { result = super.getExpr() } + override Expr getOperand() { result = J::PostDecExpr.super.getOperand() } } class CopyValueExpr extends UnaryExpr { @@ -200,7 +200,7 @@ module Sem implements Semantic { } override Expr getOperand() { - result = this.(J::PlusExpr).getExpr() or + result = this.(J::PlusExpr).getOperand() or result = this.(J::AssignExpr).getSource() or result = this.(J::LocalVariableDeclExpr).getInit() } @@ -220,6 +220,8 @@ module Sem implements Semantic { int getBlockId1(BasicBlock bb) { idOf(bb, result) } + string getBlockId2(BasicBlock bb) { bb.getFirstNode().getIdTag() = result } + class Guard extends G::Guards_v2::Guard { Expr asExpr() { result = this } } diff --git a/java/ql/lib/semmle/code/java/dataflow/TypeFlow.qll b/java/ql/lib/semmle/code/java/dataflow/TypeFlow.qll index 361b4feb54a8..2c04a6413eb7 100644 --- a/java/ql/lib/semmle/code/java/dataflow/TypeFlow.qll +++ b/java/ql/lib/semmle/code/java/dataflow/TypeFlow.qll @@ -110,7 +110,7 @@ module FlowStepsInput implements UniversalFlow::UniversalFlowInput { n2.asSsa().(Base::SsaPhiDefinition).getAnUltimateDefinition() = n1.asSsa() or exists(ReturnStmt ret | - n2.asMethod() = ret.getEnclosingCallable() and ret.getResult() = n1.asExpr() + n2.asMethod() = ret.getEnclosingCallable() and ret.getExpr() = n1.asExpr() ) or viableImpl_v1(n2.asExpr()) = n1.asMethod() @@ -137,7 +137,7 @@ module FlowStepsInput implements UniversalFlow::UniversalFlowInput { or n2.asSsa().(Base::SsaCapturedDefinition).captures(n1.asSsa()) or - n2.asExpr().(NotNullExpr).getExpr() = n1.asExpr() + n2.asExpr().(NotNullExpr).getOperand() = n1.asExpr() } /** @@ -326,20 +326,45 @@ private module Input implements TypeFlowInput { ) } - /** - * Holds if `ioe` checks `v`, its true-successor is `bb`, and `bb` has multiple - * predecessors. - */ - private predicate instanceofDisjunct(InstanceOfExpr ioe, BasicBlock bb, Base::SsaDefinition v) { + /** Holds if `ioe` checks `v` and its true-successor is `bb`. */ + private predicate instanceofTrueSuccessor(InstanceOfExpr ioe, BasicBlock bb, Base::SsaDefinition v) { ioe.getExpr() = v.getARead() and - strictcount(bb.getAPredecessor()) > 1 and exists(ConditionBlock cb | cb.getCondition() = ioe and cb.getTestSuccessor(true) = bb) } - /** Holds if `bb` is disjunctively guarded by multiple `instanceof` tests on `v`. */ - private predicate instanceofDisjunction(BasicBlock bb, Base::SsaDefinition v) { - strictcount(InstanceOfExpr ioe | instanceofDisjunct(ioe, bb, v)) = - strictcount(bb.getAPredecessor()) + /** + * Holds if `bb` is disjunctively guarded by one (`trivial = true`) or more + * (`trivial = false`) `instanceof` tests on `v`. + */ + private predicate instanceofDisjunction(BasicBlock bb, Base::SsaDefinition v, boolean trivial) { + exists(int preds | + strictcount(bb.getAPredecessor()) = preds and + strictcount(InstanceOfExpr ioe | instanceofTrueSuccessor(ioe, bb, v)) = preds and + if preds > 1 then trivial = false else trivial = true + ) + or + strictcount(bb.getAPredecessor()) = 2 and + exists(BasicBlock pred1, BasicBlock pred2 | + pred1 != pred2 and + pred1 = bb.getAPredecessor() and + pred2 = bb.getAPredecessor() and + instanceofDisjunction(pred1, v, _) and + instanceofDisjunction(pred2, v, _) and + trivial = false + ) + } + + /** + * Holds if `bb` is disjunctively guarded by one or more `instanceof` tests + * on `v`, and `ioe` is one of those tests. + */ + private predicate instanceofDisjunct(InstanceOfExpr ioe, BasicBlock bb, Base::SsaDefinition v) { + instanceofDisjunction(bb, v, _) and + ( + instanceofTrueSuccessor(ioe, bb, v) + or + exists(BasicBlock pred | pred = bb.getAPredecessor() and instanceofDisjunct(ioe, pred, v)) + ) } /** @@ -348,7 +373,7 @@ private module Input implements TypeFlowInput { */ predicate instanceofDisjunctionGuarded(TypeFlowNode n, RefType t) { exists(BasicBlock bb, InstanceOfExpr ioe, Base::SsaDefinition v, VarAccess va | - instanceofDisjunction(bb, v) and + instanceofDisjunction(bb, v, false) and bb.dominates(va.getBasicBlock()) and va = v.getARead() and instanceofDisjunct(ioe, bb, v) and diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/BaseSSA.qll b/java/ql/lib/semmle/code/java/dataflow/internal/BaseSSA.qll index e373340d7d7c..07d871ab9bc8 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/BaseSSA.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/BaseSSA.qll @@ -87,14 +87,13 @@ private module BaseSsaImpl { result = TLocalVar(v.getCallable(), v) ) or - result.getAnAccess() = upd.(UnaryAssignExpr).getExpr() + result.getAnAccess() = upd.(UnaryAssignExpr).getOperand() } /** Holds if `n` updates the local variable `v`. */ predicate variableUpdate(BaseSsaSourceVariable v, ControlFlowNode n, BasicBlock b, int i) { exists(VariableUpdate a | a.getControlFlowNode() = n | getDestVar(a) = v) and - b.getNode(i) = n and - hasDominanceInformation(b) + b.getNode(i) = n } /** Gets the definition point of a nested class in the parent scope. */ @@ -132,7 +131,7 @@ private module BaseSsaImpl { inner != outer and inner.getDeclaringType() = innerclass and result = parentDef(desugaredGetEnclosingType*(innerclass)) and - result.getEnclosingStmt().getEnclosingCallable() = outer and + result.getEnclosingCallable() = outer and capturedvar = TLocalVar(outer, v) and closurevar = TLocalVar(inner, v) ) @@ -178,15 +177,12 @@ private module SsaImplInput implements SsaImplCommon::InputSig { predicate returnStep(Node n1, LocalSourceNode n2) { exists(ReturnStmt ret, Method m | ret.getEnclosingCallable() = m and - ret.getResult() = n1.asExpr() and + ret.getExpr() = n1.asExpr() and m = dispatch(n2.asExpr()) ) } diff --git a/java/ql/lib/semmle/code/java/dispatch/ObjFlow.qll b/java/ql/lib/semmle/code/java/dispatch/ObjFlow.qll index 239f4dd0fbc1..d5a4ee605712 100644 --- a/java/ql/lib/semmle/code/java/dispatch/ObjFlow.qll +++ b/java/ql/lib/semmle/code/java/dispatch/ObjFlow.qll @@ -53,7 +53,7 @@ private predicate viableArgParam(ArgumentNode arg, ParameterNode p) { private predicate returnStep(Node n1, Node n2) { exists(ReturnStmt ret, Method m | ret.getEnclosingCallable() = m and - ret.getResult() = n1.asExpr() and + ret.getExpr() = n1.asExpr() and pragma[only_bind_out](m) = dispatchCand(n2.asExpr()) ) } diff --git a/java/ql/lib/semmle/code/java/frameworks/JAXB.qll b/java/ql/lib/semmle/code/java/frameworks/JAXB.qll index 1283aa3d21e2..c781abdb8287 100644 --- a/java/ql/lib/semmle/code/java/frameworks/JAXB.qll +++ b/java/ql/lib/semmle/code/java/frameworks/JAXB.qll @@ -6,20 +6,20 @@ import semmle.code.java.Type class JaxbElement extends Class { JaxbElement() { - this.getAnAncestor().hasQualifiedName("javax.xml.bind", "JAXBElement") or + this.getAnAncestor().hasQualifiedName(javaxOrJakarta() + ".xml.bind", "JAXBElement") or this.getAnAnnotation().getType().getName() = "XmlRootElement" } } class JaxbMarshalMethod extends Method { JaxbMarshalMethod() { - this.getDeclaringType().hasQualifiedName("javax.xml.bind", "Marshaller") and + this.getDeclaringType().hasQualifiedName(javaxOrJakarta() + ".xml.bind", "Marshaller") and this.getName() = "marshal" } } class JaxbAnnotationType extends AnnotationType { - JaxbAnnotationType() { this.getPackage().getName() = "javax.xml.bind.annotation" } + JaxbAnnotationType() { this.getPackage().getName() = javaxOrJakarta() + ".xml.bind.annotation" } } class JaxbAnnotated extends Annotatable { diff --git a/java/ql/lib/semmle/code/java/frameworks/JavaxAnnotations.qll b/java/ql/lib/semmle/code/java/frameworks/JavaxAnnotations.qll index 22f33d346df0..3b70c42fbec9 100644 --- a/java/ql/lib/semmle/code/java/frameworks/JavaxAnnotations.qll +++ b/java/ql/lib/semmle/code/java/frameworks/JavaxAnnotations.qll @@ -14,35 +14,45 @@ import java * A `@javax.annotation.Generated` annotation. */ class GeneratedAnnotation extends Annotation { - GeneratedAnnotation() { this.getType().hasQualifiedName("javax.annotation", "Generated") } + GeneratedAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".annotation", "Generated") + } } /** * A `@javax.annotation.PostConstruct` annotation. */ class PostConstructAnnotation extends Annotation { - PostConstructAnnotation() { this.getType().hasQualifiedName("javax.annotation", "PostConstruct") } + PostConstructAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".annotation", "PostConstruct") + } } /** * A `@javax.annotation.PreDestroy` annotation. */ class PreDestroyAnnotation extends Annotation { - PreDestroyAnnotation() { this.getType().hasQualifiedName("javax.annotation", "PreDestroy") } + PreDestroyAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".annotation", "PreDestroy") + } } /** * A `@javax.annotation.Resource` annotation. */ class ResourceAnnotation extends Annotation { - ResourceAnnotation() { this.getType().hasQualifiedName("javax.annotation", "Resource") } + ResourceAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".annotation", "Resource") + } } /** * A `@javax.annotation.Resources` annotation. */ class ResourcesAnnotation extends Annotation { - ResourcesAnnotation() { this.getType().hasQualifiedName("javax.annotation", "Resources") } + ResourcesAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".annotation", "Resources") + } } /** @@ -50,7 +60,7 @@ class ResourcesAnnotation extends Annotation { */ class JavaxManagedBeanAnnotation extends Annotation { JavaxManagedBeanAnnotation() { - this.getType().hasQualifiedName("javax.annotation", "ManagedBean") + this.getType().hasQualifiedName(javaxOrJakarta() + ".annotation", "ManagedBean") } } @@ -63,7 +73,7 @@ class JavaxManagedBeanAnnotation extends Annotation { */ class DeclareRolesAnnotation extends Annotation { DeclareRolesAnnotation() { - this.getType().hasQualifiedName("javax.annotation.security", "DeclareRoles") + this.getType().hasQualifiedName(javaxOrJakarta() + ".annotation.security", "DeclareRoles") } } @@ -71,7 +81,9 @@ class DeclareRolesAnnotation extends Annotation { * A `@javax.annotation.security.DenyAll` annotation. */ class DenyAllAnnotation extends Annotation { - DenyAllAnnotation() { this.getType().hasQualifiedName("javax.annotation.security", "DenyAll") } + DenyAllAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".annotation.security", "DenyAll") + } } /** @@ -79,7 +91,7 @@ class DenyAllAnnotation extends Annotation { */ class PermitAllAnnotation extends Annotation { PermitAllAnnotation() { - this.getType().hasQualifiedName("javax.annotation.security", "PermitAll") + this.getType().hasQualifiedName(javaxOrJakarta() + ".annotation.security", "PermitAll") } } @@ -88,7 +100,7 @@ class PermitAllAnnotation extends Annotation { */ class RolesAllowedAnnotation extends Annotation { RolesAllowedAnnotation() { - this.getType().hasQualifiedName("javax.annotation.security", "RolesAllowed") + this.getType().hasQualifiedName(javaxOrJakarta() + ".annotation.security", "RolesAllowed") } } @@ -96,7 +108,9 @@ class RolesAllowedAnnotation extends Annotation { * A `@javax.annotation.security.RunAs` annotation. */ class RunAsAnnotation extends Annotation { - RunAsAnnotation() { this.getType().hasQualifiedName("javax.annotation.security", "RunAs") } + RunAsAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".annotation.security", "RunAs") + } } /* @@ -107,7 +121,9 @@ class RunAsAnnotation extends Annotation { * A `@javax.interceptor.AroundInvoke` annotation. */ class AroundInvokeAnnotation extends Annotation { - AroundInvokeAnnotation() { this.getType().hasQualifiedName("javax.interceptor", "AroundInvoke") } + AroundInvokeAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".interceptor", "AroundInvoke") + } } /** @@ -115,7 +131,7 @@ class AroundInvokeAnnotation extends Annotation { */ class ExcludeClassInterceptorsAnnotation extends Annotation { ExcludeClassInterceptorsAnnotation() { - this.getType().hasQualifiedName("javax.interceptor", "ExcludeClassInterceptors") + this.getType().hasQualifiedName(javaxOrJakarta() + ".interceptor", "ExcludeClassInterceptors") } } @@ -124,7 +140,7 @@ class ExcludeClassInterceptorsAnnotation extends Annotation { */ class ExcludeDefaultInterceptorsAnnotation extends Annotation { ExcludeDefaultInterceptorsAnnotation() { - this.getType().hasQualifiedName("javax.interceptor", "ExcludeDefaultInterceptors") + this.getType().hasQualifiedName(javaxOrJakarta() + ".interceptor", "ExcludeDefaultInterceptors") } } @@ -132,7 +148,9 @@ class ExcludeDefaultInterceptorsAnnotation extends Annotation { * A `@javax.interceptor.Interceptors` annotation. */ class InterceptorsAnnotation extends Annotation { - InterceptorsAnnotation() { this.getType().hasQualifiedName("javax.interceptor", "Interceptors") } + InterceptorsAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".interceptor", "Interceptors") + } } /* @@ -143,14 +161,16 @@ class InterceptorsAnnotation extends Annotation { * A `@javax.jws.WebMethod` annotation. */ class WebMethodAnnotation extends Annotation { - WebMethodAnnotation() { this.getType().hasQualifiedName("javax.jws", "WebMethod") } + WebMethodAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".jws", "WebMethod") } } /** * A `@javax.jws.WebService` annotation. */ class WebServiceAnnotation extends Annotation { - WebServiceAnnotation() { this.getType().hasQualifiedName("javax.jws", "WebService") } + WebServiceAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".jws", "WebService") + } } /* @@ -161,5 +181,40 @@ class WebServiceAnnotation extends Annotation { * A `@javax.xml.ws.WebServiceRef` annotation. */ class WebServiceRefAnnotation extends Annotation { - WebServiceRefAnnotation() { this.getType().hasQualifiedName("javax.xml.ws", "WebServiceRef") } + WebServiceRefAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".xml.ws", "WebServiceRef") + } +} + +/* + * Annotations in the package `javax.validation.constraints`. + */ + +/** + * A `@javax.validation.constraints.Pattern` annotation. + */ +class PatternAnnotation extends Annotation, RegexMatch::Range { + PatternAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".validation.constraints", "Pattern") + } + + override Expr getRegex() { result = this.getValue("regexp") } + + override Expr getString() { + // Annotation on field accessed by direct read - value of field will match regexp + result.(FieldRead).getField() = this.getAnnotatedElement() + or + // Annotation on field accessed by getter - value of field will match regexp + result.(MethodCall).getMethod().(GetterMethod).getField() = this.getAnnotatedElement() + or + // Annotation on parameter - value of parameter will match regexp + result.(VarRead).getVariable().(Parameter) = this.getAnnotatedElement() + or + // Annotation on method - return value of method will match regexp + result.(Call).getCallee() = this.getAnnotatedElement() + // TODO - we could also consider the case where the annotation is on a type + // but this harder to model and not very common. + } + + override string getName() { result = "@javax.validation.constraints.Pattern annotation" } } diff --git a/java/ql/lib/semmle/code/java/frameworks/JaxWS.qll b/java/ql/lib/semmle/code/java/frameworks/JaxWS.qll index 62289f737c02..38bac53485bf 100644 --- a/java/ql/lib/semmle/code/java/frameworks/JaxWS.qll +++ b/java/ql/lib/semmle/code/java/frameworks/JaxWS.qll @@ -13,7 +13,7 @@ private import semmle.code.java.security.XSS /** * Gets a name for the root package of JAX-RS. */ -string getAJaxRsPackage() { result in ["javax.ws.rs", "jakarta.ws.rs"] } +string getAJaxRsPackage() { result = javaxOrJakarta() + ".ws.rs" } /** * Gets a name for package `subpackage` within the JAX-RS hierarchy. @@ -42,7 +42,7 @@ class JaxWsEndpoint extends Class { result.isPublic() and not result instanceof InitializerMethod and not exists(Annotation a | a = result.getAnAnnotation() | - a.getType().hasQualifiedName(["javax", "jakarta"] + ".jws", "WebMethod") and + a.getType().hasQualifiedName(javaxOrJakarta() + ".jws", "WebMethod") and a.getValue("exclude").(BooleanLiteral).getBooleanValue() = true ) and forex(ParamOrReturn paramOrRet | paramOrRet = result.getAParameter() or paramOrRet = result | @@ -62,8 +62,7 @@ class JaxWsEndpoint extends Class { /** The annotation type `@XmlJavaTypeAdapter`. */ class XmlJavaTypeAdapter extends AnnotationType { XmlJavaTypeAdapter() { - this.hasQualifiedName(["javax", "jakarta"] + ".xml.bind.annotation.adapters", - "XmlJavaTypeAdapter") + this.hasQualifiedName(javaxOrJakarta() + ".xml.bind.annotation.adapters", "XmlJavaTypeAdapter") } } @@ -292,7 +291,7 @@ class JaxRSAnnotation extends Annotation { JaxRSAnnotation() { exists(AnnotationType a | a = this.getType() and - a.getPackage().getName().regexpMatch(["javax\\.ws\\.rs(\\..*)?", "jakarta\\.ws\\.rs(\\..*)?"]) + a.getPackage().getName().regexpMatch(javaxOrJakarta() + "\\.ws\\.rs(\\..*)?") ) } } @@ -424,7 +423,7 @@ private class JaxRSXssSink extends XssSink { exists(JaxRsResourceMethod resourceMethod, ReturnStmt rs | resourceMethod = any(JaxRsResourceClass resourceClass).getAResourceMethod() and rs.getEnclosingCallable() = resourceMethod and - this.asExpr() = rs.getResult() + this.asExpr() = rs.getExpr() | not exists(resourceMethod.getProducesAnnotation()) or diff --git a/java/ql/lib/semmle/code/java/frameworks/Jms.qll b/java/ql/lib/semmle/code/java/frameworks/Jms.qll index 3cc76771a776..abee6b3a4279 100644 --- a/java/ql/lib/semmle/code/java/frameworks/Jms.qll +++ b/java/ql/lib/semmle/code/java/frameworks/Jms.qll @@ -7,6 +7,6 @@ import java /** The method `ObjectMessage.getObject`. */ class ObjectMessageGetObjectMethod extends Method { ObjectMessageGetObjectMethod() { - this.hasQualifiedName(["javax", "jakarta"] + ".jms", "ObjectMessage", "getObject") + this.hasQualifiedName(javaxOrJakarta() + ".jms", "ObjectMessage", "getObject") } } diff --git a/java/ql/lib/semmle/code/java/frameworks/Jndi.qll b/java/ql/lib/semmle/code/java/frameworks/Jndi.qll index 0d7d481dc1d0..d2b14d5f58ec 100644 --- a/java/ql/lib/semmle/code/java/frameworks/Jndi.qll +++ b/java/ql/lib/semmle/code/java/frameworks/Jndi.qll @@ -9,32 +9,34 @@ import java /*--- Types ---*/ /** The interface `javax.naming.Context`. */ class TypeNamingContext extends Interface { - TypeNamingContext() { this.hasQualifiedName("javax.naming", "Context") } + TypeNamingContext() { this.hasQualifiedName(javaxOrJakarta() + ".naming", "Context") } } /** The class `javax.naming.CompositeName`. */ class TypeCompositeName extends Class { - TypeCompositeName() { this.hasQualifiedName("javax.naming", "CompositeName") } + TypeCompositeName() { this.hasQualifiedName(javaxOrJakarta() + ".naming", "CompositeName") } } /** The class `javax.naming.CompoundName`. */ class TypeCompoundName extends Class { - TypeCompoundName() { this.hasQualifiedName("javax.naming", "CompoundName") } + TypeCompoundName() { this.hasQualifiedName(javaxOrJakarta() + ".naming", "CompoundName") } } /** The interface `javax.naming.directory.DirContext`. */ class TypeDirContext extends Interface { - TypeDirContext() { this.hasQualifiedName("javax.naming.directory", "DirContext") } + TypeDirContext() { this.hasQualifiedName(javaxOrJakarta() + ".naming.directory", "DirContext") } } /** The class `javax.naming.directory.SearchControls` */ class TypeSearchControls extends Class { - TypeSearchControls() { this.hasQualifiedName("javax.naming.directory", "SearchControls") } + TypeSearchControls() { + this.hasQualifiedName(javaxOrJakarta() + ".naming.directory", "SearchControls") + } } /** The class `javax.naming.ldap.LdapName`. */ class TypeLdapName extends Class { - TypeLdapName() { this.hasQualifiedName("javax.naming.ldap", "LdapName") } + TypeLdapName() { this.hasQualifiedName(javaxOrJakarta() + ".naming.ldap", "LdapName") } } /*--- Methods ---*/ diff --git a/java/ql/lib/semmle/code/java/frameworks/Mail.qll b/java/ql/lib/semmle/code/java/frameworks/Mail.qll index c61e5ae34f99..b99220c17376 100644 --- a/java/ql/lib/semmle/code/java/frameworks/Mail.qll +++ b/java/ql/lib/semmle/code/java/frameworks/Mail.qll @@ -8,7 +8,7 @@ import java * The class `javax.mail.Session` or `jakarta.mail.Session`. */ class MailSession extends Class { - MailSession() { this.hasQualifiedName(["javax.mail", "jakarta.mail"], "Session") } + MailSession() { this.hasQualifiedName(javaxOrJakarta() + ".mail", "Session") } } /** diff --git a/java/ql/lib/semmle/code/java/frameworks/Mockito.qll b/java/ql/lib/semmle/code/java/frameworks/Mockito.qll index a8559060d306..2613b0e5c51c 100644 --- a/java/ql/lib/semmle/code/java/frameworks/Mockito.qll +++ b/java/ql/lib/semmle/code/java/frameworks/Mockito.qll @@ -386,7 +386,7 @@ class MockitoMockedObject extends Expr { or exists(ReturnStmt ret | this.(MethodCall).getMethod() = ret.getEnclosingCallable() and - ret.getResult() instanceof MockitoMockedObject + ret.getExpr() instanceof MockitoMockedObject ) } } diff --git a/java/ql/lib/semmle/code/java/frameworks/MyBatis.qll b/java/ql/lib/semmle/code/java/frameworks/MyBatis.qll index e3f89186821b..6a354a0a42a7 100644 --- a/java/ql/lib/semmle/code/java/frameworks/MyBatis.qll +++ b/java/ql/lib/semmle/code/java/frameworks/MyBatis.qll @@ -109,7 +109,7 @@ class MyBatisInjectionSink extends DataFlow::Node { a.getType() instanceof MyBatisProvider and m.getDeclaringType() = a.getValue(["type", "value"]).(TypeLiteral).getTypeName().getType() and m.hasName(a.getValue("method").(StringLiteral).getValue()) and - exists(ReturnStmt ret | this.asExpr() = ret.getResult() and ret.getEnclosingCallable() = m) + exists(ReturnStmt ret | this.asExpr() = ret.getExpr() and ret.getEnclosingCallable() = m) ) } } diff --git a/java/ql/lib/semmle/code/java/frameworks/Networking.qll b/java/ql/lib/semmle/code/java/frameworks/Networking.qll index 6eeb5aa90241..21df7ae7f8d2 100644 --- a/java/ql/lib/semmle/code/java/frameworks/Networking.qll +++ b/java/ql/lib/semmle/code/java/frameworks/Networking.qll @@ -20,7 +20,7 @@ class TypeSocket extends RefType { /** The type `javax.net.SocketFactory` */ class TypeSocketFactory extends RefType { - TypeSocketFactory() { this.hasQualifiedName("javax.net", "SocketFactory") } + TypeSocketFactory() { this.hasQualifiedName(javaxOrJakarta() + ".net", "SocketFactory") } } /** The type `java.net.URL`. */ diff --git a/java/ql/lib/semmle/code/java/frameworks/Regex.qll b/java/ql/lib/semmle/code/java/frameworks/Regex.qll index 56be77eae825..83d7336a341a 100644 --- a/java/ql/lib/semmle/code/java/frameworks/Regex.qll +++ b/java/ql/lib/semmle/code/java/frameworks/Regex.qll @@ -3,6 +3,7 @@ overlay[local?] module; import java +private import semmle.code.java.dataflow.DataFlow /** The class `java.util.regex.Matcher`. */ class TypeRegexMatcher extends Class { @@ -24,6 +25,16 @@ class TypeRegexPattern extends Class { TypeRegexPattern() { this.hasQualifiedName("java.util.regex", "Pattern") } } +/** + * The `compile` method of `java.util.regex.Pattern`. + */ +class PatternCompileMethod extends Method { + PatternCompileMethod() { + this.getDeclaringType() instanceof TypeRegexPattern and + this.hasName("compile") + } +} + /** * The `matches` method of `java.util.regex.Pattern`. */ @@ -59,3 +70,66 @@ class PatternLiteralField extends Field { this.hasName("LITERAL") } } + +/** A call to the `compile` method of `java.util.regex.Pattern`. */ +class PatternCompileCall extends MethodCall { + PatternCompileCall() { this.getMethod() instanceof PatternCompileMethod } +} + +/** A call to the `matcher` method of `java.util.regex.Pattern`. */ +class PatternMatcherCall extends MethodCall { + PatternMatcherCall() { this.getMethod() instanceof PatternMatcherMethod } +} + +/** A call to the `matches` method of `java.util.regex.Pattern`. */ +class PatternMatchesCall extends MethodCall, RegexMatch::Range { + PatternMatchesCall() { this.getMethod() instanceof PatternMatchesMethod } + + override Expr getRegex() { result = this.getArgument(0) } + + override Expr getString() { result = this.getArgument(1) } + + override string getName() { result = "Pattern.matches" } +} + +/** A call to the `matches` method of `java.util.regex.Matcher`. */ +class MatcherMatchesCall extends MethodCall, RegexMatch::Range { + MatcherMatchesCall() { this.getMethod() instanceof MatcherMatchesMethod } + + /** + * Gets the call to `java.util.regex.Pattern.matcher` that returned the + * qualifier of this call. This is needed to determine the string being + * matched. + */ + PatternMatcherCall getPatternMatcherCall() { + DataFlow::localExprFlow(result, this.getQualifier()) + } + + /** + * Gets the call to `java.util.regex.Pattern.compile` that returned the + * `Pattern` used by this matcher. This is needed to determine the regular + * expression being used. + */ + PatternCompileCall getPatternCompileCall() { + DataFlow::localExprFlow(result, this.getPatternMatcherCall()) + } + + override Expr getRegex() { result = this.getPatternCompileCall().getArgument(0) } + + override Expr getString() { result = this.getPatternMatcherCall().getArgument(0) } + + override Expr getAdditionalSanitizedExpr() { + // Special case for MatcherMatchesCall. Consider the following code: + // + // Matcher matcher = Pattern.compile(regexp).matcher(taintedInput); + // if (matcher.matches()) { + // sink(matcher.group(1)); + // } + // + // Even though the string is `taintedInput`, we also want to sanitize + // `matcher` as it can be used to get substrings of `taintedInput`. + result = this.getQualifier() + } + + override string getName() { result = "Matcher.matches" } +} diff --git a/java/ql/lib/semmle/code/java/frameworks/Servlets.qll b/java/ql/lib/semmle/code/java/frameworks/Servlets.qll index 7d7beb74fc30..826636ce0737 100644 --- a/java/ql/lib/semmle/code/java/frameworks/Servlets.qll +++ b/java/ql/lib/semmle/code/java/frameworks/Servlets.qll @@ -12,7 +12,7 @@ import semmle.code.java.Type */ class ServletRequest extends RefType { ServletRequest() { - this.hasQualifiedName("javax.servlet", "ServletRequest") or + this.hasQualifiedName(javaxOrJakarta() + ".servlet", "ServletRequest") or this instanceof HttpServletRequest } } @@ -21,7 +21,9 @@ class ServletRequest extends RefType { * The interface `javax.servlet.http.HttpServletRequest`. */ class HttpServletRequest extends RefType { - HttpServletRequest() { this.hasQualifiedName("javax.servlet.http", "HttpServletRequest") } + HttpServletRequest() { + this.hasQualifiedName(javaxOrJakarta() + ".servlet.http", "HttpServletRequest") + } } /** @@ -168,7 +170,7 @@ class ServletRequestGetBodyMethod extends Method { */ class ServletResponse extends RefType { ServletResponse() { - this.hasQualifiedName("javax.servlet", "ServletResponse") or + this.hasQualifiedName(javaxOrJakarta() + ".servlet", "ServletResponse") or this instanceof HttpServletResponse } } @@ -177,7 +179,9 @@ class ServletResponse extends RefType { * The interface `javax.servlet.http.HttpServletResponse`. */ class HttpServletResponse extends RefType { - HttpServletResponse() { this.hasQualifiedName("javax.servlet.http", "HttpServletResponse") } + HttpServletResponse() { + this.hasQualifiedName(javaxOrJakarta() + ".servlet.http", "HttpServletResponse") + } } /** @@ -239,7 +243,7 @@ class ServletResponseGetOutputStreamMethod extends Method { /** The class `javax.servlet.http.Cookie`. */ class TypeCookie extends Class { - TypeCookie() { this.hasQualifiedName("javax.servlet.http", "Cookie") } + TypeCookie() { this.hasQualifiedName(javaxOrJakarta() + ".servlet.http", "Cookie") } } /** @@ -331,7 +335,7 @@ class ResponseSetContentTypeMethod extends Method { * A class that has `javax.servlet.Servlet` as an ancestor. */ class ServletClass extends Class { - ServletClass() { this.getAnAncestor().hasQualifiedName("javax.servlet", "Servlet") } + ServletClass() { this.getAnAncestor().hasQualifiedName(javaxOrJakarta() + ".servlet", "Servlet") } } /** @@ -342,13 +346,13 @@ class ServletClass extends Class { */ class ServletWebXmlListenerType extends RefType { ServletWebXmlListenerType() { - this.hasQualifiedName("javax.servlet", "ServletContextAttributeListener") or - this.hasQualifiedName("javax.servlet", "ServletContextListener") or - this.hasQualifiedName("javax.servlet", "ServletRequestAttributeListener") or - this.hasQualifiedName("javax.servlet", "ServletRequestListener") or - this.hasQualifiedName("javax.servlet.http", "HttpSessionAttributeListener") or - this.hasQualifiedName("javax.servlet.http", "HttpSessionIdListener") or - this.hasQualifiedName("javax.servlet.http", "HttpSessionListener") + this.hasQualifiedName(javaxOrJakarta() + ".servlet", "ServletContextAttributeListener") or + this.hasQualifiedName(javaxOrJakarta() + ".servlet", "ServletContextListener") or + this.hasQualifiedName(javaxOrJakarta() + ".servlet", "ServletRequestAttributeListener") or + this.hasQualifiedName(javaxOrJakarta() + ".servlet", "ServletRequestListener") or + this.hasQualifiedName(javaxOrJakarta() + ".servlet.http", "HttpSessionAttributeListener") or + this.hasQualifiedName(javaxOrJakarta() + ".servlet.http", "HttpSessionIdListener") or + this.hasQualifiedName(javaxOrJakarta() + ".servlet.http", "HttpSessionListener") // Listeners that are not configured in `web.xml`: // - `HttpSessionActivationListener` // - `HttpSessionBindingListener` @@ -373,8 +377,8 @@ predicate isRequestGetParamMethod(MethodCall ma) { /** The Java EE RequestDispatcher. */ class RequestDispatcher extends RefType { RequestDispatcher() { - this.hasQualifiedName(["javax.servlet", "jakarta.servlet"], "RequestDispatcher") or - this.hasQualifiedName("javax.portlet", "PortletRequestDispatcher") + this.hasQualifiedName(javaxOrJakarta() + ".servlet", "RequestDispatcher") or + this.hasQualifiedName(javaxOrJakarta() + ".portlet", "PortletRequestDispatcher") } } @@ -398,7 +402,7 @@ class RequestDispatchMethod extends Method { * The interface `javax.servlet.ServletContext`. */ class ServletContext extends RefType { - ServletContext() { this.hasQualifiedName("javax.servlet", "ServletContext") } + ServletContext() { this.hasQualifiedName(javaxOrJakarta() + ".servlet", "ServletContext") } } /** The `getResource` method of `ServletContext`. */ @@ -419,5 +423,5 @@ class GetServletResourceAsStreamMethod extends Method { /** The interface `javax.servlet.http.HttpSession` */ class HttpServletSession extends RefType { - HttpServletSession() { this.hasQualifiedName("javax.servlet.http", "HttpSession") } + HttpServletSession() { this.hasQualifiedName(javaxOrJakarta() + ".servlet.http", "HttpSession") } } diff --git a/java/ql/lib/semmle/code/java/frameworks/ThreadLocal.qll b/java/ql/lib/semmle/code/java/frameworks/ThreadLocal.qll index c813c0383eb6..5a550ff95013 100644 --- a/java/ql/lib/semmle/code/java/frameworks/ThreadLocal.qll +++ b/java/ql/lib/semmle/code/java/frameworks/ThreadLocal.qll @@ -15,7 +15,7 @@ private predicate threadLocalInitialValue(ClassInstanceExpr cie, Method initialV exists(RefType t, ReturnStmt ret | cie.getConstructedType().getSourceDeclaration() = t and t.getASourceSupertype+().hasQualifiedName("java.lang", "ThreadLocal") and - ret.getResult() = init and + ret.getExpr() = init and ret.getEnclosingCallable() = initialValue and initialValue.hasName("initialValue") and initialValue.getDeclaringType() = t diff --git a/java/ql/lib/semmle/code/java/frameworks/android/AsyncTask.qll b/java/ql/lib/semmle/code/java/frameworks/android/AsyncTask.qll index 1aba64a4c7e0..e7948fcd5f4d 100644 --- a/java/ql/lib/semmle/code/java/frameworks/android/AsyncTask.qll +++ b/java/ql/lib/semmle/code/java/frameworks/android/AsyncTask.qll @@ -37,7 +37,7 @@ private class AsyncTaskOnPostExecuteAdditionalValueStep extends AdditionalValueS | onPostExecute.getDeclaringType() = runInBackground.getDeclaringType() | - node1.asExpr() = any(ReturnStmt r | r.getEnclosingCallable() = runInBackground).getResult() and + node1.asExpr() = any(ReturnStmt r | r.getEnclosingCallable() = runInBackground).getExpr() and node2.asParameter() = onPostExecute.getParameter(0) ) } diff --git a/java/ql/lib/semmle/code/java/frameworks/android/Compose.qll b/java/ql/lib/semmle/code/java/frameworks/android/Compose.qll index 9123600d4e48..134e93ea4eb7 100644 --- a/java/ql/lib/semmle/code/java/frameworks/android/Compose.qll +++ b/java/ql/lib/semmle/code/java/frameworks/android/Compose.qll @@ -44,7 +44,7 @@ class LiveLiteralMethod extends Method { private predicate methodReturns(Method m, Expr res) { exists(ReturnStmt r | - r.getResult() = res and + r.getExpr() = res and r.getEnclosingCallable() = m ) } diff --git a/java/ql/lib/semmle/code/java/frameworks/android/Intent.qll b/java/ql/lib/semmle/code/java/frameworks/android/Intent.qll index 3df890c95f41..b11e4e5d4ef8 100644 --- a/java/ql/lib/semmle/code/java/frameworks/android/Intent.qll +++ b/java/ql/lib/semmle/code/java/frameworks/android/Intent.qll @@ -279,7 +279,7 @@ private predicate reaches(Expr src, Argument arg) { or exists(StmtExpr e | e.getResultExpr() = src | reaches(e, arg)) or - exists(NotNullExpr e | e.getExpr() = src | reaches(e, arg)) + exists(NotNullExpr e | e.getOperand() = src | reaches(e, arg)) or exists(WhenExpr e | e.getBranch(_).getAResult() = src | reaches(e, arg)) } diff --git a/java/ql/lib/semmle/code/java/frameworks/javaee/JavaServerFaces.qll b/java/ql/lib/semmle/code/java/frameworks/javaee/JavaServerFaces.qll index 2f749962e94d..285bd7fd670f 100644 --- a/java/ql/lib/semmle/code/java/frameworks/javaee/JavaServerFaces.qll +++ b/java/ql/lib/semmle/code/java/frameworks/javaee/JavaServerFaces.qll @@ -61,7 +61,7 @@ class FacesAccessibleType extends RefType { class FacesComponent extends Class { FacesComponent() { // Must extend UIComponent for it to be a valid component. - this.getAnAncestor().hasQualifiedName("javax.faces.component", "UIComponent") and + this.getAnAncestor().hasQualifiedName(javaxOrJakarta() + ".faces.component", "UIComponent") and ( // Must be registered using either an annotation exists(FacesComponentAnnotation componentAnnotation | diff --git a/java/ql/lib/semmle/code/java/frameworks/javaee/Persistence.qll b/java/ql/lib/semmle/code/java/frameworks/javaee/Persistence.qll index b5031d7dff08..a6cedcc3fee1 100644 --- a/java/ql/lib/semmle/code/java/frameworks/javaee/Persistence.qll +++ b/java/ql/lib/semmle/code/java/frameworks/javaee/Persistence.qll @@ -9,7 +9,7 @@ import java /** * Gets a JavaEE Persistence API package name. */ -string getAPersistencePackageName() { result = ["javax.persistence", "jakarta.persistence"] } +string getAPersistencePackageName() { result = javaxOrJakarta() + ".persistence" } /** * A `RefType` with the `@Entity` annotation that indicates that it can be persisted using a JPA diff --git a/java/ql/lib/semmle/code/java/frameworks/javaee/Xml.qll b/java/ql/lib/semmle/code/java/frameworks/javaee/Xml.qll index 222b778ba588..6943c8023d43 100644 --- a/java/ql/lib/semmle/code/java/frameworks/javaee/Xml.qll +++ b/java/ql/lib/semmle/code/java/frameworks/javaee/Xml.qll @@ -33,7 +33,7 @@ private class ValidatorConfig extends TransformerConfig { /** The class `javax.xml.validation.Validator`. */ private class Validator extends RefType { - Validator() { this.hasQualifiedName("javax.xml.validation", "Validator") } + Validator() { this.hasQualifiedName(javaxOrJakarta() + ".xml.validation", "Validator") } } /** A safely configured `Validator`. */ diff --git a/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJB.qll b/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJB.qll index a866d84df21d..efbd0c0b1eb5 100644 --- a/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJB.qll +++ b/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJB.qll @@ -64,7 +64,7 @@ class SessionEjb extends EJB { result = this.getASupertype() and not result.hasQualifiedName("java.io", "Serializable") and not result.hasQualifiedName("java.io", "Externalizable") and - not result.getPackage().getName() = "javax.ejb" + not result.getPackage().getName() = javaxOrJakarta() + ".ejb" } /** Any remote interfaces of this EJB. */ @@ -216,14 +216,14 @@ abstract class BusinessInterfaceAnnotation extends EjbInterfaceAnnotation { } * An instance of a `@Remote` annotation. */ class RemoteAnnotation extends BusinessInterfaceAnnotation { - RemoteAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Remote") } + RemoteAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Remote") } } /** * An instance of a `@Local` annotation. */ class LocalAnnotation extends BusinessInterfaceAnnotation { - LocalAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Local") } + LocalAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Local") } } /** @@ -330,7 +330,7 @@ class LocalAnnotatedBusinessInterface extends AnnotatedBusinessInterface { * A `@javax.ejb.Init` annotation. */ class InitAnnotation extends Annotation { - InitAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Init") } + InitAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Init") } } /** @@ -383,14 +383,16 @@ abstract class HomeAnnotation extends EjbInterfaceAnnotation { } * An instance of a `@RemoteHome` annotation. */ class RemoteHomeAnnotation extends HomeAnnotation { - RemoteHomeAnnotation() { this.getType().hasQualifiedName("javax.ejb", "RemoteHome") } + RemoteHomeAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "RemoteHome") + } } /** * An instance of a `@LocalHome` annotation. */ class LocalHomeAnnotation extends HomeAnnotation { - LocalHomeAnnotation() { this.getType().hasQualifiedName("javax.ejb", "LocalHome") } + LocalHomeAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "LocalHome") } } /** @@ -748,7 +750,9 @@ Type inheritsMatchingCreateMethodExceptThrows(StatefulSessionEjb ejb, EjbInterfa * A `@javax.ejb.AccessTimeout` annotation. */ class AccessTimeoutAnnotation extends Annotation { - AccessTimeoutAnnotation() { this.getType().hasQualifiedName("javax.ejb", "AccessTimeout") } + AccessTimeoutAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "AccessTimeout") + } } /** @@ -756,7 +760,7 @@ class AccessTimeoutAnnotation extends Annotation { */ class ActivationConfigPropertyAnnotation extends Annotation { ActivationConfigPropertyAnnotation() { - this.getType().hasQualifiedName("javax.ejb", "ActivationConfigProperty") + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "ActivationConfigProperty") } } @@ -764,14 +768,18 @@ class ActivationConfigPropertyAnnotation extends Annotation { * A `@javax.ejb.AfterBegin` annotation. */ class AfterBeginAnnotation extends Annotation { - AfterBeginAnnotation() { this.getType().hasQualifiedName("javax.ejb", "AfterBegin") } + AfterBeginAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "AfterBegin") + } } /** * A `@javax.ejb.AfterCompletion` annotation. */ class AfterCompletionAnnotation extends Annotation { - AfterCompletionAnnotation() { this.getType().hasQualifiedName("javax.ejb", "AfterCompletion") } + AfterCompletionAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "AfterCompletion") + } } /** @@ -779,7 +787,7 @@ class AfterCompletionAnnotation extends Annotation { */ class ApplicationExceptionAnnotation extends Annotation { ApplicationExceptionAnnotation() { - this.getType().hasQualifiedName("javax.ejb", "ApplicationException") + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "ApplicationException") } } @@ -787,14 +795,18 @@ class ApplicationExceptionAnnotation extends Annotation { * A `@javax.ejb.Asynchronous` annotation. */ class AsynchronousAnnotation extends Annotation { - AsynchronousAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Asynchronous") } + AsynchronousAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Asynchronous") + } } /** * A `@javax.ejb.BeforeCompletion` annotation. */ class BeforeCompletionAnnotation extends Annotation { - BeforeCompletionAnnotation() { this.getType().hasQualifiedName("javax.ejb", "BeforeCompletion") } + BeforeCompletionAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "BeforeCompletion") + } } /** @@ -802,7 +814,7 @@ class BeforeCompletionAnnotation extends Annotation { */ class ConcurrencyManagementAnnotation extends Annotation { ConcurrencyManagementAnnotation() { - this.getType().hasQualifiedName("javax.ejb", "ConcurrencyManagement") + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "ConcurrencyManagement") } } @@ -810,119 +822,127 @@ class ConcurrencyManagementAnnotation extends Annotation { * A `@javax.ejb.DependsOn` annotation. */ class DependsOnAnnotation extends Annotation { - DependsOnAnnotation() { this.getType().hasQualifiedName("javax.ejb", "DependsOn") } + DependsOnAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "DependsOn") } } /** * A `@javax.ejb.EJB` annotation. */ class EjbAnnotation extends Annotation { - EjbAnnotation() { this.getType().hasQualifiedName("javax.ejb", "EJB") } + EjbAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "EJB") } } /** * A `@javax.ejb.EJBs` annotation. */ class EJBsAnnotation extends Annotation { - EJBsAnnotation() { this.getType().hasQualifiedName("javax.ejb", "EJBs") } + EJBsAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "EJBs") } } /** * A `@javax.ejb.LocalBean` annotation. */ class LocalBeanAnnotation extends Annotation { - LocalBeanAnnotation() { this.getType().hasQualifiedName("javax.ejb", "LocalBean") } + LocalBeanAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "LocalBean") } } /** * A `@javax.ejb.Lock` annotation. */ class LockAnnotation extends Annotation { - LockAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Lock") } + LockAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Lock") } } /** * A `@javax.ejb.MessageDriven` annotation. */ class MessageDrivenAnnotation extends Annotation { - MessageDrivenAnnotation() { this.getType().hasQualifiedName("javax.ejb", "MessageDriven") } + MessageDrivenAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "MessageDriven") + } } /** * A `@javax.ejb.PostActivate` annotation. */ class PostActivateAnnotation extends Annotation { - PostActivateAnnotation() { this.getType().hasQualifiedName("javax.ejb", "PostActivate") } + PostActivateAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "PostActivate") + } } /** * A `@javax.ejb.PrePassivate` annotation. */ class PrePassivateAnnotation extends Annotation { - PrePassivateAnnotation() { this.getType().hasQualifiedName("javax.ejb", "PrePassivate") } + PrePassivateAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "PrePassivate") + } } /** * A `@javax.ejb.Remove` annotation. */ class RemoveAnnotation extends Annotation { - RemoveAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Remove") } + RemoveAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Remove") } } /** * A `@javax.ejb.Schedule` annotation. */ class ScheduleAnnotation extends Annotation { - ScheduleAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Schedule") } + ScheduleAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Schedule") } } /** * A `@javax.ejb.Schedules` annotation. */ class SchedulesAnnotation extends Annotation { - SchedulesAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Schedules") } + SchedulesAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Schedules") } } /** * A `@javax.ejb.Singleton` annotation. */ class SingletonAnnotation extends Annotation { - SingletonAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Singleton") } + SingletonAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Singleton") } } /** * A `@javax.ejb.Startup` annotation. */ class StartupAnnotation extends Annotation { - StartupAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Startup") } + StartupAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Startup") } } /** * A `@javax.ejb.Stateful` annotation. */ class StatefulAnnotation extends Annotation { - StatefulAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Stateful") } + StatefulAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Stateful") } } /** * A `@javax.ejb.StatefulTimeout` annotation. */ class StatefulTimeoutAnnotation extends Annotation { - StatefulTimeoutAnnotation() { this.getType().hasQualifiedName("javax.ejb", "StatefulTimeout") } + StatefulTimeoutAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "StatefulTimeout") + } } /** * A `@javax.ejb.Stateless` annotation. */ class StatelessAnnotation extends Annotation { - StatelessAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Stateless") } + StatelessAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Stateless") } } /** * A `@javax.ejb.Timeout` annotation. */ class TimeoutAnnotation extends Annotation { - TimeoutAnnotation() { this.getType().hasQualifiedName("javax.ejb", "Timeout") } + TimeoutAnnotation() { this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "Timeout") } } /** @@ -930,7 +950,7 @@ class TimeoutAnnotation extends Annotation { */ class TransactionAttributeAnnotation extends Annotation { TransactionAttributeAnnotation() { - this.getType().hasQualifiedName("javax.ejb", "TransactionAttribute") + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "TransactionAttribute") } } @@ -939,7 +959,7 @@ class TransactionAttributeAnnotation extends Annotation { */ class TransactionManagementAnnotation extends Annotation { TransactionManagementAnnotation() { - this.getType().hasQualifiedName("javax.ejb", "TransactionManagement") + this.getType().hasQualifiedName(javaxOrJakarta() + ".ejb", "TransactionManagement") } } @@ -951,7 +971,10 @@ class RequiredTransactionAttributeAnnotation extends TransactionAttributeAnnotat RequiredTransactionAttributeAnnotation() { exists(FieldRead fr | this.getValue("value") = fr and - fr.getField().getType().(RefType).hasQualifiedName("javax.ejb", "TransactionAttributeType") and + fr.getField() + .getType() + .(RefType) + .hasQualifiedName(javaxOrJakarta() + ".ejb", "TransactionAttributeType") and fr.getField().getName() = "REQUIRED" ) } @@ -965,7 +988,10 @@ class RequiresNewTransactionAttributeAnnotation extends TransactionAttributeAnno RequiresNewTransactionAttributeAnnotation() { exists(FieldRead fr | this.getValue("value") = fr and - fr.getField().getType().(RefType).hasQualifiedName("javax.ejb", "TransactionAttributeType") and + fr.getField() + .getType() + .(RefType) + .hasQualifiedName(javaxOrJakarta() + ".ejb", "TransactionAttributeType") and fr.getField().getName() = "REQUIRES_NEW" ) } @@ -999,7 +1025,9 @@ TransactionAttributeAnnotation getInnermostTransactionAttributeAnnotation(Method */ class SetRollbackOnlyMethod extends Method { SetRollbackOnlyMethod() { - this.getDeclaringType().getAnAncestor().hasQualifiedName("javax.ejb", "EJBContext") and + this.getDeclaringType() + .getAnAncestor() + .hasQualifiedName(javaxOrJakarta() + ".ejb", "EJBContext") and this.getName() = "setRollbackOnly" and this.hasNoParameters() } diff --git a/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJBRestrictions.qll b/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJBRestrictions.qll index 2f5a88ba5c81..478728168253 100644 --- a/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJBRestrictions.qll +++ b/java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJBRestrictions.qll @@ -138,7 +138,7 @@ ThisAccess forbiddenThisUse(Callable c) { result.getEnclosingCallable() = c and ( exists(MethodCall ma | ma.getAnArgument() = result) or - exists(ReturnStmt rs | rs.getResult() = result) + exists(ReturnStmt rs | rs.getExpr() = result) ) } @@ -159,8 +159,8 @@ class GraphicsPackage extends Package { GraphicsPackage() { this.getName() = "java.awt" or this.getName().matches("java.awt.%") or - this.getName() = "javax.swing" or - this.getName().matches("javax.swing.%") + this.getName() = javaxOrJakarta() + ".swing" or + this.getName().matches(javaxOrJakarta() + ".swing.%") } } diff --git a/java/ql/lib/semmle/code/java/frameworks/javaee/jsf/JSFAnnotations.qll b/java/ql/lib/semmle/code/java/frameworks/javaee/jsf/JSFAnnotations.qll index 3338fa840ab0..f62d9e50b687 100644 --- a/java/ql/lib/semmle/code/java/frameworks/javaee/jsf/JSFAnnotations.qll +++ b/java/ql/lib/semmle/code/java/frameworks/javaee/jsf/JSFAnnotations.qll @@ -9,7 +9,7 @@ import default */ class FacesManagedBeanAnnotation extends Annotation { FacesManagedBeanAnnotation() { - this.getType().hasQualifiedName("javax.faces.bean", "ManagedBean") + this.getType().hasQualifiedName(javaxOrJakarta() + ".faces.bean", "ManagedBean") } /** @@ -25,7 +25,7 @@ class FacesManagedBeanAnnotation extends Annotation { */ class FacesComponentAnnotation extends Annotation { FacesComponentAnnotation() { - this.getType().hasQualifiedName("javax.faces.component", "FacesComponent") + this.getType().hasQualifiedName(javaxOrJakarta() + ".faces.component", "FacesComponent") } /** diff --git a/java/ql/lib/semmle/code/java/frameworks/javaee/jsf/JSFRenderer.qll b/java/ql/lib/semmle/code/java/frameworks/javaee/jsf/JSFRenderer.qll index df646e8a9a2c..21f8fba67859 100644 --- a/java/ql/lib/semmle/code/java/frameworks/javaee/jsf/JSFRenderer.qll +++ b/java/ql/lib/semmle/code/java/frameworks/javaee/jsf/JSFRenderer.qll @@ -8,9 +8,7 @@ import java * The JSF class `FacesContext` for processing HTTP requests. */ class FacesContext extends RefType { - FacesContext() { - this.hasQualifiedName(["javax.faces.context", "jakarta.faces.context"], "FacesContext") - } + FacesContext() { this.hasQualifiedName(javaxOrJakarta() + ".faces.context", "FacesContext") } } /** diff --git a/java/ql/lib/semmle/code/java/frameworks/spring/SpringAutowire.qll b/java/ql/lib/semmle/code/java/frameworks/spring/SpringAutowire.qll index e758811b368e..970870f95037 100644 --- a/java/ql/lib/semmle/code/java/frameworks/spring/SpringAutowire.qll +++ b/java/ql/lib/semmle/code/java/frameworks/spring/SpringAutowire.qll @@ -14,7 +14,7 @@ import SpringComponentScan predicate hasInjectAnnotation(Annotatable a) { a.hasAnnotation("org.springframework.beans.factory.annotation", "Autowired") or a.getAnAnnotation() instanceof SpringResourceAnnotation or - a.hasAnnotation("javax.inject", "Inject") + a.hasAnnotation(javaxOrJakarta() + ".inject", "Inject") } /** @@ -292,7 +292,7 @@ class SpringBeanAutowiredField extends Field { class SpringQualifierAnnotationType extends AnnotationType { SpringQualifierAnnotationType() { this.hasQualifiedName("org.springframework.beans.factory.annotation", "Qualifier") or - this.hasQualifiedName("javax.inject", "Qualifier") or + this.hasQualifiedName(javaxOrJakarta() + ".inject", "Qualifier") or this.getAnAnnotation().getType() instanceof SpringQualifierAnnotationType } } @@ -340,7 +340,9 @@ class SpringQualifierAnnotation extends Annotation { * autowired by Spring, and can optionally specify a qualifier in the "name". */ class SpringResourceAnnotation extends Annotation { - SpringResourceAnnotation() { this.getType().hasQualifiedName("javax.inject", "Resource") } + SpringResourceAnnotation() { + this.getType().hasQualifiedName(javaxOrJakarta() + ".inject", "Resource") + } /** * Gets the specified name value, if any. diff --git a/java/ql/lib/semmle/code/java/frameworks/spring/SpringController.qll b/java/ql/lib/semmle/code/java/frameworks/spring/SpringController.qll index a444dc96d5a4..a26e4edc2771 100644 --- a/java/ql/lib/semmle/code/java/frameworks/spring/SpringController.qll +++ b/java/ql/lib/semmle/code/java/frameworks/spring/SpringController.qll @@ -210,10 +210,22 @@ class SpringRequestMappingParameter extends Parameter { predicate isNotDirectlyTaintedInput() { this.getType().(RefType).getAnAncestor() instanceof SpringWebRequest or this.getType().(RefType).getAnAncestor() instanceof SpringNativeWebRequest or - this.getType().(RefType).getAnAncestor().hasQualifiedName("javax.servlet", "ServletRequest") or - this.getType().(RefType).getAnAncestor().hasQualifiedName("javax.servlet", "ServletResponse") or - this.getType().(RefType).getAnAncestor().hasQualifiedName("javax.servlet.http", "HttpSession") or - this.getType().(RefType).getAnAncestor().hasQualifiedName("javax.servlet.http", "PushBuilder") or + this.getType() + .(RefType) + .getAnAncestor() + .hasQualifiedName(javaxOrJakarta() + ".servlet", "ServletRequest") or + this.getType() + .(RefType) + .getAnAncestor() + .hasQualifiedName(javaxOrJakarta() + ".servlet", "ServletResponse") or + this.getType() + .(RefType) + .getAnAncestor() + .hasQualifiedName(javaxOrJakarta() + ".servlet.http", "HttpSession") or + this.getType() + .(RefType) + .getAnAncestor() + .hasQualifiedName(javaxOrJakarta() + ".servlet.http", "PushBuilder") or this.getType().(RefType).getAnAncestor().hasQualifiedName("java.security", "Principal") or this.getType() .(RefType) diff --git a/java/ql/lib/semmle/code/java/frameworks/spring/SpringHttp.qll b/java/ql/lib/semmle/code/java/frameworks/spring/SpringHttp.qll index 5f9271c01490..d110caa1703c 100644 --- a/java/ql/lib/semmle/code/java/frameworks/spring/SpringHttp.qll +++ b/java/ql/lib/semmle/code/java/frameworks/spring/SpringHttp.qll @@ -52,7 +52,7 @@ private class SpringXssSink extends XSS::XssSink { SpringXssSink() { exists(SpringRequestMappingMethod requestMappingMethod, ReturnStmt rs | requestMappingMethod = rs.getEnclosingCallable() and - this.asExpr() = rs.getResult() and + this.asExpr() = rs.getExpr() and ( not specifiesContentType(requestMappingMethod) or isXssVulnerableContentTypeExpr(requestMappingMethod.getAProducesExpr()) diff --git a/java/ql/lib/semmle/code/java/frameworks/stapler/Stapler.qll b/java/ql/lib/semmle/code/java/frameworks/stapler/Stapler.qll index 28ca95b55413..d7563100d974 100644 --- a/java/ql/lib/semmle/code/java/frameworks/stapler/Stapler.qll +++ b/java/ql/lib/semmle/code/java/frameworks/stapler/Stapler.qll @@ -58,9 +58,9 @@ private class HttpResponseGetDescriptionStep extends AdditionalValueStep { override predicate step(DataFlow::Node n1, DataFlow::Node n2) { exists(ReturnStmt s, GenerateResponseMethod m | s.getEnclosingCallable() instanceof HudsonWebMethod and - boundOrStaticType(s.getResult(), m.getDeclaringType().getADescendant()) + boundOrStaticType(s.getExpr(), m.getDeclaringType().getADescendant()) | - n1.asExpr() = s.getResult() and + n1.asExpr() = s.getExpr() and n2.(DataFlow::InstanceParameterNode).getCallable() = m ) } diff --git a/java/ql/lib/semmle/code/java/metrics/MetricCallable.qll b/java/ql/lib/semmle/code/java/metrics/MetricCallable.qll index e6fa5d9e5c26..55753cc7bc82 100644 --- a/java/ql/lib/semmle/code/java/metrics/MetricCallable.qll +++ b/java/ql/lib/semmle/code/java/metrics/MetricCallable.qll @@ -71,18 +71,28 @@ class MetricCallable extends Callable { } } +private predicate fallthroughSwitchCase(SwitchCase sc1, SwitchCase sc2) { + exists(SwitchStmt switch, int n | switch.getStmt(n) = sc1 and switch.getStmt(n + 1) = sc2) + or + exists(SwitchExpr switch, int n | switch.getStmt(n) = sc1 and switch.getStmt(n + 1) = sc2) +} + // Branching points in the sense of cyclomatic complexity are binary, // so there should be a branching point for each non-default switch // case (ignoring those that just fall through to the next case). private predicate branchingSwitchCase(ConstCase sc) { - not sc.getControlFlowNode().getASuccessor().asStmt() instanceof SwitchCase and - not defaultFallThrough(sc) + if sc.isRule() + then any() + else ( + not fallthroughSwitchCase(sc, _) and + not defaultFallThrough(sc) + ) } private predicate defaultFallThrough(ConstCase sc) { - exists(DefaultCase default | default.getControlFlowNode().getASuccessor().asStmt() = sc) + exists(DefaultCase default | fallthroughSwitchCase(default, sc)) or - defaultFallThrough(sc.getControlFlowNode().getAPredecessor().asStmt()) + exists(ConstCase mid | defaultFallThrough(mid) and fallthroughSwitchCase(mid, sc)) } /** Holds if `stmt` is a branching statement used for the computation of cyclomatic complexity. */ diff --git a/java/ql/lib/semmle/code/java/security/ArithmeticCommon.qll b/java/ql/lib/semmle/code/java/security/ArithmeticCommon.qll index 4f4c20a5263b..9282e7666273 100644 --- a/java/ql/lib/semmle/code/java/security/ArithmeticCommon.qll +++ b/java/ql/lib/semmle/code/java/security/ArithmeticCommon.qll @@ -113,7 +113,7 @@ predicate upcastToWiderType(Expr e) { or exists(CastingExpr c | c.getExpr() = e and t2 = c.getType()) or - exists(ReturnStmt ret | ret.getResult() = e and t2 = ret.getEnclosingCallable().getReturnType()) + exists(ReturnStmt ret | ret.getExpr() = e and t2 = ret.getEnclosingCallable().getReturnType()) or exists(Parameter p | p.getAnArgument() = e and t2 = p.getType()) or diff --git a/java/ql/lib/semmle/code/java/security/CleartextStorageCookieQuery.qll b/java/ql/lib/semmle/code/java/security/CleartextStorageCookieQuery.qll index 1c99821386da..9f04aff7e40a 100644 --- a/java/ql/lib/semmle/code/java/security/CleartextStorageCookieQuery.qll +++ b/java/ql/lib/semmle/code/java/security/CleartextStorageCookieQuery.qll @@ -23,7 +23,9 @@ private class CookieCleartextStorageSink extends CleartextStorageSink { /** The instantiation of a cookie, which can act as storage. */ class Cookie extends Storable, ClassInstanceExpr { Cookie() { - this.getConstructor().getDeclaringType().hasQualifiedName("javax.servlet.http", "Cookie") + this.getConstructor() + .getDeclaringType() + .hasQualifiedName(javaxOrJakarta() + ".servlet.http", "Cookie") } /** Gets an input, for example `input` in `new Cookie("...", input);`. */ @@ -42,7 +44,8 @@ private predicate cookieStore(DataFlow::Node cookie, Expr store) { exists(MethodCall m, Method def | m.getMethod() = def and def.getName() = "addCookie" and - def.getDeclaringType().hasQualifiedName("javax.servlet.http", "HttpServletResponse") and + def.getDeclaringType() + .hasQualifiedName(javaxOrJakarta() + ".servlet.http", "HttpServletResponse") and store = m and cookie.asExpr() = m.getAnArgument() ) diff --git a/java/ql/lib/semmle/code/java/security/Encryption.qll b/java/ql/lib/semmle/code/java/security/Encryption.qll index b948a94962c7..b0a0fc72df77 100644 --- a/java/ql/lib/semmle/code/java/security/Encryption.qll +++ b/java/ql/lib/semmle/code/java/security/Encryption.qll @@ -9,6 +9,7 @@ import java class SslClass extends RefType { SslClass() { exists(Class c | this.getAnAncestor() = c | + // Note there are no jakarta equivalents of these classes. c.hasQualifiedName("javax.net.ssl", _) or c.hasQualifiedName("javax.rmi.ssl", _) ) diff --git a/java/ql/lib/semmle/code/java/security/FragmentInjection.qll b/java/ql/lib/semmle/code/java/security/FragmentInjection.qll index d27677b22717..7dc5f68d2d1e 100644 --- a/java/ql/lib/semmle/code/java/security/FragmentInjection.qll +++ b/java/ql/lib/semmle/code/java/security/FragmentInjection.qll @@ -25,7 +25,7 @@ class IsValidFragmentMethod extends Method { predicate isUnsafe() { this.getDeclaringType().(AndroidActivity).isExported() and forex(ReturnStmt retStmt | retStmt.getEnclosingCallable() = this | - retStmt.getResult().(BooleanLiteral).getBooleanValue() = true + retStmt.getExpr().(BooleanLiteral).getBooleanValue() = true ) } } diff --git a/java/ql/lib/semmle/code/java/security/InsecureBeanValidationQuery.qll b/java/ql/lib/semmle/code/java/security/InsecureBeanValidationQuery.qll index e1c840ce2642..88fb540e83bd 100644 --- a/java/ql/lib/semmle/code/java/security/InsecureBeanValidationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/InsecureBeanValidationQuery.qll @@ -25,7 +25,7 @@ class SetMessageInterpolatorCall extends MethodCall { this.getMethod() = m and m.getDeclaringType().getASourceSupertype*() = t and ( - t.hasQualifiedName("javax.validation", ["Configuration", "ValidatorContext"]) and + t.hasQualifiedName(javaxOrJakarta() + ".validation", ["Configuration", "ValidatorContext"]) and m.getName() = "messageInterpolator" or t.hasQualifiedName("org.springframework.validation.beanvalidation", diff --git a/java/ql/lib/semmle/code/java/security/InsecureRandomnessQuery.qll b/java/ql/lib/semmle/code/java/security/InsecureRandomnessQuery.qll index 77da25d35866..7474c977fe68 100644 --- a/java/ql/lib/semmle/code/java/security/InsecureRandomnessQuery.qll +++ b/java/ql/lib/semmle/code/java/security/InsecureRandomnessQuery.qll @@ -75,7 +75,7 @@ module InsecureRandomnessConfig implements DataFlow::ConfigSig { predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) { n1.asExpr() = n2.asExpr().(BinaryExpr).getAnOperand() or - n1.asExpr() = n2.asExpr().(UnaryExpr).getExpr() + n1.asExpr() = n2.asExpr().(UnaryExpr).getOperand() or exists(MethodCall mc, string methodName | mc.getMethod().hasQualifiedName("org.owasp.esapi", "Encoder", methodName) and diff --git a/java/ql/lib/semmle/code/java/security/LogInjection.qll b/java/ql/lib/semmle/code/java/security/LogInjection.qll index da5a1dc73a0c..b585c249d1eb 100644 --- a/java/ql/lib/semmle/code/java/security/LogInjection.qll +++ b/java/ql/lib/semmle/code/java/security/LogInjection.qll @@ -45,11 +45,11 @@ private class LineBreaksLogInjectionSanitizer extends LogInjectionSanitizer { } private predicate stringMethodCall( - MethodCall ma, CompileTimeConstantExpr arg0, CompileTimeConstantExpr arg1 + MethodCall mc, CompileTimeConstantExpr arg0, CompileTimeConstantExpr arg1 ) { - ma.getMethod().getDeclaringType() instanceof TypeString and - arg0 = ma.getArgument(0) and - arg1 = ma.getArgument(1) + mc.getMethod().getDeclaringType() instanceof TypeString and + arg0 = mc.getArgument(0) and + arg1 = mc.getArgument(1) } private predicate stringMethodArgument(CompileTimeConstantExpr arg) { @@ -64,22 +64,23 @@ private predicate stringMethodArgumentValueMatches(CompileTimeConstantExpr const } /** - * Holds if the return value of `ma` is sanitized against log injection attacks - * by removing line breaks from it. + * Holds if `e` is sanitized against log injection attacks by removing line + * breaks from it. */ -private predicate logInjectionSanitizer(MethodCall ma) { - exists(CompileTimeConstantExpr target, CompileTimeConstantExpr replacement | - stringMethodCall(ma, target, replacement) and +private predicate logInjectionSanitizer(Expr e) { + exists(MethodCall mc, CompileTimeConstantExpr target, CompileTimeConstantExpr replacement | + e = mc and + stringMethodCall(mc, target, replacement) and not stringMethodArgumentValueMatches(replacement, ["%\n%", "%\r%"]) | - ma.getMethod().hasName("replace") and + mc.getMethod().hasName("replace") and not replacement.getIntValue() = [10, 13] and ( target.getIntValue() = [10, 13] or // 10 == '\n', 13 == '\r' target.getStringValue() = ["\n", "\r"] ) or - ma.getMethod().hasName("replaceAll") and + mc.getMethod().hasName("replaceAll") and ( // Replace anything not in an allow list target.getStringValue().matches("[^%]") and @@ -89,6 +90,13 @@ private predicate logInjectionSanitizer(MethodCall ma) { target.getStringValue() = ["\n", "\r", "\\n", "\\r", "\\R"] ) ) + or + exists(RegexMatch rm, CompileTimeConstantExpr target | + rm instanceof Annotation and + e = rm.getASanitizedExpr() and + target = rm.getRegex() and + regexPreventsLogInjection(target.getStringValue(), true) + ) } /** @@ -96,41 +104,44 @@ private predicate logInjectionSanitizer(MethodCall ma) { * by checking if there are line breaks in `e`. */ private predicate logInjectionGuard(Guard g, Expr e, boolean branch) { - exists(MethodCall ma, CompileTimeConstantExpr target | - ma = g and - target = ma.getArgument(0) - | - ma.getMethod().getDeclaringType() instanceof TypeString and - ma.getMethod().hasName("contains") and - target.getStringValue() = ["\n", "\r"] and - e = ma.getQualifier() and + exists(MethodCall mc | mc = g | + mc.getMethod() instanceof StringContainsMethod and + mc.getArgument(0).(CompileTimeConstantExpr).getStringValue() = ["\n", "\r"] and + e = mc.getQualifier() and branch = false - or - ma.getMethod().hasName("matches") and - ( - ma.getMethod().getDeclaringType() instanceof TypeString and - e = ma.getQualifier() - or - ma.getMethod().getDeclaringType().hasQualifiedName("java.util.regex", "Pattern") and - e = ma.getArgument(1) - ) and - ( - // Allow anything except line breaks - ( - not target.getStringValue().matches("%[^%]%") and - not target.getStringValue().matches("%" + ["\n", "\r", "\\n", "\\r", "\\R"] + "%") - or - target.getStringValue().matches("%[^%" + ["\n", "\r", "\\n", "\\r", "\\R"] + "%]%") - ) and - branch = true - or - // Disallow line breaks - ( - not target.getStringValue().matches("%[^%" + ["\n", "\r", "\\n", "\\r", "\\R"] + "%]%") and - // Assuming a regex containing line breaks is correctly matching line breaks in a string - target.getStringValue().matches("%" + ["\n", "\r", "\\n", "\\r", "\\R"] + "%") - ) and - branch = false - ) ) + or + exists(RegexMatch rm, CompileTimeConstantExpr target | + rm = g and + not rm instanceof Annotation and + target = rm.getRegex() and + e = rm.getASanitizedExpr() + | + regexPreventsLogInjection(target.getStringValue(), branch) + ) +} + +/** + * Holds if `regex` matches against a pattern that allows anything except + * line breaks when `branch` is `true`, or a pattern that matches line breaks + * when `branch` is `false`. + */ +bindingset[regex] +private predicate regexPreventsLogInjection(string regex, boolean branch) { + // Allow anything except line breaks + ( + not regex.matches("%[^%]%") and + not regex.matches("%" + ["\n", "\r", "\\n", "\\r", "\\R"] + "%") + or + regex.matches("%[^%" + ["\n", "\r", "\\n", "\\r", "\\R"] + "%]%") + ) and + branch = true + or + // Disallow line breaks + ( + not regex.matches("%[^%" + ["\n", "\r", "\\n", "\\r", "\\R"] + "%]%") and + // Assuming a regex containing line breaks is correctly matching line breaks in a string + regex.matches("%" + ["\n", "\r", "\\n", "\\r", "\\R"] + "%") + ) and + branch = false } diff --git a/java/ql/lib/semmle/code/java/security/PathSanitizer.qll b/java/ql/lib/semmle/code/java/security/PathSanitizer.qll index 4685f5e48f71..788cd5429397 100644 --- a/java/ql/lib/semmle/code/java/security/PathSanitizer.qll +++ b/java/ql/lib/semmle/code/java/security/PathSanitizer.qll @@ -427,20 +427,15 @@ private class ReplaceDirectoryCharactersSanitizer extends StringReplaceOrReplace } } -/** Holds if `target` is the first argument of `matchesCall`. */ -private predicate isMatchesTarget(StringMatchesCall matchesCall, CompileTimeConstantExpr target) { - target = matchesCall.getArgument(0) -} - /** * Holds if `matchesCall` confirms that `checkedExpr` does not contain any directory characters * on the given `branch`. */ -private predicate isMatchesCall(StringMatchesCall matchesCall, Expr checkedExpr, boolean branch) { +private predicate isMatchesCall(RegexMatch regexMatch, Expr checkedExpr, boolean branch) { exists(CompileTimeConstantExpr target, string targetValue | - isMatchesTarget(matchesCall, target) and + target = regexMatch.getRegex() and target.getStringValue() = targetValue and - checkedExpr = matchesCall.getQualifier() + checkedExpr = regexMatch.getString() | ( // Allow anything except `.`, '/', '\' diff --git a/java/ql/lib/semmle/code/java/security/Sanitizers.qll b/java/ql/lib/semmle/code/java/security/Sanitizers.qll index 3f909864d2cd..e00071da2d8c 100644 --- a/java/ql/lib/semmle/code/java/security/Sanitizers.qll +++ b/java/ql/lib/semmle/code/java/security/Sanitizers.qll @@ -41,24 +41,10 @@ class SimpleTypeSanitizer extends DataFlow::Node { * make the type recursive. Otherwise use `RegexpCheckBarrier`. */ predicate regexpMatchGuardChecks(Guard guard, Expr e, boolean branch) { - exists(Method method, MethodCall mc | - method = mc.getMethod() and - guard = mc and + exists(RegexMatch rm | not rm instanceof Annotation | + guard = rm and + e = rm.getASanitizedExpr() and branch = true - | - // `String.matches` and other `matches` methods. - method.getName() = "matches" and - e = mc.getQualifier() - or - method instanceof PatternMatchesMethod and - e = mc.getArgument(1) - or - method instanceof MatcherMatchesMethod and - exists(MethodCall matcherCall | - matcherCall.getMethod() instanceof PatternMatcherMethod and - e = matcherCall.getArgument(0) and - DataFlow::localExprFlow(matcherCall, mc.getQualifier()) - ) ) } @@ -70,5 +56,10 @@ predicate regexpMatchGuardChecks(Guard guard, Expr e, boolean branch) { class RegexpCheckBarrier extends DataFlow::Node { RegexpCheckBarrier() { this = DataFlow::BarrierGuard::getABarrierNode() + or + // Annotations don't fit into the model of barrier guards because the + // annotation doesn't dominate the sanitized expression, so we instead + // treat them as barriers directly. + exists(RegexMatch rm | rm instanceof Annotation | this.asExpr() = rm.getString()) } } diff --git a/java/ql/lib/semmle/code/java/security/StaticInitializationVectorQuery.qll b/java/ql/lib/semmle/code/java/security/StaticInitializationVectorQuery.qll index a03775990541..e97a31614999 100644 --- a/java/ql/lib/semmle/code/java/security/StaticInitializationVectorQuery.qll +++ b/java/ql/lib/semmle/code/java/security/StaticInitializationVectorQuery.qll @@ -107,7 +107,7 @@ private class StaticInitializationVectorSource extends DataFlow::Node { // Reduce FPs from utility methods that return an empty array in an exceptional case not exists(ReturnStmt ret | array.getADimension().(CompileTimeConstantExpr).getIntValue() = 0 and - DataFlow::localExprFlow(array, ret.getResult()) + DataFlow::localExprFlow(array, ret.getExpr()) ) ) } diff --git a/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll b/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll index dc771a466063..4b9f5c61f591 100644 --- a/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll @@ -95,7 +95,7 @@ private module SafeKryoConfig implements DataFlow::ConfigSig { ) { exists(ConstructorCall cc, FunctionalExpr fe | cc.getConstructedType() instanceof KryoPoolBuilder and - fe.asMethod().getBody().getAStmt().(ReturnStmt).getResult() = node1.asExpr() and + fe.asMethod().getBody().getAStmt().(ReturnStmt).getExpr() = node1.asExpr() and node2.asExpr() = cc and cc.getArgument(0) = fe ) diff --git a/java/ql/lib/semmle/code/java/security/UnsafeHostnameVerificationQuery.qll b/java/ql/lib/semmle/code/java/security/UnsafeHostnameVerificationQuery.qll index 60829f426f75..724bccceb1fd 100644 --- a/java/ql/lib/semmle/code/java/security/UnsafeHostnameVerificationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UnsafeHostnameVerificationQuery.qll @@ -13,7 +13,7 @@ private import semmle.code.java.dataflow.ExternalFlow */ private predicate alwaysReturnsTrue(HostnameVerifierVerify m) { forex(ReturnStmt rs | rs.getEnclosingCallable() = m | - rs.getResult().(CompileTimeConstantExpr).getBooleanValue() = true + rs.getExpr().(CompileTimeConstantExpr).getBooleanValue() = true ) } diff --git a/java/ql/lib/semmle/code/java/security/XSS.qll b/java/ql/lib/semmle/code/java/security/XSS.qll index 0d52d480ae7b..b094346b753e 100644 --- a/java/ql/lib/semmle/code/java/security/XSS.qll +++ b/java/ql/lib/semmle/code/java/security/XSS.qll @@ -127,7 +127,7 @@ class XssVulnerableWriterSource extends MethodCall { ) or exists(Method m | m = this.getMethod() | - m.hasQualifiedName("javax.servlet.jsp", "JspContext", "getOut") + m.hasQualifiedName(javaxOrJakarta() + ".servlet.jsp", "JspContext", "getOut") ) or this.getMethod() instanceof FacesGetResponseWriterMethod diff --git a/java/ql/lib/semmle/code/java/security/XmlParsers.qll b/java/ql/lib/semmle/code/java/security/XmlParsers.qll index 8bb2a015a14d..bd1520034eb9 100644 --- a/java/ql/lib/semmle/code/java/security/XmlParsers.qll +++ b/java/ql/lib/semmle/code/java/security/XmlParsers.qll @@ -62,12 +62,14 @@ abstract class ParserConfig extends MethodCall { /** The class `javax.xml.parsers.DocumentBuilderFactory`. */ class DocumentBuilderFactory extends RefType { - DocumentBuilderFactory() { this.hasQualifiedName("javax.xml.parsers", "DocumentBuilderFactory") } + DocumentBuilderFactory() { + this.hasQualifiedName(javaxOrJakarta() + ".xml.parsers", "DocumentBuilderFactory") + } } /** The class `javax.xml.parsers.DocumentBuilder`. */ class DocumentBuilder extends RefType { - DocumentBuilder() { this.hasQualifiedName("javax.xml.parsers", "DocumentBuilder") } + DocumentBuilder() { this.hasQualifiedName(javaxOrJakarta() + ".xml.parsers", "DocumentBuilder") } } /** A call to `DocumentBuilder.parse`. */ @@ -174,7 +176,7 @@ class SafeDocumentBuilder extends DocumentBuilderConstruction { /** The class `javax.xml.stream.XMLInputFactory`. */ class XmlInputFactory extends RefType { - XmlInputFactory() { this.hasQualifiedName("javax.xml.stream", "XMLInputFactory") } + XmlInputFactory() { this.hasQualifiedName(javaxOrJakarta() + ".xml.stream", "XMLInputFactory") } } /** A call to `XMLInputFactory.createXMLStreamReader`. */ @@ -243,7 +245,8 @@ class XmlInputFactoryConfig extends ParserConfig { * An `XmlInputFactory` specific expression that indicates whether parsing external entities is supported. */ Expr configOptionIsSupportingExternalEntities() { - result.(ConstantStringExpr).getStringValue() = "javax.xml.stream.isSupportingExternalEntities" + result.(ConstantStringExpr).getStringValue() = + javaxOrJakarta() + ".xml.stream.isSupportingExternalEntities" or exists(Field f | result = f.getAnAccess() and @@ -256,7 +259,7 @@ Expr configOptionIsSupportingExternalEntities() { * An `XmlInputFactory` specific expression that indicates whether DTD is supported. */ Expr configOptionSupportDtd() { - result.(ConstantStringExpr).getStringValue() = "javax.xml.stream.supportDTD" + result.(ConstantStringExpr).getStringValue() = javaxOrJakarta() + ".xml.stream.supportDTD" or exists(Field f | result = f.getAnAccess() and @@ -357,12 +360,14 @@ class SafeSaxBuilder extends VarAccess { * The class `javax.xml.parsers.SAXParser`. */ class SaxParser extends RefType { - SaxParser() { this.hasQualifiedName("javax.xml.parsers", "SAXParser") } + SaxParser() { this.hasQualifiedName(javaxOrJakarta() + ".xml.parsers", "SAXParser") } } /** The class `javax.xml.parsers.SAXParserFactory`. */ class SaxParserFactory extends RefType { - SaxParserFactory() { this.hasQualifiedName("javax.xml.parsers", "SAXParserFactory") } + SaxParserFactory() { + this.hasQualifiedName(javaxOrJakarta() + ".xml.parsers", "SAXParserFactory") + } } /** A call to `SAXParser.parse`. */ @@ -635,7 +640,7 @@ class CreatedSafeXmlReader extends Call { /** The class `javax.xml.transform.sax.SAXSource` */ class SaxSource extends RefType { - SaxSource() { this.hasQualifiedName("javax.xml.transform.sax", "SAXSource") } + SaxSource() { this.hasQualifiedName(javaxOrJakarta() + ".xml.transform.sax", "SAXSource") } } /** A call to the constructor of `SAXSource` with `XmlReader` and `InputSource`. */ @@ -697,7 +702,7 @@ abstract class TransformerConfig extends MethodCall { /** The class `javax.xml.XMLConstants`. */ class XmlConstants extends RefType { - XmlConstants() { this.hasQualifiedName("javax.xml", "XMLConstants") } + XmlConstants() { this.hasQualifiedName(javaxOrJakarta() + ".xml", "XMLConstants") } } /** A configuration specific for transformers and schema. */ @@ -739,14 +744,14 @@ Expr configAccessExternalSchema() { /** The class `javax.xml.transform.TransformerFactory` or `javax.xml.transform.sax.SAXTransformerFactory`. */ class TransformerFactory extends RefType { TransformerFactory() { - this.hasQualifiedName("javax.xml.transform", "TransformerFactory") or - this.hasQualifiedName("javax.xml.transform.sax", "SAXTransformerFactory") + this.hasQualifiedName(javaxOrJakarta() + ".xml.transform", "TransformerFactory") or + this.hasQualifiedName(javaxOrJakarta() + ".xml.transform.sax", "SAXTransformerFactory") } } /** The class `javax.xml.transform.Transformer`. */ class Transformer extends RefType { - Transformer() { this.hasQualifiedName("javax.xml.transform", "Transformer") } + Transformer() { this.hasQualifiedName(javaxOrJakarta() + ".xml.transform", "Transformer") } } /** A call to `Transformer.transform`. */ @@ -843,7 +848,8 @@ class SaxTransformerFactoryNewXmlFilter extends XmlParserCall { SaxTransformerFactoryNewXmlFilter() { exists(Method m | this.getMethod() = m and - m.getDeclaringType().hasQualifiedName("javax.xml.transform.sax", "SAXTransformerFactory") and + m.getDeclaringType() + .hasQualifiedName(javaxOrJakarta() + ".xml.transform.sax", "SAXTransformerFactory") and m.hasName("newXMLFilter") ) } @@ -858,7 +864,7 @@ class SaxTransformerFactoryNewXmlFilter extends XmlParserCall { /* Schema: https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#schemafactory */ /** The class `javax.xml.validation.SchemaFactory`. */ class SchemaFactory extends RefType { - SchemaFactory() { this.hasQualifiedName("javax.xml.validation", "SchemaFactory") } + SchemaFactory() { this.hasQualifiedName(javaxOrJakarta() + ".xml.validation", "SchemaFactory") } } /** A `ParserConfig` specific to `SchemaFactory`. */ @@ -913,7 +919,7 @@ class SafeSchemaFactory extends VarAccess { /* Unmarshaller: https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#jaxb-unmarshaller */ /** The class `javax.xml.bind.Unmarshaller`. */ class XmlUnmarshaller extends RefType { - XmlUnmarshaller() { this.hasQualifiedName("javax.xml.bind", "Unmarshaller") } + XmlUnmarshaller() { this.hasQualifiedName(javaxOrJakarta() + ".xml.bind", "Unmarshaller") } } /** A call to `Unmarshaller.unmarshal`. */ @@ -934,12 +940,12 @@ class XmlUnmarshal extends XmlParserCall { /* XPathExpression: https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#xpathexpression */ /** The interface `javax.xml.xpath.XPathExpression`. */ class XPathExpression extends Interface { - XPathExpression() { this.hasQualifiedName("javax.xml.xpath", "XPathExpression") } + XPathExpression() { this.hasQualifiedName(javaxOrJakarta() + ".xml.xpath", "XPathExpression") } } /** The interface `java.xml.xpath.XPath`. */ class XPath extends Interface { - XPath() { this.hasQualifiedName("javax.xml.xpath", "XPath") } + XPath() { this.hasQualifiedName(javaxOrJakarta() + ".xml.xpath", "XPath") } } /** A call to the method `evaluate` of the classes `XPathExpression` or `XPath`. */ diff --git a/java/ql/lib/semmle/code/java/security/XsltInjection.qll b/java/ql/lib/semmle/code/java/security/XsltInjection.qll index d54e92066443..a6b18e1518f0 100644 --- a/java/ql/lib/semmle/code/java/security/XsltInjection.qll +++ b/java/ql/lib/semmle/code/java/security/XsltInjection.qll @@ -163,17 +163,17 @@ private predicate xsltPackageStep(DataFlow::Node n1, DataFlow::Node n2) { /** The class `javax.xml.transform.stax.StAXSource`. */ private class TypeStAXSource extends Class { - TypeStAXSource() { this.hasQualifiedName("javax.xml.transform.stax", "StAXSource") } + TypeStAXSource() { this.hasQualifiedName(javaxOrJakarta() + ".xml.transform.stax", "StAXSource") } } /** The class `javax.xml.transform.dom.DOMSource`. */ private class TypeDomSource extends Class { - TypeDomSource() { this.hasQualifiedName("javax.xml.transform.dom", "DOMSource") } + TypeDomSource() { this.hasQualifiedName(javaxOrJakarta() + ".xml.transform.dom", "DOMSource") } } /** The interface `javax.xml.transform.Templates`. */ private class TypeTemplates extends Interface { - TypeTemplates() { this.hasQualifiedName("javax.xml.transform", "Templates") } + TypeTemplates() { this.hasQualifiedName(javaxOrJakarta() + ".xml.transform", "Templates") } } /** The class `net.sf.saxon.s9api.XsltCompiler`. */ @@ -205,7 +205,7 @@ private class DocumentBuilderParse extends MethodCall { /** The class `javax.xml.parsers.DocumentBuilder`. */ private class DocumentBuilder extends RefType { - DocumentBuilder() { this.hasQualifiedName("javax.xml.parsers", "DocumentBuilder") } + DocumentBuilder() { this.hasQualifiedName(javaxOrJakarta() + ".xml.parsers", "DocumentBuilder") } } /** A call to `XMLInputFactory.createXMLStreamReader`. */ @@ -232,5 +232,5 @@ private class XmlInputFactoryEventReader extends MethodCall { /** The class `javax.xml.stream.XMLInputFactory`. */ private class XmlInputFactory extends RefType { - XmlInputFactory() { this.hasQualifiedName("javax.xml.stream", "XMLInputFactory") } + XmlInputFactory() { this.hasQualifiedName(javaxOrJakarta() + ".xml.stream", "XMLInputFactory") } } diff --git a/java/ql/lib/semmle/code/java/security/internal/ArraySizing.qll b/java/ql/lib/semmle/code/java/security/internal/ArraySizing.qll index 185b1b8a46e2..ab9ac70e7c44 100644 --- a/java/ql/lib/semmle/code/java/security/internal/ArraySizing.qll +++ b/java/ql/lib/semmle/code/java/security/internal/ArraySizing.qll @@ -49,7 +49,7 @@ class PointlessLoop extends WhileStmt { this.getCondition().(BooleanLiteral).getBooleanValue() = true and // The only `break` must be the last statement. forall(BreakStmt break | break.getTarget() = this | - this.getStmt().(BlockStmt).getLastStmt() = break + this.getBody().(BlockStmt).getLastStmt() = break ) and // No `continue` statements. not exists(ContinueStmt continue | continue.getTarget() = this) diff --git a/java/ql/lib/semmle/code/java/security/regexp/RegexInjection.qll b/java/ql/lib/semmle/code/java/security/regexp/RegexInjection.qll index 944ffca803ae..a14a07e04463 100644 --- a/java/ql/lib/semmle/code/java/security/regexp/RegexInjection.qll +++ b/java/ql/lib/semmle/code/java/security/regexp/RegexInjection.qll @@ -31,11 +31,9 @@ private class ExternalRegexInjectionSanitizer extends RegexInjectionSanitizer { */ private class PatternLiteralFlag extends RegexInjectionSanitizer { PatternLiteralFlag() { - exists(MethodCall ma, Method m, PatternLiteralField field | m = ma.getMethod() | - ma.getArgument(0) = this.asExpr() and - m.getDeclaringType() instanceof TypeRegexPattern and - m.hasName("compile") and - ma.getArgument(1) = field.getAnAccess() + exists(PatternCompileCall pcc, PatternLiteralField field | + pcc.getArgument(0) = this.asExpr() and + pcc.getArgument(1) = field.getAnAccess() ) } } diff --git a/java/ql/lib/utils/test/AstCfg.qll b/java/ql/lib/utils/test/AstCfg.qll new file mode 100644 index 000000000000..c44b14bee726 --- /dev/null +++ b/java/ql/lib/utils/test/AstCfg.qll @@ -0,0 +1,28 @@ +/** + * Provides utilities for getting an AST-based control flow graph in tests. + */ +overlay[local?] +module; + +import java + +private predicate isAstNode(ControlFlowNode n) { + n.injects(_) or + n instanceof ControlFlow::EntryNode or + n instanceof ControlFlow::AnnotatedExitNode or + n instanceof ControlFlow::ExitNode +} + +private predicate succToAst(ControlFlowNode n1, ControlFlowNode n2) { + n2 = n1.getASuccessor() and + isAstNode(n2) + or + exists(ControlFlowNode mid | + mid = n1.getASuccessor() and + not isAstNode(mid) and + succToAst(mid, n2) + ) +} + +/** Gets a control flow successor of `n` that skips over non-AST nodes. */ +ControlFlowNode getAnAstSuccessor(ControlFlowNode n) { isAstNode(n) and succToAst(n, result) } diff --git a/java/ql/lib/utils/test/BasicBlock.qll b/java/ql/lib/utils/test/BasicBlock.qll new file mode 100644 index 000000000000..c1f31f791825 --- /dev/null +++ b/java/ql/lib/utils/test/BasicBlock.qll @@ -0,0 +1,40 @@ +/** + * Provides utilities for working with basic blocks in tests. + */ +overlay[local?] +module; + +import java +import codeql.util.Boolean + +private predicate entryOrExit(ControlFlowNode n) { + n instanceof ControlFlow::EntryNode or + n instanceof ControlFlow::AnnotatedExitNode or + n instanceof ControlFlow::ExitNode +} + +/** Gets the first AST node in the basic block `bb`, if any. */ +ControlFlowNode getFirstAstNode(BasicBlock bb) { result = getFirstAstNode(bb, false) } + +/** + * Gets the first AST node in the basic block `bb`, if any. Otherwise, gets + * the first synthetic node. + */ +ControlFlowNode getFirstAstNodeOrSynth(BasicBlock bb) { result = getFirstAstNode(bb, true) } + +private ControlFlowNode getFirstAstNode(BasicBlock bb, Boolean allowSynthetic) { + result = + min(ControlFlowNode n, int i, int astOrder | + bb.getNode(i) = n and + if n.injects(_) + then astOrder = 0 + else + if entryOrExit(n) + then astOrder = 1 + else ( + allowSynthetic = true and astOrder = 2 + ) + | + n order by astOrder, i + ) +} diff --git a/java/ql/src/Advisory/Declarations/NonFinalImmutableField.ql b/java/ql/src/Advisory/Declarations/NonFinalImmutableField.ql index 1ca836ab2317..a94d54a92048 100644 --- a/java/ql/src/Advisory/Declarations/NonFinalImmutableField.ql +++ b/java/ql/src/Advisory/Declarations/NonFinalImmutableField.ql @@ -32,7 +32,7 @@ class AnyAssignment extends Expr { /** The expression modified by this assignment. */ Expr getDest() { this.(Assignment).getDest() = result or - this.(UnaryAssignExpr).getExpr() = result + this.(UnaryAssignExpr).getOperand() = result } } diff --git a/java/ql/src/CHANGELOG.md b/java/ql/src/CHANGELOG.md index a7307229a499..20585a7e1cc1 100644 --- a/java/ql/src/CHANGELOG.md +++ b/java/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.10.7 + +No user-facing changes. + ## 1.10.6 No user-facing changes. diff --git a/java/ql/src/Language Abuse/IterableClass.qll b/java/ql/src/Language Abuse/IterableClass.qll index a6b4c86cffda..896fc2e11607 100644 --- a/java/ql/src/Language Abuse/IterableClass.qll +++ b/java/ql/src/Language Abuse/IterableClass.qll @@ -12,7 +12,7 @@ class Iterable extends Class { exists(Method m | m.getDeclaringType().getSourceDeclaration() = this and m.getName() = "iterator" and - m.getBody().(SingletonBlock).getStmt().(ReturnStmt).getResult() = result + m.getBody().(SingletonBlock).getStmt().(ReturnStmt).getExpr() = result ) } } diff --git a/java/ql/src/Language Abuse/IterableIterator.ql b/java/ql/src/Language Abuse/IterableIterator.ql index 72dfbcd99655..f2ba1a727de7 100644 --- a/java/ql/src/Language Abuse/IterableIterator.ql +++ b/java/ql/src/Language Abuse/IterableIterator.ql @@ -30,7 +30,7 @@ class EmptyIterableIterator extends IterableIterator { .(SingletonBlock) .getStmt() .(ReturnStmt) - .getResult() + .getExpr() .(BooleanLiteral) .getBooleanValue() = false ) diff --git a/java/ql/src/Likely Bugs/Arithmetic/CondExprTypes.ql b/java/ql/src/Likely Bugs/Arithmetic/CondExprTypes.ql index 4d375864b2a8..89663e801b1e 100644 --- a/java/ql/src/Likely Bugs/Arithmetic/CondExprTypes.ql +++ b/java/ql/src/Likely Bugs/Arithmetic/CondExprTypes.ql @@ -25,5 +25,5 @@ where t instanceof PrimitiveType and not t instanceof CharType ) -select ce, "Mismatch between types of branches: $@ and $@.", ce.getTrueExpr(), - ce.getTrueExpr().getType().getName(), ce.getFalseExpr(), ce.getFalseExpr().getType().getName() +select ce, "Mismatch between types of branches: $@ and $@.", ce.getThen(), + ce.getThen().getType().getName(), ce.getElse(), ce.getElse().getType().getName() diff --git a/java/ql/src/Likely Bugs/Collections/IteratorRemoveMayFail.ql b/java/ql/src/Likely Bugs/Collections/IteratorRemoveMayFail.ql index 09d686947e00..92faee89be7b 100644 --- a/java/ql/src/Likely Bugs/Collections/IteratorRemoveMayFail.ql +++ b/java/ql/src/Likely Bugs/Collections/IteratorRemoveMayFail.ql @@ -39,7 +39,7 @@ predicate containsSpecialCollection(Expr e, SpecialCollectionCreation origin) { or exists(Call c, ReturnStmt r | e = c | r.getEnclosingCallable() = c.getCallee().getSourceDeclaration() and - containsSpecialCollection(r.getResult(), origin) + containsSpecialCollection(r.getExpr(), origin) ) } @@ -61,7 +61,7 @@ predicate iterOfSpecialCollection(Expr e, SpecialCollectionCreation origin) { or exists(Call c, ReturnStmt r | e = c | r.getEnclosingCallable() = c.getCallee().getSourceDeclaration() and - iterOfSpecialCollection(r.getResult(), origin) + iterOfSpecialCollection(r.getExpr(), origin) ) } diff --git a/java/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql b/java/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql index 2951f97d65fe..6de1e52ed98d 100644 --- a/java/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql +++ b/java/ql/src/Likely Bugs/Collections/ReadOnlyContainer.ql @@ -29,7 +29,7 @@ where exists(AssignExpr assgn | va = assgn.getDest() | assgn.getSource() instanceof FreshContainer) or // ...a return (but only if `v` is a local variable) - v instanceof LocalVariableDecl and exists(ReturnStmt ret | ret.getResult() = va) + v instanceof LocalVariableDecl and exists(ReturnStmt ret | ret.getExpr() = va) or // ...or a call to a query method on `v`. exists(MethodCall ma | va = ma.getQualifier() | ma.getMethod() instanceof ContainerQueryMethod) diff --git a/java/ql/src/Likely Bugs/Comparison/DefineEqualsWhenAddingFields.ql b/java/ql/src/Likely Bugs/Comparison/DefineEqualsWhenAddingFields.ql index 2edeea4ec57f..6695d6b677c2 100644 --- a/java/ql/src/Likely Bugs/Comparison/DefineEqualsWhenAddingFields.ql +++ b/java/ql/src/Likely Bugs/Comparison/DefineEqualsWhenAddingFields.ql @@ -32,13 +32,13 @@ predicate checksReferenceEquality(EqualsMethod em) { eq.getAnOperand().(VarAccess).getVariable() = em.getParameter(0) and ( // `{ return (ojb==this); }` - eq = blk.getStmt().(ReturnStmt).getResult() + eq = blk.getStmt().(ReturnStmt).getExpr() or // `{ if (ojb==this) return true; else return false; }` exists(IfStmt ifStmt | ifStmt = blk.getStmt() | eq = ifStmt.getCondition() and - ifStmt.getThen().(ReturnStmt).getResult().(BooleanLiteral).getBooleanValue() = true and - ifStmt.getElse().(ReturnStmt).getResult().(BooleanLiteral).getBooleanValue() = false + ifStmt.getThen().(ReturnStmt).getExpr().(BooleanLiteral).getBooleanValue() = true and + ifStmt.getElse().(ReturnStmt).getExpr().(BooleanLiteral).getBooleanValue() = false ) ) ) @@ -47,7 +47,7 @@ predicate checksReferenceEquality(EqualsMethod em) { // More precisely, we check whether the body of `em` is of the form `return super.equals(o);`, // where `o` is the (only) parameter of `em`, and the invoked method is a reference equality check. exists(SuperMethodCall sup | - sup = em.getBody().(SingletonBlock).getStmt().(ReturnStmt).getResult() and + sup = em.getBody().(SingletonBlock).getStmt().(ReturnStmt).getExpr() and sup.getArgument(0) = em.getParameter(0).getAnAccess() and checksReferenceEquality(sup.getCallee()) ) diff --git a/java/ql/src/Likely Bugs/Comparison/Equality.qll b/java/ql/src/Likely Bugs/Comparison/Equality.qll index 9aeb4a46047e..babd41157426 100644 --- a/java/ql/src/Likely Bugs/Comparison/Equality.qll +++ b/java/ql/src/Likely Bugs/Comparison/Equality.qll @@ -22,7 +22,7 @@ class RefiningEquals extends EqualsMethod { // ... on the (only) parameter of this method ... sup.getArgument(0).(VarAccess).getVariable() = this.getAParameter() and // ... and its result is implied by the result of `ret`. - exprImplies(ret.getResult(), true, sup, true) + exprImplies(ret.getExpr(), true, sup, true) ) ) } diff --git a/java/ql/src/Likely Bugs/Comparison/MissingInstanceofInEquals.ql b/java/ql/src/Likely Bugs/Comparison/MissingInstanceofInEquals.ql index 7cd495f90733..2c33143ccf0f 100644 --- a/java/ql/src/Likely Bugs/Comparison/MissingInstanceofInEquals.ql +++ b/java/ql/src/Likely Bugs/Comparison/MissingInstanceofInEquals.ql @@ -52,7 +52,7 @@ class ReferenceEquals extends EqualsMethod { exists(BlockStmt b, ReturnStmt ret, EQExpr eq | this.getBody() = b and b.getStmt(0) = ret and - ret.getResult() = eq and + ret.getExpr() = eq and eq.getAnOperand() = this.getAParameter().getAnAccess() and (eq.getAnOperand() instanceof ThisAccess or eq.getAnOperand() instanceof FieldAccess) ) diff --git a/java/ql/src/Likely Bugs/Comparison/StringComparison.ql b/java/ql/src/Likely Bugs/Comparison/StringComparison.ql index cfca2c8d7ddb..9818f965e05c 100644 --- a/java/ql/src/Likely Bugs/Comparison/StringComparison.ql +++ b/java/ql/src/Likely Bugs/Comparison/StringComparison.ql @@ -27,8 +27,8 @@ class StringValue extends Expr { ) or // Ternary conditional operator. - this.(ConditionalExpr).getTrueExpr().(StringValue).isInterned() and - this.(ConditionalExpr).getFalseExpr().(StringValue).isInterned() + this.(ConditionalExpr).getThen().(StringValue).isInterned() and + this.(ConditionalExpr).getElse().(StringValue).isInterned() or // Values of type `String` that are compile-time constant expressions (JLS 15.28). this instanceof CompileTimeConstantExpr @@ -38,7 +38,7 @@ class StringValue extends Expr { or // Method accesses whose results are all interned. forex(ReturnStmt rs | rs.getEnclosingCallable() = this.(MethodCall).getMethod() | - rs.getResult().(StringValue).isInterned() + rs.getExpr().(StringValue).isInterned() ) } } diff --git a/java/ql/src/Likely Bugs/Comparison/UselessComparisonTest.ql b/java/ql/src/Likely Bugs/Comparison/UselessComparisonTest.ql index 5c2fd94a9179..d9a1f8a3f65b 100644 --- a/java/ql/src/Likely Bugs/Comparison/UselessComparisonTest.ql +++ b/java/ql/src/Likely Bugs/Comparison/UselessComparisonTest.ql @@ -134,8 +134,8 @@ Expr overFlowCand() { result.(LocalVariableDeclExpr).getInit() = overFlowCand() or exists(ConditionalExpr c | c = result | - c.getTrueExpr() = overFlowCand() and - c.getFalseExpr() = overFlowCand() + c.getThen() = overFlowCand() and + c.getElse() = overFlowCand() ) } diff --git a/java/ql/src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql b/java/ql/src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql index 3dcd44a5273d..25eaca21aba1 100644 --- a/java/ql/src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql +++ b/java/ql/src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql @@ -42,7 +42,7 @@ predicate delegatingOverride(Method sub, Method sup) { delegatingSuperCall(stmt.(ExprStmt).getExpr(), sup) or // ...or a `return` statement containing such a call. - delegatingSuperCall(stmt.(ReturnStmt).getResult(), sup) + delegatingSuperCall(stmt.(ReturnStmt).getExpr(), sup) ) ) } diff --git a/java/ql/src/Likely Bugs/Frameworks/Swing/BadlyOverriddenAdapter.ql b/java/ql/src/Likely Bugs/Frameworks/Swing/BadlyOverriddenAdapter.ql index 6a2db4b695f3..34fd190ccf11 100644 --- a/java/ql/src/Likely Bugs/Frameworks/Swing/BadlyOverriddenAdapter.ql +++ b/java/ql/src/Likely Bugs/Frameworks/Swing/BadlyOverriddenAdapter.ql @@ -19,7 +19,7 @@ class Adapter extends Class { this.getName().matches("%Adapter") and ( this.getPackage().hasName("java.awt.event") or - this.getPackage().hasName("javax.swing.event") + this.getPackage().hasName(javaxOrJakarta() + ".swing.event") ) } } diff --git a/java/ql/src/Likely Bugs/Frameworks/Swing/ThreadSafety.ql b/java/ql/src/Likely Bugs/Frameworks/Swing/ThreadSafety.ql index 8d49cf1d59e8..623470aefc19 100644 --- a/java/ql/src/Likely Bugs/Frameworks/Swing/ThreadSafety.ql +++ b/java/ql/src/Likely Bugs/Frameworks/Swing/ThreadSafety.ql @@ -15,7 +15,12 @@ import java from MethodCall ma, Method m, MainMethod main where - ma.getQualifier().getType().getCompilationUnit().getPackage().getName().matches("javax.swing%") and + ma.getQualifier() + .getType() + .getCompilationUnit() + .getPackage() + .getName() + .matches(javaxOrJakarta() + ".swing%") and ( m.hasName("show") and m.hasNoParameters() or diff --git a/java/ql/src/Likely Bugs/Serialization/NonSerializableInnerClass.ql b/java/ql/src/Likely Bugs/Serialization/NonSerializableInnerClass.ql index 520dba86c418..316352b9b687 100644 --- a/java/ql/src/Likely Bugs/Serialization/NonSerializableInnerClass.ql +++ b/java/ql/src/Likely Bugs/Serialization/NonSerializableInnerClass.ql @@ -32,7 +32,7 @@ predicate castTo(ClassInstanceExpr cie, RefType to) { or exists(Call call, int n | call.getArgument(n) = cie | to = call.getCallee().getParameterType(n)) or - exists(ReturnStmt ret | ret.getResult() = cie | to = ret.getEnclosingCallable().getReturnType()) + exists(ReturnStmt ret | ret.getExpr() = cie | to = ret.getEnclosingCallable().getReturnType()) or exists(ArrayCreationExpr ace | ace.getInit().getAnInit() = cie | to = ace.getType().(Array).getComponentType() diff --git a/java/ql/src/Likely Bugs/Statements/Chaining.qll b/java/ql/src/Likely Bugs/Statements/Chaining.qll index bb7fba549e7b..a02c07fac42a 100644 --- a/java/ql/src/Likely Bugs/Statements/Chaining.qll +++ b/java/ql/src/Likely Bugs/Statements/Chaining.qll @@ -31,13 +31,13 @@ private predicate nonChaining(Method m) { private predicate nonChainingReturn(Method m, ReturnStmt ret) { // The wrong `this` is returned. - ret.getResult() instanceof ThisAccess and - ret.getResult().getType() != m.getDeclaringType() + ret.getExpr() instanceof ThisAccess and + ret.getExpr().getType() != m.getDeclaringType() or // A method call to the wrong method is returned. - ret.getResult() instanceof MethodCall and + ret.getExpr() instanceof MethodCall and exists(MethodCall delegateCall, Method delegate | - delegateCall = ret.getResult() and + delegateCall = ret.getExpr() and delegate = delegateCall.getMethod() | delegate.getDeclaringType() != m.getDeclaringType() @@ -54,7 +54,7 @@ private predicate nonChainingReturn(Method m, ReturnStmt ret) { or // Something else is returned. not ( - ret.getResult() instanceof ThisAccess or - ret.getResult() instanceof MethodCall + ret.getExpr() instanceof ThisAccess or + ret.getExpr() instanceof MethodCall ) } diff --git a/java/ql/src/Likely Bugs/Statements/ImpossibleCast.ql b/java/ql/src/Likely Bugs/Statements/ImpossibleCast.ql index 753c40774f6f..1232e775be50 100644 --- a/java/ql/src/Likely Bugs/Statements/ImpossibleCast.ql +++ b/java/ql/src/Likely Bugs/Statements/ImpossibleCast.ql @@ -45,13 +45,13 @@ predicate castFlow(ArrayCast ce, Variable v) { } predicate returnedFrom(ArrayCast ce, Method m) { - exists(ReturnStmt ret | ret.getEnclosingCallable() = m | ret.getResult() = ce) + exists(ReturnStmt ret | ret.getEnclosingCallable() = m | ret.getExpr() = ce) or exists(Variable v | castFlow(ce, v) | returnedVariableFrom(v, m)) } predicate returnedVariableFrom(Variable v, Method m) { - exists(ReturnStmt ret | ret.getResult() = v.getAnAccess() and ret.getEnclosingCallable() = m) + exists(ReturnStmt ret | ret.getExpr() = v.getAnAccess() and ret.getEnclosingCallable() = m) } predicate rawTypeConversion(RawType source, ParameterizedType target) { diff --git a/java/ql/src/Likely Bugs/Termination/ConstantLoopCondition.ql b/java/ql/src/Likely Bugs/Termination/ConstantLoopCondition.ql index bf03191bdac6..edc800405f72 100644 --- a/java/ql/src/Likely Bugs/Termination/ConstantLoopCondition.ql +++ b/java/ql/src/Likely Bugs/Termination/ConstantLoopCondition.ql @@ -57,13 +57,15 @@ predicate loopExitGuard(LoopStmt loop, Expr cond) { */ predicate mainLoopCondition(LoopStmt loop, Expr cond) { loop.getCondition() = cond and - exists(Expr loopReentry, ControlFlowNode last | - if exists(loop.(ForStmt).getAnUpdate()) - then loopReentry = loop.(ForStmt).getUpdate(0) - else loopReentry = cond - | - last.getEnclosingStmt().getEnclosingStmt*() = loop.getBody() and - last.getASuccessor().asExpr().getParent*() = loopReentry + exists(BasicBlock condBlock | condBlock.getANode().isBefore(cond) | + 1 < strictcount(condBlock.getAPredecessor()) or loop instanceof DoStmt + ) +} + +predicate ssaDefinitionInLoop(LoopStmt loop, SsaDefinition ssa) { + exists(ControlFlowNode node | node = ssa.getControlFlowNode() | + node.getAstNode().(Stmt).getEnclosingStmt*() = loop or + node.getAstNode().(Expr).getEnclosingStmt().getEnclosingStmt*() = loop ) } @@ -76,7 +78,7 @@ where ) and // None of the ssa variables in `cond` are updated inside the loop. forex(SsaDefinition ssa, VarRead use | ssa.getARead() = use and use.getParent*() = cond | - not ssa.getControlFlowNode().getEnclosingStmt().getEnclosingStmt*() = loop or + not ssaDefinitionInLoop(loop, ssa) or ssa.getControlFlowNode().asExpr().getParent*() = loop.(ForStmt).getAnInit() ) and // And `cond` does not use method calls, field reads, or array reads. diff --git a/java/ql/src/Likely Bugs/Termination/SpinOnField.ql b/java/ql/src/Likely Bugs/Termination/SpinOnField.ql index 7cfb2308c966..1b4185531cad 100644 --- a/java/ql/src/Likely Bugs/Termination/SpinOnField.ql +++ b/java/ql/src/Likely Bugs/Termination/SpinOnField.ql @@ -37,12 +37,12 @@ class EmptyLoop extends Stmt { exists(ForStmt stmt | stmt = this | not exists(stmt.getAnInit()) and not exists(stmt.getAnUpdate()) and - stmt.getStmt() instanceof Empty + stmt.getBody() instanceof Empty ) or - this.(WhileStmt).getStmt() instanceof Empty + this.(WhileStmt).getBody() instanceof Empty or - this.(DoStmt).getStmt() instanceof Empty + this.(DoStmt).getBody() instanceof Empty } Expr getCondition() { diff --git a/java/ql/src/Security/CWE/CWE-1004/SensitiveCookieNotHttpOnly.ql b/java/ql/src/Security/CWE/CWE-1004/SensitiveCookieNotHttpOnly.ql index 494e851a5333..afa08fb6928e 100644 --- a/java/ql/src/Security/CWE/CWE-1004/SensitiveCookieNotHttpOnly.ql +++ b/java/ql/src/Security/CWE/CWE-1004/SensitiveCookieNotHttpOnly.ql @@ -77,7 +77,9 @@ module MatchesHttpOnlyToRawHeaderFlow = TaintTracking::Global; | +| Test.kt:4:2:79:2 | Entry | 27 | Test.kt:11:3:16:3 | when ... | +| Test.kt:4:2:79:2 | Entry | 28 | Test.kt:11:3:16:3 | ... -> ... | +| Test.kt:4:2:79:2 | Entry | 29 | Test.kt:11:7:11:11 | Before ... > ... | +| Test.kt:4:2:79:2 | Entry | 30 | Test.kt:11:7:11:7 | x | +| Test.kt:4:2:79:2 | Entry | 31 | Test.kt:11:11:11:11 | 0 | +| Test.kt:4:2:79:2 | Entry | 32 | Test.kt:11:7:11:11 | ... > ... | | Test.kt:4:2:79:2 | Normal Exit | 0 | Test.kt:4:2:79:2 | Normal Exit | -| Test.kt:4:13:79:2 | { ... } | 0 | Test.kt:4:13:79:2 | { ... } | -| Test.kt:4:13:79:2 | { ... } | 1 | Test.kt:5:7:5:7 | var ...; | -| Test.kt:4:13:79:2 | { ... } | 2 | Test.kt:5:16:5:16 | 0 | -| Test.kt:4:13:79:2 | { ... } | 3 | Test.kt:5:7:5:7 | x | -| Test.kt:4:13:79:2 | { ... } | 4 | Test.kt:6:7:6:7 | var ...; | -| Test.kt:4:13:79:2 | { ... } | 5 | Test.kt:6:17:6:18 | 50 | -| Test.kt:4:13:79:2 | { ... } | 6 | Test.kt:6:7:6:7 | y | -| Test.kt:4:13:79:2 | { ... } | 7 | Test.kt:7:7:7:7 | var ...; | -| Test.kt:4:13:79:2 | { ... } | 8 | Test.kt:7:16:7:16 | 0 | -| Test.kt:4:13:79:2 | { ... } | 9 | Test.kt:7:7:7:7 | z | -| Test.kt:4:13:79:2 | { ... } | 10 | Test.kt:8:7:8:7 | var ...; | -| Test.kt:4:13:79:2 | { ... } | 11 | Test.kt:8:16:8:16 | 0 | -| Test.kt:4:13:79:2 | { ... } | 12 | Test.kt:8:7:8:7 | w | -| Test.kt:4:13:79:2 | { ... } | 13 | Test.kt:11:3:16:3 | ; | -| Test.kt:4:13:79:2 | { ... } | 14 | Test.kt:11:3:16:3 | when ... | -| Test.kt:4:13:79:2 | { ... } | 15 | Test.kt:11:3:16:3 | ... -> ... | -| Test.kt:4:13:79:2 | { ... } | 16 | Test.kt:11:7:11:7 | x | -| Test.kt:4:13:79:2 | { ... } | 17 | Test.kt:11:11:11:11 | 0 | -| Test.kt:4:13:79:2 | { ... } | 18 | Test.kt:11:7:11:11 | ... > ... | -| Test.kt:11:3:16:3 | ... -> ... | 0 | Test.kt:11:3:16:3 | ... -> ... | -| Test.kt:11:3:16:3 | ... -> ... | 1 | Test.kt:11:3:16:3 | true | -| Test.kt:11:3:16:3 | ... -> ... | 2 | Test.kt:14:10:16:3 | { ... } | -| Test.kt:11:3:16:3 | ... -> ... | 3 | Test.kt:15:4:15:4 | ; | -| Test.kt:11:3:16:3 | ... -> ... | 4 | Test.kt:15:8:15:9 | 30 | -| Test.kt:11:3:16:3 | ... -> ... | 5 | Test.kt:15:4:15:9 | ...=... | -| Test.kt:11:14:14:3 | { ... } | 0 | Test.kt:11:14:14:3 | { ... } | -| Test.kt:11:14:14:3 | { ... } | 1 | Test.kt:12:4:12:4 | ; | -| Test.kt:11:14:14:3 | { ... } | 2 | Test.kt:12:8:12:9 | 20 | -| Test.kt:11:14:14:3 | { ... } | 3 | Test.kt:12:4:12:9 | ...=... | -| Test.kt:11:14:14:3 | { ... } | 4 | Test.kt:13:4:13:4 | ; | -| Test.kt:11:14:14:3 | { ... } | 5 | Test.kt:13:8:13:9 | 10 | -| Test.kt:11:14:14:3 | { ... } | 6 | Test.kt:13:4:13:9 | ...=... | -| Test.kt:18:3:18:3 | ; | 0 | Test.kt:18:3:18:3 | ; | -| Test.kt:18:3:18:3 | ; | 1 | Test.kt:18:7:18:7 | 0 | -| Test.kt:18:3:18:3 | ; | 2 | Test.kt:18:3:18:7 | ...=... | -| Test.kt:18:3:18:3 | ; | 3 | Test.kt:21:3:24:9 | ; | -| Test.kt:18:3:18:3 | ; | 4 | Test.kt:21:3:24:9 | when ... | -| Test.kt:18:3:18:3 | ; | 5 | Test.kt:21:3:24:9 | ... -> ... | -| Test.kt:18:3:18:3 | ; | 6 | Test.kt:21:6:21:6 | x | -| Test.kt:18:3:18:3 | ; | 7 | Test.kt:21:10:21:10 | 0 | -| Test.kt:18:3:18:3 | ; | 8 | Test.kt:21:6:21:10 | ... < ... | -| Test.kt:21:3:24:9 | ... -> ... | 0 | Test.kt:21:3:24:9 | ... -> ... | -| Test.kt:21:3:24:9 | ... -> ... | 1 | Test.kt:21:3:24:9 | true | -| Test.kt:21:3:24:9 | ... -> ... | 2 | Test.kt:24:4:24:9 | INSTANCE | -| Test.kt:21:3:24:9 | ... -> ... | 3 | Test.kt:24:4:24:9 | return ... | -| Test.kt:22:4:22:4 | ; | 0 | Test.kt:22:4:22:4 | ; | -| Test.kt:22:4:22:4 | ; | 1 | Test.kt:22:8:22:9 | 40 | -| Test.kt:22:4:22:4 | ; | 2 | Test.kt:22:4:22:9 | ...=... | -| Test.kt:22:4:22:4 | ; | 3 | Test.kt:27:3:27:3 | ; | -| Test.kt:22:4:22:4 | ; | 4 | Test.kt:27:7:27:8 | 10 | -| Test.kt:22:4:22:4 | ; | 5 | Test.kt:27:3:27:8 | ...=... | -| Test.kt:22:4:22:4 | ; | 6 | Test.kt:30:3:33:3 | ; | -| Test.kt:22:4:22:4 | ; | 7 | Test.kt:30:3:33:3 | when ... | -| Test.kt:22:4:22:4 | ; | 8 | Test.kt:30:3:33:3 | ... -> ... | -| Test.kt:22:4:22:4 | ; | 9 | Test.kt:30:7:30:7 | x | -| Test.kt:22:4:22:4 | ; | 10 | Test.kt:30:12:30:12 | 0 | -| Test.kt:22:4:22:4 | ; | 11 | Test.kt:30:7:30:12 | ... (value equals) ... | -| Test.kt:30:15:33:3 | { ... } | 0 | Test.kt:30:15:33:3 | { ... } | -| Test.kt:30:15:33:3 | { ... } | 1 | Test.kt:31:4:31:4 | ; | -| Test.kt:30:15:33:3 | { ... } | 2 | Test.kt:31:8:31:9 | 60 | -| Test.kt:30:15:33:3 | { ... } | 3 | Test.kt:31:4:31:9 | ...=... | -| Test.kt:30:15:33:3 | { ... } | 4 | Test.kt:32:4:32:4 | ; | -| Test.kt:30:15:33:3 | { ... } | 5 | Test.kt:32:8:32:9 | 10 | -| Test.kt:30:15:33:3 | { ... } | 6 | Test.kt:32:4:32:9 | ...=... | -| Test.kt:35:3:35:3 | ; | 0 | Test.kt:35:3:35:3 | ; | -| Test.kt:35:3:35:3 | ; | 1 | Test.kt:35:7:35:8 | 20 | -| Test.kt:35:3:35:3 | ; | 2 | Test.kt:35:3:35:8 | ...=... | -| Test.kt:35:3:35:3 | ; | 3 | Test.kt:38:3:41:3 | while (...) | -| Test.kt:38:9:38:9 | x | 0 | Test.kt:38:9:38:9 | x | -| Test.kt:38:9:38:9 | x | 1 | Test.kt:38:13:38:13 | 0 | -| Test.kt:38:9:38:9 | x | 2 | Test.kt:38:9:38:13 | ... > ... | -| Test.kt:38:16:41:3 | { ... } | 0 | Test.kt:38:16:41:3 | { ... } | -| Test.kt:38:16:41:3 | { ... } | 1 | Test.kt:39:4:39:4 | ; | -| Test.kt:38:16:41:3 | { ... } | 2 | Test.kt:39:8:39:9 | 10 | -| Test.kt:38:16:41:3 | { ... } | 3 | Test.kt:39:4:39:9 | ...=... | -| Test.kt:38:16:41:3 | { ... } | 4 | Test.kt:40:4:40:6 | ; | -| Test.kt:38:16:41:3 | { ... } | 5 | Test.kt:40:4:40:6 | | -| Test.kt:38:16:41:3 | { ... } | 6 | Test.kt:40:4:40:6 | { ... } | -| Test.kt:38:16:41:3 | { ... } | 7 | Test.kt:40:4:40:6 | var ...; | -| Test.kt:38:16:41:3 | { ... } | 8 | Test.kt:40:4:40:4 | x | -| Test.kt:38:16:41:3 | { ... } | 9 | Test.kt:40:4:40:6 | tmp0 | -| Test.kt:38:16:41:3 | { ... } | 10 | Test.kt:40:4:40:4 | ; | -| Test.kt:38:16:41:3 | { ... } | 11 | Test.kt:40:4:40:6 | tmp0 | -| Test.kt:38:16:41:3 | { ... } | 12 | Test.kt:40:4:40:6 | dec(...) | -| Test.kt:38:16:41:3 | { ... } | 13 | Test.kt:40:4:40:6 | ...=... | -| Test.kt:38:16:41:3 | { ... } | 14 | Test.kt:40:4:40:6 | ; | -| Test.kt:38:16:41:3 | { ... } | 15 | Test.kt:40:4:40:6 | tmp0 | -| Test.kt:38:16:41:3 | { ... } | 16 | Test.kt:40:4:40:6 | | -| Test.kt:43:3:43:3 | ; | 0 | Test.kt:43:3:43:3 | ; | -| Test.kt:43:3:43:3 | ; | 1 | Test.kt:43:7:43:8 | 30 | -| Test.kt:43:3:43:3 | ; | 2 | Test.kt:43:3:43:8 | ...=... | -| Test.kt:43:3:43:3 | ; | 3 | Test.kt:73:3:73:3 | ; | -| Test.kt:43:3:43:3 | ; | 4 | Test.kt:73:7:73:8 | 50 | -| Test.kt:43:3:43:3 | ; | 5 | Test.kt:73:3:73:8 | ...=... | -| Test.kt:43:3:43:3 | ; | 6 | Test.kt:77:3:77:3 | ; | -| Test.kt:43:3:43:3 | ; | 7 | Test.kt:77:7:77:8 | 40 | -| Test.kt:43:3:43:3 | ; | 8 | Test.kt:77:3:77:8 | ...=... | -| Test.kt:43:3:43:3 | ; | 9 | Test.kt:78:3:78:8 | INSTANCE | -| Test.kt:43:3:43:3 | ; | 10 | Test.kt:78:3:78:8 | return ... | -| Test.kt:82:1:89:1 | Exceptional Exit | 0 | Test.kt:82:1:89:1 | Exceptional Exit | +| Test.kt:4:2:79:2 | Normal Exit | 1 | Test.kt:4:2:79:2 | Exit | +| Test.kt:11:3:16:3 | After when ... | 0 | Test.kt:11:3:16:3 | After when ... | +| Test.kt:11:3:16:3 | After when ... | 1 | Test.kt:11:3:16:3 | After ; | +| Test.kt:11:3:16:3 | After when ... | 2 | Test.kt:18:3:18:3 | ; | +| Test.kt:11:3:16:3 | After when ... | 3 | Test.kt:18:3:18:7 | Before ...=... | +| Test.kt:11:3:16:3 | After when ... | 4 | Test.kt:18:3:18:3 | z | +| Test.kt:11:3:16:3 | After when ... | 5 | Test.kt:18:7:18:7 | 0 | +| Test.kt:11:3:16:3 | After when ... | 6 | Test.kt:18:3:18:7 | ...=... | +| Test.kt:11:3:16:3 | After when ... | 7 | Test.kt:18:3:18:7 | After ...=... | +| Test.kt:11:3:16:3 | After when ... | 8 | Test.kt:18:3:18:3 | After ; | +| Test.kt:11:3:16:3 | After when ... | 9 | Test.kt:21:3:24:9 | ; | +| Test.kt:11:3:16:3 | After when ... | 10 | Test.kt:21:3:24:9 | when ... | +| Test.kt:11:3:16:3 | After when ... | 11 | Test.kt:21:3:24:9 | ... -> ... | +| Test.kt:11:3:16:3 | After when ... | 12 | Test.kt:21:6:21:10 | Before ... < ... | +| Test.kt:11:3:16:3 | After when ... | 13 | Test.kt:21:6:21:6 | x | +| Test.kt:11:3:16:3 | After when ... | 14 | Test.kt:21:10:21:10 | 0 | +| Test.kt:11:3:16:3 | After when ... | 15 | Test.kt:21:6:21:10 | ... < ... | +| Test.kt:11:7:11:11 | After ... > ... [false] | 0 | Test.kt:11:7:11:11 | After ... > ... [false] | +| Test.kt:11:7:11:11 | After ... > ... [false] | 1 | Test.kt:11:3:16:3 | ... -> ... | +| Test.kt:11:7:11:11 | After ... > ... [false] | 2 | Test.kt:11:3:16:3 | true | +| Test.kt:11:7:11:11 | After ... > ... [false] | 3 | Test.kt:11:3:16:3 | After true [true] | +| Test.kt:11:7:11:11 | After ... > ... [false] | 4 | Test.kt:14:10:16:3 | { ... } | +| Test.kt:11:7:11:11 | After ... > ... [false] | 5 | Test.kt:15:4:15:4 | ; | +| Test.kt:11:7:11:11 | After ... > ... [false] | 6 | Test.kt:15:4:15:9 | Before ...=... | +| Test.kt:11:7:11:11 | After ... > ... [false] | 7 | Test.kt:15:4:15:4 | y | +| Test.kt:11:7:11:11 | After ... > ... [false] | 8 | Test.kt:15:8:15:9 | 30 | +| Test.kt:11:7:11:11 | After ... > ... [false] | 9 | Test.kt:15:4:15:9 | ...=... | +| Test.kt:11:7:11:11 | After ... > ... [false] | 10 | Test.kt:15:4:15:9 | After ...=... | +| Test.kt:11:7:11:11 | After ... > ... [false] | 11 | Test.kt:15:4:15:4 | After ; | +| Test.kt:11:7:11:11 | After ... > ... [false] | 12 | Test.kt:14:10:16:3 | After { ... } | +| Test.kt:11:7:11:11 | After ... > ... [true] | 0 | Test.kt:11:7:11:11 | After ... > ... [true] | +| Test.kt:11:7:11:11 | After ... > ... [true] | 1 | Test.kt:11:14:14:3 | { ... } | +| Test.kt:11:7:11:11 | After ... > ... [true] | 2 | Test.kt:12:4:12:4 | ; | +| Test.kt:11:7:11:11 | After ... > ... [true] | 3 | Test.kt:12:4:12:9 | Before ...=... | +| Test.kt:11:7:11:11 | After ... > ... [true] | 4 | Test.kt:12:4:12:4 | y | +| Test.kt:11:7:11:11 | After ... > ... [true] | 5 | Test.kt:12:8:12:9 | 20 | +| Test.kt:11:7:11:11 | After ... > ... [true] | 6 | Test.kt:12:4:12:9 | ...=... | +| Test.kt:11:7:11:11 | After ... > ... [true] | 7 | Test.kt:12:4:12:9 | After ...=... | +| Test.kt:11:7:11:11 | After ... > ... [true] | 8 | Test.kt:12:4:12:4 | After ; | +| Test.kt:11:7:11:11 | After ... > ... [true] | 9 | Test.kt:13:4:13:4 | ; | +| Test.kt:11:7:11:11 | After ... > ... [true] | 10 | Test.kt:13:4:13:9 | Before ...=... | +| Test.kt:11:7:11:11 | After ... > ... [true] | 11 | Test.kt:13:4:13:4 | z | +| Test.kt:11:7:11:11 | After ... > ... [true] | 12 | Test.kt:13:8:13:9 | 10 | +| Test.kt:11:7:11:11 | After ... > ... [true] | 13 | Test.kt:13:4:13:9 | ...=... | +| Test.kt:11:7:11:11 | After ... > ... [true] | 14 | Test.kt:13:4:13:9 | After ...=... | +| Test.kt:11:7:11:11 | After ... > ... [true] | 15 | Test.kt:13:4:13:4 | After ; | +| Test.kt:11:7:11:11 | After ... > ... [true] | 16 | Test.kt:11:14:14:3 | After { ... } | +| Test.kt:21:6:21:10 | After ... < ... [false] | 0 | Test.kt:21:6:21:10 | After ... < ... [false] | +| Test.kt:21:6:21:10 | After ... < ... [false] | 1 | Test.kt:21:3:24:9 | ... -> ... | +| Test.kt:21:6:21:10 | After ... < ... [false] | 2 | Test.kt:21:3:24:9 | true | +| Test.kt:21:6:21:10 | After ... < ... [false] | 3 | Test.kt:21:3:24:9 | After true [true] | +| Test.kt:21:6:21:10 | After ... < ... [false] | 4 | Test.kt:24:4:24:9 | Before return ... | +| Test.kt:21:6:21:10 | After ... < ... [false] | 5 | Test.kt:24:4:24:9 | INSTANCE | +| Test.kt:21:6:21:10 | After ... < ... [false] | 6 | Test.kt:24:4:24:9 | return ... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 0 | Test.kt:21:6:21:10 | After ... < ... [true] | +| Test.kt:21:6:21:10 | After ... < ... [true] | 1 | Test.kt:22:4:22:4 | ; | +| Test.kt:21:6:21:10 | After ... < ... [true] | 2 | Test.kt:22:4:22:9 | Before ...=... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 3 | Test.kt:22:4:22:4 | y | +| Test.kt:21:6:21:10 | After ... < ... [true] | 4 | Test.kt:22:8:22:9 | 40 | +| Test.kt:21:6:21:10 | After ... < ... [true] | 5 | Test.kt:22:4:22:9 | ...=... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 6 | Test.kt:22:4:22:9 | After ...=... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 7 | Test.kt:22:4:22:4 | After ; | +| Test.kt:21:6:21:10 | After ... < ... [true] | 8 | Test.kt:21:3:24:9 | After when ... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 9 | Test.kt:21:3:24:9 | After ; | +| Test.kt:21:6:21:10 | After ... < ... [true] | 10 | Test.kt:27:3:27:3 | ; | +| Test.kt:21:6:21:10 | After ... < ... [true] | 11 | Test.kt:27:3:27:8 | Before ...=... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 12 | Test.kt:27:3:27:3 | z | +| Test.kt:21:6:21:10 | After ... < ... [true] | 13 | Test.kt:27:7:27:8 | 10 | +| Test.kt:21:6:21:10 | After ... < ... [true] | 14 | Test.kt:27:3:27:8 | ...=... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 15 | Test.kt:27:3:27:8 | After ...=... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 16 | Test.kt:27:3:27:3 | After ; | +| Test.kt:21:6:21:10 | After ... < ... [true] | 17 | Test.kt:30:3:33:3 | ; | +| Test.kt:21:6:21:10 | After ... < ... [true] | 18 | Test.kt:30:3:33:3 | when ... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 19 | Test.kt:30:3:33:3 | ... -> ... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 20 | Test.kt:30:7:30:12 | Before ... (value equals) ... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 21 | Test.kt:30:7:30:7 | x | +| Test.kt:21:6:21:10 | After ... < ... [true] | 22 | Test.kt:30:12:30:12 | 0 | +| Test.kt:21:6:21:10 | After ... < ... [true] | 23 | Test.kt:30:7:30:12 | ... (value equals) ... | +| Test.kt:30:3:33:3 | After when ... | 0 | Test.kt:30:3:33:3 | After when ... | +| Test.kt:30:3:33:3 | After when ... | 1 | Test.kt:30:3:33:3 | After ; | +| Test.kt:30:3:33:3 | After when ... | 2 | Test.kt:35:3:35:3 | ; | +| Test.kt:30:3:33:3 | After when ... | 3 | Test.kt:35:3:35:8 | Before ...=... | +| Test.kt:30:3:33:3 | After when ... | 4 | Test.kt:35:3:35:3 | z | +| Test.kt:30:3:33:3 | After when ... | 5 | Test.kt:35:7:35:8 | 20 | +| Test.kt:30:3:33:3 | After when ... | 6 | Test.kt:35:3:35:8 | ...=... | +| Test.kt:30:3:33:3 | After when ... | 7 | Test.kt:35:3:35:8 | After ...=... | +| Test.kt:30:3:33:3 | After when ... | 8 | Test.kt:35:3:35:3 | After ; | +| Test.kt:30:3:33:3 | After when ... | 9 | Test.kt:38:3:41:3 | while (...) | +| Test.kt:30:7:30:12 | After ... (value equals) ... [false] | 0 | Test.kt:30:7:30:12 | After ... (value equals) ... [false] | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 0 | Test.kt:30:7:30:12 | After ... (value equals) ... [true] | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 1 | Test.kt:30:15:33:3 | { ... } | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 2 | Test.kt:31:4:31:4 | ; | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 3 | Test.kt:31:4:31:9 | Before ...=... | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 4 | Test.kt:31:4:31:4 | y | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 5 | Test.kt:31:8:31:9 | 60 | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 6 | Test.kt:31:4:31:9 | ...=... | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 7 | Test.kt:31:4:31:9 | After ...=... | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 8 | Test.kt:31:4:31:4 | After ; | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 9 | Test.kt:32:4:32:4 | ; | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 10 | Test.kt:32:4:32:9 | Before ...=... | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 11 | Test.kt:32:4:32:4 | z | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 12 | Test.kt:32:8:32:9 | 10 | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 13 | Test.kt:32:4:32:9 | ...=... | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 14 | Test.kt:32:4:32:9 | After ...=... | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 15 | Test.kt:32:4:32:4 | After ; | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 16 | Test.kt:30:15:33:3 | After { ... } | +| Test.kt:38:3:41:3 | [LoopHeader] while (...) | 0 | Test.kt:38:3:41:3 | [LoopHeader] while (...) | +| Test.kt:38:3:41:3 | [LoopHeader] while (...) | 1 | Test.kt:38:9:38:13 | Before ... > ... | +| Test.kt:38:3:41:3 | [LoopHeader] while (...) | 2 | Test.kt:38:9:38:9 | x | +| Test.kt:38:3:41:3 | [LoopHeader] while (...) | 3 | Test.kt:38:13:38:13 | 0 | +| Test.kt:38:3:41:3 | [LoopHeader] while (...) | 4 | Test.kt:38:9:38:13 | ... > ... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 0 | Test.kt:38:9:38:13 | After ... > ... [false] | +| Test.kt:38:9:38:13 | After ... > ... [false] | 1 | Test.kt:38:3:41:3 | After while (...) | +| Test.kt:38:9:38:13 | After ... > ... [false] | 2 | Test.kt:43:3:43:3 | ; | +| Test.kt:38:9:38:13 | After ... > ... [false] | 3 | Test.kt:43:3:43:8 | Before ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 4 | Test.kt:43:3:43:3 | z | +| Test.kt:38:9:38:13 | After ... > ... [false] | 5 | Test.kt:43:7:43:8 | 30 | +| Test.kt:38:9:38:13 | After ... > ... [false] | 6 | Test.kt:43:3:43:8 | ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 7 | Test.kt:43:3:43:8 | After ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 8 | Test.kt:43:3:43:3 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [false] | 9 | Test.kt:73:3:73:3 | ; | +| Test.kt:38:9:38:13 | After ... > ... [false] | 10 | Test.kt:73:3:73:8 | Before ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 11 | Test.kt:73:3:73:3 | z | +| Test.kt:38:9:38:13 | After ... > ... [false] | 12 | Test.kt:73:7:73:8 | 50 | +| Test.kt:38:9:38:13 | After ... > ... [false] | 13 | Test.kt:73:3:73:8 | ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 14 | Test.kt:73:3:73:8 | After ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 15 | Test.kt:73:3:73:3 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [false] | 16 | Test.kt:77:3:77:3 | ; | +| Test.kt:38:9:38:13 | After ... > ... [false] | 17 | Test.kt:77:3:77:8 | Before ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 18 | Test.kt:77:3:77:3 | w | +| Test.kt:38:9:38:13 | After ... > ... [false] | 19 | Test.kt:77:7:77:8 | 40 | +| Test.kt:38:9:38:13 | After ... > ... [false] | 20 | Test.kt:77:3:77:8 | ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 21 | Test.kt:77:3:77:8 | After ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 22 | Test.kt:77:3:77:3 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [false] | 23 | Test.kt:78:3:78:8 | Before return ... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 24 | Test.kt:78:3:78:8 | INSTANCE | +| Test.kt:38:9:38:13 | After ... > ... [false] | 25 | Test.kt:78:3:78:8 | return ... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 0 | Test.kt:38:9:38:13 | After ... > ... [true] | +| Test.kt:38:9:38:13 | After ... > ... [true] | 1 | Test.kt:38:16:41:3 | { ... } | +| Test.kt:38:9:38:13 | After ... > ... [true] | 2 | Test.kt:39:4:39:4 | ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 3 | Test.kt:39:4:39:9 | Before ...=... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 4 | Test.kt:39:4:39:4 | y | +| Test.kt:38:9:38:13 | After ... > ... [true] | 5 | Test.kt:39:8:39:9 | 10 | +| Test.kt:38:9:38:13 | After ... > ... [true] | 6 | Test.kt:39:4:39:9 | ...=... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 7 | Test.kt:39:4:39:9 | After ...=... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 8 | Test.kt:39:4:39:4 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 9 | Test.kt:40:4:40:6 | ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 10 | Test.kt:40:4:40:6 | Before | +| Test.kt:38:9:38:13 | After ... > ... [true] | 11 | Test.kt:40:4:40:6 | Before | +| Test.kt:38:9:38:13 | After ... > ... [true] | 12 | Test.kt:40:4:40:6 | { ... } | +| Test.kt:38:9:38:13 | After ... > ... [true] | 13 | Test.kt:40:4:40:6 | var ...; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 14 | Test.kt:40:4:40:6 | Before tmp0 | +| Test.kt:38:9:38:13 | After ... > ... [true] | 15 | Test.kt:40:4:40:4 | x | +| Test.kt:38:9:38:13 | After ... > ... [true] | 16 | Test.kt:40:4:40:6 | tmp0 | +| Test.kt:38:9:38:13 | After ... > ... [true] | 17 | Test.kt:40:4:40:6 | After tmp0 | +| Test.kt:38:9:38:13 | After ... > ... [true] | 18 | Test.kt:40:4:40:6 | After var ...; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 19 | Test.kt:40:4:40:4 | ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 20 | Test.kt:40:4:40:6 | Before ...=... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 21 | Test.kt:40:4:40:4 | x | +| Test.kt:38:9:38:13 | After ... > ... [true] | 22 | Test.kt:40:4:40:6 | Before dec(...) | +| Test.kt:38:9:38:13 | After ... > ... [true] | 23 | Test.kt:40:4:40:6 | tmp0 | +| Test.kt:38:9:38:13 | After ... > ... [true] | 24 | Test.kt:40:4:40:6 | dec(...) | +| Test.kt:38:9:38:13 | After ... > ... [true] | 25 | Test.kt:40:4:40:6 | After dec(...) | +| Test.kt:38:9:38:13 | After ... > ... [true] | 26 | Test.kt:40:4:40:6 | ...=... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 27 | Test.kt:40:4:40:6 | After ...=... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 28 | Test.kt:40:4:40:4 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 29 | Test.kt:40:4:40:6 | ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 30 | Test.kt:40:4:40:6 | tmp0 | +| Test.kt:38:9:38:13 | After ... > ... [true] | 31 | Test.kt:40:4:40:6 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 32 | Test.kt:40:4:40:6 | After { ... } | +| Test.kt:38:9:38:13 | After ... > ... [true] | 33 | Test.kt:40:4:40:6 | | +| Test.kt:38:9:38:13 | After ... > ... [true] | 34 | Test.kt:40:4:40:6 | After | +| Test.kt:38:9:38:13 | After ... > ... [true] | 35 | Test.kt:40:4:40:6 | | +| Test.kt:38:9:38:13 | After ... > ... [true] | 36 | Test.kt:40:4:40:6 | After | +| Test.kt:38:9:38:13 | After ... > ... [true] | 37 | Test.kt:40:4:40:6 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 38 | Test.kt:38:16:41:3 | After { ... } | +| Test.kt:82:1:89:1 | Entry | 0 | Test.kt:82:1:89:1 | Entry | +| Test.kt:82:1:89:1 | Entry | 1 | Test.kt:82:21:89:1 | { ... } | +| Test.kt:82:1:89:1 | Entry | 2 | Test.kt:83:2:88:2 | try ... | +| Test.kt:82:1:89:1 | Entry | 3 | Test.kt:83:6:86:2 | { ... } | +| Test.kt:82:1:89:1 | Entry | 4 | Test.kt:84:7:84:7 | var ...; | +| Test.kt:82:1:89:1 | Entry | 5 | Test.kt:84:7:84:7 | Before x | +| Test.kt:82:1:89:1 | Entry | 6 | Test.kt:84:11:84:18 | Before (...)... | +| Test.kt:82:1:89:1 | Entry | 7 | Test.kt:84:11:84:11 | o | +| Test.kt:82:1:89:1 | Entry | 8 | Test.kt:84:11:84:18 | (...)... | | Test.kt:82:1:89:1 | Exit | 0 | Test.kt:82:1:89:1 | Exit | | Test.kt:82:1:89:1 | Normal Exit | 0 | Test.kt:82:1:89:1 | Normal Exit | -| Test.kt:82:21:89:1 | { ... } | 0 | Test.kt:82:21:89:1 | { ... } | -| Test.kt:82:21:89:1 | { ... } | 1 | Test.kt:83:2:88:2 | try ... | -| Test.kt:82:21:89:1 | { ... } | 2 | Test.kt:83:6:86:2 | { ... } | -| Test.kt:82:21:89:1 | { ... } | 3 | Test.kt:84:7:84:7 | var ...; | -| Test.kt:82:21:89:1 | { ... } | 4 | Test.kt:84:11:84:11 | o | -| Test.kt:82:21:89:1 | { ... } | 5 | Test.kt:84:11:84:18 | (...)... | -| Test.kt:84:7:84:7 | x | 0 | Test.kt:84:7:84:7 | x | -| Test.kt:84:7:84:7 | x | 1 | Test.kt:85:10:85:10 | 1 | -| Test.kt:84:7:84:7 | x | 2 | Test.kt:85:3:85:10 | return ... | +| Test.kt:84:11:84:18 | After (...)... | 0 | Test.kt:84:11:84:18 | After (...)... | +| Test.kt:84:11:84:18 | After (...)... | 1 | Test.kt:84:7:84:7 | x | +| Test.kt:84:11:84:18 | After (...)... | 2 | Test.kt:84:7:84:7 | After x | +| Test.kt:84:11:84:18 | After (...)... | 3 | Test.kt:84:7:84:7 | After var ...; | +| Test.kt:84:11:84:18 | After (...)... | 4 | Test.kt:85:3:85:10 | Before return ... | +| Test.kt:84:11:84:18 | After (...)... | 5 | Test.kt:85:10:85:10 | 1 | +| Test.kt:84:11:84:18 | After (...)... | 6 | Test.kt:85:3:85:10 | return ... | +| Test.kt:86:4:88:2 | After catch (...) [match] | 0 | Test.kt:86:4:88:2 | After catch (...) [match] | +| Test.kt:86:4:88:2 | After catch (...) [match] | 1 | Test.kt:86:11:86:31 | e | +| Test.kt:86:4:88:2 | After catch (...) [match] | 2 | Test.kt:86:34:88:2 | { ... } | +| Test.kt:86:4:88:2 | After catch (...) [match] | 3 | Test.kt:87:3:87:10 | Before return ... | +| Test.kt:86:4:88:2 | After catch (...) [match] | 4 | Test.kt:87:10:87:10 | 2 | +| Test.kt:86:4:88:2 | After catch (...) [match] | 5 | Test.kt:87:3:87:10 | return ... | +| Test.kt:86:4:88:2 | After catch (...) [no-match] | 0 | Test.kt:86:4:88:2 | After catch (...) [no-match] | +| Test.kt:86:4:88:2 | After catch (...) [no-match] | 1 | Test.kt:82:1:89:1 | Exceptional Exit | | Test.kt:86:4:88:2 | catch (...) | 0 | Test.kt:86:4:88:2 | catch (...) | -| Test.kt:86:4:88:2 | catch (...) | 1 | Test.kt:86:11:86:31 | e | -| Test.kt:86:4:88:2 | catch (...) | 2 | Test.kt:86:34:88:2 | { ... } | -| Test.kt:86:4:88:2 | catch (...) | 3 | Test.kt:87:10:87:10 | 2 | -| Test.kt:86:4:88:2 | catch (...) | 4 | Test.kt:87:3:87:10 | return ... | -| Test.kt:91:1:98:1 | Exceptional Exit | 0 | Test.kt:91:1:98:1 | Exceptional Exit | +| Test.kt:91:1:98:1 | Entry | 0 | Test.kt:91:1:98:1 | Entry | +| Test.kt:91:1:98:1 | Entry | 1 | Test.kt:91:22:98:1 | { ... } | +| Test.kt:91:1:98:1 | Entry | 2 | Test.kt:92:2:97:2 | try ... | +| Test.kt:91:1:98:1 | Entry | 3 | Test.kt:92:6:95:2 | { ... } | +| Test.kt:91:1:98:1 | Entry | 4 | Test.kt:93:7:93:7 | var ...; | +| Test.kt:91:1:98:1 | Entry | 5 | Test.kt:93:7:93:7 | Before x | +| Test.kt:91:1:98:1 | Entry | 6 | Test.kt:93:12:93:13 | Before ...!! | +| Test.kt:91:1:98:1 | Entry | 7 | Test.kt:93:11:93:11 | o | +| Test.kt:91:1:98:1 | Entry | 8 | Test.kt:93:12:93:13 | ...!! | | Test.kt:91:1:98:1 | Exit | 0 | Test.kt:91:1:98:1 | Exit | | Test.kt:91:1:98:1 | Normal Exit | 0 | Test.kt:91:1:98:1 | Normal Exit | -| Test.kt:91:22:98:1 | { ... } | 0 | Test.kt:91:22:98:1 | { ... } | -| Test.kt:91:22:98:1 | { ... } | 1 | Test.kt:92:2:97:2 | try ... | -| Test.kt:91:22:98:1 | { ... } | 2 | Test.kt:92:6:95:2 | { ... } | -| Test.kt:91:22:98:1 | { ... } | 3 | Test.kt:93:7:93:7 | var ...; | -| Test.kt:91:22:98:1 | { ... } | 4 | Test.kt:93:11:93:11 | o | -| Test.kt:91:22:98:1 | { ... } | 5 | Test.kt:93:12:93:13 | ...!! | -| Test.kt:93:7:93:7 | x | 0 | Test.kt:93:7:93:7 | x | -| Test.kt:93:7:93:7 | x | 1 | Test.kt:94:10:94:10 | 1 | -| Test.kt:93:7:93:7 | x | 2 | Test.kt:94:3:94:10 | return ... | +| Test.kt:93:12:93:13 | After ...!! | 0 | Test.kt:93:12:93:13 | After ...!! | +| Test.kt:93:12:93:13 | After ...!! | 1 | Test.kt:93:7:93:7 | x | +| Test.kt:93:12:93:13 | After ...!! | 2 | Test.kt:93:7:93:7 | After x | +| Test.kt:93:12:93:13 | After ...!! | 3 | Test.kt:93:7:93:7 | After var ...; | +| Test.kt:93:12:93:13 | After ...!! | 4 | Test.kt:94:3:94:10 | Before return ... | +| Test.kt:93:12:93:13 | After ...!! | 5 | Test.kt:94:10:94:10 | 1 | +| Test.kt:93:12:93:13 | After ...!! | 6 | Test.kt:94:3:94:10 | return ... | +| Test.kt:95:4:97:2 | After catch (...) [match] | 0 | Test.kt:95:4:97:2 | After catch (...) [match] | +| Test.kt:95:4:97:2 | After catch (...) [match] | 1 | Test.kt:95:11:95:33 | e | +| Test.kt:95:4:97:2 | After catch (...) [match] | 2 | Test.kt:95:36:97:2 | { ... } | +| Test.kt:95:4:97:2 | After catch (...) [match] | 3 | Test.kt:96:3:96:10 | Before return ... | +| Test.kt:95:4:97:2 | After catch (...) [match] | 4 | Test.kt:96:10:96:10 | 2 | +| Test.kt:95:4:97:2 | After catch (...) [match] | 5 | Test.kt:96:3:96:10 | return ... | +| Test.kt:95:4:97:2 | After catch (...) [no-match] | 0 | Test.kt:95:4:97:2 | After catch (...) [no-match] | +| Test.kt:95:4:97:2 | After catch (...) [no-match] | 1 | Test.kt:91:1:98:1 | Exceptional Exit | | Test.kt:95:4:97:2 | catch (...) | 0 | Test.kt:95:4:97:2 | catch (...) | -| Test.kt:95:4:97:2 | catch (...) | 1 | Test.kt:95:11:95:33 | e | -| Test.kt:95:4:97:2 | catch (...) | 2 | Test.kt:95:36:97:2 | { ... } | -| Test.kt:95:4:97:2 | catch (...) | 3 | Test.kt:96:10:96:10 | 2 | -| Test.kt:95:4:97:2 | catch (...) | 4 | Test.kt:96:3:96:10 | return ... | +| Test.kt:100:1:110:1 | Entry | 0 | Test.kt:100:1:110:1 | Entry | +| Test.kt:100:1:110:1 | Entry | 1 | Test.kt:100:25:110:1 | { ... } | +| Test.kt:100:1:110:1 | Entry | 2 | Test.kt:101:5:103:5 | ; | +| Test.kt:100:1:110:1 | Entry | 3 | Test.kt:101:5:103:5 | when ... | +| Test.kt:100:1:110:1 | Entry | 4 | Test.kt:101:5:103:5 | ... -> ... | +| Test.kt:100:1:110:1 | Entry | 5 | Test.kt:101:9:101:30 | ... && ... | +| Test.kt:100:1:110:1 | Entry | 6 | Test.kt:101:9:101:17 | Before ... (value equals) ... | +| Test.kt:100:1:110:1 | Entry | 7 | Test.kt:101:9:101:9 | x | +| Test.kt:100:1:110:1 | Entry | 8 | Test.kt:101:14:101:17 | null | +| Test.kt:100:1:110:1 | Entry | 9 | Test.kt:101:9:101:17 | ... (value equals) ... | | Test.kt:100:1:110:1 | Exit | 0 | Test.kt:100:1:110:1 | Exit | -| Test.kt:100:1:110:1 | Normal Exit | 0 | Test.kt:100:1:110:1 | Normal Exit | -| Test.kt:100:25:110:1 | { ... } | 0 | Test.kt:100:25:110:1 | { ... } | -| Test.kt:100:25:110:1 | { ... } | 1 | Test.kt:101:5:103:5 | ; | -| Test.kt:100:25:110:1 | { ... } | 2 | Test.kt:101:5:103:5 | when ... | -| Test.kt:100:25:110:1 | { ... } | 3 | Test.kt:101:5:103:5 | ... -> ... | -| Test.kt:100:25:110:1 | { ... } | 4 | Test.kt:101:9:101:30 | ... && ... | -| Test.kt:100:25:110:1 | { ... } | 5 | Test.kt:101:9:101:9 | x | -| Test.kt:100:25:110:1 | { ... } | 6 | Test.kt:101:14:101:17 | null | -| Test.kt:100:25:110:1 | { ... } | 7 | Test.kt:101:9:101:17 | ... (value equals) ... | -| Test.kt:101:22:101:22 | y | 0 | Test.kt:101:22:101:22 | y | -| Test.kt:101:22:101:22 | y | 1 | Test.kt:101:27:101:30 | null | -| Test.kt:101:22:101:22 | y | 2 | Test.kt:101:22:101:30 | ... (value equals) ... | -| Test.kt:101:33:103:5 | { ... } | 0 | Test.kt:101:33:103:5 | { ... } | -| Test.kt:101:33:103:5 | { ... } | 1 | Test.kt:102:15:102:25 | new Exception(...) | -| Test.kt:101:33:103:5 | { ... } | 2 | Test.kt:102:9:102:25 | throw ... | -| Test.kt:101:33:103:5 | { ... } | 3 | Test.kt:100:1:110:1 | Exceptional Exit | -| Test.kt:105:5:109:5 | ; | 0 | Test.kt:105:5:109:5 | ; | -| Test.kt:105:5:109:5 | ; | 1 | Test.kt:105:5:109:5 | when ... | -| Test.kt:105:5:109:5 | ; | 2 | Test.kt:105:9:107:5 | ... -> ... | -| Test.kt:105:5:109:5 | ; | 3 | Test.kt:105:9:105:9 | x | -| Test.kt:105:5:109:5 | ; | 4 | Test.kt:105:14:105:17 | null | -| Test.kt:105:5:109:5 | ; | 5 | Test.kt:105:9:105:17 | ... (value not-equals) ... | -| Test.kt:105:20:107:5 | { ... } | 0 | Test.kt:105:20:107:5 | { ... } | -| Test.kt:105:20:107:5 | { ... } | 1 | Test.kt:106:9:106:29 | ; | -| Test.kt:105:20:107:5 | { ... } | 2 | Test.kt:106:17:106:28 | "x not null" | -| Test.kt:105:20:107:5 | { ... } | 3 | Test.kt:106:9:106:29 | println(...) | -| Test.kt:107:16:109:5 | ... -> ... | 0 | Test.kt:107:16:109:5 | ... -> ... | -| Test.kt:107:16:109:5 | ... -> ... | 1 | Test.kt:107:16:107:16 | y | -| Test.kt:107:16:109:5 | ... -> ... | 2 | Test.kt:107:21:107:24 | null | -| Test.kt:107:16:109:5 | ... -> ... | 3 | Test.kt:107:16:107:24 | ... (value not-equals) ... | -| Test.kt:107:27:109:5 | { ... } | 0 | Test.kt:107:27:109:5 | { ... } | -| Test.kt:107:27:109:5 | { ... } | 1 | Test.kt:108:9:108:29 | ; | -| Test.kt:107:27:109:5 | { ... } | 2 | Test.kt:108:17:108:28 | "y not null" | -| Test.kt:107:27:109:5 | { ... } | 3 | Test.kt:108:9:108:29 | println(...) | -| Test.kt:112:1:116:1 | Exceptional Exit | 0 | Test.kt:112:1:116:1 | Exceptional Exit | -| Test.kt:112:1:116:1 | Exit | 0 | Test.kt:112:1:116:1 | Exit | -| Test.kt:112:1:116:1 | Normal Exit | 0 | Test.kt:112:1:116:1 | Normal Exit | -| Test.kt:112:32:116:1 | { ... } | 0 | Test.kt:112:32:116:1 | { ... } | -| Test.kt:112:32:116:1 | { ... } | 1 | Test.kt:113:5:115:5 | ; | -| Test.kt:112:32:116:1 | { ... } | 2 | Test.kt:113:5:115:5 | when ... | -| Test.kt:112:32:116:1 | { ... } | 3 | Test.kt:113:5:115:5 | ... -> ... | -| Test.kt:112:32:116:1 | { ... } | 4 | Test.kt:113:9:113:14 | ... && ... | -| Test.kt:112:32:116:1 | { ... } | 5 | Test.kt:113:9:113:9 | x | -| Test.kt:113:14:113:14 | y | 0 | Test.kt:113:14:113:14 | y | -| Test.kt:113:17:115:5 | { ... } | 0 | Test.kt:113:17:115:5 | { ... } | -| Test.kt:118:1:124:1 | Exceptional Exit | 0 | Test.kt:118:1:124:1 | Exceptional Exit | -| Test.kt:118:1:124:1 | Exit | 0 | Test.kt:118:1:124:1 | Exit | -| Test.kt:118:1:124:1 | Normal Exit | 0 | Test.kt:118:1:124:1 | Normal Exit | -| Test.kt:118:37:124:1 | { ... } | 0 | Test.kt:118:37:124:1 | { ... } | -| Test.kt:118:37:124:1 | { ... } | 1 | Test.kt:119:2:123:12 | ; | -| Test.kt:118:37:124:1 | { ... } | 2 | Test.kt:119:2:123:12 | when ... | -| Test.kt:118:37:124:1 | { ... } | 3 | Test.kt:120:3:123:10 | ... -> ... | -| Test.kt:118:37:124:1 | { ... } | 4 | Test.kt:120:3:123:3 | when ... | -| Test.kt:118:37:124:1 | { ... } | 5 | Test.kt:121:4:121:9 | ... -> ... | -| Test.kt:118:37:124:1 | { ... } | 6 | Test.kt:121:4:121:4 | x | -| Test.kt:121:9:121:9 | ; | 0 | Test.kt:121:9:121:9 | ; | -| Test.kt:121:9:121:9 | ; | 1 | Test.kt:121:9:121:9 | y | -| Test.kt:122:12:122:16 | ... -> ... | 0 | Test.kt:122:12:122:16 | ... -> ... | -| Test.kt:122:12:122:16 | ... -> ... | 1 | Test.kt:122:12:122:16 | true | -| Test.kt:122:12:122:16 | ... -> ... | 2 | Test.kt:122:12:122:16 | ; | -| Test.kt:122:12:122:16 | ... -> ... | 3 | Test.kt:122:12:122:16 | false | -| Test.kt:123:8:123:10 | { ... } | 0 | Test.kt:123:8:123:10 | { ... } | +| Test.kt:101:9:101:17 | After ... (value equals) ... [false] | 0 | Test.kt:101:9:101:17 | After ... (value equals) ... [false] | +| Test.kt:101:9:101:17 | After ... (value equals) ... [true] | 0 | Test.kt:101:9:101:17 | After ... (value equals) ... [true] | +| Test.kt:101:9:101:17 | After ... (value equals) ... [true] | 1 | Test.kt:101:22:101:30 | Before ... (value equals) ... | +| Test.kt:101:9:101:17 | After ... (value equals) ... [true] | 2 | Test.kt:101:22:101:22 | y | +| Test.kt:101:9:101:17 | After ... (value equals) ... [true] | 3 | Test.kt:101:27:101:30 | null | +| Test.kt:101:9:101:17 | After ... (value equals) ... [true] | 4 | Test.kt:101:22:101:30 | ... (value equals) ... | +| Test.kt:101:9:101:30 | After ... && ... [false] | 0 | Test.kt:101:9:101:30 | After ... && ... [false] | +| Test.kt:101:9:101:30 | After ... && ... [false] | 1 | Test.kt:101:5:103:5 | After when ... | +| Test.kt:101:9:101:30 | After ... && ... [false] | 2 | Test.kt:101:5:103:5 | After ; | +| Test.kt:101:9:101:30 | After ... && ... [false] | 3 | Test.kt:105:5:109:5 | ; | +| Test.kt:101:9:101:30 | After ... && ... [false] | 4 | Test.kt:105:5:109:5 | when ... | +| Test.kt:101:9:101:30 | After ... && ... [false] | 5 | Test.kt:105:9:107:5 | ... -> ... | +| Test.kt:101:9:101:30 | After ... && ... [false] | 6 | Test.kt:105:9:105:17 | Before ... (value not-equals) ... | +| Test.kt:101:9:101:30 | After ... && ... [false] | 7 | Test.kt:105:9:105:9 | x | +| Test.kt:101:9:101:30 | After ... && ... [false] | 8 | Test.kt:105:14:105:17 | null | +| Test.kt:101:9:101:30 | After ... && ... [false] | 9 | Test.kt:105:9:105:17 | ... (value not-equals) ... | +| Test.kt:101:22:101:30 | After ... (value equals) ... [false] | 0 | Test.kt:101:22:101:30 | After ... (value equals) ... [false] | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 0 | Test.kt:101:22:101:30 | After ... (value equals) ... [true] | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 1 | Test.kt:101:9:101:30 | After ... && ... [true] | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 2 | Test.kt:101:33:103:5 | { ... } | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 3 | Test.kt:102:9:102:25 | Before throw ... | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 4 | Test.kt:102:15:102:25 | Before new Exception(...) | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 5 | Test.kt:102:15:102:25 | new Exception(...) | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 6 | Test.kt:102:15:102:25 | After new Exception(...) | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 7 | Test.kt:102:9:102:25 | throw ... | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 8 | Test.kt:100:1:110:1 | Exceptional Exit | +| Test.kt:105:5:109:5 | After when ... | 0 | Test.kt:105:5:109:5 | After when ... | +| Test.kt:105:5:109:5 | After when ... | 1 | Test.kt:105:5:109:5 | After ; | +| Test.kt:105:5:109:5 | After when ... | 2 | Test.kt:100:25:110:1 | After { ... } | +| Test.kt:105:5:109:5 | After when ... | 3 | Test.kt:100:1:110:1 | Normal Exit | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | 0 | Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | 1 | Test.kt:107:16:109:5 | ... -> ... | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | 2 | Test.kt:107:16:107:24 | Before ... (value not-equals) ... | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | 3 | Test.kt:107:16:107:16 | y | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | 4 | Test.kt:107:21:107:24 | null | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | 5 | Test.kt:107:16:107:24 | ... (value not-equals) ... | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 0 | Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 1 | Test.kt:105:20:107:5 | { ... } | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 2 | Test.kt:106:9:106:29 | ; | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 3 | Test.kt:106:9:106:29 | Before println(...) | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 4 | Test.kt:106:17:106:28 | "x not null" | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 5 | Test.kt:106:9:106:29 | println(...) | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 6 | Test.kt:106:9:106:29 | After println(...) | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 7 | Test.kt:106:9:106:29 | After ; | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 8 | Test.kt:105:20:107:5 | After { ... } | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [false] | 0 | Test.kt:107:16:107:24 | After ... (value not-equals) ... [false] | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 0 | Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 1 | Test.kt:107:27:109:5 | { ... } | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 2 | Test.kt:108:9:108:29 | ; | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 3 | Test.kt:108:9:108:29 | Before println(...) | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 4 | Test.kt:108:17:108:28 | "y not null" | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 5 | Test.kt:108:9:108:29 | println(...) | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 6 | Test.kt:108:9:108:29 | After println(...) | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 7 | Test.kt:108:9:108:29 | After ; | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 8 | Test.kt:107:27:109:5 | After { ... } | +| Test.kt:112:1:116:1 | Entry | 0 | Test.kt:112:1:116:1 | Entry | +| Test.kt:112:1:116:1 | Entry | 1 | Test.kt:112:32:116:1 | { ... } | +| Test.kt:112:1:116:1 | Entry | 2 | Test.kt:113:5:115:5 | ; | +| Test.kt:112:1:116:1 | Entry | 3 | Test.kt:113:5:115:5 | when ... | +| Test.kt:112:1:116:1 | Entry | 4 | Test.kt:113:5:115:5 | ... -> ... | +| Test.kt:112:1:116:1 | Entry | 5 | Test.kt:113:9:113:14 | ... && ... | +| Test.kt:112:1:116:1 | Entry | 6 | Test.kt:113:9:113:9 | x | +| Test.kt:113:5:115:5 | After when ... | 0 | Test.kt:113:5:115:5 | After when ... | +| Test.kt:113:5:115:5 | After when ... | 1 | Test.kt:113:5:115:5 | After ; | +| Test.kt:113:5:115:5 | After when ... | 2 | Test.kt:112:32:116:1 | After { ... } | +| Test.kt:113:5:115:5 | After when ... | 3 | Test.kt:112:1:116:1 | Normal Exit | +| Test.kt:113:5:115:5 | After when ... | 4 | Test.kt:112:1:116:1 | Exit | +| Test.kt:113:9:113:9 | After x [false] | 0 | Test.kt:113:9:113:9 | After x [false] | +| Test.kt:113:9:113:9 | After x [true] | 0 | Test.kt:113:9:113:9 | After x [true] | +| Test.kt:113:9:113:9 | After x [true] | 1 | Test.kt:113:14:113:14 | y | +| Test.kt:113:9:113:14 | After ... && ... [false] | 0 | Test.kt:113:9:113:14 | After ... && ... [false] | +| Test.kt:113:14:113:14 | After y [false] | 0 | Test.kt:113:14:113:14 | After y [false] | +| Test.kt:113:14:113:14 | After y [true] | 0 | Test.kt:113:14:113:14 | After y [true] | +| Test.kt:113:14:113:14 | After y [true] | 1 | Test.kt:113:9:113:14 | After ... && ... [true] | +| Test.kt:113:14:113:14 | After y [true] | 2 | Test.kt:113:17:115:5 | { ... } | +| Test.kt:118:1:124:1 | Entry | 0 | Test.kt:118:1:124:1 | Entry | +| Test.kt:118:1:124:1 | Entry | 1 | Test.kt:118:37:124:1 | { ... } | +| Test.kt:118:1:124:1 | Entry | 2 | Test.kt:119:2:123:12 | ; | +| Test.kt:118:1:124:1 | Entry | 3 | Test.kt:119:2:123:12 | when ... | +| Test.kt:118:1:124:1 | Entry | 4 | Test.kt:120:3:123:10 | ... -> ... | +| Test.kt:118:1:124:1 | Entry | 5 | Test.kt:120:3:123:3 | when ... | +| Test.kt:118:1:124:1 | Entry | 6 | Test.kt:121:4:121:9 | ... -> ... | +| Test.kt:118:1:124:1 | Entry | 7 | Test.kt:121:4:121:4 | x | +| Test.kt:119:2:123:12 | After when ... | 0 | Test.kt:119:2:123:12 | After when ... | +| Test.kt:119:2:123:12 | After when ... | 1 | Test.kt:119:2:123:12 | After ; | +| Test.kt:119:2:123:12 | After when ... | 2 | Test.kt:118:37:124:1 | After { ... } | +| Test.kt:119:2:123:12 | After when ... | 3 | Test.kt:118:1:124:1 | Normal Exit | +| Test.kt:119:2:123:12 | After when ... | 4 | Test.kt:118:1:124:1 | Exit | +| Test.kt:120:3:123:3 | After when ... [false] | 0 | Test.kt:120:3:123:3 | After when ... [false] | +| Test.kt:120:3:123:3 | After when ... [true] | 0 | Test.kt:120:3:123:3 | After when ... [true] | +| Test.kt:120:3:123:3 | After when ... [true] | 1 | Test.kt:123:8:123:10 | { ... } | +| Test.kt:121:4:121:4 | After x [false] | 0 | Test.kt:121:4:121:4 | After x [false] | +| Test.kt:121:4:121:4 | After x [false] | 1 | Test.kt:122:12:122:16 | ... -> ... | +| Test.kt:121:4:121:4 | After x [false] | 2 | Test.kt:122:12:122:16 | true | +| Test.kt:121:4:121:4 | After x [false] | 3 | Test.kt:122:12:122:16 | After true [true] | +| Test.kt:121:4:121:4 | After x [false] | 4 | Test.kt:122:12:122:16 | ; | +| Test.kt:121:4:121:4 | After x [false] | 5 | Test.kt:122:12:122:16 | false | +| Test.kt:121:4:121:4 | After x [false] | 6 | Test.kt:122:12:122:16 | After ; | +| Test.kt:121:4:121:4 | After x [true] | 0 | Test.kt:121:4:121:4 | After x [true] | +| Test.kt:121:4:121:4 | After x [true] | 1 | Test.kt:121:9:121:9 | ; | +| Test.kt:121:4:121:4 | After x [true] | 2 | Test.kt:121:9:121:9 | y | +| Test.kt:121:4:121:4 | After x [true] | 3 | Test.kt:121:9:121:9 | After ; | diff --git a/java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.expected b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.expected index 6d0cb2bab712..bac6b7224475 100644 --- a/java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.expected +++ b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.expected @@ -1,6 +1,3 @@ -| Test.kt:3:8:80:1 | { ... } | Test.kt:3:8:80:1 | Exit | -| Test.kt:4:2:79:2 | Normal Exit | Test.kt:4:2:79:2 | Exit | -| Test.kt:4:13:79:2 | { ... } | Test.kt:4:2:79:2 | Exit | | Test.kt:4:13:79:2 | { ... } | Test.kt:4:2:79:2 | Normal Exit | | Test.kt:4:13:79:2 | { ... } | Test.kt:11:3:16:3 | ... -> ... | | Test.kt:4:13:79:2 | { ... } | Test.kt:11:14:14:3 | { ... } | @@ -12,7 +9,6 @@ | Test.kt:4:13:79:2 | { ... } | Test.kt:38:9:38:9 | x | | Test.kt:4:13:79:2 | { ... } | Test.kt:38:16:41:3 | { ... } | | Test.kt:4:13:79:2 | { ... } | Test.kt:43:3:43:3 | ; | -| Test.kt:18:3:18:3 | ; | Test.kt:4:2:79:2 | Exit | | Test.kt:18:3:18:3 | ; | Test.kt:4:2:79:2 | Normal Exit | | Test.kt:18:3:18:3 | ; | Test.kt:21:3:24:9 | ... -> ... | | Test.kt:18:3:18:3 | ; | Test.kt:22:4:22:4 | ; | @@ -31,16 +27,22 @@ | Test.kt:35:3:35:3 | ; | Test.kt:43:3:43:3 | ; | | Test.kt:38:9:38:9 | x | Test.kt:38:16:41:3 | { ... } | | Test.kt:38:9:38:9 | x | Test.kt:43:3:43:3 | ; | -| Test.kt:82:1:89:1 | Normal Exit | Test.kt:82:1:89:1 | Exit | +| Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | Exceptional Exit | | Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | Exit | | Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | Normal Exit | | Test.kt:82:21:89:1 | { ... } | Test.kt:84:7:84:7 | x | | Test.kt:82:21:89:1 | { ... } | Test.kt:86:4:88:2 | catch (...) | -| Test.kt:91:1:98:1 | Normal Exit | Test.kt:91:1:98:1 | Exit | +| Test.kt:82:21:89:1 | { ... } | Test.kt:86:11:86:31 | e | +| Test.kt:86:4:88:2 | catch (...) | Test.kt:82:1:89:1 | Exceptional Exit | +| Test.kt:86:4:88:2 | catch (...) | Test.kt:86:11:86:31 | e | +| Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | Exceptional Exit | | Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | Exit | | Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | Normal Exit | | Test.kt:91:22:98:1 | { ... } | Test.kt:93:7:93:7 | x | | Test.kt:91:22:98:1 | { ... } | Test.kt:95:4:97:2 | catch (...) | +| Test.kt:91:22:98:1 | { ... } | Test.kt:95:11:95:33 | e | +| Test.kt:95:4:97:2 | catch (...) | Test.kt:91:1:98:1 | Exceptional Exit | +| Test.kt:95:4:97:2 | catch (...) | Test.kt:95:11:95:33 | e | | Test.kt:100:25:110:1 | { ... } | Test.kt:100:1:110:1 | Exit | | Test.kt:100:25:110:1 | { ... } | Test.kt:100:1:110:1 | Normal Exit | | Test.kt:100:25:110:1 | { ... } | Test.kt:101:22:101:22 | y | @@ -55,16 +57,11 @@ | Test.kt:105:5:109:5 | ; | Test.kt:107:16:109:5 | ... -> ... | | Test.kt:105:5:109:5 | ; | Test.kt:107:27:109:5 | { ... } | | Test.kt:107:16:109:5 | ... -> ... | Test.kt:107:27:109:5 | { ... } | -| Test.kt:112:1:116:1 | Normal Exit | Test.kt:112:1:116:1 | Exit | -| Test.kt:112:32:116:1 | { ... } | Test.kt:112:1:116:1 | Exit | | Test.kt:112:32:116:1 | { ... } | Test.kt:112:1:116:1 | Normal Exit | | Test.kt:112:32:116:1 | { ... } | Test.kt:113:14:113:14 | y | | Test.kt:112:32:116:1 | { ... } | Test.kt:113:17:115:5 | { ... } | | Test.kt:113:14:113:14 | y | Test.kt:113:17:115:5 | { ... } | -| Test.kt:118:1:124:1 | Normal Exit | Test.kt:118:1:124:1 | Exit | -| Test.kt:118:37:124:1 | { ... } | Test.kt:118:1:124:1 | Exit | | Test.kt:118:37:124:1 | { ... } | Test.kt:118:1:124:1 | Normal Exit | | Test.kt:118:37:124:1 | { ... } | Test.kt:121:9:121:9 | ; | | Test.kt:118:37:124:1 | { ... } | Test.kt:122:12:122:16 | ... -> ... | | Test.kt:118:37:124:1 | { ... } | Test.kt:123:8:123:10 | { ... } | -| Test.kt:121:9:121:9 | ; | Test.kt:123:8:123:10 | { ... } | diff --git a/java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.ql b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.ql index de1e23b649cc..72de0cc435d3 100644 --- a/java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.ql +++ b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.ql @@ -1,6 +1,7 @@ import java import semmle.code.java.controlflow.Dominance +import utils.test.BasicBlock from BasicBlock b, BasicBlock b2 where b.strictlyDominates(b2) -select b, b2 +select getFirstAstNode(b), getFirstAstNode(b2) diff --git a/java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.expected b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.expected index cf5da7c83b77..0596f159e223 100644 --- a/java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.expected +++ b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.expected @@ -1,7 +1,3 @@ -| Test.kt:3:8:80:1 | Exceptional Exit | Test.kt:3:8:80:1 | Exit | -| Test.kt:3:8:80:1 | { ... } | Test.kt:3:8:80:1 | Exit | -| Test.kt:4:2:79:2 | Exceptional Exit | Test.kt:4:2:79:2 | Exit | -| Test.kt:4:2:79:2 | Normal Exit | Test.kt:4:2:79:2 | Exit | | Test.kt:4:13:79:2 | { ... } | Test.kt:11:3:16:3 | ... -> ... | | Test.kt:4:13:79:2 | { ... } | Test.kt:11:14:14:3 | { ... } | | Test.kt:11:3:16:3 | ... -> ... | Test.kt:18:3:18:3 | ; | @@ -9,8 +5,9 @@ | Test.kt:18:3:18:3 | ; | Test.kt:21:3:24:9 | ... -> ... | | Test.kt:18:3:18:3 | ; | Test.kt:22:4:22:4 | ; | | Test.kt:21:3:24:9 | ... -> ... | Test.kt:4:2:79:2 | Normal Exit | +| Test.kt:22:4:22:4 | ; | Test.kt:30:7:30:12 | After ... (value equals) ... [false] | | Test.kt:22:4:22:4 | ; | Test.kt:30:15:33:3 | { ... } | -| Test.kt:22:4:22:4 | ; | Test.kt:35:3:35:3 | ; | +| Test.kt:30:7:30:12 | After ... (value equals) ... [false] | Test.kt:35:3:35:3 | ; | | Test.kt:30:15:33:3 | { ... } | Test.kt:35:3:35:3 | ; | | Test.kt:35:3:35:3 | ; | Test.kt:38:9:38:9 | x | | Test.kt:38:9:38:9 | x | Test.kt:38:16:41:3 | { ... } | @@ -22,37 +19,45 @@ | Test.kt:82:21:89:1 | { ... } | Test.kt:84:7:84:7 | x | | Test.kt:82:21:89:1 | { ... } | Test.kt:86:4:88:2 | catch (...) | | Test.kt:84:7:84:7 | x | Test.kt:82:1:89:1 | Normal Exit | -| Test.kt:86:4:88:2 | catch (...) | Test.kt:82:1:89:1 | Normal Exit | +| Test.kt:86:4:88:2 | catch (...) | Test.kt:82:1:89:1 | Exceptional Exit | +| Test.kt:86:4:88:2 | catch (...) | Test.kt:86:11:86:31 | e | +| Test.kt:86:11:86:31 | e | Test.kt:82:1:89:1 | Normal Exit | | Test.kt:91:1:98:1 | Exceptional Exit | Test.kt:91:1:98:1 | Exit | | Test.kt:91:1:98:1 | Normal Exit | Test.kt:91:1:98:1 | Exit | | Test.kt:91:22:98:1 | { ... } | Test.kt:93:7:93:7 | x | | Test.kt:91:22:98:1 | { ... } | Test.kt:95:4:97:2 | catch (...) | | Test.kt:93:7:93:7 | x | Test.kt:91:1:98:1 | Normal Exit | -| Test.kt:95:4:97:2 | catch (...) | Test.kt:91:1:98:1 | Normal Exit | +| Test.kt:95:4:97:2 | catch (...) | Test.kt:91:1:98:1 | Exceptional Exit | +| Test.kt:95:4:97:2 | catch (...) | Test.kt:95:11:95:33 | e | +| Test.kt:95:11:95:33 | e | Test.kt:91:1:98:1 | Normal Exit | | Test.kt:100:1:110:1 | Normal Exit | Test.kt:100:1:110:1 | Exit | +| Test.kt:100:25:110:1 | { ... } | Test.kt:101:9:101:17 | After ... (value equals) ... [false] | | Test.kt:100:25:110:1 | { ... } | Test.kt:101:22:101:22 | y | -| Test.kt:100:25:110:1 | { ... } | Test.kt:105:5:109:5 | ; | +| Test.kt:101:9:101:17 | After ... (value equals) ... [false] | Test.kt:105:5:109:5 | ; | +| Test.kt:101:22:101:22 | y | Test.kt:101:22:101:30 | After ... (value equals) ... [false] | | Test.kt:101:22:101:22 | y | Test.kt:101:33:103:5 | { ... } | -| Test.kt:101:22:101:22 | y | Test.kt:105:5:109:5 | ; | +| Test.kt:101:22:101:30 | After ... (value equals) ... [false] | Test.kt:105:5:109:5 | ; | | Test.kt:101:33:103:5 | { ... } | Test.kt:100:1:110:1 | Exit | | Test.kt:105:5:109:5 | ; | Test.kt:105:20:107:5 | { ... } | | Test.kt:105:5:109:5 | ; | Test.kt:107:16:109:5 | ... -> ... | | Test.kt:105:20:107:5 | { ... } | Test.kt:100:1:110:1 | Normal Exit | -| Test.kt:107:16:109:5 | ... -> ... | Test.kt:100:1:110:1 | Normal Exit | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [false] | Test.kt:100:1:110:1 | Normal Exit | +| Test.kt:107:16:109:5 | ... -> ... | Test.kt:107:16:107:24 | After ... (value not-equals) ... [false] | | Test.kt:107:16:109:5 | ... -> ... | Test.kt:107:27:109:5 | { ... } | | Test.kt:107:27:109:5 | { ... } | Test.kt:100:1:110:1 | Normal Exit | -| Test.kt:112:1:116:1 | Exceptional Exit | Test.kt:112:1:116:1 | Exit | -| Test.kt:112:1:116:1 | Normal Exit | Test.kt:112:1:116:1 | Exit | -| Test.kt:112:32:116:1 | { ... } | Test.kt:112:1:116:1 | Normal Exit | +| Test.kt:112:32:116:1 | { ... } | Test.kt:113:9:113:9 | After x [false] | | Test.kt:112:32:116:1 | { ... } | Test.kt:113:14:113:14 | y | -| Test.kt:113:14:113:14 | y | Test.kt:112:1:116:1 | Normal Exit | +| Test.kt:113:9:113:9 | After x [false] | Test.kt:113:9:113:14 | After ... && ... [false] | +| Test.kt:113:9:113:14 | After ... && ... [false] | Test.kt:112:1:116:1 | Normal Exit | +| Test.kt:113:14:113:14 | After y [false] | Test.kt:113:9:113:14 | After ... && ... [false] | +| Test.kt:113:14:113:14 | y | Test.kt:113:14:113:14 | After y [false] | | Test.kt:113:14:113:14 | y | Test.kt:113:17:115:5 | { ... } | | Test.kt:113:17:115:5 | { ... } | Test.kt:112:1:116:1 | Normal Exit | -| Test.kt:118:1:124:1 | Exceptional Exit | Test.kt:118:1:124:1 | Exit | -| Test.kt:118:1:124:1 | Normal Exit | Test.kt:118:1:124:1 | Exit | | Test.kt:118:37:124:1 | { ... } | Test.kt:121:9:121:9 | ; | | Test.kt:118:37:124:1 | { ... } | Test.kt:122:12:122:16 | ... -> ... | -| Test.kt:121:9:121:9 | ; | Test.kt:118:1:124:1 | Normal Exit | +| Test.kt:120:3:123:3 | After when ... [false] | Test.kt:118:1:124:1 | Normal Exit | +| Test.kt:121:9:121:9 | ; | Test.kt:120:3:123:3 | After when ... [false] | | Test.kt:121:9:121:9 | ; | Test.kt:123:8:123:10 | { ... } | -| Test.kt:122:12:122:16 | ... -> ... | Test.kt:118:1:124:1 | Normal Exit | +| Test.kt:122:12:122:16 | ... -> ... | Test.kt:120:3:123:3 | After when ... [false] | +| Test.kt:122:12:122:16 | ... -> ... | Test.kt:123:8:123:10 | { ... } | | Test.kt:123:8:123:10 | { ... } | Test.kt:118:1:124:1 | Normal Exit | diff --git a/java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.ql b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.ql index ae2d8a393b47..ae8dc5d188d6 100644 --- a/java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.ql +++ b/java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.ql @@ -1,5 +1,6 @@ import java +import utils.test.BasicBlock from BasicBlock b, BasicBlock b2 where b.getASuccessor() = b2 -select b, b2 +select getFirstAstNodeOrSynth(b), getFirstAstNodeOrSynth(b2) diff --git a/java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.expected b/java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.expected index 1d07b13c9d75..8f9cce281606 100644 --- a/java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.expected +++ b/java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.expected @@ -1,12 +1,10 @@ #select | Test.kt:3:1:80:1 | super(...) | SuperConstructorInvocationStmt | Test.kt:3:8:80:1 | { ... } | BlockStmt | -| Test.kt:3:8:80:1 | Exceptional Exit | Constructor | Test.kt:3:8:80:1 | Exit | Constructor | -| Test.kt:3:8:80:1 | Exit | Constructor | file://:0:0:0:0 | | | +| Test.kt:3:8:80:1 | Entry | Constructor | Test.kt:3:8:80:1 | { ... } | BlockStmt | | Test.kt:3:8:80:1 | Normal Exit | Constructor | Test.kt:3:8:80:1 | Exit | Constructor | | Test.kt:3:8:80:1 | { ... } | BlockStmt | Test.kt:3:1:80:1 | super(...) | SuperConstructorInvocationStmt | | Test.kt:3:8:80:1 | { ... } | BlockStmt | Test.kt:3:8:80:1 | Normal Exit | Constructor | -| Test.kt:4:2:79:2 | Exceptional Exit | Method | Test.kt:4:2:79:2 | Exit | Method | -| Test.kt:4:2:79:2 | Exit | Method | file://:0:0:0:0 | | | +| Test.kt:4:2:79:2 | Entry | Method | Test.kt:4:13:79:2 | { ... } | BlockStmt | | Test.kt:4:2:79:2 | Normal Exit | Method | Test.kt:4:2:79:2 | Exit | Method | | Test.kt:4:13:79:2 | { ... } | BlockStmt | Test.kt:5:7:5:7 | var ...; | LocalVariableDeclStmt | | Test.kt:5:7:5:7 | var ...; | LocalVariableDeclStmt | Test.kt:5:16:5:16 | 0 | IntegerLiteral | @@ -31,17 +29,21 @@ | Test.kt:11:7:11:11 | ... > ... | GTExpr | Test.kt:11:14:14:3 | { ... } | BlockStmt | | Test.kt:11:11:11:11 | 0 | IntegerLiteral | Test.kt:11:7:11:11 | ... > ... | GTExpr | | Test.kt:11:14:14:3 | { ... } | BlockStmt | Test.kt:12:4:12:4 | ; | ExprStmt | -| Test.kt:12:4:12:4 | ; | ExprStmt | Test.kt:12:8:12:9 | 20 | LongLiteral | +| Test.kt:12:4:12:4 | ; | ExprStmt | Test.kt:12:4:12:4 | y | VarAccess | +| Test.kt:12:4:12:4 | y | VarAccess | Test.kt:12:8:12:9 | 20 | LongLiteral | | Test.kt:12:4:12:9 | ...=... | AssignExpr | Test.kt:13:4:13:4 | ; | ExprStmt | | Test.kt:12:8:12:9 | 20 | LongLiteral | Test.kt:12:4:12:9 | ...=... | AssignExpr | -| Test.kt:13:4:13:4 | ; | ExprStmt | Test.kt:13:8:13:9 | 10 | IntegerLiteral | +| Test.kt:13:4:13:4 | ; | ExprStmt | Test.kt:13:4:13:4 | z | VarAccess | +| Test.kt:13:4:13:4 | z | VarAccess | Test.kt:13:8:13:9 | 10 | IntegerLiteral | | Test.kt:13:4:13:9 | ...=... | AssignExpr | Test.kt:18:3:18:3 | ; | ExprStmt | | Test.kt:13:8:13:9 | 10 | IntegerLiteral | Test.kt:13:4:13:9 | ...=... | AssignExpr | | Test.kt:14:10:16:3 | { ... } | BlockStmt | Test.kt:15:4:15:4 | ; | ExprStmt | -| Test.kt:15:4:15:4 | ; | ExprStmt | Test.kt:15:8:15:9 | 30 | LongLiteral | +| Test.kt:15:4:15:4 | ; | ExprStmt | Test.kt:15:4:15:4 | y | VarAccess | +| Test.kt:15:4:15:4 | y | VarAccess | Test.kt:15:8:15:9 | 30 | LongLiteral | | Test.kt:15:4:15:9 | ...=... | AssignExpr | Test.kt:18:3:18:3 | ; | ExprStmt | | Test.kt:15:8:15:9 | 30 | LongLiteral | Test.kt:15:4:15:9 | ...=... | AssignExpr | -| Test.kt:18:3:18:3 | ; | ExprStmt | Test.kt:18:7:18:7 | 0 | IntegerLiteral | +| Test.kt:18:3:18:3 | ; | ExprStmt | Test.kt:18:3:18:3 | z | VarAccess | +| Test.kt:18:3:18:3 | z | VarAccess | Test.kt:18:7:18:7 | 0 | IntegerLiteral | | Test.kt:18:3:18:7 | ...=... | AssignExpr | Test.kt:21:3:24:9 | ; | ExprStmt | | Test.kt:18:7:18:7 | 0 | IntegerLiteral | Test.kt:18:3:18:7 | ...=... | AssignExpr | | Test.kt:21:3:24:9 | ... -> ... | WhenBranch | Test.kt:21:3:24:9 | true | BooleanLiteral | @@ -53,12 +55,14 @@ | Test.kt:21:6:21:10 | ... < ... | LTExpr | Test.kt:21:3:24:9 | ... -> ... | WhenBranch | | Test.kt:21:6:21:10 | ... < ... | LTExpr | Test.kt:22:4:22:4 | ; | ExprStmt | | Test.kt:21:10:21:10 | 0 | IntegerLiteral | Test.kt:21:6:21:10 | ... < ... | LTExpr | -| Test.kt:22:4:22:4 | ; | ExprStmt | Test.kt:22:8:22:9 | 40 | LongLiteral | +| Test.kt:22:4:22:4 | ; | ExprStmt | Test.kt:22:4:22:4 | y | VarAccess | +| Test.kt:22:4:22:4 | y | VarAccess | Test.kt:22:8:22:9 | 40 | LongLiteral | | Test.kt:22:4:22:9 | ...=... | AssignExpr | Test.kt:27:3:27:3 | ; | ExprStmt | | Test.kt:22:8:22:9 | 40 | LongLiteral | Test.kt:22:4:22:9 | ...=... | AssignExpr | | Test.kt:24:4:24:9 | INSTANCE | VarAccess | Test.kt:24:4:24:9 | return ... | ReturnStmt | | Test.kt:24:4:24:9 | return ... | ReturnStmt | Test.kt:4:2:79:2 | Normal Exit | Method | -| Test.kt:27:3:27:3 | ; | ExprStmt | Test.kt:27:7:27:8 | 10 | IntegerLiteral | +| Test.kt:27:3:27:3 | ; | ExprStmt | Test.kt:27:3:27:3 | z | VarAccess | +| Test.kt:27:3:27:3 | z | VarAccess | Test.kt:27:7:27:8 | 10 | IntegerLiteral | | Test.kt:27:3:27:8 | ...=... | AssignExpr | Test.kt:30:3:33:3 | ; | ExprStmt | | Test.kt:27:7:27:8 | 10 | IntegerLiteral | Test.kt:27:3:27:8 | ...=... | AssignExpr | | Test.kt:30:3:33:3 | ... -> ... | WhenBranch | Test.kt:30:7:30:7 | x | VarAccess | @@ -69,13 +73,16 @@ | Test.kt:30:7:30:12 | ... (value equals) ... | ValueEQExpr | Test.kt:35:3:35:3 | ; | ExprStmt | | Test.kt:30:12:30:12 | 0 | IntegerLiteral | Test.kt:30:7:30:12 | ... (value equals) ... | ValueEQExpr | | Test.kt:30:15:33:3 | { ... } | BlockStmt | Test.kt:31:4:31:4 | ; | ExprStmt | -| Test.kt:31:4:31:4 | ; | ExprStmt | Test.kt:31:8:31:9 | 60 | LongLiteral | +| Test.kt:31:4:31:4 | ; | ExprStmt | Test.kt:31:4:31:4 | y | VarAccess | +| Test.kt:31:4:31:4 | y | VarAccess | Test.kt:31:8:31:9 | 60 | LongLiteral | | Test.kt:31:4:31:9 | ...=... | AssignExpr | Test.kt:32:4:32:4 | ; | ExprStmt | | Test.kt:31:8:31:9 | 60 | LongLiteral | Test.kt:31:4:31:9 | ...=... | AssignExpr | -| Test.kt:32:4:32:4 | ; | ExprStmt | Test.kt:32:8:32:9 | 10 | IntegerLiteral | +| Test.kt:32:4:32:4 | ; | ExprStmt | Test.kt:32:4:32:4 | z | VarAccess | +| Test.kt:32:4:32:4 | z | VarAccess | Test.kt:32:8:32:9 | 10 | IntegerLiteral | | Test.kt:32:4:32:9 | ...=... | AssignExpr | Test.kt:35:3:35:3 | ; | ExprStmt | | Test.kt:32:8:32:9 | 10 | IntegerLiteral | Test.kt:32:4:32:9 | ...=... | AssignExpr | -| Test.kt:35:3:35:3 | ; | ExprStmt | Test.kt:35:7:35:8 | 20 | IntegerLiteral | +| Test.kt:35:3:35:3 | ; | ExprStmt | Test.kt:35:3:35:3 | z | VarAccess | +| Test.kt:35:3:35:3 | z | VarAccess | Test.kt:35:7:35:8 | 20 | IntegerLiteral | | Test.kt:35:3:35:8 | ...=... | AssignExpr | Test.kt:38:3:41:3 | while (...) | WhileStmt | | Test.kt:35:7:35:8 | 20 | IntegerLiteral | Test.kt:35:3:35:8 | ...=... | AssignExpr | | Test.kt:38:3:41:3 | while (...) | WhileStmt | Test.kt:38:9:38:9 | x | VarAccess | @@ -84,35 +91,40 @@ | Test.kt:38:9:38:13 | ... > ... | GTExpr | Test.kt:43:3:43:3 | ; | ExprStmt | | Test.kt:38:13:38:13 | 0 | IntegerLiteral | Test.kt:38:9:38:13 | ... > ... | GTExpr | | Test.kt:38:16:41:3 | { ... } | BlockStmt | Test.kt:39:4:39:4 | ; | ExprStmt | -| Test.kt:39:4:39:4 | ; | ExprStmt | Test.kt:39:8:39:9 | 10 | LongLiteral | +| Test.kt:39:4:39:4 | ; | ExprStmt | Test.kt:39:4:39:4 | y | VarAccess | +| Test.kt:39:4:39:4 | y | VarAccess | Test.kt:39:8:39:9 | 10 | LongLiteral | | Test.kt:39:4:39:9 | ...=... | AssignExpr | Test.kt:40:4:40:6 | ; | ExprStmt | | Test.kt:39:8:39:9 | 10 | LongLiteral | Test.kt:39:4:39:9 | ...=... | AssignExpr | -| Test.kt:40:4:40:4 | ; | ExprStmt | Test.kt:40:4:40:6 | tmp0 | VarAccess | +| Test.kt:40:4:40:4 | ; | ExprStmt | Test.kt:40:4:40:4 | x | VarAccess | | Test.kt:40:4:40:4 | x | VarAccess | Test.kt:40:4:40:6 | tmp0 | LocalVariableDeclExpr | +| Test.kt:40:4:40:4 | x | VarAccess | Test.kt:40:4:40:6 | tmp0 | VarAccess | | Test.kt:40:4:40:6 | ...=... | AssignExpr | Test.kt:40:4:40:6 | ; | ExprStmt | -| Test.kt:40:4:40:6 | ; | ExprStmt | Test.kt:40:4:40:6 | | StmtExpr | | Test.kt:40:4:40:6 | ; | ExprStmt | Test.kt:40:4:40:6 | tmp0 | VarAccess | -| Test.kt:40:4:40:6 | | StmtExpr | Test.kt:40:4:40:6 | { ... } | BlockStmt | +| Test.kt:40:4:40:6 | ; | ExprStmt | Test.kt:40:4:40:6 | { ... } | BlockStmt | +| Test.kt:40:4:40:6 | | StmtExpr | Test.kt:40:4:40:6 | | ImplicitCoercionToUnitExpr | | Test.kt:40:4:40:6 | | ImplicitCoercionToUnitExpr | Test.kt:38:9:38:9 | x | VarAccess | | Test.kt:40:4:40:6 | dec(...) | MethodCall | Test.kt:40:4:40:6 | ...=... | AssignExpr | | Test.kt:40:4:40:6 | tmp0 | LocalVariableDeclExpr | Test.kt:40:4:40:4 | ; | ExprStmt | -| Test.kt:40:4:40:6 | tmp0 | VarAccess | Test.kt:40:4:40:6 | | ImplicitCoercionToUnitExpr | +| Test.kt:40:4:40:6 | tmp0 | VarAccess | Test.kt:40:4:40:6 | | StmtExpr | | Test.kt:40:4:40:6 | tmp0 | VarAccess | Test.kt:40:4:40:6 | dec(...) | MethodCall | | Test.kt:40:4:40:6 | var ...; | LocalVariableDeclStmt | Test.kt:40:4:40:4 | x | VarAccess | | Test.kt:40:4:40:6 | { ... } | BlockStmt | Test.kt:40:4:40:6 | var ...; | LocalVariableDeclStmt | -| Test.kt:43:3:43:3 | ; | ExprStmt | Test.kt:43:7:43:8 | 30 | IntegerLiteral | +| Test.kt:43:3:43:3 | ; | ExprStmt | Test.kt:43:3:43:3 | z | VarAccess | +| Test.kt:43:3:43:3 | z | VarAccess | Test.kt:43:7:43:8 | 30 | IntegerLiteral | | Test.kt:43:3:43:8 | ...=... | AssignExpr | Test.kt:73:3:73:3 | ; | ExprStmt | | Test.kt:43:7:43:8 | 30 | IntegerLiteral | Test.kt:43:3:43:8 | ...=... | AssignExpr | -| Test.kt:73:3:73:3 | ; | ExprStmt | Test.kt:73:7:73:8 | 50 | IntegerLiteral | +| Test.kt:73:3:73:3 | ; | ExprStmt | Test.kt:73:3:73:3 | z | VarAccess | +| Test.kt:73:3:73:3 | z | VarAccess | Test.kt:73:7:73:8 | 50 | IntegerLiteral | | Test.kt:73:3:73:8 | ...=... | AssignExpr | Test.kt:77:3:77:3 | ; | ExprStmt | | Test.kt:73:7:73:8 | 50 | IntegerLiteral | Test.kt:73:3:73:8 | ...=... | AssignExpr | -| Test.kt:77:3:77:3 | ; | ExprStmt | Test.kt:77:7:77:8 | 40 | IntegerLiteral | +| Test.kt:77:3:77:3 | ; | ExprStmt | Test.kt:77:3:77:3 | w | VarAccess | +| Test.kt:77:3:77:3 | w | VarAccess | Test.kt:77:7:77:8 | 40 | IntegerLiteral | | Test.kt:77:3:77:8 | ...=... | AssignExpr | Test.kt:78:3:78:8 | INSTANCE | VarAccess | | Test.kt:77:7:77:8 | 40 | IntegerLiteral | Test.kt:77:3:77:8 | ...=... | AssignExpr | | Test.kt:78:3:78:8 | INSTANCE | VarAccess | Test.kt:78:3:78:8 | return ... | ReturnStmt | | Test.kt:78:3:78:8 | return ... | ReturnStmt | Test.kt:4:2:79:2 | Normal Exit | Method | +| Test.kt:82:1:89:1 | Entry | Method | Test.kt:82:21:89:1 | { ... } | BlockStmt | | Test.kt:82:1:89:1 | Exceptional Exit | Method | Test.kt:82:1:89:1 | Exit | Method | -| Test.kt:82:1:89:1 | Exit | Method | file://:0:0:0:0 | | | | Test.kt:82:1:89:1 | Normal Exit | Method | Test.kt:82:1:89:1 | Exit | Method | | Test.kt:82:21:89:1 | { ... } | BlockStmt | Test.kt:83:2:88:2 | try ... | TryStmt | | Test.kt:83:2:88:2 | try ... | TryStmt | Test.kt:83:6:86:2 | { ... } | BlockStmt | @@ -124,13 +136,14 @@ | Test.kt:84:11:84:18 | (...)... | CastExpr | Test.kt:86:4:88:2 | catch (...) | CatchClause | | Test.kt:85:3:85:10 | return ... | ReturnStmt | Test.kt:82:1:89:1 | Normal Exit | Method | | Test.kt:85:10:85:10 | 1 | IntegerLiteral | Test.kt:85:3:85:10 | return ... | ReturnStmt | +| Test.kt:86:4:88:2 | catch (...) | CatchClause | Test.kt:82:1:89:1 | Exceptional Exit | Method | | Test.kt:86:4:88:2 | catch (...) | CatchClause | Test.kt:86:11:86:31 | e | LocalVariableDeclExpr | | Test.kt:86:11:86:31 | e | LocalVariableDeclExpr | Test.kt:86:34:88:2 | { ... } | BlockStmt | | Test.kt:86:34:88:2 | { ... } | BlockStmt | Test.kt:87:10:87:10 | 2 | IntegerLiteral | | Test.kt:87:3:87:10 | return ... | ReturnStmt | Test.kt:82:1:89:1 | Normal Exit | Method | | Test.kt:87:10:87:10 | 2 | IntegerLiteral | Test.kt:87:3:87:10 | return ... | ReturnStmt | +| Test.kt:91:1:98:1 | Entry | Method | Test.kt:91:22:98:1 | { ... } | BlockStmt | | Test.kt:91:1:98:1 | Exceptional Exit | Method | Test.kt:91:1:98:1 | Exit | Method | -| Test.kt:91:1:98:1 | Exit | Method | file://:0:0:0:0 | | | | Test.kt:91:1:98:1 | Normal Exit | Method | Test.kt:91:1:98:1 | Exit | Method | | Test.kt:91:22:98:1 | { ... } | BlockStmt | Test.kt:92:2:97:2 | try ... | TryStmt | | Test.kt:92:2:97:2 | try ... | TryStmt | Test.kt:92:6:95:2 | { ... } | BlockStmt | @@ -142,13 +155,14 @@ | Test.kt:93:12:93:13 | ...!! | NotNullExpr | Test.kt:95:4:97:2 | catch (...) | CatchClause | | Test.kt:94:3:94:10 | return ... | ReturnStmt | Test.kt:91:1:98:1 | Normal Exit | Method | | Test.kt:94:10:94:10 | 1 | IntegerLiteral | Test.kt:94:3:94:10 | return ... | ReturnStmt | +| Test.kt:95:4:97:2 | catch (...) | CatchClause | Test.kt:91:1:98:1 | Exceptional Exit | Method | | Test.kt:95:4:97:2 | catch (...) | CatchClause | Test.kt:95:11:95:33 | e | LocalVariableDeclExpr | | Test.kt:95:11:95:33 | e | LocalVariableDeclExpr | Test.kt:95:36:97:2 | { ... } | BlockStmt | | Test.kt:95:36:97:2 | { ... } | BlockStmt | Test.kt:96:10:96:10 | 2 | IntegerLiteral | | Test.kt:96:3:96:10 | return ... | ReturnStmt | Test.kt:91:1:98:1 | Normal Exit | Method | | Test.kt:96:10:96:10 | 2 | IntegerLiteral | Test.kt:96:3:96:10 | return ... | ReturnStmt | +| Test.kt:100:1:110:1 | Entry | Method | Test.kt:100:25:110:1 | { ... } | BlockStmt | | Test.kt:100:1:110:1 | Exceptional Exit | Method | Test.kt:100:1:110:1 | Exit | Method | -| Test.kt:100:1:110:1 | Exit | Method | file://:0:0:0:0 | | | | Test.kt:100:1:110:1 | Normal Exit | Method | Test.kt:100:1:110:1 | Exit | Method | | Test.kt:100:25:110:1 | { ... } | BlockStmt | Test.kt:101:5:103:5 | ; | ExprStmt | | Test.kt:101:5:103:5 | ... -> ... | WhenBranch | Test.kt:101:9:101:30 | ... && ... | AndLogicalExpr | @@ -186,8 +200,7 @@ | Test.kt:108:9:108:29 | ; | ExprStmt | Test.kt:108:17:108:28 | "y not null" | StringLiteral | | Test.kt:108:9:108:29 | println(...) | MethodCall | Test.kt:100:1:110:1 | Normal Exit | Method | | Test.kt:108:17:108:28 | "y not null" | StringLiteral | Test.kt:108:9:108:29 | println(...) | MethodCall | -| Test.kt:112:1:116:1 | Exceptional Exit | Method | Test.kt:112:1:116:1 | Exit | Method | -| Test.kt:112:1:116:1 | Exit | Method | file://:0:0:0:0 | | | +| Test.kt:112:1:116:1 | Entry | Method | Test.kt:112:32:116:1 | { ... } | BlockStmt | | Test.kt:112:1:116:1 | Normal Exit | Method | Test.kt:112:1:116:1 | Exit | Method | | Test.kt:112:32:116:1 | { ... } | BlockStmt | Test.kt:113:5:115:5 | ; | ExprStmt | | Test.kt:113:5:115:5 | ... -> ... | WhenBranch | Test.kt:113:9:113:14 | ... && ... | AndLogicalExpr | @@ -199,8 +212,7 @@ | Test.kt:113:14:113:14 | y | VarAccess | Test.kt:112:1:116:1 | Normal Exit | Method | | Test.kt:113:14:113:14 | y | VarAccess | Test.kt:113:17:115:5 | { ... } | BlockStmt | | Test.kt:113:17:115:5 | { ... } | BlockStmt | Test.kt:112:1:116:1 | Normal Exit | Method | -| Test.kt:118:1:124:1 | Exceptional Exit | Method | Test.kt:118:1:124:1 | Exit | Method | -| Test.kt:118:1:124:1 | Exit | Method | file://:0:0:0:0 | | | +| Test.kt:118:1:124:1 | Entry | Method | Test.kt:118:37:124:1 | { ... } | BlockStmt | | Test.kt:118:1:124:1 | Normal Exit | Method | Test.kt:118:1:124:1 | Exit | Method | | Test.kt:118:37:124:1 | { ... } | BlockStmt | Test.kt:119:2:123:12 | ; | ExprStmt | | Test.kt:119:2:123:12 | ; | ExprStmt | Test.kt:119:2:123:12 | when ... | WhenExpr | @@ -216,6 +228,7 @@ | Test.kt:122:12:122:16 | ... -> ... | WhenBranch | Test.kt:122:12:122:16 | true | BooleanLiteral | | Test.kt:122:12:122:16 | ; | ExprStmt | Test.kt:122:12:122:16 | false | BooleanLiteral | | Test.kt:122:12:122:16 | false | BooleanLiteral | Test.kt:118:1:124:1 | Normal Exit | Method | +| Test.kt:122:12:122:16 | false | BooleanLiteral | Test.kt:123:8:123:10 | { ... } | BlockStmt | | Test.kt:122:12:122:16 | true | BooleanLiteral | Test.kt:122:12:122:16 | ; | ExprStmt | | Test.kt:123:8:123:10 | { ... } | BlockStmt | Test.kt:118:1:124:1 | Normal Exit | Method | missingSuccessor diff --git a/java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.ql b/java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.ql index c097d7d5e936..9a334d18aae7 100644 --- a/java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.ql +++ b/java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.ql @@ -1,53 +1,14 @@ import java +import utils.test.AstCfg -newtype TMaybeControlFlowNode = - TControlFlowNode(ControlFlowNode c) or - TNoControlFlowNode() - -class MaybeControlFlowNode extends TMaybeControlFlowNode { - abstract string toString(); - - abstract Location getLocation(); - - abstract string getPrimaryQlClasses(); -} - -class YesMaybeControlFlowNode extends MaybeControlFlowNode { - ControlFlowNode c; - - YesMaybeControlFlowNode() { this = TControlFlowNode(c) } - - override string toString() { result = c.toString() } - - override Location getLocation() { result = c.getLocation() } - - override string getPrimaryQlClasses() { result = c.getAstNode().getPrimaryQlClasses() } -} - -class NoMaybeControlFlowNode extends MaybeControlFlowNode { - NoMaybeControlFlowNode() { this = TNoControlFlowNode() } - - override string toString() { result = "" } - - override Location getLocation() { result.toString() = "file://:0:0:0:0" } - - override string getPrimaryQlClasses() { result = "" } -} - -MaybeControlFlowNode maybeSuccessor(ControlFlowNode n) { - if exists(n.getASuccessor()) - then result = TControlFlowNode(n.getASuccessor()) - else result = TNoControlFlowNode() -} - -from ControlFlowNode n, MaybeControlFlowNode m +from ControlFlowNode n, ControlFlowNode m where - m = maybeSuccessor(n) and + m = getAnAstSuccessor(n) and n.getLocation().getFile().(CompilationUnit).fromSource() -select n, n.getAstNode().getPrimaryQlClasses(), m, m.getPrimaryQlClasses() +select n, n.getAstNode().getPrimaryQlClasses(), m, m.getAstNode().getPrimaryQlClasses() query predicate missingSuccessor(Expr e) { - maybeSuccessor(e.getControlFlowNode()) instanceof NoMaybeControlFlowNode and + exists(ControlFlowNode n | n = e.getControlFlowNode() and not exists(n.getASuccessor())) and e.getFile().(CompilationUnit).fromSource() and not e instanceof TypeAccess and not e instanceof VarWrite diff --git a/java/ql/test-kotlin1/library-tests/controlflow/basic/strictDominance.expected b/java/ql/test-kotlin1/library-tests/controlflow/basic/strictDominance.expected index a85a0c120b3c..13d018efabd2 100644 --- a/java/ql/test-kotlin1/library-tests/controlflow/basic/strictDominance.expected +++ b/java/ql/test-kotlin1/library-tests/controlflow/basic/strictDominance.expected @@ -562,5 +562,4 @@ | Test.kt:121:4:121:9 | ... -> ... | Test.kt:122:12:122:16 | ... -> ... | | Test.kt:121:4:121:9 | ... -> ... | Test.kt:122:12:122:16 | ; | | Test.kt:121:4:121:9 | ... -> ... | Test.kt:123:8:123:10 | { ... } | -| Test.kt:121:9:121:9 | ; | Test.kt:123:8:123:10 | { ... } | | Test.kt:122:12:122:16 | ... -> ... | Test.kt:122:12:122:16 | ; | diff --git a/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominanceWrong.ql b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominanceWrong.ql index 4eadcddc61a6..6deead2df73b 100644 --- a/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominanceWrong.ql +++ b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominanceWrong.ql @@ -17,5 +17,6 @@ predicate dominanceCounterExample(ControlFlowNode entry, ControlFlowNode dom, Co from Callable c, ControlFlowNode dom, ControlFlowNode node where strictlyDominates(dom, node) and - dominanceCounterExample(c.getBody().getControlFlowNode(), dom, node) + dominanceCounterExample(any(ControlFlow::EntryNode entry | entry.getEnclosingCallable() = c), dom, + node) select c, dom, node diff --git a/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominator.expected b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominator.expected index 31da586d6307..3288b521887f 100644 --- a/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominator.expected +++ b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominator.expected @@ -1,157 +1,21 @@ -| Test.kt:2:43:79:2 | { ... } | Test.kt:3:13:3:13 | var ...; | -| Test.kt:3:13:3:13 | var ...; | Test.kt:3:17:3:18 | px | -| Test.kt:3:13:3:13 | x | Test.kt:4:13:4:13 | var ...; | -| Test.kt:3:17:3:18 | px | Test.kt:3:13:3:13 | x | -| Test.kt:4:13:4:13 | var ...; | Test.kt:4:17:4:18 | pw | -| Test.kt:4:13:4:13 | w | Test.kt:5:13:5:13 | var ...; | -| Test.kt:4:17:4:18 | pw | Test.kt:4:13:4:13 | w | -| Test.kt:5:13:5:13 | var ...; | Test.kt:5:17:5:18 | pz | -| Test.kt:5:13:5:13 | z | Test.kt:7:7:7:7 | var ...; | -| Test.kt:5:17:5:18 | pz | Test.kt:5:13:5:13 | z | -| Test.kt:7:7:7:7 | j | Test.kt:8:7:8:7 | var ...; | -| Test.kt:7:7:7:7 | var ...; | Test.kt:7:7:7:7 | j | -| Test.kt:8:7:8:7 | var ...; | Test.kt:8:17:8:18 | 50 | -| Test.kt:8:7:8:7 | y | Test.kt:11:3:16:3 | ; | -| Test.kt:8:17:8:18 | 50 | Test.kt:8:7:8:7 | y | -| Test.kt:11:3:16:3 | ... -> ... | Test.kt:11:3:16:3 | true | -| Test.kt:11:3:16:3 | ... -> ... | Test.kt:11:7:11:7 | x | -| Test.kt:11:3:16:3 | ; | Test.kt:11:3:16:3 | when ... | -| Test.kt:11:3:16:3 | true | Test.kt:14:10:16:3 | { ... } | -| Test.kt:11:3:16:3 | when ... | Test.kt:11:3:16:3 | ... -> ... | -| Test.kt:11:7:11:7 | x | Test.kt:11:11:11:11 | 0 | -| Test.kt:11:7:11:11 | ... > ... | Test.kt:11:3:16:3 | ... -> ... | -| Test.kt:11:7:11:11 | ... > ... | Test.kt:11:14:14:3 | { ... } | -| Test.kt:11:7:11:11 | ... > ... | Test.kt:18:3:18:3 | ; | -| Test.kt:11:11:11:11 | 0 | Test.kt:11:7:11:11 | ... > ... | -| Test.kt:11:14:14:3 | { ... } | Test.kt:12:4:12:4 | ; | -| Test.kt:12:4:12:4 | ; | Test.kt:12:8:12:9 | 20 | -| Test.kt:12:4:12:9 | ...=... | Test.kt:13:4:13:4 | ; | -| Test.kt:12:8:12:9 | 20 | Test.kt:12:4:12:9 | ...=... | -| Test.kt:13:4:13:4 | ; | Test.kt:13:8:13:9 | 10 | -| Test.kt:13:8:13:9 | 10 | Test.kt:13:4:13:9 | ...=... | -| Test.kt:14:10:16:3 | { ... } | Test.kt:15:4:15:4 | ; | -| Test.kt:15:4:15:4 | ; | Test.kt:15:8:15:9 | 30 | -| Test.kt:15:8:15:9 | 30 | Test.kt:15:4:15:9 | ...=... | -| Test.kt:18:3:18:3 | ; | Test.kt:18:8:18:8 | x | -| Test.kt:18:3:18:20 | ...=... | Test.kt:21:3:24:11 | ; | -| Test.kt:18:7:18:20 | (...)... | Test.kt:18:3:18:20 | ...=... | -| Test.kt:18:8:18:8 | x | Test.kt:18:12:18:12 | y | -| Test.kt:18:8:18:12 | ... + ... | Test.kt:18:7:18:20 | (...)... | -| Test.kt:18:12:18:12 | y | Test.kt:18:8:18:12 | ... + ... | -| Test.kt:21:3:24:11 | ... -> ... | Test.kt:21:3:24:11 | true | -| Test.kt:21:3:24:11 | ... -> ... | Test.kt:21:7:21:7 | x | -| Test.kt:21:3:24:11 | ; | Test.kt:21:3:24:11 | when ... | -| Test.kt:21:3:24:11 | true | Test.kt:24:11:24:11 | z | -| Test.kt:21:3:24:11 | when ... | Test.kt:21:3:24:11 | ... -> ... | -| Test.kt:21:7:21:7 | x | Test.kt:21:11:21:11 | 0 | -| Test.kt:21:7:21:11 | ... < ... | Test.kt:2:2:79:2 | Normal Exit | -| Test.kt:21:7:21:11 | ... < ... | Test.kt:21:3:24:11 | ... -> ... | -| Test.kt:21:7:21:11 | ... < ... | Test.kt:22:4:22:4 | ; | -| Test.kt:21:11:21:11 | 0 | Test.kt:21:7:21:11 | ... < ... | -| Test.kt:22:4:22:4 | ; | Test.kt:22:8:22:9 | 40 | -| Test.kt:22:4:22:9 | ...=... | Test.kt:27:3:27:3 | ; | -| Test.kt:22:8:22:9 | 40 | Test.kt:22:4:22:9 | ...=... | -| Test.kt:24:11:24:11 | z | Test.kt:24:4:24:11 | return ... | -| Test.kt:27:3:27:3 | ; | Test.kt:27:7:27:8 | 10 | -| Test.kt:27:3:27:8 | ...=... | Test.kt:30:3:33:3 | ; | -| Test.kt:27:7:27:8 | 10 | Test.kt:27:3:27:8 | ...=... | -| Test.kt:30:3:33:3 | ... -> ... | Test.kt:30:7:30:7 | x | -| Test.kt:30:3:33:3 | ; | Test.kt:30:3:33:3 | when ... | -| Test.kt:30:3:33:3 | when ... | Test.kt:30:3:33:3 | ... -> ... | -| Test.kt:30:7:30:7 | x | Test.kt:30:12:30:12 | 0 | -| Test.kt:30:7:30:12 | ... (value equals) ... | Test.kt:30:15:33:3 | { ... } | -| Test.kt:30:7:30:12 | ... (value equals) ... | Test.kt:35:3:35:3 | ; | -| Test.kt:30:12:30:12 | 0 | Test.kt:30:7:30:12 | ... (value equals) ... | -| Test.kt:30:15:33:3 | { ... } | Test.kt:31:4:31:4 | ; | -| Test.kt:31:4:31:4 | ; | Test.kt:31:8:31:9 | 60 | -| Test.kt:31:4:31:9 | ...=... | Test.kt:32:4:32:4 | ; | -| Test.kt:31:8:31:9 | 60 | Test.kt:31:4:31:9 | ...=... | -| Test.kt:32:4:32:4 | ; | Test.kt:32:8:32:9 | 10 | -| Test.kt:32:8:32:9 | 10 | Test.kt:32:4:32:9 | ...=... | -| Test.kt:35:3:35:3 | ; | Test.kt:35:3:35:3 | z | -| Test.kt:35:3:35:3 | z | Test.kt:35:8:35:8 | x | -| Test.kt:35:3:35:8 | ...+=... | Test.kt:38:3:41:3 | while (...) | -| Test.kt:35:8:35:8 | x | Test.kt:35:3:35:8 | ...+=... | -| Test.kt:38:3:41:3 | while (...) | Test.kt:38:10:38:10 | x | -| Test.kt:38:10:38:10 | x | Test.kt:38:14:38:14 | 0 | -| Test.kt:38:10:38:14 | ... > ... | Test.kt:38:17:41:3 | { ... } | -| Test.kt:38:10:38:14 | ... > ... | Test.kt:43:3:43:3 | ; | -| Test.kt:38:14:38:14 | 0 | Test.kt:38:10:38:14 | ... > ... | -| Test.kt:38:17:41:3 | { ... } | Test.kt:39:4:39:4 | ; | -| Test.kt:39:4:39:4 | ; | Test.kt:39:8:39:9 | 10 | -| Test.kt:39:4:39:9 | ...=... | Test.kt:40:4:40:6 | ; | -| Test.kt:39:8:39:9 | 10 | Test.kt:39:4:39:9 | ...=... | -| Test.kt:40:4:40:4 | ; | Test.kt:40:4:40:6 | tmp0 | -| Test.kt:40:4:40:4 | x | Test.kt:40:4:40:6 | tmp0 | -| Test.kt:40:4:40:6 | ...=... | Test.kt:40:4:40:6 | ; | -| Test.kt:40:4:40:6 | ; | Test.kt:40:4:40:6 | | -| Test.kt:40:4:40:6 | ; | Test.kt:40:4:40:6 | tmp0 | -| Test.kt:40:4:40:6 | | Test.kt:40:4:40:6 | { ... } | -| Test.kt:40:4:40:6 | dec(...) | Test.kt:40:4:40:6 | ...=... | -| Test.kt:40:4:40:6 | tmp0 | Test.kt:40:4:40:4 | ; | -| Test.kt:40:4:40:6 | tmp0 | Test.kt:40:4:40:6 | | -| Test.kt:40:4:40:6 | tmp0 | Test.kt:40:4:40:6 | dec(...) | -| Test.kt:40:4:40:6 | var ...; | Test.kt:40:4:40:4 | x | -| Test.kt:40:4:40:6 | { ... } | Test.kt:40:4:40:6 | var ...; | -| Test.kt:43:3:43:3 | ; | Test.kt:43:3:43:3 | z | -| Test.kt:43:3:43:3 | z | Test.kt:43:8:43:8 | y | -| Test.kt:43:3:43:15 | ...+=... | Test.kt:73:3:73:3 | ; | -| Test.kt:43:8:43:8 | y | Test.kt:43:8:43:15 | (...)... | -| Test.kt:43:8:43:15 | (...)... | Test.kt:43:3:43:15 | ...+=... | -| Test.kt:73:3:73:3 | ; | Test.kt:73:3:73:3 | z | -| Test.kt:73:3:73:3 | z | Test.kt:73:8:73:8 | x | -| Test.kt:73:3:73:16 | ...+=... | Test.kt:77:3:77:3 | ; | -| Test.kt:73:8:73:8 | x | Test.kt:73:12:73:12 | y | -| Test.kt:73:8:73:12 | ... + ... | Test.kt:73:16:73:16 | w | -| Test.kt:73:8:73:16 | ... + ... | Test.kt:73:3:73:16 | ...+=... | -| Test.kt:73:12:73:12 | | Test.kt:73:8:73:12 | ... + ... | -| Test.kt:73:12:73:12 | y | Test.kt:73:12:73:12 | | -| Test.kt:73:16:73:16 | w | Test.kt:73:8:73:16 | ... + ... | -| Test.kt:77:3:77:3 | ; | Test.kt:77:7:77:8 | 40 | -| Test.kt:77:3:77:8 | ...=... | Test.kt:78:10:78:10 | w | -| Test.kt:77:7:77:8 | 40 | Test.kt:77:3:77:8 | ...=... | -| Test.kt:78:10:78:10 | w | Test.kt:78:3:78:10 | return ... | -| Test.kt:81:25:98:2 | { ... } | Test.kt:83:7:83:7 | var ...; | -| Test.kt:83:7:83:7 | b | Test.kt:84:7:84:7 | var ...; | -| Test.kt:83:7:83:7 | var ...; | Test.kt:83:7:83:7 | b | -| Test.kt:84:7:84:7 | c | Test.kt:85:3:85:3 | ; | -| Test.kt:84:7:84:7 | var ...; | Test.kt:84:7:84:7 | c | -| Test.kt:85:3:85:3 | ; | Test.kt:85:7:85:7 | 0 | -| Test.kt:85:3:85:7 | ...=... | Test.kt:86:3:96:3 | while (...) | -| Test.kt:85:7:85:7 | 0 | Test.kt:85:3:85:7 | ...=... | -| Test.kt:86:3:96:3 | while (...) | Test.kt:86:9:86:12 | true | -| Test.kt:86:9:86:12 | true | Test.kt:86:15:96:3 | { ... } | -| Test.kt:86:15:96:3 | { ... } | Test.kt:87:4:87:4 | ; | -| Test.kt:87:4:87:4 | ; | Test.kt:87:8:87:9 | 10 | -| Test.kt:87:4:87:9 | ...=... | Test.kt:88:4:91:4 | ; | -| Test.kt:87:8:87:9 | 10 | Test.kt:87:4:87:9 | ...=... | -| Test.kt:88:4:91:4 | ... -> ... | Test.kt:88:8:88:8 | a | -| Test.kt:88:4:91:4 | ; | Test.kt:88:4:91:4 | when ... | -| Test.kt:88:4:91:4 | when ... | Test.kt:88:4:91:4 | ... -> ... | -| Test.kt:88:8:88:8 | a | Test.kt:88:12:88:14 | 100 | -| Test.kt:88:8:88:14 | ... > ... | Test.kt:88:17:91:4 | { ... } | -| Test.kt:88:8:88:14 | ... > ... | Test.kt:92:4:93:9 | ; | -| Test.kt:88:12:88:14 | 100 | Test.kt:88:8:88:14 | ... > ... | -| Test.kt:88:17:91:4 | { ... } | Test.kt:89:5:89:5 | ; | -| Test.kt:89:5:89:5 | ; | Test.kt:89:9:89:10 | 10 | -| Test.kt:89:5:89:10 | ...=... | Test.kt:90:5:90:5 | ; | -| Test.kt:89:9:89:10 | 10 | Test.kt:89:5:89:10 | ...=... | -| Test.kt:90:5:90:5 | ; | Test.kt:90:9:90:9 | c | -| Test.kt:90:9:90:9 | c | Test.kt:90:5:90:9 | ...=... | -| Test.kt:92:4:93:9 | ... -> ... | Test.kt:92:8:92:8 | a | -| Test.kt:92:4:93:9 | ; | Test.kt:92:4:93:9 | when ... | -| Test.kt:92:4:93:9 | when ... | Test.kt:92:4:93:9 | ... -> ... | -| Test.kt:92:8:92:8 | a | Test.kt:92:13:92:14 | 10 | -| Test.kt:92:8:92:14 | ... (value equals) ... | Test.kt:81:2:98:2 | Normal Exit | -| Test.kt:92:8:92:14 | ... (value equals) ... | Test.kt:93:5:93:9 | break | -| Test.kt:92:8:92:14 | ... (value equals) ... | Test.kt:94:4:95:12 | ; | -| Test.kt:92:13:92:14 | 10 | Test.kt:92:8:92:14 | ... (value equals) ... | -| Test.kt:93:5:93:9 | break | Test.kt:97:10:97:10 | b | -| Test.kt:94:4:95:12 | ... -> ... | Test.kt:94:8:94:8 | a | -| Test.kt:94:4:95:12 | ; | Test.kt:94:4:95:12 | when ... | -| Test.kt:94:4:95:12 | when ... | Test.kt:94:4:95:12 | ... -> ... | -| Test.kt:94:8:94:8 | a | Test.kt:94:13:94:14 | 20 | -| Test.kt:94:8:94:14 | ... (value equals) ... | Test.kt:95:12:95:12 | c | -| Test.kt:94:13:94:14 | 20 | Test.kt:94:8:94:14 | ... (value equals) ... | -| Test.kt:95:12:95:12 | c | Test.kt:95:5:95:12 | return ... | -| Test.kt:97:10:97:10 | b | Test.kt:97:3:97:10 | return ... | +| Test.kt:2:43:79:2 | { ... } | Test.kt:11:3:16:3 | ... -> ... | +| Test.kt:2:43:79:2 | { ... } | Test.kt:11:14:14:3 | { ... } | +| Test.kt:2:43:79:2 | { ... } | Test.kt:18:3:18:3 | ; | +| Test.kt:18:3:18:3 | ; | Test.kt:2:2:79:2 | Normal Exit | +| Test.kt:18:3:18:3 | ; | Test.kt:21:3:24:11 | ... -> ... | +| Test.kt:18:3:18:3 | ; | Test.kt:22:4:22:4 | ; | +| Test.kt:22:4:22:4 | ; | Test.kt:30:7:30:12 | After ... (value equals) ... [false] | +| Test.kt:22:4:22:4 | ; | Test.kt:30:15:33:3 | { ... } | +| Test.kt:22:4:22:4 | ; | Test.kt:35:3:35:3 | ; | +| Test.kt:35:3:35:3 | ; | Test.kt:38:10:38:10 | x | +| Test.kt:38:10:38:10 | x | Test.kt:38:17:41:3 | { ... } | +| Test.kt:38:10:38:10 | x | Test.kt:43:3:43:3 | ; | +| Test.kt:81:25:98:2 | { ... } | Test.kt:86:9:86:12 | true | +| Test.kt:86:9:86:12 | true | Test.kt:88:8:88:14 | After ... > ... [false] | +| Test.kt:86:9:86:12 | true | Test.kt:88:17:91:4 | { ... } | +| Test.kt:86:9:86:12 | true | Test.kt:92:4:93:9 | ; | +| Test.kt:92:4:93:9 | ; | Test.kt:81:2:98:2 | Normal Exit | +| Test.kt:92:4:93:9 | ; | Test.kt:93:5:93:9 | break | +| Test.kt:92:4:93:9 | ; | Test.kt:94:4:95:12 | ; | +| Test.kt:94:4:95:12 | ; | Test.kt:94:8:94:14 | After ... (value equals) ... [false] | +| Test.kt:94:4:95:12 | ; | Test.kt:95:12:95:12 | c | diff --git a/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominator.ql b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominator.ql index 701640bf7209..7fc18484febf 100644 --- a/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominator.ql +++ b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominator.ql @@ -1,9 +1,9 @@ -import default -import semmle.code.java.controlflow.Dominance +import java +import utils.test.BasicBlock -from Method func, ControlFlowNode dominator, ControlFlowNode node +from Method func, BasicBlock dominator, BasicBlock bb where - iDominates(dominator, node) and - dominator.getEnclosingStmt().getEnclosingCallable() = func and + dominator.immediatelyDominates(bb) and + dominator.getEnclosingCallable() = func and func.getDeclaringType().hasName("Test") -select dominator, node +select getFirstAstNodeOrSynth(dominator), getFirstAstNodeOrSynth(bb) diff --git a/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatorUnique.ql b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatorUnique.ql index eaf75ab7bfaa..54b0d1863624 100644 --- a/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatorUnique.ql +++ b/java/ql/test-kotlin1/library-tests/controlflow/dominance/dominatorUnique.ql @@ -7,5 +7,5 @@ where iDominates(dom1, node) and iDominates(dom2, node) and dom1 != dom2 and - func = node.getEnclosingStmt().getEnclosingCallable() + func = node.getEnclosingCallable() select func, node, dom1, dom2 diff --git a/java/ql/test-kotlin1/library-tests/exprs/unaryOp.ql b/java/ql/test-kotlin1/library-tests/exprs/unaryOp.ql index 9e7359e1e075..bce290e4afc8 100644 --- a/java/ql/test-kotlin1/library-tests/exprs/unaryOp.ql +++ b/java/ql/test-kotlin1/library-tests/exprs/unaryOp.ql @@ -29,7 +29,7 @@ class NoMaybeElement extends MaybeElement { } MaybeElement op(UnaryExpr e) { - if exists(e.getExpr()) then result = TElement(e.getExpr()) else result = TNoElement() + if exists(e.getOperand()) then result = TElement(e.getOperand()) else result = TNoElement() } from Expr e diff --git a/java/ql/test-kotlin2/library-tests/controlflow/basic/bbStmts.expected b/java/ql/test-kotlin2/library-tests/controlflow/basic/bbStmts.expected index c66d50a722d1..6a1994921f47 100644 --- a/java/ql/test-kotlin2/library-tests/controlflow/basic/bbStmts.expected +++ b/java/ql/test-kotlin2/library-tests/controlflow/basic/bbStmts.expected @@ -1,205 +1,386 @@ -| Test.kt:3:1:80:1 | Exceptional Exit | 0 | Test.kt:3:1:80:1 | Exceptional Exit | -| Test.kt:3:1:80:1 | Exit | 0 | Test.kt:3:1:80:1 | Exit | -| Test.kt:3:1:80:1 | { ... } | 0 | Test.kt:3:1:80:1 | { ... } | -| Test.kt:3:1:80:1 | { ... } | 1 | Test.kt:3:1:80:1 | super(...) | -| Test.kt:3:1:80:1 | { ... } | 2 | Test.kt:3:1:80:1 | { ... } | -| Test.kt:3:1:80:1 | { ... } | 3 | Test.kt:3:1:80:1 | Normal Exit | -| Test.kt:4:2:79:2 | Exceptional Exit | 0 | Test.kt:4:2:79:2 | Exceptional Exit | -| Test.kt:4:2:79:2 | Exit | 0 | Test.kt:4:2:79:2 | Exit | +| Test.kt:3:1:80:1 | Entry | 0 | Test.kt:3:1:80:1 | Entry | +| Test.kt:3:1:80:1 | Entry | 1 | Test.kt:3:1:80:1 | { ... } | +| Test.kt:3:1:80:1 | Entry | 2 | Test.kt:3:1:80:1 | Before super(...) | +| Test.kt:3:1:80:1 | Entry | 3 | Test.kt:3:1:80:1 | super(...) | +| Test.kt:3:1:80:1 | Entry | 4 | Test.kt:3:1:80:1 | After super(...) | +| Test.kt:3:1:80:1 | Entry | 5 | Test.kt:3:1:80:1 | { ... } | +| Test.kt:3:1:80:1 | Entry | 6 | Test.kt:3:1:80:1 | After { ... } | +| Test.kt:3:1:80:1 | Entry | 7 | Test.kt:3:1:80:1 | Normal Exit | +| Test.kt:3:1:80:1 | Entry | 8 | Test.kt:3:1:80:1 | Exit | +| Test.kt:4:2:79:2 | Entry | 0 | Test.kt:4:2:79:2 | Entry | +| Test.kt:4:2:79:2 | Entry | 1 | Test.kt:4:13:79:2 | { ... } | +| Test.kt:4:2:79:2 | Entry | 2 | Test.kt:5:3:5:16 | var ...; | +| Test.kt:4:2:79:2 | Entry | 3 | Test.kt:5:3:5:16 | Before x | +| Test.kt:4:2:79:2 | Entry | 4 | Test.kt:5:16:5:16 | 0 | +| Test.kt:4:2:79:2 | Entry | 5 | Test.kt:5:3:5:16 | x | +| Test.kt:4:2:79:2 | Entry | 6 | Test.kt:5:3:5:16 | After x | +| Test.kt:4:2:79:2 | Entry | 7 | Test.kt:5:3:5:16 | After var ...; | +| Test.kt:4:2:79:2 | Entry | 8 | Test.kt:6:3:6:18 | var ...; | +| Test.kt:4:2:79:2 | Entry | 9 | Test.kt:6:3:6:18 | Before y | +| Test.kt:4:2:79:2 | Entry | 10 | Test.kt:6:17:6:18 | 50 | +| Test.kt:4:2:79:2 | Entry | 11 | Test.kt:6:3:6:18 | y | +| Test.kt:4:2:79:2 | Entry | 12 | Test.kt:6:3:6:18 | After y | +| Test.kt:4:2:79:2 | Entry | 13 | Test.kt:6:3:6:18 | After var ...; | +| Test.kt:4:2:79:2 | Entry | 14 | Test.kt:7:3:7:16 | var ...; | +| Test.kt:4:2:79:2 | Entry | 15 | Test.kt:7:3:7:16 | Before z | +| Test.kt:4:2:79:2 | Entry | 16 | Test.kt:7:16:7:16 | 0 | +| Test.kt:4:2:79:2 | Entry | 17 | Test.kt:7:3:7:16 | z | +| Test.kt:4:2:79:2 | Entry | 18 | Test.kt:7:3:7:16 | After z | +| Test.kt:4:2:79:2 | Entry | 19 | Test.kt:7:3:7:16 | After var ...; | +| Test.kt:4:2:79:2 | Entry | 20 | Test.kt:8:3:8:16 | var ...; | +| Test.kt:4:2:79:2 | Entry | 21 | Test.kt:8:3:8:16 | Before w | +| Test.kt:4:2:79:2 | Entry | 22 | Test.kt:8:16:8:16 | 0 | +| Test.kt:4:2:79:2 | Entry | 23 | Test.kt:8:3:8:16 | w | +| Test.kt:4:2:79:2 | Entry | 24 | Test.kt:8:3:8:16 | After w | +| Test.kt:4:2:79:2 | Entry | 25 | Test.kt:8:3:8:16 | After var ...; | +| Test.kt:4:2:79:2 | Entry | 26 | Test.kt:11:3:16:3 | ; | +| Test.kt:4:2:79:2 | Entry | 27 | Test.kt:11:3:16:3 | when ... | +| Test.kt:4:2:79:2 | Entry | 28 | Test.kt:11:7:14:3 | ... -> ... | +| Test.kt:4:2:79:2 | Entry | 29 | Test.kt:11:7:11:11 | Before ... > ... | +| Test.kt:4:2:79:2 | Entry | 30 | Test.kt:11:7:11:7 | x | +| Test.kt:4:2:79:2 | Entry | 31 | Test.kt:11:11:11:11 | 0 | +| Test.kt:4:2:79:2 | Entry | 32 | Test.kt:11:7:11:11 | ... > ... | | Test.kt:4:2:79:2 | Normal Exit | 0 | Test.kt:4:2:79:2 | Normal Exit | -| Test.kt:4:13:79:2 | { ... } | 0 | Test.kt:4:13:79:2 | { ... } | -| Test.kt:4:13:79:2 | { ... } | 1 | Test.kt:5:3:5:16 | var ...; | -| Test.kt:4:13:79:2 | { ... } | 2 | Test.kt:5:16:5:16 | 0 | -| Test.kt:4:13:79:2 | { ... } | 3 | Test.kt:5:3:5:16 | x | -| Test.kt:4:13:79:2 | { ... } | 4 | Test.kt:6:3:6:18 | var ...; | -| Test.kt:4:13:79:2 | { ... } | 5 | Test.kt:6:17:6:18 | 50 | -| Test.kt:4:13:79:2 | { ... } | 6 | Test.kt:6:3:6:18 | y | -| Test.kt:4:13:79:2 | { ... } | 7 | Test.kt:7:3:7:16 | var ...; | -| Test.kt:4:13:79:2 | { ... } | 8 | Test.kt:7:16:7:16 | 0 | -| Test.kt:4:13:79:2 | { ... } | 9 | Test.kt:7:3:7:16 | z | -| Test.kt:4:13:79:2 | { ... } | 10 | Test.kt:8:3:8:16 | var ...; | -| Test.kt:4:13:79:2 | { ... } | 11 | Test.kt:8:16:8:16 | 0 | -| Test.kt:4:13:79:2 | { ... } | 12 | Test.kt:8:3:8:16 | w | -| Test.kt:4:13:79:2 | { ... } | 13 | Test.kt:11:3:16:3 | ; | -| Test.kt:4:13:79:2 | { ... } | 14 | Test.kt:11:3:16:3 | when ... | -| Test.kt:4:13:79:2 | { ... } | 15 | Test.kt:11:7:14:3 | ... -> ... | -| Test.kt:4:13:79:2 | { ... } | 16 | Test.kt:11:7:11:7 | x | -| Test.kt:4:13:79:2 | { ... } | 17 | Test.kt:11:11:11:11 | 0 | -| Test.kt:4:13:79:2 | { ... } | 18 | Test.kt:11:7:11:11 | ... > ... | -| Test.kt:11:14:14:3 | { ... } | 0 | Test.kt:11:14:14:3 | { ... } | -| Test.kt:11:14:14:3 | { ... } | 1 | Test.kt:12:4:12:9 | ; | -| Test.kt:11:14:14:3 | { ... } | 2 | Test.kt:12:8:12:9 | 20 | -| Test.kt:11:14:14:3 | { ... } | 3 | Test.kt:12:4:12:9 | ...=... | -| Test.kt:11:14:14:3 | { ... } | 4 | Test.kt:13:4:13:9 | ; | -| Test.kt:11:14:14:3 | { ... } | 5 | Test.kt:13:8:13:9 | 10 | -| Test.kt:11:14:14:3 | { ... } | 6 | Test.kt:13:4:13:9 | ...=... | -| Test.kt:14:10:16:3 | ... -> ... | 0 | Test.kt:14:10:16:3 | ... -> ... | -| Test.kt:14:10:16:3 | ... -> ... | 1 | Test.kt:14:10:16:3 | true | -| Test.kt:14:10:16:3 | ... -> ... | 2 | Test.kt:14:10:16:3 | { ... } | -| Test.kt:14:10:16:3 | ... -> ... | 3 | Test.kt:15:4:15:9 | ; | -| Test.kt:14:10:16:3 | ... -> ... | 4 | Test.kt:15:8:15:9 | 30 | -| Test.kt:14:10:16:3 | ... -> ... | 5 | Test.kt:15:4:15:9 | ...=... | -| Test.kt:18:3:18:7 | ; | 0 | Test.kt:18:3:18:7 | ; | -| Test.kt:18:3:18:7 | ; | 1 | Test.kt:18:7:18:7 | 0 | -| Test.kt:18:3:18:7 | ; | 2 | Test.kt:18:3:18:7 | ...=... | -| Test.kt:18:3:18:7 | ; | 3 | Test.kt:21:3:24:9 | ; | -| Test.kt:18:3:18:7 | ; | 4 | Test.kt:21:3:24:9 | when ... | -| Test.kt:18:3:18:7 | ; | 5 | Test.kt:21:6:22:9 | ... -> ... | -| Test.kt:18:3:18:7 | ; | 6 | Test.kt:21:6:21:6 | x | -| Test.kt:18:3:18:7 | ; | 7 | Test.kt:21:10:21:10 | 0 | -| Test.kt:18:3:18:7 | ; | 8 | Test.kt:21:6:21:10 | ... < ... | -| Test.kt:22:4:22:9 | ; | 0 | Test.kt:22:4:22:9 | ; | -| Test.kt:22:4:22:9 | ; | 1 | Test.kt:22:8:22:9 | 40 | -| Test.kt:22:4:22:9 | ; | 2 | Test.kt:22:4:22:9 | ...=... | -| Test.kt:22:4:22:9 | ; | 3 | Test.kt:27:3:27:8 | ; | -| Test.kt:22:4:22:9 | ; | 4 | Test.kt:27:7:27:8 | 10 | -| Test.kt:22:4:22:9 | ; | 5 | Test.kt:27:3:27:8 | ...=... | -| Test.kt:22:4:22:9 | ; | 6 | Test.kt:30:3:33:3 | ; | -| Test.kt:22:4:22:9 | ; | 7 | Test.kt:30:3:33:3 | when ... | -| Test.kt:22:4:22:9 | ; | 8 | Test.kt:30:7:33:3 | ... -> ... | -| Test.kt:22:4:22:9 | ; | 9 | Test.kt:30:7:30:7 | x | -| Test.kt:22:4:22:9 | ; | 10 | Test.kt:30:12:30:12 | 0 | -| Test.kt:22:4:22:9 | ; | 11 | Test.kt:30:7:30:12 | ... (value equals) ... | -| Test.kt:24:4:24:9 | ... -> ... | 0 | Test.kt:24:4:24:9 | ... -> ... | -| Test.kt:24:4:24:9 | ... -> ... | 1 | Test.kt:24:4:24:9 | true | -| Test.kt:24:4:24:9 | ... -> ... | 2 | Test.kt:24:10:24:10 | INSTANCE | -| Test.kt:24:4:24:9 | ... -> ... | 3 | Test.kt:24:4:24:9 | return ... | -| Test.kt:30:15:33:3 | { ... } | 0 | Test.kt:30:15:33:3 | { ... } | -| Test.kt:30:15:33:3 | { ... } | 1 | Test.kt:31:4:31:9 | ; | -| Test.kt:30:15:33:3 | { ... } | 2 | Test.kt:31:8:31:9 | 60 | -| Test.kt:30:15:33:3 | { ... } | 3 | Test.kt:31:4:31:9 | ...=... | -| Test.kt:30:15:33:3 | { ... } | 4 | Test.kt:32:4:32:9 | ; | -| Test.kt:30:15:33:3 | { ... } | 5 | Test.kt:32:8:32:9 | 10 | -| Test.kt:30:15:33:3 | { ... } | 6 | Test.kt:32:4:32:9 | ...=... | -| Test.kt:35:3:35:8 | ; | 0 | Test.kt:35:3:35:8 | ; | -| Test.kt:35:3:35:8 | ; | 1 | Test.kt:35:7:35:8 | 20 | -| Test.kt:35:3:35:8 | ; | 2 | Test.kt:35:3:35:8 | ...=... | -| Test.kt:35:3:35:8 | ; | 3 | Test.kt:38:3:41:3 | while (...) | -| Test.kt:38:9:38:9 | x | 0 | Test.kt:38:9:38:9 | x | -| Test.kt:38:9:38:9 | x | 1 | Test.kt:38:13:38:13 | 0 | -| Test.kt:38:9:38:9 | x | 2 | Test.kt:38:9:38:13 | ... > ... | -| Test.kt:38:16:41:3 | { ... } | 0 | Test.kt:38:16:41:3 | { ... } | -| Test.kt:38:16:41:3 | { ... } | 1 | Test.kt:39:4:39:9 | ; | -| Test.kt:38:16:41:3 | { ... } | 2 | Test.kt:39:8:39:9 | 10 | -| Test.kt:38:16:41:3 | { ... } | 3 | Test.kt:39:4:39:9 | ...=... | -| Test.kt:38:16:41:3 | { ... } | 4 | Test.kt:40:4:40:6 | ; | -| Test.kt:38:16:41:3 | { ... } | 5 | Test.kt:40:4:40:6 | | -| Test.kt:38:16:41:3 | { ... } | 6 | Test.kt:40:4:40:6 | { ... } | -| Test.kt:38:16:41:3 | { ... } | 7 | Test.kt:40:4:40:6 | var ...; | -| Test.kt:38:16:41:3 | { ... } | 8 | Test.kt:40:4:40:4 | x | -| Test.kt:38:16:41:3 | { ... } | 9 | Test.kt:40:4:40:6 | | -| Test.kt:38:16:41:3 | { ... } | 10 | Test.kt:40:4:40:6 | ; | -| Test.kt:38:16:41:3 | { ... } | 11 | Test.kt:40:4:40:6 | | -| Test.kt:38:16:41:3 | { ... } | 12 | Test.kt:40:4:40:6 | dec(...) | -| Test.kt:38:16:41:3 | { ... } | 13 | Test.kt:40:4:40:6 | ...=... | -| Test.kt:38:16:41:3 | { ... } | 14 | Test.kt:40:4:40:6 | ; | -| Test.kt:38:16:41:3 | { ... } | 15 | Test.kt:40:4:40:6 | | -| Test.kt:38:16:41:3 | { ... } | 16 | Test.kt:40:4:40:6 | | -| Test.kt:43:3:43:8 | ; | 0 | Test.kt:43:3:43:8 | ; | -| Test.kt:43:3:43:8 | ; | 1 | Test.kt:43:7:43:8 | 30 | -| Test.kt:43:3:43:8 | ; | 2 | Test.kt:43:3:43:8 | ...=... | -| Test.kt:43:3:43:8 | ; | 3 | Test.kt:73:3:73:8 | ; | -| Test.kt:43:3:43:8 | ; | 4 | Test.kt:73:7:73:8 | 50 | -| Test.kt:43:3:43:8 | ; | 5 | Test.kt:73:3:73:8 | ...=... | -| Test.kt:43:3:43:8 | ; | 6 | Test.kt:77:3:77:8 | ; | -| Test.kt:43:3:43:8 | ; | 7 | Test.kt:77:7:77:8 | 40 | -| Test.kt:43:3:43:8 | ; | 8 | Test.kt:77:3:77:8 | ...=... | -| Test.kt:43:3:43:8 | ; | 9 | Test.kt:78:9:78:9 | INSTANCE | -| Test.kt:43:3:43:8 | ; | 10 | Test.kt:78:3:78:8 | return ... | -| Test.kt:82:1:89:1 | Exceptional Exit | 0 | Test.kt:82:1:89:1 | Exceptional Exit | +| Test.kt:4:2:79:2 | Normal Exit | 1 | Test.kt:4:2:79:2 | Exit | +| Test.kt:11:3:16:3 | After when ... | 0 | Test.kt:11:3:16:3 | After when ... | +| Test.kt:11:3:16:3 | After when ... | 1 | Test.kt:11:3:16:3 | After ; | +| Test.kt:11:3:16:3 | After when ... | 2 | Test.kt:18:3:18:7 | ; | +| Test.kt:11:3:16:3 | After when ... | 3 | Test.kt:18:3:18:7 | Before ...=... | +| Test.kt:11:3:16:3 | After when ... | 4 | Test.kt:18:3:18:7 | z | +| Test.kt:11:3:16:3 | After when ... | 5 | Test.kt:18:7:18:7 | 0 | +| Test.kt:11:3:16:3 | After when ... | 6 | Test.kt:18:3:18:7 | ...=... | +| Test.kt:11:3:16:3 | After when ... | 7 | Test.kt:18:3:18:7 | After ...=... | +| Test.kt:11:3:16:3 | After when ... | 8 | Test.kt:18:3:18:7 | After ; | +| Test.kt:11:3:16:3 | After when ... | 9 | Test.kt:21:3:24:9 | ; | +| Test.kt:11:3:16:3 | After when ... | 10 | Test.kt:21:3:24:9 | when ... | +| Test.kt:11:3:16:3 | After when ... | 11 | Test.kt:21:6:22:9 | ... -> ... | +| Test.kt:11:3:16:3 | After when ... | 12 | Test.kt:21:6:21:10 | Before ... < ... | +| Test.kt:11:3:16:3 | After when ... | 13 | Test.kt:21:6:21:6 | x | +| Test.kt:11:3:16:3 | After when ... | 14 | Test.kt:21:10:21:10 | 0 | +| Test.kt:11:3:16:3 | After when ... | 15 | Test.kt:21:6:21:10 | ... < ... | +| Test.kt:11:7:11:11 | After ... > ... [false] | 0 | Test.kt:11:7:11:11 | After ... > ... [false] | +| Test.kt:11:7:11:11 | After ... > ... [false] | 1 | Test.kt:14:10:16:3 | ... -> ... | +| Test.kt:11:7:11:11 | After ... > ... [false] | 2 | Test.kt:14:10:16:3 | true | +| Test.kt:11:7:11:11 | After ... > ... [false] | 3 | Test.kt:14:10:16:3 | After true [true] | +| Test.kt:11:7:11:11 | After ... > ... [false] | 4 | Test.kt:14:10:16:3 | { ... } | +| Test.kt:11:7:11:11 | After ... > ... [false] | 5 | Test.kt:15:4:15:9 | ; | +| Test.kt:11:7:11:11 | After ... > ... [false] | 6 | Test.kt:15:4:15:9 | Before ...=... | +| Test.kt:11:7:11:11 | After ... > ... [false] | 7 | Test.kt:15:4:15:9 | y | +| Test.kt:11:7:11:11 | After ... > ... [false] | 8 | Test.kt:15:8:15:9 | 30 | +| Test.kt:11:7:11:11 | After ... > ... [false] | 9 | Test.kt:15:4:15:9 | ...=... | +| Test.kt:11:7:11:11 | After ... > ... [false] | 10 | Test.kt:15:4:15:9 | After ...=... | +| Test.kt:11:7:11:11 | After ... > ... [false] | 11 | Test.kt:15:4:15:9 | After ; | +| Test.kt:11:7:11:11 | After ... > ... [false] | 12 | Test.kt:14:10:16:3 | After { ... } | +| Test.kt:11:7:11:11 | After ... > ... [true] | 0 | Test.kt:11:7:11:11 | After ... > ... [true] | +| Test.kt:11:7:11:11 | After ... > ... [true] | 1 | Test.kt:11:14:14:3 | { ... } | +| Test.kt:11:7:11:11 | After ... > ... [true] | 2 | Test.kt:12:4:12:9 | ; | +| Test.kt:11:7:11:11 | After ... > ... [true] | 3 | Test.kt:12:4:12:9 | Before ...=... | +| Test.kt:11:7:11:11 | After ... > ... [true] | 4 | Test.kt:12:4:12:9 | y | +| Test.kt:11:7:11:11 | After ... > ... [true] | 5 | Test.kt:12:8:12:9 | 20 | +| Test.kt:11:7:11:11 | After ... > ... [true] | 6 | Test.kt:12:4:12:9 | ...=... | +| Test.kt:11:7:11:11 | After ... > ... [true] | 7 | Test.kt:12:4:12:9 | After ...=... | +| Test.kt:11:7:11:11 | After ... > ... [true] | 8 | Test.kt:12:4:12:9 | After ; | +| Test.kt:11:7:11:11 | After ... > ... [true] | 9 | Test.kt:13:4:13:9 | ; | +| Test.kt:11:7:11:11 | After ... > ... [true] | 10 | Test.kt:13:4:13:9 | Before ...=... | +| Test.kt:11:7:11:11 | After ... > ... [true] | 11 | Test.kt:13:4:13:9 | z | +| Test.kt:11:7:11:11 | After ... > ... [true] | 12 | Test.kt:13:8:13:9 | 10 | +| Test.kt:11:7:11:11 | After ... > ... [true] | 13 | Test.kt:13:4:13:9 | ...=... | +| Test.kt:11:7:11:11 | After ... > ... [true] | 14 | Test.kt:13:4:13:9 | After ...=... | +| Test.kt:11:7:11:11 | After ... > ... [true] | 15 | Test.kt:13:4:13:9 | After ; | +| Test.kt:11:7:11:11 | After ... > ... [true] | 16 | Test.kt:11:14:14:3 | After { ... } | +| Test.kt:21:6:21:10 | After ... < ... [false] | 0 | Test.kt:21:6:21:10 | After ... < ... [false] | +| Test.kt:21:6:21:10 | After ... < ... [false] | 1 | Test.kt:24:4:24:9 | ... -> ... | +| Test.kt:21:6:21:10 | After ... < ... [false] | 2 | Test.kt:24:4:24:9 | true | +| Test.kt:21:6:21:10 | After ... < ... [false] | 3 | Test.kt:24:4:24:9 | After true [true] | +| Test.kt:21:6:21:10 | After ... < ... [false] | 4 | Test.kt:24:4:24:9 | Before return ... | +| Test.kt:21:6:21:10 | After ... < ... [false] | 5 | Test.kt:24:10:24:10 | INSTANCE | +| Test.kt:21:6:21:10 | After ... < ... [false] | 6 | Test.kt:24:4:24:9 | return ... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 0 | Test.kt:21:6:21:10 | After ... < ... [true] | +| Test.kt:21:6:21:10 | After ... < ... [true] | 1 | Test.kt:22:4:22:9 | ; | +| Test.kt:21:6:21:10 | After ... < ... [true] | 2 | Test.kt:22:4:22:9 | Before ...=... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 3 | Test.kt:22:4:22:9 | y | +| Test.kt:21:6:21:10 | After ... < ... [true] | 4 | Test.kt:22:8:22:9 | 40 | +| Test.kt:21:6:21:10 | After ... < ... [true] | 5 | Test.kt:22:4:22:9 | ...=... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 6 | Test.kt:22:4:22:9 | After ...=... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 7 | Test.kt:22:4:22:9 | After ; | +| Test.kt:21:6:21:10 | After ... < ... [true] | 8 | Test.kt:21:3:24:9 | After when ... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 9 | Test.kt:21:3:24:9 | After ; | +| Test.kt:21:6:21:10 | After ... < ... [true] | 10 | Test.kt:27:3:27:8 | ; | +| Test.kt:21:6:21:10 | After ... < ... [true] | 11 | Test.kt:27:3:27:8 | Before ...=... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 12 | Test.kt:27:3:27:8 | z | +| Test.kt:21:6:21:10 | After ... < ... [true] | 13 | Test.kt:27:7:27:8 | 10 | +| Test.kt:21:6:21:10 | After ... < ... [true] | 14 | Test.kt:27:3:27:8 | ...=... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 15 | Test.kt:27:3:27:8 | After ...=... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 16 | Test.kt:27:3:27:8 | After ; | +| Test.kt:21:6:21:10 | After ... < ... [true] | 17 | Test.kt:30:3:33:3 | ; | +| Test.kt:21:6:21:10 | After ... < ... [true] | 18 | Test.kt:30:3:33:3 | when ... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 19 | Test.kt:30:7:33:3 | ... -> ... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 20 | Test.kt:30:7:30:12 | Before ... (value equals) ... | +| Test.kt:21:6:21:10 | After ... < ... [true] | 21 | Test.kt:30:7:30:7 | x | +| Test.kt:21:6:21:10 | After ... < ... [true] | 22 | Test.kt:30:12:30:12 | 0 | +| Test.kt:21:6:21:10 | After ... < ... [true] | 23 | Test.kt:30:7:30:12 | ... (value equals) ... | +| Test.kt:30:3:33:3 | After when ... | 0 | Test.kt:30:3:33:3 | After when ... | +| Test.kt:30:3:33:3 | After when ... | 1 | Test.kt:30:3:33:3 | After ; | +| Test.kt:30:3:33:3 | After when ... | 2 | Test.kt:35:3:35:8 | ; | +| Test.kt:30:3:33:3 | After when ... | 3 | Test.kt:35:3:35:8 | Before ...=... | +| Test.kt:30:3:33:3 | After when ... | 4 | Test.kt:35:3:35:8 | z | +| Test.kt:30:3:33:3 | After when ... | 5 | Test.kt:35:7:35:8 | 20 | +| Test.kt:30:3:33:3 | After when ... | 6 | Test.kt:35:3:35:8 | ...=... | +| Test.kt:30:3:33:3 | After when ... | 7 | Test.kt:35:3:35:8 | After ...=... | +| Test.kt:30:3:33:3 | After when ... | 8 | Test.kt:35:3:35:8 | After ; | +| Test.kt:30:3:33:3 | After when ... | 9 | Test.kt:38:3:41:3 | while (...) | +| Test.kt:30:7:30:12 | After ... (value equals) ... [false] | 0 | Test.kt:30:7:30:12 | After ... (value equals) ... [false] | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 0 | Test.kt:30:7:30:12 | After ... (value equals) ... [true] | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 1 | Test.kt:30:15:33:3 | { ... } | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 2 | Test.kt:31:4:31:9 | ; | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 3 | Test.kt:31:4:31:9 | Before ...=... | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 4 | Test.kt:31:4:31:9 | y | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 5 | Test.kt:31:8:31:9 | 60 | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 6 | Test.kt:31:4:31:9 | ...=... | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 7 | Test.kt:31:4:31:9 | After ...=... | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 8 | Test.kt:31:4:31:9 | After ; | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 9 | Test.kt:32:4:32:9 | ; | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 10 | Test.kt:32:4:32:9 | Before ...=... | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 11 | Test.kt:32:4:32:9 | z | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 12 | Test.kt:32:8:32:9 | 10 | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 13 | Test.kt:32:4:32:9 | ...=... | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 14 | Test.kt:32:4:32:9 | After ...=... | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 15 | Test.kt:32:4:32:9 | After ; | +| Test.kt:30:7:30:12 | After ... (value equals) ... [true] | 16 | Test.kt:30:15:33:3 | After { ... } | +| Test.kt:38:3:41:3 | [LoopHeader] while (...) | 0 | Test.kt:38:3:41:3 | [LoopHeader] while (...) | +| Test.kt:38:3:41:3 | [LoopHeader] while (...) | 1 | Test.kt:38:9:38:13 | Before ... > ... | +| Test.kt:38:3:41:3 | [LoopHeader] while (...) | 2 | Test.kt:38:9:38:9 | x | +| Test.kt:38:3:41:3 | [LoopHeader] while (...) | 3 | Test.kt:38:13:38:13 | 0 | +| Test.kt:38:3:41:3 | [LoopHeader] while (...) | 4 | Test.kt:38:9:38:13 | ... > ... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 0 | Test.kt:38:9:38:13 | After ... > ... [false] | +| Test.kt:38:9:38:13 | After ... > ... [false] | 1 | Test.kt:38:3:41:3 | After while (...) | +| Test.kt:38:9:38:13 | After ... > ... [false] | 2 | Test.kt:43:3:43:8 | ; | +| Test.kt:38:9:38:13 | After ... > ... [false] | 3 | Test.kt:43:3:43:8 | Before ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 4 | Test.kt:43:3:43:8 | z | +| Test.kt:38:9:38:13 | After ... > ... [false] | 5 | Test.kt:43:7:43:8 | 30 | +| Test.kt:38:9:38:13 | After ... > ... [false] | 6 | Test.kt:43:3:43:8 | ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 7 | Test.kt:43:3:43:8 | After ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 8 | Test.kt:43:3:43:8 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [false] | 9 | Test.kt:73:3:73:8 | ; | +| Test.kt:38:9:38:13 | After ... > ... [false] | 10 | Test.kt:73:3:73:8 | Before ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 11 | Test.kt:73:3:73:8 | z | +| Test.kt:38:9:38:13 | After ... > ... [false] | 12 | Test.kt:73:7:73:8 | 50 | +| Test.kt:38:9:38:13 | After ... > ... [false] | 13 | Test.kt:73:3:73:8 | ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 14 | Test.kt:73:3:73:8 | After ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 15 | Test.kt:73:3:73:8 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [false] | 16 | Test.kt:77:3:77:8 | ; | +| Test.kt:38:9:38:13 | After ... > ... [false] | 17 | Test.kt:77:3:77:8 | Before ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 18 | Test.kt:77:3:77:8 | w | +| Test.kt:38:9:38:13 | After ... > ... [false] | 19 | Test.kt:77:7:77:8 | 40 | +| Test.kt:38:9:38:13 | After ... > ... [false] | 20 | Test.kt:77:3:77:8 | ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 21 | Test.kt:77:3:77:8 | After ...=... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 22 | Test.kt:77:3:77:8 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [false] | 23 | Test.kt:78:3:78:8 | Before return ... | +| Test.kt:38:9:38:13 | After ... > ... [false] | 24 | Test.kt:78:9:78:9 | INSTANCE | +| Test.kt:38:9:38:13 | After ... > ... [false] | 25 | Test.kt:78:3:78:8 | return ... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 0 | Test.kt:38:9:38:13 | After ... > ... [true] | +| Test.kt:38:9:38:13 | After ... > ... [true] | 1 | Test.kt:38:16:41:3 | { ... } | +| Test.kt:38:9:38:13 | After ... > ... [true] | 2 | Test.kt:39:4:39:9 | ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 3 | Test.kt:39:4:39:9 | Before ...=... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 4 | Test.kt:39:4:39:9 | y | +| Test.kt:38:9:38:13 | After ... > ... [true] | 5 | Test.kt:39:8:39:9 | 10 | +| Test.kt:38:9:38:13 | After ... > ... [true] | 6 | Test.kt:39:4:39:9 | ...=... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 7 | Test.kt:39:4:39:9 | After ...=... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 8 | Test.kt:39:4:39:9 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 9 | Test.kt:40:4:40:6 | ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 10 | Test.kt:40:4:40:6 | Before | +| Test.kt:38:9:38:13 | After ... > ... [true] | 11 | Test.kt:40:4:40:6 | Before | +| Test.kt:38:9:38:13 | After ... > ... [true] | 12 | Test.kt:40:4:40:6 | { ... } | +| Test.kt:38:9:38:13 | After ... > ... [true] | 13 | Test.kt:40:4:40:6 | var ...; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 14 | Test.kt:40:4:40:6 | Before | +| Test.kt:38:9:38:13 | After ... > ... [true] | 15 | Test.kt:40:4:40:4 | x | +| Test.kt:38:9:38:13 | After ... > ... [true] | 16 | Test.kt:40:4:40:6 | | +| Test.kt:38:9:38:13 | After ... > ... [true] | 17 | Test.kt:40:4:40:6 | After | +| Test.kt:38:9:38:13 | After ... > ... [true] | 18 | Test.kt:40:4:40:6 | After var ...; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 19 | Test.kt:40:4:40:6 | ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 20 | Test.kt:40:4:40:6 | Before ...=... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 21 | Test.kt:40:4:40:6 | x | +| Test.kt:38:9:38:13 | After ... > ... [true] | 22 | Test.kt:40:4:40:6 | Before dec(...) | +| Test.kt:38:9:38:13 | After ... > ... [true] | 23 | Test.kt:40:4:40:6 | | +| Test.kt:38:9:38:13 | After ... > ... [true] | 24 | Test.kt:40:4:40:6 | dec(...) | +| Test.kt:38:9:38:13 | After ... > ... [true] | 25 | Test.kt:40:4:40:6 | After dec(...) | +| Test.kt:38:9:38:13 | After ... > ... [true] | 26 | Test.kt:40:4:40:6 | ...=... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 27 | Test.kt:40:4:40:6 | After ...=... | +| Test.kt:38:9:38:13 | After ... > ... [true] | 28 | Test.kt:40:4:40:6 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 29 | Test.kt:40:4:40:6 | ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 30 | Test.kt:40:4:40:6 | | +| Test.kt:38:9:38:13 | After ... > ... [true] | 31 | Test.kt:40:4:40:6 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 32 | Test.kt:40:4:40:6 | After { ... } | +| Test.kt:38:9:38:13 | After ... > ... [true] | 33 | Test.kt:40:4:40:6 | | +| Test.kt:38:9:38:13 | After ... > ... [true] | 34 | Test.kt:40:4:40:6 | After | +| Test.kt:38:9:38:13 | After ... > ... [true] | 35 | Test.kt:40:4:40:6 | | +| Test.kt:38:9:38:13 | After ... > ... [true] | 36 | Test.kt:40:4:40:6 | After | +| Test.kt:38:9:38:13 | After ... > ... [true] | 37 | Test.kt:40:4:40:6 | After ; | +| Test.kt:38:9:38:13 | After ... > ... [true] | 38 | Test.kt:38:16:41:3 | After { ... } | +| Test.kt:82:1:89:1 | Entry | 0 | Test.kt:82:1:89:1 | Entry | +| Test.kt:82:1:89:1 | Entry | 1 | Test.kt:82:21:89:1 | { ... } | +| Test.kt:82:1:89:1 | Entry | 2 | Test.kt:83:2:88:2 | try ... | +| Test.kt:82:1:89:1 | Entry | 3 | Test.kt:83:6:86:2 | { ... } | +| Test.kt:82:1:89:1 | Entry | 4 | Test.kt:84:3:84:18 | var ...; | +| Test.kt:82:1:89:1 | Entry | 5 | Test.kt:84:3:84:18 | Before x | +| Test.kt:82:1:89:1 | Entry | 6 | Test.kt:84:11:84:18 | Before (...)... | +| Test.kt:82:1:89:1 | Entry | 7 | Test.kt:84:11:84:11 | o | +| Test.kt:82:1:89:1 | Entry | 8 | Test.kt:84:11:84:18 | (...)... | | Test.kt:82:1:89:1 | Exit | 0 | Test.kt:82:1:89:1 | Exit | | Test.kt:82:1:89:1 | Normal Exit | 0 | Test.kt:82:1:89:1 | Normal Exit | -| Test.kt:82:21:89:1 | { ... } | 0 | Test.kt:82:21:89:1 | { ... } | -| Test.kt:82:21:89:1 | { ... } | 1 | Test.kt:83:2:88:2 | try ... | -| Test.kt:82:21:89:1 | { ... } | 2 | Test.kt:83:6:86:2 | { ... } | -| Test.kt:82:21:89:1 | { ... } | 3 | Test.kt:84:3:84:18 | var ...; | -| Test.kt:82:21:89:1 | { ... } | 4 | Test.kt:84:11:84:11 | o | -| Test.kt:82:21:89:1 | { ... } | 5 | Test.kt:84:11:84:18 | (...)... | -| Test.kt:84:3:84:18 | x | 0 | Test.kt:84:3:84:18 | x | -| Test.kt:84:3:84:18 | x | 1 | Test.kt:85:10:85:10 | 1 | -| Test.kt:84:3:84:18 | x | 2 | Test.kt:85:3:85:10 | return ... | +| Test.kt:84:11:84:18 | After (...)... | 0 | Test.kt:84:11:84:18 | After (...)... | +| Test.kt:84:11:84:18 | After (...)... | 1 | Test.kt:84:3:84:18 | x | +| Test.kt:84:11:84:18 | After (...)... | 2 | Test.kt:84:3:84:18 | After x | +| Test.kt:84:11:84:18 | After (...)... | 3 | Test.kt:84:3:84:18 | After var ...; | +| Test.kt:84:11:84:18 | After (...)... | 4 | Test.kt:85:3:85:10 | Before return ... | +| Test.kt:84:11:84:18 | After (...)... | 5 | Test.kt:85:10:85:10 | 1 | +| Test.kt:84:11:84:18 | After (...)... | 6 | Test.kt:85:3:85:10 | return ... | +| Test.kt:86:4:88:2 | After catch (...) [match] | 0 | Test.kt:86:4:88:2 | After catch (...) [match] | +| Test.kt:86:4:88:2 | After catch (...) [match] | 1 | Test.kt:86:11:86:31 | e | +| Test.kt:86:4:88:2 | After catch (...) [match] | 2 | Test.kt:86:34:88:2 | { ... } | +| Test.kt:86:4:88:2 | After catch (...) [match] | 3 | Test.kt:87:3:87:10 | Before return ... | +| Test.kt:86:4:88:2 | After catch (...) [match] | 4 | Test.kt:87:10:87:10 | 2 | +| Test.kt:86:4:88:2 | After catch (...) [match] | 5 | Test.kt:87:3:87:10 | return ... | +| Test.kt:86:4:88:2 | After catch (...) [no-match] | 0 | Test.kt:86:4:88:2 | After catch (...) [no-match] | +| Test.kt:86:4:88:2 | After catch (...) [no-match] | 1 | Test.kt:82:1:89:1 | Exceptional Exit | | Test.kt:86:4:88:2 | catch (...) | 0 | Test.kt:86:4:88:2 | catch (...) | -| Test.kt:86:4:88:2 | catch (...) | 1 | Test.kt:86:11:86:31 | e | -| Test.kt:86:4:88:2 | catch (...) | 2 | Test.kt:86:34:88:2 | { ... } | -| Test.kt:86:4:88:2 | catch (...) | 3 | Test.kt:87:10:87:10 | 2 | -| Test.kt:86:4:88:2 | catch (...) | 4 | Test.kt:87:3:87:10 | return ... | -| Test.kt:91:1:98:1 | Exceptional Exit | 0 | Test.kt:91:1:98:1 | Exceptional Exit | +| Test.kt:91:1:98:1 | Entry | 0 | Test.kt:91:1:98:1 | Entry | +| Test.kt:91:1:98:1 | Entry | 1 | Test.kt:91:22:98:1 | { ... } | +| Test.kt:91:1:98:1 | Entry | 2 | Test.kt:92:2:97:2 | try ... | +| Test.kt:91:1:98:1 | Entry | 3 | Test.kt:92:6:95:2 | { ... } | +| Test.kt:91:1:98:1 | Entry | 4 | Test.kt:93:3:93:13 | var ...; | +| Test.kt:91:1:98:1 | Entry | 5 | Test.kt:93:3:93:13 | Before x | +| Test.kt:91:1:98:1 | Entry | 6 | Test.kt:93:11:93:13 | Before ...!! | +| Test.kt:91:1:98:1 | Entry | 7 | Test.kt:93:11:93:11 | o | +| Test.kt:91:1:98:1 | Entry | 8 | Test.kt:93:11:93:13 | ...!! | | Test.kt:91:1:98:1 | Exit | 0 | Test.kt:91:1:98:1 | Exit | | Test.kt:91:1:98:1 | Normal Exit | 0 | Test.kt:91:1:98:1 | Normal Exit | -| Test.kt:91:22:98:1 | { ... } | 0 | Test.kt:91:22:98:1 | { ... } | -| Test.kt:91:22:98:1 | { ... } | 1 | Test.kt:92:2:97:2 | try ... | -| Test.kt:91:22:98:1 | { ... } | 2 | Test.kt:92:6:95:2 | { ... } | -| Test.kt:91:22:98:1 | { ... } | 3 | Test.kt:93:3:93:13 | var ...; | -| Test.kt:91:22:98:1 | { ... } | 4 | Test.kt:93:11:93:11 | o | -| Test.kt:91:22:98:1 | { ... } | 5 | Test.kt:93:11:93:13 | ...!! | -| Test.kt:93:3:93:13 | x | 0 | Test.kt:93:3:93:13 | x | -| Test.kt:93:3:93:13 | x | 1 | Test.kt:94:10:94:10 | 1 | -| Test.kt:93:3:93:13 | x | 2 | Test.kt:94:3:94:10 | return ... | +| Test.kt:93:11:93:13 | After ...!! | 0 | Test.kt:93:11:93:13 | After ...!! | +| Test.kt:93:11:93:13 | After ...!! | 1 | Test.kt:93:3:93:13 | x | +| Test.kt:93:11:93:13 | After ...!! | 2 | Test.kt:93:3:93:13 | After x | +| Test.kt:93:11:93:13 | After ...!! | 3 | Test.kt:93:3:93:13 | After var ...; | +| Test.kt:93:11:93:13 | After ...!! | 4 | Test.kt:94:3:94:10 | Before return ... | +| Test.kt:93:11:93:13 | After ...!! | 5 | Test.kt:94:10:94:10 | 1 | +| Test.kt:93:11:93:13 | After ...!! | 6 | Test.kt:94:3:94:10 | return ... | +| Test.kt:95:4:97:2 | After catch (...) [match] | 0 | Test.kt:95:4:97:2 | After catch (...) [match] | +| Test.kt:95:4:97:2 | After catch (...) [match] | 1 | Test.kt:95:11:95:33 | e | +| Test.kt:95:4:97:2 | After catch (...) [match] | 2 | Test.kt:95:36:97:2 | { ... } | +| Test.kt:95:4:97:2 | After catch (...) [match] | 3 | Test.kt:96:3:96:10 | Before return ... | +| Test.kt:95:4:97:2 | After catch (...) [match] | 4 | Test.kt:96:10:96:10 | 2 | +| Test.kt:95:4:97:2 | After catch (...) [match] | 5 | Test.kt:96:3:96:10 | return ... | +| Test.kt:95:4:97:2 | After catch (...) [no-match] | 0 | Test.kt:95:4:97:2 | After catch (...) [no-match] | +| Test.kt:95:4:97:2 | After catch (...) [no-match] | 1 | Test.kt:91:1:98:1 | Exceptional Exit | | Test.kt:95:4:97:2 | catch (...) | 0 | Test.kt:95:4:97:2 | catch (...) | -| Test.kt:95:4:97:2 | catch (...) | 1 | Test.kt:95:11:95:33 | e | -| Test.kt:95:4:97:2 | catch (...) | 2 | Test.kt:95:36:97:2 | { ... } | -| Test.kt:95:4:97:2 | catch (...) | 3 | Test.kt:96:10:96:10 | 2 | -| Test.kt:95:4:97:2 | catch (...) | 4 | Test.kt:96:3:96:10 | return ... | +| Test.kt:100:1:110:1 | Entry | 0 | Test.kt:100:1:110:1 | Entry | +| Test.kt:100:1:110:1 | Entry | 1 | Test.kt:100:25:110:1 | { ... } | +| Test.kt:100:1:110:1 | Entry | 2 | Test.kt:101:5:103:5 | ; | +| Test.kt:100:1:110:1 | Entry | 3 | Test.kt:101:5:103:5 | when ... | +| Test.kt:100:1:110:1 | Entry | 4 | Test.kt:101:9:103:5 | ... -> ... | +| Test.kt:100:1:110:1 | Entry | 5 | Test.kt:101:9:101:30 | ... && ... | +| Test.kt:100:1:110:1 | Entry | 6 | Test.kt:101:9:101:17 | Before ... (value equals) ... | +| Test.kt:100:1:110:1 | Entry | 7 | Test.kt:101:9:101:9 | x | +| Test.kt:100:1:110:1 | Entry | 8 | Test.kt:101:14:101:17 | null | +| Test.kt:100:1:110:1 | Entry | 9 | Test.kt:101:9:101:17 | ... (value equals) ... | | Test.kt:100:1:110:1 | Exit | 0 | Test.kt:100:1:110:1 | Exit | -| Test.kt:100:1:110:1 | Normal Exit | 0 | Test.kt:100:1:110:1 | Normal Exit | -| Test.kt:100:25:110:1 | { ... } | 0 | Test.kt:100:25:110:1 | { ... } | -| Test.kt:100:25:110:1 | { ... } | 1 | Test.kt:101:5:103:5 | ; | -| Test.kt:100:25:110:1 | { ... } | 2 | Test.kt:101:5:103:5 | when ... | -| Test.kt:100:25:110:1 | { ... } | 3 | Test.kt:101:9:103:5 | ... -> ... | -| Test.kt:100:25:110:1 | { ... } | 4 | Test.kt:101:9:101:30 | ... && ... | -| Test.kt:100:25:110:1 | { ... } | 5 | Test.kt:101:9:101:9 | x | -| Test.kt:100:25:110:1 | { ... } | 6 | Test.kt:101:14:101:17 | null | -| Test.kt:100:25:110:1 | { ... } | 7 | Test.kt:101:9:101:17 | ... (value equals) ... | -| Test.kt:101:22:101:22 | y | 0 | Test.kt:101:22:101:22 | y | -| Test.kt:101:22:101:22 | y | 1 | Test.kt:101:27:101:30 | null | -| Test.kt:101:22:101:22 | y | 2 | Test.kt:101:22:101:30 | ... (value equals) ... | -| Test.kt:101:33:103:5 | { ... } | 0 | Test.kt:101:33:103:5 | { ... } | -| Test.kt:101:33:103:5 | { ... } | 1 | Test.kt:102:15:102:25 | new Exception(...) | -| Test.kt:101:33:103:5 | { ... } | 2 | Test.kt:102:9:102:25 | throw ... | -| Test.kt:101:33:103:5 | { ... } | 3 | Test.kt:100:1:110:1 | Exceptional Exit | -| Test.kt:105:5:109:5 | ; | 0 | Test.kt:105:5:109:5 | ; | -| Test.kt:105:5:109:5 | ; | 1 | Test.kt:105:5:109:5 | when ... | -| Test.kt:105:5:109:5 | ; | 2 | Test.kt:105:9:107:5 | ... -> ... | -| Test.kt:105:5:109:5 | ; | 3 | Test.kt:105:9:105:9 | x | -| Test.kt:105:5:109:5 | ; | 4 | Test.kt:105:14:105:17 | null | -| Test.kt:105:5:109:5 | ; | 5 | Test.kt:105:9:105:17 | ... (value not-equals) ... | -| Test.kt:105:20:107:5 | { ... } | 0 | Test.kt:105:20:107:5 | { ... } | -| Test.kt:105:20:107:5 | { ... } | 1 | Test.kt:106:9:106:29 | ; | -| Test.kt:105:20:107:5 | { ... } | 2 | Test.kt:106:17:106:28 | "x not null" | -| Test.kt:105:20:107:5 | { ... } | 3 | Test.kt:106:9:106:29 | println(...) | -| Test.kt:107:16:109:5 | ... -> ... | 0 | Test.kt:107:16:109:5 | ... -> ... | -| Test.kt:107:16:109:5 | ... -> ... | 1 | Test.kt:107:16:107:16 | y | -| Test.kt:107:16:109:5 | ... -> ... | 2 | Test.kt:107:21:107:24 | null | -| Test.kt:107:16:109:5 | ... -> ... | 3 | Test.kt:107:16:107:24 | ... (value not-equals) ... | -| Test.kt:107:27:109:5 | { ... } | 0 | Test.kt:107:27:109:5 | { ... } | -| Test.kt:107:27:109:5 | { ... } | 1 | Test.kt:108:9:108:29 | ; | -| Test.kt:107:27:109:5 | { ... } | 2 | Test.kt:108:17:108:28 | "y not null" | -| Test.kt:107:27:109:5 | { ... } | 3 | Test.kt:108:9:108:29 | println(...) | -| Test.kt:112:1:116:1 | Exceptional Exit | 0 | Test.kt:112:1:116:1 | Exceptional Exit | -| Test.kt:112:1:116:1 | Exit | 0 | Test.kt:112:1:116:1 | Exit | -| Test.kt:112:1:116:1 | Normal Exit | 0 | Test.kt:112:1:116:1 | Normal Exit | -| Test.kt:112:32:116:1 | { ... } | 0 | Test.kt:112:32:116:1 | { ... } | -| Test.kt:112:32:116:1 | { ... } | 1 | Test.kt:113:5:115:5 | ; | -| Test.kt:112:32:116:1 | { ... } | 2 | Test.kt:113:5:115:5 | when ... | -| Test.kt:112:32:116:1 | { ... } | 3 | Test.kt:113:9:115:5 | ... -> ... | -| Test.kt:112:32:116:1 | { ... } | 4 | Test.kt:113:9:113:14 | ... && ... | -| Test.kt:112:32:116:1 | { ... } | 5 | Test.kt:113:9:113:9 | x | -| Test.kt:113:14:113:14 | y | 0 | Test.kt:113:14:113:14 | y | -| Test.kt:113:17:115:5 | { ... } | 0 | Test.kt:113:17:115:5 | { ... } | -| Test.kt:118:1:124:1 | Exceptional Exit | 0 | Test.kt:118:1:124:1 | Exceptional Exit | -| Test.kt:118:1:124:1 | Exit | 0 | Test.kt:118:1:124:1 | Exit | -| Test.kt:118:1:124:1 | Normal Exit | 0 | Test.kt:118:1:124:1 | Normal Exit | -| Test.kt:118:37:124:1 | { ... } | 0 | Test.kt:118:37:124:1 | { ... } | -| Test.kt:118:37:124:1 | { ... } | 1 | Test.kt:119:2:123:12 | ; | -| Test.kt:118:37:124:1 | { ... } | 2 | Test.kt:119:2:123:12 | when ... | -| Test.kt:118:37:124:1 | { ... } | 3 | Test.kt:120:3:123:10 | ... -> ... | -| Test.kt:118:37:124:1 | { ... } | 4 | Test.kt:120:3:123:3 | when ... | -| Test.kt:118:37:124:1 | { ... } | 5 | Test.kt:121:4:121:9 | ... -> ... | -| Test.kt:118:37:124:1 | { ... } | 6 | Test.kt:121:4:121:4 | x | -| Test.kt:121:9:121:9 | ; | 0 | Test.kt:121:9:121:9 | ; | -| Test.kt:121:9:121:9 | ; | 1 | Test.kt:121:9:121:9 | y | -| Test.kt:122:12:122:16 | ... -> ... | 0 | Test.kt:122:12:122:16 | ... -> ... | -| Test.kt:122:12:122:16 | ... -> ... | 1 | Test.kt:122:12:122:16 | true | -| Test.kt:122:12:122:16 | ... -> ... | 2 | Test.kt:122:12:122:16 | ; | -| Test.kt:122:12:122:16 | ... -> ... | 3 | Test.kt:122:12:122:16 | false | -| Test.kt:123:8:123:10 | { ... } | 0 | Test.kt:123:8:123:10 | { ... } | +| Test.kt:101:9:101:17 | After ... (value equals) ... [false] | 0 | Test.kt:101:9:101:17 | After ... (value equals) ... [false] | +| Test.kt:101:9:101:17 | After ... (value equals) ... [true] | 0 | Test.kt:101:9:101:17 | After ... (value equals) ... [true] | +| Test.kt:101:9:101:17 | After ... (value equals) ... [true] | 1 | Test.kt:101:22:101:30 | Before ... (value equals) ... | +| Test.kt:101:9:101:17 | After ... (value equals) ... [true] | 2 | Test.kt:101:22:101:22 | y | +| Test.kt:101:9:101:17 | After ... (value equals) ... [true] | 3 | Test.kt:101:27:101:30 | null | +| Test.kt:101:9:101:17 | After ... (value equals) ... [true] | 4 | Test.kt:101:22:101:30 | ... (value equals) ... | +| Test.kt:101:9:101:30 | After ... && ... [false] | 0 | Test.kt:101:9:101:30 | After ... && ... [false] | +| Test.kt:101:9:101:30 | After ... && ... [false] | 1 | Test.kt:101:5:103:5 | After when ... | +| Test.kt:101:9:101:30 | After ... && ... [false] | 2 | Test.kt:101:5:103:5 | After ; | +| Test.kt:101:9:101:30 | After ... && ... [false] | 3 | Test.kt:105:5:109:5 | ; | +| Test.kt:101:9:101:30 | After ... && ... [false] | 4 | Test.kt:105:5:109:5 | when ... | +| Test.kt:101:9:101:30 | After ... && ... [false] | 5 | Test.kt:105:9:107:5 | ... -> ... | +| Test.kt:101:9:101:30 | After ... && ... [false] | 6 | Test.kt:105:9:105:17 | Before ... (value not-equals) ... | +| Test.kt:101:9:101:30 | After ... && ... [false] | 7 | Test.kt:105:9:105:9 | x | +| Test.kt:101:9:101:30 | After ... && ... [false] | 8 | Test.kt:105:14:105:17 | null | +| Test.kt:101:9:101:30 | After ... && ... [false] | 9 | Test.kt:105:9:105:17 | ... (value not-equals) ... | +| Test.kt:101:22:101:30 | After ... (value equals) ... [false] | 0 | Test.kt:101:22:101:30 | After ... (value equals) ... [false] | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 0 | Test.kt:101:22:101:30 | After ... (value equals) ... [true] | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 1 | Test.kt:101:9:101:30 | After ... && ... [true] | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 2 | Test.kt:101:33:103:5 | { ... } | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 3 | Test.kt:102:9:102:25 | Before throw ... | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 4 | Test.kt:102:15:102:25 | Before new Exception(...) | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 5 | Test.kt:102:15:102:25 | new Exception(...) | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 6 | Test.kt:102:15:102:25 | After new Exception(...) | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 7 | Test.kt:102:9:102:25 | throw ... | +| Test.kt:101:22:101:30 | After ... (value equals) ... [true] | 8 | Test.kt:100:1:110:1 | Exceptional Exit | +| Test.kt:105:5:109:5 | After when ... | 0 | Test.kt:105:5:109:5 | After when ... | +| Test.kt:105:5:109:5 | After when ... | 1 | Test.kt:105:5:109:5 | After ; | +| Test.kt:105:5:109:5 | After when ... | 2 | Test.kt:100:25:110:1 | After { ... } | +| Test.kt:105:5:109:5 | After when ... | 3 | Test.kt:100:1:110:1 | Normal Exit | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | 0 | Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | 1 | Test.kt:107:16:109:5 | ... -> ... | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | 2 | Test.kt:107:16:107:24 | Before ... (value not-equals) ... | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | 3 | Test.kt:107:16:107:16 | y | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | 4 | Test.kt:107:21:107:24 | null | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [false] | 5 | Test.kt:107:16:107:24 | ... (value not-equals) ... | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 0 | Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 1 | Test.kt:105:20:107:5 | { ... } | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 2 | Test.kt:106:9:106:29 | ; | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 3 | Test.kt:106:9:106:29 | Before println(...) | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 4 | Test.kt:106:17:106:28 | "x not null" | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 5 | Test.kt:106:9:106:29 | println(...) | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 6 | Test.kt:106:9:106:29 | After println(...) | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 7 | Test.kt:106:9:106:29 | After ; | +| Test.kt:105:9:105:17 | After ... (value not-equals) ... [true] | 8 | Test.kt:105:20:107:5 | After { ... } | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [false] | 0 | Test.kt:107:16:107:24 | After ... (value not-equals) ... [false] | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 0 | Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 1 | Test.kt:107:27:109:5 | { ... } | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 2 | Test.kt:108:9:108:29 | ; | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 3 | Test.kt:108:9:108:29 | Before println(...) | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 4 | Test.kt:108:17:108:28 | "y not null" | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 5 | Test.kt:108:9:108:29 | println(...) | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 6 | Test.kt:108:9:108:29 | After println(...) | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 7 | Test.kt:108:9:108:29 | After ; | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [true] | 8 | Test.kt:107:27:109:5 | After { ... } | +| Test.kt:112:1:116:1 | Entry | 0 | Test.kt:112:1:116:1 | Entry | +| Test.kt:112:1:116:1 | Entry | 1 | Test.kt:112:32:116:1 | { ... } | +| Test.kt:112:1:116:1 | Entry | 2 | Test.kt:113:5:115:5 | ; | +| Test.kt:112:1:116:1 | Entry | 3 | Test.kt:113:5:115:5 | when ... | +| Test.kt:112:1:116:1 | Entry | 4 | Test.kt:113:9:115:5 | ... -> ... | +| Test.kt:112:1:116:1 | Entry | 5 | Test.kt:113:9:113:14 | ... && ... | +| Test.kt:112:1:116:1 | Entry | 6 | Test.kt:113:9:113:9 | x | +| Test.kt:113:5:115:5 | After when ... | 0 | Test.kt:113:5:115:5 | After when ... | +| Test.kt:113:5:115:5 | After when ... | 1 | Test.kt:113:5:115:5 | After ; | +| Test.kt:113:5:115:5 | After when ... | 2 | Test.kt:112:32:116:1 | After { ... } | +| Test.kt:113:5:115:5 | After when ... | 3 | Test.kt:112:1:116:1 | Normal Exit | +| Test.kt:113:5:115:5 | After when ... | 4 | Test.kt:112:1:116:1 | Exit | +| Test.kt:113:9:113:9 | After x [false] | 0 | Test.kt:113:9:113:9 | After x [false] | +| Test.kt:113:9:113:9 | After x [true] | 0 | Test.kt:113:9:113:9 | After x [true] | +| Test.kt:113:9:113:9 | After x [true] | 1 | Test.kt:113:14:113:14 | y | +| Test.kt:113:9:113:14 | After ... && ... [false] | 0 | Test.kt:113:9:113:14 | After ... && ... [false] | +| Test.kt:113:14:113:14 | After y [false] | 0 | Test.kt:113:14:113:14 | After y [false] | +| Test.kt:113:14:113:14 | After y [true] | 0 | Test.kt:113:14:113:14 | After y [true] | +| Test.kt:113:14:113:14 | After y [true] | 1 | Test.kt:113:9:113:14 | After ... && ... [true] | +| Test.kt:113:14:113:14 | After y [true] | 2 | Test.kt:113:17:115:5 | { ... } | +| Test.kt:118:1:124:1 | Entry | 0 | Test.kt:118:1:124:1 | Entry | +| Test.kt:118:1:124:1 | Entry | 1 | Test.kt:118:37:124:1 | { ... } | +| Test.kt:118:1:124:1 | Entry | 2 | Test.kt:119:2:123:12 | ; | +| Test.kt:118:1:124:1 | Entry | 3 | Test.kt:119:2:123:12 | when ... | +| Test.kt:118:1:124:1 | Entry | 4 | Test.kt:120:3:123:10 | ... -> ... | +| Test.kt:118:1:124:1 | Entry | 5 | Test.kt:120:3:123:3 | when ... | +| Test.kt:118:1:124:1 | Entry | 6 | Test.kt:121:4:121:9 | ... -> ... | +| Test.kt:118:1:124:1 | Entry | 7 | Test.kt:121:4:121:4 | x | +| Test.kt:119:2:123:12 | After when ... | 0 | Test.kt:119:2:123:12 | After when ... | +| Test.kt:119:2:123:12 | After when ... | 1 | Test.kt:119:2:123:12 | After ; | +| Test.kt:119:2:123:12 | After when ... | 2 | Test.kt:118:37:124:1 | After { ... } | +| Test.kt:119:2:123:12 | After when ... | 3 | Test.kt:118:1:124:1 | Normal Exit | +| Test.kt:119:2:123:12 | After when ... | 4 | Test.kt:118:1:124:1 | Exit | +| Test.kt:120:3:123:3 | After when ... [false] | 0 | Test.kt:120:3:123:3 | After when ... [false] | +| Test.kt:120:3:123:3 | After when ... [true] | 0 | Test.kt:120:3:123:3 | After when ... [true] | +| Test.kt:120:3:123:3 | After when ... [true] | 1 | Test.kt:123:8:123:10 | { ... } | +| Test.kt:121:4:121:4 | After x [false] | 0 | Test.kt:121:4:121:4 | After x [false] | +| Test.kt:121:4:121:4 | After x [false] | 1 | Test.kt:122:12:122:16 | ... -> ... | +| Test.kt:121:4:121:4 | After x [false] | 2 | Test.kt:122:12:122:16 | true | +| Test.kt:121:4:121:4 | After x [false] | 3 | Test.kt:122:12:122:16 | After true [true] | +| Test.kt:121:4:121:4 | After x [false] | 4 | Test.kt:122:12:122:16 | ; | +| Test.kt:121:4:121:4 | After x [false] | 5 | Test.kt:122:12:122:16 | false | +| Test.kt:121:4:121:4 | After x [false] | 6 | Test.kt:122:12:122:16 | After ; | +| Test.kt:121:4:121:4 | After x [true] | 0 | Test.kt:121:4:121:4 | After x [true] | +| Test.kt:121:4:121:4 | After x [true] | 1 | Test.kt:121:9:121:9 | ; | +| Test.kt:121:4:121:4 | After x [true] | 2 | Test.kt:121:9:121:9 | y | +| Test.kt:121:4:121:4 | After x [true] | 3 | Test.kt:121:9:121:9 | After ; | diff --git a/java/ql/test-kotlin2/library-tests/controlflow/basic/bbStrictDominance.expected b/java/ql/test-kotlin2/library-tests/controlflow/basic/bbStrictDominance.expected index c7e225ecc6f4..a4a9b68d4041 100644 --- a/java/ql/test-kotlin2/library-tests/controlflow/basic/bbStrictDominance.expected +++ b/java/ql/test-kotlin2/library-tests/controlflow/basic/bbStrictDominance.expected @@ -1,6 +1,3 @@ -| Test.kt:3:1:80:1 | { ... } | Test.kt:3:1:80:1 | Exit | -| Test.kt:4:2:79:2 | Normal Exit | Test.kt:4:2:79:2 | Exit | -| Test.kt:4:13:79:2 | { ... } | Test.kt:4:2:79:2 | Exit | | Test.kt:4:13:79:2 | { ... } | Test.kt:4:2:79:2 | Normal Exit | | Test.kt:4:13:79:2 | { ... } | Test.kt:11:14:14:3 | { ... } | | Test.kt:4:13:79:2 | { ... } | Test.kt:14:10:16:3 | ... -> ... | @@ -12,7 +9,6 @@ | Test.kt:4:13:79:2 | { ... } | Test.kt:38:9:38:9 | x | | Test.kt:4:13:79:2 | { ... } | Test.kt:38:16:41:3 | { ... } | | Test.kt:4:13:79:2 | { ... } | Test.kt:43:3:43:8 | ; | -| Test.kt:18:3:18:7 | ; | Test.kt:4:2:79:2 | Exit | | Test.kt:18:3:18:7 | ; | Test.kt:4:2:79:2 | Normal Exit | | Test.kt:18:3:18:7 | ; | Test.kt:22:4:22:9 | ; | | Test.kt:18:3:18:7 | ; | Test.kt:24:4:24:9 | ... -> ... | @@ -31,16 +27,22 @@ | Test.kt:35:3:35:8 | ; | Test.kt:43:3:43:8 | ; | | Test.kt:38:9:38:9 | x | Test.kt:38:16:41:3 | { ... } | | Test.kt:38:9:38:9 | x | Test.kt:43:3:43:8 | ; | -| Test.kt:82:1:89:1 | Normal Exit | Test.kt:82:1:89:1 | Exit | +| Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | Exceptional Exit | | Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | Exit | | Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | Normal Exit | | Test.kt:82:21:89:1 | { ... } | Test.kt:84:3:84:18 | x | | Test.kt:82:21:89:1 | { ... } | Test.kt:86:4:88:2 | catch (...) | -| Test.kt:91:1:98:1 | Normal Exit | Test.kt:91:1:98:1 | Exit | +| Test.kt:82:21:89:1 | { ... } | Test.kt:86:11:86:31 | e | +| Test.kt:86:4:88:2 | catch (...) | Test.kt:82:1:89:1 | Exceptional Exit | +| Test.kt:86:4:88:2 | catch (...) | Test.kt:86:11:86:31 | e | +| Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | Exceptional Exit | | Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | Exit | | Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | Normal Exit | | Test.kt:91:22:98:1 | { ... } | Test.kt:93:3:93:13 | x | | Test.kt:91:22:98:1 | { ... } | Test.kt:95:4:97:2 | catch (...) | +| Test.kt:91:22:98:1 | { ... } | Test.kt:95:11:95:33 | e | +| Test.kt:95:4:97:2 | catch (...) | Test.kt:91:1:98:1 | Exceptional Exit | +| Test.kt:95:4:97:2 | catch (...) | Test.kt:95:11:95:33 | e | | Test.kt:100:25:110:1 | { ... } | Test.kt:100:1:110:1 | Exit | | Test.kt:100:25:110:1 | { ... } | Test.kt:100:1:110:1 | Normal Exit | | Test.kt:100:25:110:1 | { ... } | Test.kt:101:22:101:22 | y | @@ -55,16 +57,11 @@ | Test.kt:105:5:109:5 | ; | Test.kt:107:16:109:5 | ... -> ... | | Test.kt:105:5:109:5 | ; | Test.kt:107:27:109:5 | { ... } | | Test.kt:107:16:109:5 | ... -> ... | Test.kt:107:27:109:5 | { ... } | -| Test.kt:112:1:116:1 | Normal Exit | Test.kt:112:1:116:1 | Exit | -| Test.kt:112:32:116:1 | { ... } | Test.kt:112:1:116:1 | Exit | | Test.kt:112:32:116:1 | { ... } | Test.kt:112:1:116:1 | Normal Exit | | Test.kt:112:32:116:1 | { ... } | Test.kt:113:14:113:14 | y | | Test.kt:112:32:116:1 | { ... } | Test.kt:113:17:115:5 | { ... } | | Test.kt:113:14:113:14 | y | Test.kt:113:17:115:5 | { ... } | -| Test.kt:118:1:124:1 | Normal Exit | Test.kt:118:1:124:1 | Exit | -| Test.kt:118:37:124:1 | { ... } | Test.kt:118:1:124:1 | Exit | | Test.kt:118:37:124:1 | { ... } | Test.kt:118:1:124:1 | Normal Exit | | Test.kt:118:37:124:1 | { ... } | Test.kt:121:9:121:9 | ; | | Test.kt:118:37:124:1 | { ... } | Test.kt:122:12:122:16 | ... -> ... | | Test.kt:118:37:124:1 | { ... } | Test.kt:123:8:123:10 | { ... } | -| Test.kt:121:9:121:9 | ; | Test.kt:123:8:123:10 | { ... } | diff --git a/java/ql/test-kotlin2/library-tests/controlflow/basic/bbStrictDominance.ql b/java/ql/test-kotlin2/library-tests/controlflow/basic/bbStrictDominance.ql index de1e23b649cc..72de0cc435d3 100644 --- a/java/ql/test-kotlin2/library-tests/controlflow/basic/bbStrictDominance.ql +++ b/java/ql/test-kotlin2/library-tests/controlflow/basic/bbStrictDominance.ql @@ -1,6 +1,7 @@ import java import semmle.code.java.controlflow.Dominance +import utils.test.BasicBlock from BasicBlock b, BasicBlock b2 where b.strictlyDominates(b2) -select b, b2 +select getFirstAstNode(b), getFirstAstNode(b2) diff --git a/java/ql/test-kotlin2/library-tests/controlflow/basic/bbSuccessor.expected b/java/ql/test-kotlin2/library-tests/controlflow/basic/bbSuccessor.expected index 219779e73dc7..060e3fcae70d 100644 --- a/java/ql/test-kotlin2/library-tests/controlflow/basic/bbSuccessor.expected +++ b/java/ql/test-kotlin2/library-tests/controlflow/basic/bbSuccessor.expected @@ -1,16 +1,13 @@ -| Test.kt:3:1:80:1 | Exceptional Exit | Test.kt:3:1:80:1 | Exit | -| Test.kt:3:1:80:1 | { ... } | Test.kt:3:1:80:1 | Exit | -| Test.kt:4:2:79:2 | Exceptional Exit | Test.kt:4:2:79:2 | Exit | -| Test.kt:4:2:79:2 | Normal Exit | Test.kt:4:2:79:2 | Exit | | Test.kt:4:13:79:2 | { ... } | Test.kt:11:14:14:3 | { ... } | | Test.kt:4:13:79:2 | { ... } | Test.kt:14:10:16:3 | ... -> ... | | Test.kt:11:14:14:3 | { ... } | Test.kt:18:3:18:7 | ; | | Test.kt:14:10:16:3 | ... -> ... | Test.kt:18:3:18:7 | ; | | Test.kt:18:3:18:7 | ; | Test.kt:22:4:22:9 | ; | | Test.kt:18:3:18:7 | ; | Test.kt:24:4:24:9 | ... -> ... | +| Test.kt:22:4:22:9 | ; | Test.kt:30:7:30:12 | After ... (value equals) ... [false] | | Test.kt:22:4:22:9 | ; | Test.kt:30:15:33:3 | { ... } | -| Test.kt:22:4:22:9 | ; | Test.kt:35:3:35:8 | ; | | Test.kt:24:4:24:9 | ... -> ... | Test.kt:4:2:79:2 | Normal Exit | +| Test.kt:30:7:30:12 | After ... (value equals) ... [false] | Test.kt:35:3:35:8 | ; | | Test.kt:30:15:33:3 | { ... } | Test.kt:35:3:35:8 | ; | | Test.kt:35:3:35:8 | ; | Test.kt:38:9:38:9 | x | | Test.kt:38:9:38:9 | x | Test.kt:38:16:41:3 | { ... } | @@ -22,37 +19,45 @@ | Test.kt:82:21:89:1 | { ... } | Test.kt:84:3:84:18 | x | | Test.kt:82:21:89:1 | { ... } | Test.kt:86:4:88:2 | catch (...) | | Test.kt:84:3:84:18 | x | Test.kt:82:1:89:1 | Normal Exit | -| Test.kt:86:4:88:2 | catch (...) | Test.kt:82:1:89:1 | Normal Exit | +| Test.kt:86:4:88:2 | catch (...) | Test.kt:82:1:89:1 | Exceptional Exit | +| Test.kt:86:4:88:2 | catch (...) | Test.kt:86:11:86:31 | e | +| Test.kt:86:11:86:31 | e | Test.kt:82:1:89:1 | Normal Exit | | Test.kt:91:1:98:1 | Exceptional Exit | Test.kt:91:1:98:1 | Exit | | Test.kt:91:1:98:1 | Normal Exit | Test.kt:91:1:98:1 | Exit | | Test.kt:91:22:98:1 | { ... } | Test.kt:93:3:93:13 | x | | Test.kt:91:22:98:1 | { ... } | Test.kt:95:4:97:2 | catch (...) | | Test.kt:93:3:93:13 | x | Test.kt:91:1:98:1 | Normal Exit | -| Test.kt:95:4:97:2 | catch (...) | Test.kt:91:1:98:1 | Normal Exit | +| Test.kt:95:4:97:2 | catch (...) | Test.kt:91:1:98:1 | Exceptional Exit | +| Test.kt:95:4:97:2 | catch (...) | Test.kt:95:11:95:33 | e | +| Test.kt:95:11:95:33 | e | Test.kt:91:1:98:1 | Normal Exit | | Test.kt:100:1:110:1 | Normal Exit | Test.kt:100:1:110:1 | Exit | +| Test.kt:100:25:110:1 | { ... } | Test.kt:101:9:101:17 | After ... (value equals) ... [false] | | Test.kt:100:25:110:1 | { ... } | Test.kt:101:22:101:22 | y | -| Test.kt:100:25:110:1 | { ... } | Test.kt:105:5:109:5 | ; | +| Test.kt:101:9:101:17 | After ... (value equals) ... [false] | Test.kt:105:5:109:5 | ; | +| Test.kt:101:22:101:22 | y | Test.kt:101:22:101:30 | After ... (value equals) ... [false] | | Test.kt:101:22:101:22 | y | Test.kt:101:33:103:5 | { ... } | -| Test.kt:101:22:101:22 | y | Test.kt:105:5:109:5 | ; | +| Test.kt:101:22:101:30 | After ... (value equals) ... [false] | Test.kt:105:5:109:5 | ; | | Test.kt:101:33:103:5 | { ... } | Test.kt:100:1:110:1 | Exit | | Test.kt:105:5:109:5 | ; | Test.kt:105:20:107:5 | { ... } | | Test.kt:105:5:109:5 | ; | Test.kt:107:16:109:5 | ... -> ... | | Test.kt:105:20:107:5 | { ... } | Test.kt:100:1:110:1 | Normal Exit | -| Test.kt:107:16:109:5 | ... -> ... | Test.kt:100:1:110:1 | Normal Exit | +| Test.kt:107:16:107:24 | After ... (value not-equals) ... [false] | Test.kt:100:1:110:1 | Normal Exit | +| Test.kt:107:16:109:5 | ... -> ... | Test.kt:107:16:107:24 | After ... (value not-equals) ... [false] | | Test.kt:107:16:109:5 | ... -> ... | Test.kt:107:27:109:5 | { ... } | | Test.kt:107:27:109:5 | { ... } | Test.kt:100:1:110:1 | Normal Exit | -| Test.kt:112:1:116:1 | Exceptional Exit | Test.kt:112:1:116:1 | Exit | -| Test.kt:112:1:116:1 | Normal Exit | Test.kt:112:1:116:1 | Exit | -| Test.kt:112:32:116:1 | { ... } | Test.kt:112:1:116:1 | Normal Exit | +| Test.kt:112:32:116:1 | { ... } | Test.kt:113:9:113:9 | After x [false] | | Test.kt:112:32:116:1 | { ... } | Test.kt:113:14:113:14 | y | -| Test.kt:113:14:113:14 | y | Test.kt:112:1:116:1 | Normal Exit | +| Test.kt:113:9:113:9 | After x [false] | Test.kt:113:9:113:14 | After ... && ... [false] | +| Test.kt:113:9:113:14 | After ... && ... [false] | Test.kt:112:1:116:1 | Normal Exit | +| Test.kt:113:14:113:14 | After y [false] | Test.kt:113:9:113:14 | After ... && ... [false] | +| Test.kt:113:14:113:14 | y | Test.kt:113:14:113:14 | After y [false] | | Test.kt:113:14:113:14 | y | Test.kt:113:17:115:5 | { ... } | | Test.kt:113:17:115:5 | { ... } | Test.kt:112:1:116:1 | Normal Exit | -| Test.kt:118:1:124:1 | Exceptional Exit | Test.kt:118:1:124:1 | Exit | -| Test.kt:118:1:124:1 | Normal Exit | Test.kt:118:1:124:1 | Exit | | Test.kt:118:37:124:1 | { ... } | Test.kt:121:9:121:9 | ; | | Test.kt:118:37:124:1 | { ... } | Test.kt:122:12:122:16 | ... -> ... | -| Test.kt:121:9:121:9 | ; | Test.kt:118:1:124:1 | Normal Exit | +| Test.kt:120:3:123:3 | After when ... [false] | Test.kt:118:1:124:1 | Normal Exit | +| Test.kt:121:9:121:9 | ; | Test.kt:120:3:123:3 | After when ... [false] | | Test.kt:121:9:121:9 | ; | Test.kt:123:8:123:10 | { ... } | -| Test.kt:122:12:122:16 | ... -> ... | Test.kt:118:1:124:1 | Normal Exit | +| Test.kt:122:12:122:16 | ... -> ... | Test.kt:120:3:123:3 | After when ... [false] | +| Test.kt:122:12:122:16 | ... -> ... | Test.kt:123:8:123:10 | { ... } | | Test.kt:123:8:123:10 | { ... } | Test.kt:118:1:124:1 | Normal Exit | diff --git a/java/ql/test-kotlin2/library-tests/controlflow/basic/bbSuccessor.ql b/java/ql/test-kotlin2/library-tests/controlflow/basic/bbSuccessor.ql index ae2d8a393b47..ae8dc5d188d6 100644 --- a/java/ql/test-kotlin2/library-tests/controlflow/basic/bbSuccessor.ql +++ b/java/ql/test-kotlin2/library-tests/controlflow/basic/bbSuccessor.ql @@ -1,5 +1,6 @@ import java +import utils.test.BasicBlock from BasicBlock b, BasicBlock b2 where b.getASuccessor() = b2 -select b, b2 +select getFirstAstNodeOrSynth(b), getFirstAstNodeOrSynth(b2) diff --git a/java/ql/test-kotlin2/library-tests/controlflow/basic/getASuccessor.expected b/java/ql/test-kotlin2/library-tests/controlflow/basic/getASuccessor.expected index c4be613c5e99..d5483586e0b8 100644 --- a/java/ql/test-kotlin2/library-tests/controlflow/basic/getASuccessor.expected +++ b/java/ql/test-kotlin2/library-tests/controlflow/basic/getASuccessor.expected @@ -1,12 +1,10 @@ #select -| Test.kt:3:1:80:1 | Exceptional Exit | Constructor | Test.kt:3:1:80:1 | Exit | Constructor | -| Test.kt:3:1:80:1 | Exit | Constructor | file://:0:0:0:0 | | | +| Test.kt:3:1:80:1 | Entry | Constructor | Test.kt:3:1:80:1 | { ... } | BlockStmt | | Test.kt:3:1:80:1 | Normal Exit | Constructor | Test.kt:3:1:80:1 | Exit | Constructor | | Test.kt:3:1:80:1 | super(...) | SuperConstructorInvocationStmt | Test.kt:3:1:80:1 | { ... } | BlockStmt | | Test.kt:3:1:80:1 | { ... } | BlockStmt | Test.kt:3:1:80:1 | Normal Exit | Constructor | | Test.kt:3:1:80:1 | { ... } | BlockStmt | Test.kt:3:1:80:1 | super(...) | SuperConstructorInvocationStmt | -| Test.kt:4:2:79:2 | Exceptional Exit | Method | Test.kt:4:2:79:2 | Exit | Method | -| Test.kt:4:2:79:2 | Exit | Method | file://:0:0:0:0 | | | +| Test.kt:4:2:79:2 | Entry | Method | Test.kt:4:13:79:2 | { ... } | BlockStmt | | Test.kt:4:2:79:2 | Normal Exit | Method | Test.kt:4:2:79:2 | Exit | Method | | Test.kt:4:13:79:2 | { ... } | BlockStmt | Test.kt:5:3:5:16 | var ...; | LocalVariableDeclStmt | | Test.kt:5:3:5:16 | var ...; | LocalVariableDeclStmt | Test.kt:5:16:5:16 | 0 | IntegerLiteral | @@ -30,19 +28,23 @@ | Test.kt:11:11:11:11 | 0 | IntegerLiteral | Test.kt:11:7:11:11 | ... > ... | GTExpr | | Test.kt:11:14:14:3 | { ... } | BlockStmt | Test.kt:12:4:12:9 | ; | ExprStmt | | Test.kt:12:4:12:9 | ...=... | AssignExpr | Test.kt:13:4:13:9 | ; | ExprStmt | -| Test.kt:12:4:12:9 | ; | ExprStmt | Test.kt:12:8:12:9 | 20 | LongLiteral | +| Test.kt:12:4:12:9 | ; | ExprStmt | Test.kt:12:4:12:9 | y | VarAccess | +| Test.kt:12:4:12:9 | y | VarAccess | Test.kt:12:8:12:9 | 20 | LongLiteral | | Test.kt:12:8:12:9 | 20 | LongLiteral | Test.kt:12:4:12:9 | ...=... | AssignExpr | | Test.kt:13:4:13:9 | ...=... | AssignExpr | Test.kt:18:3:18:7 | ; | ExprStmt | -| Test.kt:13:4:13:9 | ; | ExprStmt | Test.kt:13:8:13:9 | 10 | IntegerLiteral | +| Test.kt:13:4:13:9 | ; | ExprStmt | Test.kt:13:4:13:9 | z | VarAccess | +| Test.kt:13:4:13:9 | z | VarAccess | Test.kt:13:8:13:9 | 10 | IntegerLiteral | | Test.kt:13:8:13:9 | 10 | IntegerLiteral | Test.kt:13:4:13:9 | ...=... | AssignExpr | | Test.kt:14:10:16:3 | ... -> ... | WhenBranch | Test.kt:14:10:16:3 | true | BooleanLiteral | | Test.kt:14:10:16:3 | true | BooleanLiteral | Test.kt:14:10:16:3 | { ... } | BlockStmt | | Test.kt:14:10:16:3 | { ... } | BlockStmt | Test.kt:15:4:15:9 | ; | ExprStmt | | Test.kt:15:4:15:9 | ...=... | AssignExpr | Test.kt:18:3:18:7 | ; | ExprStmt | -| Test.kt:15:4:15:9 | ; | ExprStmt | Test.kt:15:8:15:9 | 30 | LongLiteral | +| Test.kt:15:4:15:9 | ; | ExprStmt | Test.kt:15:4:15:9 | y | VarAccess | +| Test.kt:15:4:15:9 | y | VarAccess | Test.kt:15:8:15:9 | 30 | LongLiteral | | Test.kt:15:8:15:9 | 30 | LongLiteral | Test.kt:15:4:15:9 | ...=... | AssignExpr | | Test.kt:18:3:18:7 | ...=... | AssignExpr | Test.kt:21:3:24:9 | ; | ExprStmt | -| Test.kt:18:3:18:7 | ; | ExprStmt | Test.kt:18:7:18:7 | 0 | IntegerLiteral | +| Test.kt:18:3:18:7 | ; | ExprStmt | Test.kt:18:3:18:7 | z | VarAccess | +| Test.kt:18:3:18:7 | z | VarAccess | Test.kt:18:7:18:7 | 0 | IntegerLiteral | | Test.kt:18:7:18:7 | 0 | IntegerLiteral | Test.kt:18:3:18:7 | ...=... | AssignExpr | | Test.kt:21:3:24:9 | ; | ExprStmt | Test.kt:21:3:24:9 | when ... | WhenExpr | | Test.kt:21:3:24:9 | when ... | WhenExpr | Test.kt:21:6:22:9 | ... -> ... | WhenBranch | @@ -52,14 +54,16 @@ | Test.kt:21:6:22:9 | ... -> ... | WhenBranch | Test.kt:21:6:21:6 | x | VarAccess | | Test.kt:21:10:21:10 | 0 | IntegerLiteral | Test.kt:21:6:21:10 | ... < ... | LTExpr | | Test.kt:22:4:22:9 | ...=... | AssignExpr | Test.kt:27:3:27:8 | ; | ExprStmt | -| Test.kt:22:4:22:9 | ; | ExprStmt | Test.kt:22:8:22:9 | 40 | LongLiteral | +| Test.kt:22:4:22:9 | ; | ExprStmt | Test.kt:22:4:22:9 | y | VarAccess | +| Test.kt:22:4:22:9 | y | VarAccess | Test.kt:22:8:22:9 | 40 | LongLiteral | | Test.kt:22:8:22:9 | 40 | LongLiteral | Test.kt:22:4:22:9 | ...=... | AssignExpr | | Test.kt:24:4:24:9 | ... -> ... | WhenBranch | Test.kt:24:4:24:9 | true | BooleanLiteral | | Test.kt:24:4:24:9 | return ... | ReturnStmt | Test.kt:4:2:79:2 | Normal Exit | Method | | Test.kt:24:4:24:9 | true | BooleanLiteral | Test.kt:24:10:24:10 | INSTANCE | VarAccess | | Test.kt:24:10:24:10 | INSTANCE | VarAccess | Test.kt:24:4:24:9 | return ... | ReturnStmt | | Test.kt:27:3:27:8 | ...=... | AssignExpr | Test.kt:30:3:33:3 | ; | ExprStmt | -| Test.kt:27:3:27:8 | ; | ExprStmt | Test.kt:27:7:27:8 | 10 | IntegerLiteral | +| Test.kt:27:3:27:8 | ; | ExprStmt | Test.kt:27:3:27:8 | z | VarAccess | +| Test.kt:27:3:27:8 | z | VarAccess | Test.kt:27:7:27:8 | 10 | IntegerLiteral | | Test.kt:27:7:27:8 | 10 | IntegerLiteral | Test.kt:27:3:27:8 | ...=... | AssignExpr | | Test.kt:30:3:33:3 | ; | ExprStmt | Test.kt:30:3:33:3 | when ... | WhenExpr | | Test.kt:30:3:33:3 | when ... | WhenExpr | Test.kt:30:7:33:3 | ... -> ... | WhenBranch | @@ -70,13 +74,16 @@ | Test.kt:30:12:30:12 | 0 | IntegerLiteral | Test.kt:30:7:30:12 | ... (value equals) ... | ValueEQExpr | | Test.kt:30:15:33:3 | { ... } | BlockStmt | Test.kt:31:4:31:9 | ; | ExprStmt | | Test.kt:31:4:31:9 | ...=... | AssignExpr | Test.kt:32:4:32:9 | ; | ExprStmt | -| Test.kt:31:4:31:9 | ; | ExprStmt | Test.kt:31:8:31:9 | 60 | LongLiteral | +| Test.kt:31:4:31:9 | ; | ExprStmt | Test.kt:31:4:31:9 | y | VarAccess | +| Test.kt:31:4:31:9 | y | VarAccess | Test.kt:31:8:31:9 | 60 | LongLiteral | | Test.kt:31:8:31:9 | 60 | LongLiteral | Test.kt:31:4:31:9 | ...=... | AssignExpr | | Test.kt:32:4:32:9 | ...=... | AssignExpr | Test.kt:35:3:35:8 | ; | ExprStmt | -| Test.kt:32:4:32:9 | ; | ExprStmt | Test.kt:32:8:32:9 | 10 | IntegerLiteral | +| Test.kt:32:4:32:9 | ; | ExprStmt | Test.kt:32:4:32:9 | z | VarAccess | +| Test.kt:32:4:32:9 | z | VarAccess | Test.kt:32:8:32:9 | 10 | IntegerLiteral | | Test.kt:32:8:32:9 | 10 | IntegerLiteral | Test.kt:32:4:32:9 | ...=... | AssignExpr | | Test.kt:35:3:35:8 | ...=... | AssignExpr | Test.kt:38:3:41:3 | while (...) | WhileStmt | -| Test.kt:35:3:35:8 | ; | ExprStmt | Test.kt:35:7:35:8 | 20 | IntegerLiteral | +| Test.kt:35:3:35:8 | ; | ExprStmt | Test.kt:35:3:35:8 | z | VarAccess | +| Test.kt:35:3:35:8 | z | VarAccess | Test.kt:35:7:35:8 | 20 | IntegerLiteral | | Test.kt:35:7:35:8 | 20 | IntegerLiteral | Test.kt:35:3:35:8 | ...=... | AssignExpr | | Test.kt:38:3:41:3 | while (...) | WhileStmt | Test.kt:38:9:38:9 | x | VarAccess | | Test.kt:38:9:38:9 | x | VarAccess | Test.kt:38:13:38:13 | 0 | IntegerLiteral | @@ -85,34 +92,39 @@ | Test.kt:38:13:38:13 | 0 | IntegerLiteral | Test.kt:38:9:38:13 | ... > ... | GTExpr | | Test.kt:38:16:41:3 | { ... } | BlockStmt | Test.kt:39:4:39:9 | ; | ExprStmt | | Test.kt:39:4:39:9 | ...=... | AssignExpr | Test.kt:40:4:40:6 | ; | ExprStmt | -| Test.kt:39:4:39:9 | ; | ExprStmt | Test.kt:39:8:39:9 | 10 | LongLiteral | +| Test.kt:39:4:39:9 | ; | ExprStmt | Test.kt:39:4:39:9 | y | VarAccess | +| Test.kt:39:4:39:9 | y | VarAccess | Test.kt:39:8:39:9 | 10 | LongLiteral | | Test.kt:39:8:39:9 | 10 | LongLiteral | Test.kt:39:4:39:9 | ...=... | AssignExpr | | Test.kt:40:4:40:4 | x | VarAccess | Test.kt:40:4:40:6 | | LocalVariableDeclExpr | | Test.kt:40:4:40:6 | ...=... | AssignExpr | Test.kt:40:4:40:6 | ; | ExprStmt | -| Test.kt:40:4:40:6 | ; | ExprStmt | Test.kt:40:4:40:6 | | StmtExpr | | Test.kt:40:4:40:6 | ; | ExprStmt | Test.kt:40:4:40:6 | | VarAccess | -| Test.kt:40:4:40:6 | ; | ExprStmt | Test.kt:40:4:40:6 | | VarAccess | -| Test.kt:40:4:40:6 | | StmtExpr | Test.kt:40:4:40:6 | { ... } | BlockStmt | +| Test.kt:40:4:40:6 | ; | ExprStmt | Test.kt:40:4:40:6 | x | VarAccess | +| Test.kt:40:4:40:6 | ; | ExprStmt | Test.kt:40:4:40:6 | { ... } | BlockStmt | +| Test.kt:40:4:40:6 | | StmtExpr | Test.kt:40:4:40:6 | | ImplicitCoercionToUnitExpr | | Test.kt:40:4:40:6 | | ImplicitCoercionToUnitExpr | Test.kt:38:9:38:9 | x | VarAccess | | Test.kt:40:4:40:6 | | LocalVariableDeclExpr | Test.kt:40:4:40:6 | ; | ExprStmt | -| Test.kt:40:4:40:6 | | VarAccess | Test.kt:40:4:40:6 | | ImplicitCoercionToUnitExpr | +| Test.kt:40:4:40:6 | | VarAccess | Test.kt:40:4:40:6 | | StmtExpr | | Test.kt:40:4:40:6 | | VarAccess | Test.kt:40:4:40:6 | dec(...) | MethodCall | | Test.kt:40:4:40:6 | dec(...) | MethodCall | Test.kt:40:4:40:6 | ...=... | AssignExpr | | Test.kt:40:4:40:6 | var ...; | LocalVariableDeclStmt | Test.kt:40:4:40:4 | x | VarAccess | +| Test.kt:40:4:40:6 | x | VarAccess | Test.kt:40:4:40:6 | | VarAccess | | Test.kt:40:4:40:6 | { ... } | BlockStmt | Test.kt:40:4:40:6 | var ...; | LocalVariableDeclStmt | | Test.kt:43:3:43:8 | ...=... | AssignExpr | Test.kt:73:3:73:8 | ; | ExprStmt | -| Test.kt:43:3:43:8 | ; | ExprStmt | Test.kt:43:7:43:8 | 30 | IntegerLiteral | +| Test.kt:43:3:43:8 | ; | ExprStmt | Test.kt:43:3:43:8 | z | VarAccess | +| Test.kt:43:3:43:8 | z | VarAccess | Test.kt:43:7:43:8 | 30 | IntegerLiteral | | Test.kt:43:7:43:8 | 30 | IntegerLiteral | Test.kt:43:3:43:8 | ...=... | AssignExpr | | Test.kt:73:3:73:8 | ...=... | AssignExpr | Test.kt:77:3:77:8 | ; | ExprStmt | -| Test.kt:73:3:73:8 | ; | ExprStmt | Test.kt:73:7:73:8 | 50 | IntegerLiteral | +| Test.kt:73:3:73:8 | ; | ExprStmt | Test.kt:73:3:73:8 | z | VarAccess | +| Test.kt:73:3:73:8 | z | VarAccess | Test.kt:73:7:73:8 | 50 | IntegerLiteral | | Test.kt:73:7:73:8 | 50 | IntegerLiteral | Test.kt:73:3:73:8 | ...=... | AssignExpr | | Test.kt:77:3:77:8 | ...=... | AssignExpr | Test.kt:78:9:78:9 | INSTANCE | VarAccess | -| Test.kt:77:3:77:8 | ; | ExprStmt | Test.kt:77:7:77:8 | 40 | IntegerLiteral | +| Test.kt:77:3:77:8 | ; | ExprStmt | Test.kt:77:3:77:8 | w | VarAccess | +| Test.kt:77:3:77:8 | w | VarAccess | Test.kt:77:7:77:8 | 40 | IntegerLiteral | | Test.kt:77:7:77:8 | 40 | IntegerLiteral | Test.kt:77:3:77:8 | ...=... | AssignExpr | | Test.kt:78:3:78:8 | return ... | ReturnStmt | Test.kt:4:2:79:2 | Normal Exit | Method | | Test.kt:78:9:78:9 | INSTANCE | VarAccess | Test.kt:78:3:78:8 | return ... | ReturnStmt | +| Test.kt:82:1:89:1 | Entry | Method | Test.kt:82:21:89:1 | { ... } | BlockStmt | | Test.kt:82:1:89:1 | Exceptional Exit | Method | Test.kt:82:1:89:1 | Exit | Method | -| Test.kt:82:1:89:1 | Exit | Method | file://:0:0:0:0 | | | | Test.kt:82:1:89:1 | Normal Exit | Method | Test.kt:82:1:89:1 | Exit | Method | | Test.kt:82:21:89:1 | { ... } | BlockStmt | Test.kt:83:2:88:2 | try ... | TryStmt | | Test.kt:83:2:88:2 | try ... | TryStmt | Test.kt:83:6:86:2 | { ... } | BlockStmt | @@ -124,13 +136,14 @@ | Test.kt:84:11:84:18 | (...)... | CastExpr | Test.kt:86:4:88:2 | catch (...) | CatchClause | | Test.kt:85:3:85:10 | return ... | ReturnStmt | Test.kt:82:1:89:1 | Normal Exit | Method | | Test.kt:85:10:85:10 | 1 | IntegerLiteral | Test.kt:85:3:85:10 | return ... | ReturnStmt | +| Test.kt:86:4:88:2 | catch (...) | CatchClause | Test.kt:82:1:89:1 | Exceptional Exit | Method | | Test.kt:86:4:88:2 | catch (...) | CatchClause | Test.kt:86:11:86:31 | e | LocalVariableDeclExpr | | Test.kt:86:11:86:31 | e | LocalVariableDeclExpr | Test.kt:86:34:88:2 | { ... } | BlockStmt | | Test.kt:86:34:88:2 | { ... } | BlockStmt | Test.kt:87:10:87:10 | 2 | IntegerLiteral | | Test.kt:87:3:87:10 | return ... | ReturnStmt | Test.kt:82:1:89:1 | Normal Exit | Method | | Test.kt:87:10:87:10 | 2 | IntegerLiteral | Test.kt:87:3:87:10 | return ... | ReturnStmt | +| Test.kt:91:1:98:1 | Entry | Method | Test.kt:91:22:98:1 | { ... } | BlockStmt | | Test.kt:91:1:98:1 | Exceptional Exit | Method | Test.kt:91:1:98:1 | Exit | Method | -| Test.kt:91:1:98:1 | Exit | Method | file://:0:0:0:0 | | | | Test.kt:91:1:98:1 | Normal Exit | Method | Test.kt:91:1:98:1 | Exit | Method | | Test.kt:91:22:98:1 | { ... } | BlockStmt | Test.kt:92:2:97:2 | try ... | TryStmt | | Test.kt:92:2:97:2 | try ... | TryStmt | Test.kt:92:6:95:2 | { ... } | BlockStmt | @@ -142,13 +155,14 @@ | Test.kt:93:11:93:13 | ...!! | NotNullExpr | Test.kt:95:4:97:2 | catch (...) | CatchClause | | Test.kt:94:3:94:10 | return ... | ReturnStmt | Test.kt:91:1:98:1 | Normal Exit | Method | | Test.kt:94:10:94:10 | 1 | IntegerLiteral | Test.kt:94:3:94:10 | return ... | ReturnStmt | +| Test.kt:95:4:97:2 | catch (...) | CatchClause | Test.kt:91:1:98:1 | Exceptional Exit | Method | | Test.kt:95:4:97:2 | catch (...) | CatchClause | Test.kt:95:11:95:33 | e | LocalVariableDeclExpr | | Test.kt:95:11:95:33 | e | LocalVariableDeclExpr | Test.kt:95:36:97:2 | { ... } | BlockStmt | | Test.kt:95:36:97:2 | { ... } | BlockStmt | Test.kt:96:10:96:10 | 2 | IntegerLiteral | | Test.kt:96:3:96:10 | return ... | ReturnStmt | Test.kt:91:1:98:1 | Normal Exit | Method | | Test.kt:96:10:96:10 | 2 | IntegerLiteral | Test.kt:96:3:96:10 | return ... | ReturnStmt | +| Test.kt:100:1:110:1 | Entry | Method | Test.kt:100:25:110:1 | { ... } | BlockStmt | | Test.kt:100:1:110:1 | Exceptional Exit | Method | Test.kt:100:1:110:1 | Exit | Method | -| Test.kt:100:1:110:1 | Exit | Method | file://:0:0:0:0 | | | | Test.kt:100:1:110:1 | Normal Exit | Method | Test.kt:100:1:110:1 | Exit | Method | | Test.kt:100:25:110:1 | { ... } | BlockStmt | Test.kt:101:5:103:5 | ; | ExprStmt | | Test.kt:101:5:103:5 | ; | ExprStmt | Test.kt:101:5:103:5 | when ... | WhenExpr | @@ -186,8 +200,7 @@ | Test.kt:108:9:108:29 | ; | ExprStmt | Test.kt:108:17:108:28 | "y not null" | StringLiteral | | Test.kt:108:9:108:29 | println(...) | MethodCall | Test.kt:100:1:110:1 | Normal Exit | Method | | Test.kt:108:17:108:28 | "y not null" | StringLiteral | Test.kt:108:9:108:29 | println(...) | MethodCall | -| Test.kt:112:1:116:1 | Exceptional Exit | Method | Test.kt:112:1:116:1 | Exit | Method | -| Test.kt:112:1:116:1 | Exit | Method | file://:0:0:0:0 | | | +| Test.kt:112:1:116:1 | Entry | Method | Test.kt:112:32:116:1 | { ... } | BlockStmt | | Test.kt:112:1:116:1 | Normal Exit | Method | Test.kt:112:1:116:1 | Exit | Method | | Test.kt:112:32:116:1 | { ... } | BlockStmt | Test.kt:113:5:115:5 | ; | ExprStmt | | Test.kt:113:5:115:5 | ; | ExprStmt | Test.kt:113:5:115:5 | when ... | WhenExpr | @@ -199,8 +212,7 @@ | Test.kt:113:14:113:14 | y | VarAccess | Test.kt:112:1:116:1 | Normal Exit | Method | | Test.kt:113:14:113:14 | y | VarAccess | Test.kt:113:17:115:5 | { ... } | BlockStmt | | Test.kt:113:17:115:5 | { ... } | BlockStmt | Test.kt:112:1:116:1 | Normal Exit | Method | -| Test.kt:118:1:124:1 | Exceptional Exit | Method | Test.kt:118:1:124:1 | Exit | Method | -| Test.kt:118:1:124:1 | Exit | Method | file://:0:0:0:0 | | | +| Test.kt:118:1:124:1 | Entry | Method | Test.kt:118:37:124:1 | { ... } | BlockStmt | | Test.kt:118:1:124:1 | Normal Exit | Method | Test.kt:118:1:124:1 | Exit | Method | | Test.kt:118:37:124:1 | { ... } | BlockStmt | Test.kt:119:2:123:12 | ; | ExprStmt | | Test.kt:119:2:123:12 | ; | ExprStmt | Test.kt:119:2:123:12 | when ... | WhenExpr | @@ -216,6 +228,7 @@ | Test.kt:122:12:122:16 | ... -> ... | WhenBranch | Test.kt:122:12:122:16 | true | BooleanLiteral | | Test.kt:122:12:122:16 | ; | ExprStmt | Test.kt:122:12:122:16 | false | BooleanLiteral | | Test.kt:122:12:122:16 | false | BooleanLiteral | Test.kt:118:1:124:1 | Normal Exit | Method | +| Test.kt:122:12:122:16 | false | BooleanLiteral | Test.kt:123:8:123:10 | { ... } | BlockStmt | | Test.kt:122:12:122:16 | true | BooleanLiteral | Test.kt:122:12:122:16 | ; | ExprStmt | | Test.kt:123:8:123:10 | { ... } | BlockStmt | Test.kt:118:1:124:1 | Normal Exit | Method | missingSuccessor diff --git a/java/ql/test-kotlin2/library-tests/controlflow/basic/getASuccessor.ql b/java/ql/test-kotlin2/library-tests/controlflow/basic/getASuccessor.ql index 10a2568b0607..9a334d18aae7 100644 --- a/java/ql/test-kotlin2/library-tests/controlflow/basic/getASuccessor.ql +++ b/java/ql/test-kotlin2/library-tests/controlflow/basic/getASuccessor.ql @@ -1,54 +1,15 @@ import java +import utils.test.AstCfg -newtype TMaybeControlFlowNode = - TControlFlowNode(ControlFlowNode c) or - TNoControlFlowNode() - -class MaybeControlFlowNode extends TMaybeControlFlowNode { - abstract string toString(); - - abstract Location getLocation(); - - abstract string getPrimaryQlClasses(); -} - -class YesMaybeControlFlowNode extends MaybeControlFlowNode { - ControlFlowNode c; - - YesMaybeControlFlowNode() { this = TControlFlowNode(c) } - - override string toString() { result = c.toString() } - - override Location getLocation() { result = c.getLocation() } - - override string getPrimaryQlClasses() { result = c.getAstNode().getPrimaryQlClasses() } -} - -class NoMaybeControlFlowNode extends MaybeControlFlowNode { - NoMaybeControlFlowNode() { this = TNoControlFlowNode() } - - override string toString() { result = "" } - - override Location getLocation() { result.toString() = "file://:0:0:0:0" } - - override string getPrimaryQlClasses() { result = "" } -} - -MaybeControlFlowNode maybeSuccessor(ControlFlowNode n) { - if exists(n.getASuccessor()) - then result = TControlFlowNode(n.getASuccessor()) - else result = TNoControlFlowNode() -} - -from ControlFlowNode n, MaybeControlFlowNode m +from ControlFlowNode n, ControlFlowNode m where - m = maybeSuccessor(n) and + m = getAnAstSuccessor(n) and n.getLocation().getFile().(CompilationUnit).fromSource() -select n, n.getAstNode().getPrimaryQlClasses(), m, m.getPrimaryQlClasses() +select n, n.getAstNode().getPrimaryQlClasses(), m, m.getAstNode().getPrimaryQlClasses() -query predicate missingSuccessor(Expr n) { - maybeSuccessor(n.getControlFlowNode()) instanceof NoMaybeControlFlowNode and - n.getFile().(CompilationUnit).fromSource() and - not n instanceof TypeAccess and - not n instanceof VarWrite +query predicate missingSuccessor(Expr e) { + exists(ControlFlowNode n | n = e.getControlFlowNode() and not exists(n.getASuccessor())) and + e.getFile().(CompilationUnit).fromSource() and + not e instanceof TypeAccess and + not e instanceof VarWrite } diff --git a/java/ql/test-kotlin2/library-tests/controlflow/basic/strictDominance.expected b/java/ql/test-kotlin2/library-tests/controlflow/basic/strictDominance.expected index 4fb56510ed51..27595e7017b6 100644 --- a/java/ql/test-kotlin2/library-tests/controlflow/basic/strictDominance.expected +++ b/java/ql/test-kotlin2/library-tests/controlflow/basic/strictDominance.expected @@ -562,5 +562,4 @@ | Test.kt:121:4:121:9 | ... -> ... | Test.kt:122:12:122:16 | ... -> ... | | Test.kt:121:4:121:9 | ... -> ... | Test.kt:122:12:122:16 | ; | | Test.kt:121:4:121:9 | ... -> ... | Test.kt:123:8:123:10 | { ... } | -| Test.kt:121:9:121:9 | ; | Test.kt:123:8:123:10 | { ... } | | Test.kt:122:12:122:16 | ... -> ... | Test.kt:122:12:122:16 | ; | diff --git a/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominanceWrong.ql b/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominanceWrong.ql index 4eadcddc61a6..6deead2df73b 100644 --- a/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominanceWrong.ql +++ b/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominanceWrong.ql @@ -17,5 +17,6 @@ predicate dominanceCounterExample(ControlFlowNode entry, ControlFlowNode dom, Co from Callable c, ControlFlowNode dom, ControlFlowNode node where strictlyDominates(dom, node) and - dominanceCounterExample(c.getBody().getControlFlowNode(), dom, node) + dominanceCounterExample(any(ControlFlow::EntryNode entry | entry.getEnclosingCallable() = c), dom, + node) select c, dom, node diff --git a/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominator.expected b/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominator.expected index 75662bfacd49..6084c631b9df 100644 --- a/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominator.expected +++ b/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominator.expected @@ -1,157 +1,21 @@ -| Test.kt:2:43:79:2 | { ... } | Test.kt:3:9:3:18 | var ...; | -| Test.kt:3:9:3:18 | var ...; | Test.kt:3:17:3:18 | px | -| Test.kt:3:9:3:18 | x | Test.kt:4:9:4:18 | var ...; | -| Test.kt:3:17:3:18 | px | Test.kt:3:9:3:18 | x | -| Test.kt:4:9:4:18 | var ...; | Test.kt:4:17:4:18 | pw | -| Test.kt:4:9:4:18 | w | Test.kt:5:9:5:18 | var ...; | -| Test.kt:4:17:4:18 | pw | Test.kt:4:9:4:18 | w | -| Test.kt:5:9:5:18 | var ...; | Test.kt:5:17:5:18 | pz | -| Test.kt:5:9:5:18 | z | Test.kt:7:3:7:12 | var ...; | -| Test.kt:5:17:5:18 | pz | Test.kt:5:9:5:18 | z | -| Test.kt:7:3:7:12 | j | Test.kt:8:3:8:18 | var ...; | -| Test.kt:7:3:7:12 | var ...; | Test.kt:7:3:7:12 | j | -| Test.kt:8:3:8:18 | var ...; | Test.kt:8:17:8:18 | 50 | -| Test.kt:8:3:8:18 | y | Test.kt:11:3:16:3 | ; | -| Test.kt:8:17:8:18 | 50 | Test.kt:8:3:8:18 | y | -| Test.kt:11:3:16:3 | ; | Test.kt:11:3:16:3 | when ... | -| Test.kt:11:3:16:3 | when ... | Test.kt:11:7:14:3 | ... -> ... | -| Test.kt:11:7:11:7 | x | Test.kt:11:11:11:11 | 0 | -| Test.kt:11:7:11:11 | ... > ... | Test.kt:11:14:14:3 | { ... } | -| Test.kt:11:7:11:11 | ... > ... | Test.kt:14:10:16:3 | ... -> ... | -| Test.kt:11:7:11:11 | ... > ... | Test.kt:18:3:18:20 | ; | -| Test.kt:11:7:14:3 | ... -> ... | Test.kt:11:7:11:7 | x | -| Test.kt:11:11:11:11 | 0 | Test.kt:11:7:11:11 | ... > ... | -| Test.kt:11:14:14:3 | { ... } | Test.kt:12:4:12:9 | ; | -| Test.kt:12:4:12:9 | ...=... | Test.kt:13:4:13:9 | ; | -| Test.kt:12:4:12:9 | ; | Test.kt:12:8:12:9 | 20 | -| Test.kt:12:8:12:9 | 20 | Test.kt:12:4:12:9 | ...=... | -| Test.kt:13:4:13:9 | ; | Test.kt:13:8:13:9 | 10 | -| Test.kt:13:8:13:9 | 10 | Test.kt:13:4:13:9 | ...=... | -| Test.kt:14:10:16:3 | ... -> ... | Test.kt:14:10:16:3 | true | -| Test.kt:14:10:16:3 | true | Test.kt:14:10:16:3 | { ... } | -| Test.kt:14:10:16:3 | { ... } | Test.kt:15:4:15:9 | ; | -| Test.kt:15:4:15:9 | ; | Test.kt:15:8:15:9 | 30 | -| Test.kt:15:8:15:9 | 30 | Test.kt:15:4:15:9 | ...=... | -| Test.kt:18:3:18:20 | ...=... | Test.kt:21:3:24:11 | ; | -| Test.kt:18:3:18:20 | ; | Test.kt:18:8:18:8 | x | -| Test.kt:18:7:18:20 | (...)... | Test.kt:18:3:18:20 | ...=... | -| Test.kt:18:8:18:8 | x | Test.kt:18:12:18:12 | y | -| Test.kt:18:8:18:12 | ... + ... | Test.kt:18:7:18:20 | (...)... | -| Test.kt:18:12:18:12 | y | Test.kt:18:8:18:12 | ... + ... | -| Test.kt:21:3:24:11 | ; | Test.kt:21:3:24:11 | when ... | -| Test.kt:21:3:24:11 | when ... | Test.kt:21:7:22:9 | ... -> ... | -| Test.kt:21:7:21:7 | x | Test.kt:21:11:21:11 | 0 | -| Test.kt:21:7:21:11 | ... < ... | Test.kt:2:2:79:2 | Normal Exit | -| Test.kt:21:7:21:11 | ... < ... | Test.kt:22:4:22:9 | ; | -| Test.kt:21:7:21:11 | ... < ... | Test.kt:24:4:24:11 | ... -> ... | -| Test.kt:21:7:22:9 | ... -> ... | Test.kt:21:7:21:7 | x | -| Test.kt:21:11:21:11 | 0 | Test.kt:21:7:21:11 | ... < ... | -| Test.kt:22:4:22:9 | ...=... | Test.kt:27:3:27:8 | ; | -| Test.kt:22:4:22:9 | ; | Test.kt:22:8:22:9 | 40 | -| Test.kt:22:8:22:9 | 40 | Test.kt:22:4:22:9 | ...=... | -| Test.kt:24:4:24:11 | ... -> ... | Test.kt:24:4:24:11 | true | -| Test.kt:24:4:24:11 | true | Test.kt:24:11:24:11 | z | -| Test.kt:24:11:24:11 | z | Test.kt:24:4:24:11 | return ... | -| Test.kt:27:3:27:8 | ...=... | Test.kt:30:3:33:3 | ; | -| Test.kt:27:3:27:8 | ; | Test.kt:27:7:27:8 | 10 | -| Test.kt:27:7:27:8 | 10 | Test.kt:27:3:27:8 | ...=... | -| Test.kt:30:3:33:3 | ; | Test.kt:30:3:33:3 | when ... | -| Test.kt:30:3:33:3 | when ... | Test.kt:30:7:33:3 | ... -> ... | -| Test.kt:30:7:30:7 | x | Test.kt:30:12:30:12 | 0 | -| Test.kt:30:7:30:12 | ... (value equals) ... | Test.kt:30:15:33:3 | { ... } | -| Test.kt:30:7:30:12 | ... (value equals) ... | Test.kt:35:3:35:8 | ; | -| Test.kt:30:7:33:3 | ... -> ... | Test.kt:30:7:30:7 | x | -| Test.kt:30:12:30:12 | 0 | Test.kt:30:7:30:12 | ... (value equals) ... | -| Test.kt:30:15:33:3 | { ... } | Test.kt:31:4:31:9 | ; | -| Test.kt:31:4:31:9 | ...=... | Test.kt:32:4:32:9 | ; | -| Test.kt:31:4:31:9 | ; | Test.kt:31:8:31:9 | 60 | -| Test.kt:31:8:31:9 | 60 | Test.kt:31:4:31:9 | ...=... | -| Test.kt:32:4:32:9 | ; | Test.kt:32:8:32:9 | 10 | -| Test.kt:32:8:32:9 | 10 | Test.kt:32:4:32:9 | ...=... | -| Test.kt:35:3:35:8 | ...+=... | Test.kt:38:3:41:3 | while (...) | -| Test.kt:35:3:35:8 | ; | Test.kt:35:3:35:8 | z | -| Test.kt:35:3:35:8 | z | Test.kt:35:8:35:8 | x | -| Test.kt:35:8:35:8 | x | Test.kt:35:3:35:8 | ...+=... | -| Test.kt:38:3:41:3 | while (...) | Test.kt:38:10:38:10 | x | -| Test.kt:38:10:38:10 | x | Test.kt:38:14:38:14 | 0 | -| Test.kt:38:10:38:14 | ... > ... | Test.kt:38:17:41:3 | { ... } | -| Test.kt:38:10:38:14 | ... > ... | Test.kt:43:3:43:15 | ; | -| Test.kt:38:14:38:14 | 0 | Test.kt:38:10:38:14 | ... > ... | -| Test.kt:38:17:41:3 | { ... } | Test.kt:39:4:39:9 | ; | -| Test.kt:39:4:39:9 | ...=... | Test.kt:40:4:40:6 | ; | -| Test.kt:39:4:39:9 | ; | Test.kt:39:8:39:9 | 10 | -| Test.kt:39:8:39:9 | 10 | Test.kt:39:4:39:9 | ...=... | -| Test.kt:40:4:40:4 | x | Test.kt:40:4:40:6 | | -| Test.kt:40:4:40:6 | ...=... | Test.kt:40:4:40:6 | ; | -| Test.kt:40:4:40:6 | ; | Test.kt:40:4:40:6 | | -| Test.kt:40:4:40:6 | ; | Test.kt:40:4:40:6 | | -| Test.kt:40:4:40:6 | ; | Test.kt:40:4:40:6 | | -| Test.kt:40:4:40:6 | | Test.kt:40:4:40:6 | { ... } | -| Test.kt:40:4:40:6 | | Test.kt:40:4:40:6 | ; | -| Test.kt:40:4:40:6 | | Test.kt:40:4:40:6 | | -| Test.kt:40:4:40:6 | | Test.kt:40:4:40:6 | dec(...) | -| Test.kt:40:4:40:6 | dec(...) | Test.kt:40:4:40:6 | ...=... | -| Test.kt:40:4:40:6 | var ...; | Test.kt:40:4:40:4 | x | -| Test.kt:40:4:40:6 | { ... } | Test.kt:40:4:40:6 | var ...; | -| Test.kt:43:3:43:15 | ...+=... | Test.kt:73:3:73:16 | ; | -| Test.kt:43:3:43:15 | ; | Test.kt:43:3:43:15 | z | -| Test.kt:43:3:43:15 | z | Test.kt:43:8:43:8 | y | -| Test.kt:43:8:43:8 | y | Test.kt:43:8:43:15 | (...)... | -| Test.kt:43:8:43:15 | (...)... | Test.kt:43:3:43:15 | ...+=... | -| Test.kt:73:3:73:16 | ...+=... | Test.kt:77:3:77:8 | ; | -| Test.kt:73:3:73:16 | ; | Test.kt:73:3:73:16 | z | -| Test.kt:73:3:73:16 | z | Test.kt:73:8:73:8 | x | -| Test.kt:73:8:73:8 | x | Test.kt:73:12:73:12 | y | -| Test.kt:73:8:73:12 | ... + ... | Test.kt:73:16:73:16 | w | -| Test.kt:73:8:73:16 | ... + ... | Test.kt:73:3:73:16 | ...+=... | -| Test.kt:73:12:73:12 | | Test.kt:73:8:73:12 | ... + ... | -| Test.kt:73:12:73:12 | y | Test.kt:73:12:73:12 | | -| Test.kt:73:16:73:16 | w | Test.kt:73:8:73:16 | ... + ... | -| Test.kt:77:3:77:8 | ...=... | Test.kt:78:10:78:10 | w | -| Test.kt:77:3:77:8 | ; | Test.kt:77:7:77:8 | 40 | -| Test.kt:77:7:77:8 | 40 | Test.kt:77:3:77:8 | ...=... | -| Test.kt:78:10:78:10 | w | Test.kt:78:3:78:10 | return ... | -| Test.kt:81:25:98:2 | { ... } | Test.kt:83:3:83:12 | var ...; | -| Test.kt:83:3:83:12 | b | Test.kt:84:3:84:12 | var ...; | -| Test.kt:83:3:83:12 | var ...; | Test.kt:83:3:83:12 | b | -| Test.kt:84:3:84:12 | c | Test.kt:85:3:85:7 | ; | -| Test.kt:84:3:84:12 | var ...; | Test.kt:84:3:84:12 | c | -| Test.kt:85:3:85:7 | ...=... | Test.kt:86:3:96:3 | while (...) | -| Test.kt:85:3:85:7 | ; | Test.kt:85:7:85:7 | 0 | -| Test.kt:85:7:85:7 | 0 | Test.kt:85:3:85:7 | ...=... | -| Test.kt:86:3:96:3 | while (...) | Test.kt:86:9:86:12 | true | -| Test.kt:86:9:86:12 | true | Test.kt:86:15:96:3 | { ... } | -| Test.kt:86:15:96:3 | { ... } | Test.kt:87:4:87:9 | ; | -| Test.kt:87:4:87:9 | ...=... | Test.kt:88:4:91:4 | ; | -| Test.kt:87:4:87:9 | ; | Test.kt:87:8:87:9 | 10 | -| Test.kt:87:8:87:9 | 10 | Test.kt:87:4:87:9 | ...=... | -| Test.kt:88:4:91:4 | ; | Test.kt:88:4:91:4 | when ... | -| Test.kt:88:4:91:4 | when ... | Test.kt:88:8:91:4 | ... -> ... | -| Test.kt:88:8:88:8 | a | Test.kt:88:12:88:14 | 100 | -| Test.kt:88:8:88:14 | ... > ... | Test.kt:88:17:91:4 | { ... } | -| Test.kt:88:8:88:14 | ... > ... | Test.kt:92:4:93:9 | ; | -| Test.kt:88:8:91:4 | ... -> ... | Test.kt:88:8:88:8 | a | -| Test.kt:88:12:88:14 | 100 | Test.kt:88:8:88:14 | ... > ... | -| Test.kt:88:17:91:4 | { ... } | Test.kt:89:5:89:10 | ; | -| Test.kt:89:5:89:10 | ...=... | Test.kt:90:5:90:9 | ; | -| Test.kt:89:5:89:10 | ; | Test.kt:89:9:89:10 | 10 | -| Test.kt:89:9:89:10 | 10 | Test.kt:89:5:89:10 | ...=... | -| Test.kt:90:5:90:9 | ; | Test.kt:90:9:90:9 | c | -| Test.kt:90:9:90:9 | c | Test.kt:90:5:90:9 | ...=... | -| Test.kt:92:4:93:9 | ; | Test.kt:92:4:93:9 | when ... | -| Test.kt:92:4:93:9 | when ... | Test.kt:92:8:93:9 | ... -> ... | -| Test.kt:92:8:92:8 | a | Test.kt:92:13:92:14 | 10 | -| Test.kt:92:8:92:14 | ... (value equals) ... | Test.kt:81:2:98:2 | Normal Exit | -| Test.kt:92:8:92:14 | ... (value equals) ... | Test.kt:93:5:93:9 | break | -| Test.kt:92:8:92:14 | ... (value equals) ... | Test.kt:94:4:95:12 | ; | -| Test.kt:92:8:93:9 | ... -> ... | Test.kt:92:8:92:8 | a | -| Test.kt:92:13:92:14 | 10 | Test.kt:92:8:92:14 | ... (value equals) ... | -| Test.kt:93:5:93:9 | break | Test.kt:97:10:97:10 | b | -| Test.kt:94:4:95:12 | ; | Test.kt:94:4:95:12 | when ... | -| Test.kt:94:4:95:12 | when ... | Test.kt:94:8:95:12 | ... -> ... | -| Test.kt:94:8:94:8 | a | Test.kt:94:13:94:14 | 20 | -| Test.kt:94:8:94:14 | ... (value equals) ... | Test.kt:95:12:95:12 | c | -| Test.kt:94:8:95:12 | ... -> ... | Test.kt:94:8:94:8 | a | -| Test.kt:94:13:94:14 | 20 | Test.kt:94:8:94:14 | ... (value equals) ... | -| Test.kt:95:12:95:12 | c | Test.kt:95:5:95:12 | return ... | -| Test.kt:97:10:97:10 | b | Test.kt:97:3:97:10 | return ... | +| Test.kt:2:43:79:2 | { ... } | Test.kt:11:14:14:3 | { ... } | +| Test.kt:2:43:79:2 | { ... } | Test.kt:14:10:16:3 | ... -> ... | +| Test.kt:2:43:79:2 | { ... } | Test.kt:18:3:18:20 | ; | +| Test.kt:18:3:18:20 | ; | Test.kt:2:2:79:2 | Normal Exit | +| Test.kt:18:3:18:20 | ; | Test.kt:22:4:22:9 | ; | +| Test.kt:18:3:18:20 | ; | Test.kt:24:4:24:11 | ... -> ... | +| Test.kt:22:4:22:9 | ; | Test.kt:30:7:30:12 | After ... (value equals) ... [false] | +| Test.kt:22:4:22:9 | ; | Test.kt:30:15:33:3 | { ... } | +| Test.kt:22:4:22:9 | ; | Test.kt:35:3:35:8 | ; | +| Test.kt:35:3:35:8 | ; | Test.kt:38:10:38:10 | x | +| Test.kt:38:10:38:10 | x | Test.kt:38:17:41:3 | { ... } | +| Test.kt:38:10:38:10 | x | Test.kt:43:3:43:15 | ; | +| Test.kt:81:25:98:2 | { ... } | Test.kt:86:9:86:12 | true | +| Test.kt:86:9:86:12 | true | Test.kt:88:8:88:14 | After ... > ... [false] | +| Test.kt:86:9:86:12 | true | Test.kt:88:17:91:4 | { ... } | +| Test.kt:86:9:86:12 | true | Test.kt:92:4:93:9 | ; | +| Test.kt:92:4:93:9 | ; | Test.kt:81:2:98:2 | Normal Exit | +| Test.kt:92:4:93:9 | ; | Test.kt:93:5:93:9 | break | +| Test.kt:92:4:93:9 | ; | Test.kt:94:4:95:12 | ; | +| Test.kt:94:4:95:12 | ; | Test.kt:94:8:94:14 | After ... (value equals) ... [false] | +| Test.kt:94:4:95:12 | ; | Test.kt:95:12:95:12 | c | diff --git a/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominator.ql b/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominator.ql index 701640bf7209..7fc18484febf 100644 --- a/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominator.ql +++ b/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominator.ql @@ -1,9 +1,9 @@ -import default -import semmle.code.java.controlflow.Dominance +import java +import utils.test.BasicBlock -from Method func, ControlFlowNode dominator, ControlFlowNode node +from Method func, BasicBlock dominator, BasicBlock bb where - iDominates(dominator, node) and - dominator.getEnclosingStmt().getEnclosingCallable() = func and + dominator.immediatelyDominates(bb) and + dominator.getEnclosingCallable() = func and func.getDeclaringType().hasName("Test") -select dominator, node +select getFirstAstNodeOrSynth(dominator), getFirstAstNodeOrSynth(bb) diff --git a/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominatorUnique.ql b/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominatorUnique.ql index eaf75ab7bfaa..54b0d1863624 100644 --- a/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominatorUnique.ql +++ b/java/ql/test-kotlin2/library-tests/controlflow/dominance/dominatorUnique.ql @@ -7,5 +7,5 @@ where iDominates(dom1, node) and iDominates(dom2, node) and dom1 != dom2 and - func = node.getEnclosingStmt().getEnclosingCallable() + func = node.getEnclosingCallable() select func, node, dom1, dom2 diff --git a/java/ql/test-kotlin2/library-tests/exprs/unaryOp.ql b/java/ql/test-kotlin2/library-tests/exprs/unaryOp.ql index 9e7359e1e075..bce290e4afc8 100644 --- a/java/ql/test-kotlin2/library-tests/exprs/unaryOp.ql +++ b/java/ql/test-kotlin2/library-tests/exprs/unaryOp.ql @@ -29,7 +29,7 @@ class NoMaybeElement extends MaybeElement { } MaybeElement op(UnaryExpr e) { - if exists(e.getExpr()) then result = TElement(e.getExpr()) else result = TNoElement() + if exists(e.getOperand()) then result = TElement(e.getOperand()) else result = TNoElement() } from Expr e diff --git a/java/ql/test/library-tests/controlflow/basic/bbStmts.expected b/java/ql/test/library-tests/controlflow/basic/bbStmts.expected index df336ce90a22..58b3e698771a 100644 --- a/java/ql/test/library-tests/controlflow/basic/bbStmts.expected +++ b/java/ql/test/library-tests/controlflow/basic/bbStmts.expected @@ -1,140 +1,296 @@ -| Test.java:3:14:3:17 | Exceptional Exit | 0 | Test.java:3:14:3:17 | Exceptional Exit | -| Test.java:3:14:3:17 | Exit | 0 | Test.java:3:14:3:17 | Exit | -| Test.java:3:14:3:17 | { ... } | 0 | Test.java:3:14:3:17 | { ... } | -| Test.java:3:14:3:17 | { ... } | 1 | Test.java:3:14:3:17 | super(...) | -| Test.java:3:14:3:17 | { ... } | 2 | Test.java:3:14:3:17 | Normal Exit | -| Test.java:4:14:4:17 | Exceptional Exit | 0 | Test.java:4:14:4:17 | Exceptional Exit | -| Test.java:4:14:4:17 | Exit | 0 | Test.java:4:14:4:17 | Exit | +| Test.java:3:14:3:17 | Entry | 0 | Test.java:3:14:3:17 | Entry | +| Test.java:3:14:3:17 | Entry | 1 | Test.java:3:14:3:17 | { ... } | +| Test.java:3:14:3:17 | Entry | 2 | Test.java:3:14:3:17 | Before super(...) | +| Test.java:3:14:3:17 | Entry | 3 | Test.java:3:14:3:17 | super(...) | +| Test.java:3:14:3:17 | Entry | 4 | Test.java:3:14:3:17 | After super(...) | +| Test.java:3:14:3:17 | Entry | 5 | Test.java:3:14:3:17 | After { ... } | +| Test.java:3:14:3:17 | Entry | 6 | Test.java:3:14:3:17 | Normal Exit | +| Test.java:3:14:3:17 | Entry | 7 | Test.java:3:14:3:17 | Exit | +| Test.java:4:14:4:17 | Entry | 0 | Test.java:4:14:4:17 | Entry | +| Test.java:4:14:4:17 | Entry | 1 | Test.java:4:21:76:2 | { ... } | +| Test.java:4:14:4:17 | Entry | 2 | Test.java:5:3:5:12 | var ...; | +| Test.java:4:14:4:17 | Entry | 3 | Test.java:5:7:5:11 | Before x | +| Test.java:4:14:4:17 | Entry | 4 | Test.java:5:11:5:11 | 0 | +| Test.java:4:14:4:17 | Entry | 5 | Test.java:5:7:5:11 | x | +| Test.java:4:14:4:17 | Entry | 6 | Test.java:5:7:5:11 | After x | +| Test.java:4:14:4:17 | Entry | 7 | Test.java:5:3:5:12 | After var ...; | +| Test.java:4:14:4:17 | Entry | 8 | Test.java:6:3:6:14 | var ...; | +| Test.java:4:14:4:17 | Entry | 9 | Test.java:6:8:6:13 | Before y | +| Test.java:4:14:4:17 | Entry | 10 | Test.java:6:12:6:13 | 50 | +| Test.java:4:14:4:17 | Entry | 11 | Test.java:6:8:6:13 | y | +| Test.java:4:14:4:17 | Entry | 12 | Test.java:6:8:6:13 | After y | +| Test.java:4:14:4:17 | Entry | 13 | Test.java:6:3:6:14 | After var ...; | +| Test.java:4:14:4:17 | Entry | 14 | Test.java:7:3:7:12 | var ...; | +| Test.java:4:14:4:17 | Entry | 15 | Test.java:7:7:7:11 | Before z | +| Test.java:4:14:4:17 | Entry | 16 | Test.java:7:11:7:11 | 0 | +| Test.java:4:14:4:17 | Entry | 17 | Test.java:7:7:7:11 | z | +| Test.java:4:14:4:17 | Entry | 18 | Test.java:7:7:7:11 | After z | +| Test.java:4:14:4:17 | Entry | 19 | Test.java:7:3:7:12 | After var ...; | +| Test.java:4:14:4:17 | Entry | 20 | Test.java:8:3:8:12 | var ...; | +| Test.java:4:14:4:17 | Entry | 21 | Test.java:8:7:8:11 | Before w | +| Test.java:4:14:4:17 | Entry | 22 | Test.java:8:11:8:11 | 0 | +| Test.java:4:14:4:17 | Entry | 23 | Test.java:8:7:8:11 | w | +| Test.java:4:14:4:17 | Entry | 24 | Test.java:8:7:8:11 | After w | +| Test.java:4:14:4:17 | Entry | 25 | Test.java:8:3:8:12 | After var ...; | +| Test.java:4:14:4:17 | Entry | 26 | Test.java:11:3:11:12 | if (...) | +| Test.java:4:14:4:17 | Entry | 27 | Test.java:11:7:11:11 | Before ... > ... | +| Test.java:4:14:4:17 | Entry | 28 | Test.java:11:7:11:7 | x | +| Test.java:4:14:4:17 | Entry | 29 | Test.java:11:11:11:11 | 0 | +| Test.java:4:14:4:17 | Entry | 30 | Test.java:11:7:11:11 | ... > ... | | Test.java:4:14:4:17 | Normal Exit | 0 | Test.java:4:14:4:17 | Normal Exit | -| Test.java:4:21:76:2 | { ... } | 0 | Test.java:4:21:76:2 | { ... } | -| Test.java:4:21:76:2 | { ... } | 1 | Test.java:5:3:5:12 | var ...; | -| Test.java:4:21:76:2 | { ... } | 2 | Test.java:5:11:5:11 | 0 | -| Test.java:4:21:76:2 | { ... } | 3 | Test.java:5:7:5:11 | x | -| Test.java:4:21:76:2 | { ... } | 4 | Test.java:6:3:6:14 | var ...; | -| Test.java:4:21:76:2 | { ... } | 5 | Test.java:6:12:6:13 | 50 | -| Test.java:4:21:76:2 | { ... } | 6 | Test.java:6:8:6:13 | y | -| Test.java:4:21:76:2 | { ... } | 7 | Test.java:7:3:7:12 | var ...; | -| Test.java:4:21:76:2 | { ... } | 8 | Test.java:7:11:7:11 | 0 | -| Test.java:4:21:76:2 | { ... } | 9 | Test.java:7:7:7:11 | z | -| Test.java:4:21:76:2 | { ... } | 10 | Test.java:8:3:8:12 | var ...; | -| Test.java:4:21:76:2 | { ... } | 11 | Test.java:8:11:8:11 | 0 | -| Test.java:4:21:76:2 | { ... } | 12 | Test.java:8:7:8:11 | w | -| Test.java:4:21:76:2 | { ... } | 13 | Test.java:11:3:11:12 | if (...) | -| Test.java:4:21:76:2 | { ... } | 14 | Test.java:11:7:11:7 | x | -| Test.java:4:21:76:2 | { ... } | 15 | Test.java:11:11:11:11 | 0 | -| Test.java:4:21:76:2 | { ... } | 16 | Test.java:11:7:11:11 | ... > ... | -| Test.java:11:14:14:3 | { ... } | 0 | Test.java:11:14:14:3 | { ... } | -| Test.java:11:14:14:3 | { ... } | 1 | Test.java:12:4:12:10 | ; | -| Test.java:11:14:14:3 | { ... } | 2 | Test.java:12:8:12:9 | 20 | -| Test.java:11:14:14:3 | { ... } | 3 | Test.java:12:4:12:9 | ...=... | -| Test.java:11:14:14:3 | { ... } | 4 | Test.java:13:4:13:10 | ; | -| Test.java:11:14:14:3 | { ... } | 5 | Test.java:13:8:13:9 | 10 | -| Test.java:11:14:14:3 | { ... } | 6 | Test.java:13:4:13:9 | ...=... | -| Test.java:14:10:16:3 | { ... } | 0 | Test.java:14:10:16:3 | { ... } | -| Test.java:14:10:16:3 | { ... } | 1 | Test.java:15:4:15:10 | ; | -| Test.java:14:10:16:3 | { ... } | 2 | Test.java:15:8:15:9 | 30 | -| Test.java:14:10:16:3 | { ... } | 3 | Test.java:15:4:15:9 | ...=... | -| Test.java:18:3:18:8 | ; | 0 | Test.java:18:3:18:8 | ; | -| Test.java:18:3:18:8 | ; | 1 | Test.java:18:7:18:7 | 0 | -| Test.java:18:3:18:8 | ; | 2 | Test.java:18:3:18:7 | ...=... | -| Test.java:18:3:18:8 | ; | 3 | Test.java:21:3:21:11 | if (...) | -| Test.java:18:3:18:8 | ; | 4 | Test.java:21:6:21:6 | x | -| Test.java:18:3:18:8 | ; | 5 | Test.java:21:10:21:10 | 0 | -| Test.java:18:3:18:8 | ; | 6 | Test.java:21:6:21:10 | ... < ... | -| Test.java:22:4:22:10 | ; | 0 | Test.java:22:4:22:10 | ; | -| Test.java:22:4:22:10 | ; | 1 | Test.java:22:8:22:9 | 40 | -| Test.java:22:4:22:10 | ; | 2 | Test.java:22:4:22:9 | ...=... | -| Test.java:22:4:22:10 | ; | 3 | Test.java:27:3:27:9 | ; | -| Test.java:22:4:22:10 | ; | 4 | Test.java:27:7:27:8 | 10 | -| Test.java:22:4:22:10 | ; | 5 | Test.java:27:3:27:8 | ...=... | -| Test.java:22:4:22:10 | ; | 6 | Test.java:30:3:30:13 | if (...) | -| Test.java:22:4:22:10 | ; | 7 | Test.java:30:7:30:7 | x | -| Test.java:22:4:22:10 | ; | 8 | Test.java:30:12:30:12 | 0 | -| Test.java:22:4:22:10 | ; | 9 | Test.java:30:7:30:12 | ... == ... | -| Test.java:24:4:24:10 | return ... | 0 | Test.java:24:4:24:10 | return ... | -| Test.java:30:15:33:3 | { ... } | 0 | Test.java:30:15:33:3 | { ... } | -| Test.java:30:15:33:3 | { ... } | 1 | Test.java:31:4:31:10 | ; | -| Test.java:30:15:33:3 | { ... } | 2 | Test.java:31:8:31:9 | 60 | -| Test.java:30:15:33:3 | { ... } | 3 | Test.java:31:4:31:9 | ...=... | -| Test.java:30:15:33:3 | { ... } | 4 | Test.java:32:4:32:10 | ; | -| Test.java:30:15:33:3 | { ... } | 5 | Test.java:32:8:32:9 | 10 | -| Test.java:30:15:33:3 | { ... } | 6 | Test.java:32:4:32:9 | ...=... | -| Test.java:35:3:35:9 | ; | 0 | Test.java:35:3:35:9 | ; | -| Test.java:35:3:35:9 | ; | 1 | Test.java:35:7:35:8 | 20 | -| Test.java:35:3:35:9 | ; | 2 | Test.java:35:3:35:8 | ...=... | -| Test.java:35:3:35:9 | ; | 3 | Test.java:38:3:38:14 | while (...) | -| Test.java:38:9:38:9 | x | 0 | Test.java:38:9:38:9 | x | -| Test.java:38:9:38:9 | x | 1 | Test.java:38:13:38:13 | 0 | -| Test.java:38:9:38:9 | x | 2 | Test.java:38:9:38:13 | ... > ... | -| Test.java:38:16:41:3 | { ... } | 0 | Test.java:38:16:41:3 | { ... } | -| Test.java:38:16:41:3 | { ... } | 1 | Test.java:39:4:39:10 | ; | -| Test.java:38:16:41:3 | { ... } | 2 | Test.java:39:8:39:9 | 10 | -| Test.java:38:16:41:3 | { ... } | 3 | Test.java:39:4:39:9 | ...=... | -| Test.java:38:16:41:3 | { ... } | 4 | Test.java:40:4:40:7 | ; | -| Test.java:38:16:41:3 | { ... } | 5 | Test.java:40:4:40:4 | x | -| Test.java:38:16:41:3 | { ... } | 6 | Test.java:40:4:40:6 | ...-- | -| Test.java:43:3:43:9 | ; | 0 | Test.java:43:3:43:9 | ; | -| Test.java:43:3:43:9 | ; | 1 | Test.java:43:7:43:8 | 30 | -| Test.java:43:3:43:9 | ; | 2 | Test.java:43:3:43:8 | ...=... | -| Test.java:43:3:43:9 | ; | 3 | Test.java:46:3:46:29 | for (...;...;...) | -| Test.java:43:3:43:9 | ; | 4 | Test.java:46:15:46:15 | 0 | -| Test.java:43:3:43:9 | ; | 5 | Test.java:46:11:46:15 | j | -| Test.java:46:18:46:18 | j | 0 | Test.java:46:18:46:18 | j | -| Test.java:46:18:46:18 | j | 1 | Test.java:46:22:46:23 | 10 | -| Test.java:46:18:46:18 | j | 2 | Test.java:46:18:46:23 | ... < ... | -| Test.java:46:31:49:3 | { ... } | 0 | Test.java:46:31:49:3 | { ... } | -| Test.java:46:31:49:3 | { ... } | 1 | Test.java:47:4:47:9 | ; | -| Test.java:46:31:49:3 | { ... } | 2 | Test.java:47:8:47:8 | 0 | -| Test.java:46:31:49:3 | { ... } | 3 | Test.java:47:4:47:8 | ...=... | -| Test.java:46:31:49:3 | { ... } | 4 | Test.java:48:4:48:10 | ; | -| Test.java:46:31:49:3 | { ... } | 5 | Test.java:48:8:48:9 | 10 | -| Test.java:46:31:49:3 | { ... } | 6 | Test.java:48:4:48:9 | ...=... | -| Test.java:46:31:49:3 | { ... } | 7 | Test.java:46:26:46:26 | j | -| Test.java:46:31:49:3 | { ... } | 8 | Test.java:46:26:46:28 | ...++ | -| Test.java:51:3:51:9 | ; | 0 | Test.java:51:3:51:9 | ; | -| Test.java:51:3:51:9 | ; | 1 | Test.java:51:7:51:8 | 40 | -| Test.java:51:3:51:9 | ; | 2 | Test.java:51:3:51:8 | ...=... | -| Test.java:51:3:51:9 | ; | 3 | Test.java:54:3:54:29 | for (...;...;...) | -| Test.java:51:3:51:9 | ; | 4 | Test.java:54:15:54:15 | 0 | -| Test.java:51:3:51:9 | ; | 5 | Test.java:54:11:54:15 | j | -| Test.java:54:18:54:18 | j | 0 | Test.java:54:18:54:18 | j | -| Test.java:54:18:54:18 | j | 1 | Test.java:54:22:54:23 | 10 | -| Test.java:54:18:54:18 | j | 2 | Test.java:54:18:54:23 | ... < ... | -| Test.java:54:26:54:26 | j | 0 | Test.java:54:26:54:26 | j | -| Test.java:54:26:54:26 | j | 1 | Test.java:54:26:54:28 | ...++ | -| Test.java:54:31:68:3 | { ... } | 0 | Test.java:54:31:68:3 | { ... } | -| Test.java:54:31:68:3 | { ... } | 1 | Test.java:55:4:55:10 | ; | -| Test.java:54:31:68:3 | { ... } | 2 | Test.java:55:8:55:9 | 30 | -| Test.java:54:31:68:3 | { ... } | 3 | Test.java:55:4:55:9 | ...=... | -| Test.java:54:31:68:3 | { ... } | 4 | Test.java:56:4:56:12 | if (...) | -| Test.java:54:31:68:3 | { ... } | 5 | Test.java:56:7:56:7 | z | -| Test.java:54:31:68:3 | { ... } | 6 | Test.java:56:11:56:11 | 0 | -| Test.java:54:31:68:3 | { ... } | 7 | Test.java:56:7:56:11 | ... > ... | -| Test.java:57:5:57:13 | if (...) | 0 | Test.java:57:5:57:13 | if (...) | -| Test.java:57:5:57:13 | if (...) | 1 | Test.java:57:8:57:8 | y | -| Test.java:57:5:57:13 | if (...) | 2 | Test.java:57:12:57:12 | 0 | -| Test.java:57:5:57:13 | if (...) | 3 | Test.java:57:8:57:12 | ... > ... | -| Test.java:57:15:60:5 | { ... } | 0 | Test.java:57:15:60:5 | { ... } | -| Test.java:57:15:60:5 | { ... } | 1 | Test.java:58:6:58:11 | ; | -| Test.java:57:15:60:5 | { ... } | 2 | Test.java:58:10:58:10 | 0 | -| Test.java:57:15:60:5 | { ... } | 3 | Test.java:58:6:58:10 | ...=... | -| Test.java:57:15:60:5 | { ... } | 4 | Test.java:59:6:59:11 | break | -| Test.java:60:12:62:5 | { ... } | 0 | Test.java:60:12:62:5 | { ... } | -| Test.java:60:12:62:5 | { ... } | 1 | Test.java:61:6:61:12 | ; | -| Test.java:60:12:62:5 | { ... } | 2 | Test.java:61:10:61:11 | 20 | -| Test.java:60:12:62:5 | { ... } | 3 | Test.java:61:6:61:11 | ...=... | -| Test.java:60:12:62:5 | { ... } | 4 | Test.java:67:4:67:9 | ; | -| Test.java:60:12:62:5 | { ... } | 5 | Test.java:67:8:67:8 | 0 | -| Test.java:60:12:62:5 | { ... } | 6 | Test.java:67:4:67:8 | ...=... | -| Test.java:63:9:66:4 | { ... } | 0 | Test.java:63:9:66:4 | { ... } | -| Test.java:63:9:66:4 | { ... } | 1 | Test.java:64:5:64:11 | ; | -| Test.java:63:9:66:4 | { ... } | 2 | Test.java:64:9:64:10 | 10 | -| Test.java:63:9:66:4 | { ... } | 3 | Test.java:64:5:64:10 | ...=... | -| Test.java:63:9:66:4 | { ... } | 4 | Test.java:65:5:65:13 | continue | -| Test.java:70:3:70:9 | ; | 0 | Test.java:70:3:70:9 | ; | -| Test.java:70:3:70:9 | ; | 1 | Test.java:70:7:70:8 | 50 | -| Test.java:70:3:70:9 | ; | 2 | Test.java:70:3:70:8 | ...=... | -| Test.java:70:3:70:9 | ; | 3 | Test.java:74:3:74:9 | ; | -| Test.java:70:3:70:9 | ; | 4 | Test.java:74:7:74:8 | 40 | -| Test.java:70:3:70:9 | ; | 5 | Test.java:74:3:74:8 | ...=... | -| Test.java:70:3:70:9 | ; | 6 | Test.java:75:3:75:9 | return ... | +| Test.java:4:14:4:17 | Normal Exit | 1 | Test.java:4:14:4:17 | Exit | +| Test.java:11:3:11:12 | After if (...) | 0 | Test.java:11:3:11:12 | After if (...) | +| Test.java:11:3:11:12 | After if (...) | 1 | Test.java:18:3:18:8 | ; | +| Test.java:11:3:11:12 | After if (...) | 2 | Test.java:18:3:18:7 | Before ...=... | +| Test.java:11:3:11:12 | After if (...) | 3 | Test.java:18:3:18:3 | z | +| Test.java:11:3:11:12 | After if (...) | 4 | Test.java:18:7:18:7 | 0 | +| Test.java:11:3:11:12 | After if (...) | 5 | Test.java:18:3:18:7 | ...=... | +| Test.java:11:3:11:12 | After if (...) | 6 | Test.java:18:3:18:7 | After ...=... | +| Test.java:11:3:11:12 | After if (...) | 7 | Test.java:18:3:18:8 | After ; | +| Test.java:11:3:11:12 | After if (...) | 8 | Test.java:21:3:21:11 | if (...) | +| Test.java:11:3:11:12 | After if (...) | 9 | Test.java:21:6:21:10 | Before ... < ... | +| Test.java:11:3:11:12 | After if (...) | 10 | Test.java:21:6:21:6 | x | +| Test.java:11:3:11:12 | After if (...) | 11 | Test.java:21:10:21:10 | 0 | +| Test.java:11:3:11:12 | After if (...) | 12 | Test.java:21:6:21:10 | ... < ... | +| Test.java:11:7:11:11 | After ... > ... [false] | 0 | Test.java:11:7:11:11 | After ... > ... [false] | +| Test.java:11:7:11:11 | After ... > ... [false] | 1 | Test.java:14:10:16:3 | { ... } | +| Test.java:11:7:11:11 | After ... > ... [false] | 2 | Test.java:15:4:15:10 | ; | +| Test.java:11:7:11:11 | After ... > ... [false] | 3 | Test.java:15:4:15:9 | Before ...=... | +| Test.java:11:7:11:11 | After ... > ... [false] | 4 | Test.java:15:4:15:4 | y | +| Test.java:11:7:11:11 | After ... > ... [false] | 5 | Test.java:15:8:15:9 | 30 | +| Test.java:11:7:11:11 | After ... > ... [false] | 6 | Test.java:15:4:15:9 | ...=... | +| Test.java:11:7:11:11 | After ... > ... [false] | 7 | Test.java:15:4:15:9 | After ...=... | +| Test.java:11:7:11:11 | After ... > ... [false] | 8 | Test.java:15:4:15:10 | After ; | +| Test.java:11:7:11:11 | After ... > ... [false] | 9 | Test.java:14:10:16:3 | After { ... } | +| Test.java:11:7:11:11 | After ... > ... [true] | 0 | Test.java:11:7:11:11 | After ... > ... [true] | +| Test.java:11:7:11:11 | After ... > ... [true] | 1 | Test.java:11:14:14:3 | { ... } | +| Test.java:11:7:11:11 | After ... > ... [true] | 2 | Test.java:12:4:12:10 | ; | +| Test.java:11:7:11:11 | After ... > ... [true] | 3 | Test.java:12:4:12:9 | Before ...=... | +| Test.java:11:7:11:11 | After ... > ... [true] | 4 | Test.java:12:4:12:4 | y | +| Test.java:11:7:11:11 | After ... > ... [true] | 5 | Test.java:12:8:12:9 | 20 | +| Test.java:11:7:11:11 | After ... > ... [true] | 6 | Test.java:12:4:12:9 | ...=... | +| Test.java:11:7:11:11 | After ... > ... [true] | 7 | Test.java:12:4:12:9 | After ...=... | +| Test.java:11:7:11:11 | After ... > ... [true] | 8 | Test.java:12:4:12:10 | After ; | +| Test.java:11:7:11:11 | After ... > ... [true] | 9 | Test.java:13:4:13:10 | ; | +| Test.java:11:7:11:11 | After ... > ... [true] | 10 | Test.java:13:4:13:9 | Before ...=... | +| Test.java:11:7:11:11 | After ... > ... [true] | 11 | Test.java:13:4:13:4 | z | +| Test.java:11:7:11:11 | After ... > ... [true] | 12 | Test.java:13:8:13:9 | 10 | +| Test.java:11:7:11:11 | After ... > ... [true] | 13 | Test.java:13:4:13:9 | ...=... | +| Test.java:11:7:11:11 | After ... > ... [true] | 14 | Test.java:13:4:13:9 | After ...=... | +| Test.java:11:7:11:11 | After ... > ... [true] | 15 | Test.java:13:4:13:10 | After ; | +| Test.java:11:7:11:11 | After ... > ... [true] | 16 | Test.java:11:14:14:3 | After { ... } | +| Test.java:21:6:21:10 | After ... < ... [false] | 0 | Test.java:21:6:21:10 | After ... < ... [false] | +| Test.java:21:6:21:10 | After ... < ... [false] | 1 | Test.java:24:4:24:10 | Before return ... | +| Test.java:21:6:21:10 | After ... < ... [false] | 2 | Test.java:24:4:24:10 | return ... | +| Test.java:21:6:21:10 | After ... < ... [true] | 0 | Test.java:21:6:21:10 | After ... < ... [true] | +| Test.java:21:6:21:10 | After ... < ... [true] | 1 | Test.java:22:4:22:10 | ; | +| Test.java:21:6:21:10 | After ... < ... [true] | 2 | Test.java:22:4:22:9 | Before ...=... | +| Test.java:21:6:21:10 | After ... < ... [true] | 3 | Test.java:22:4:22:4 | y | +| Test.java:21:6:21:10 | After ... < ... [true] | 4 | Test.java:22:8:22:9 | 40 | +| Test.java:21:6:21:10 | After ... < ... [true] | 5 | Test.java:22:4:22:9 | ...=... | +| Test.java:21:6:21:10 | After ... < ... [true] | 6 | Test.java:22:4:22:9 | After ...=... | +| Test.java:21:6:21:10 | After ... < ... [true] | 7 | Test.java:22:4:22:10 | After ; | +| Test.java:21:6:21:10 | After ... < ... [true] | 8 | Test.java:21:3:21:11 | After if (...) | +| Test.java:21:6:21:10 | After ... < ... [true] | 9 | Test.java:27:3:27:9 | ; | +| Test.java:21:6:21:10 | After ... < ... [true] | 10 | Test.java:27:3:27:8 | Before ...=... | +| Test.java:21:6:21:10 | After ... < ... [true] | 11 | Test.java:27:3:27:3 | z | +| Test.java:21:6:21:10 | After ... < ... [true] | 12 | Test.java:27:7:27:8 | 10 | +| Test.java:21:6:21:10 | After ... < ... [true] | 13 | Test.java:27:3:27:8 | ...=... | +| Test.java:21:6:21:10 | After ... < ... [true] | 14 | Test.java:27:3:27:8 | After ...=... | +| Test.java:21:6:21:10 | After ... < ... [true] | 15 | Test.java:27:3:27:9 | After ; | +| Test.java:21:6:21:10 | After ... < ... [true] | 16 | Test.java:30:3:30:13 | if (...) | +| Test.java:21:6:21:10 | After ... < ... [true] | 17 | Test.java:30:7:30:12 | Before ... == ... | +| Test.java:21:6:21:10 | After ... < ... [true] | 18 | Test.java:30:7:30:7 | x | +| Test.java:21:6:21:10 | After ... < ... [true] | 19 | Test.java:30:12:30:12 | 0 | +| Test.java:21:6:21:10 | After ... < ... [true] | 20 | Test.java:30:7:30:12 | ... == ... | +| Test.java:30:3:30:13 | After if (...) | 0 | Test.java:30:3:30:13 | After if (...) | +| Test.java:30:3:30:13 | After if (...) | 1 | Test.java:35:3:35:9 | ; | +| Test.java:30:3:30:13 | After if (...) | 2 | Test.java:35:3:35:8 | Before ...=... | +| Test.java:30:3:30:13 | After if (...) | 3 | Test.java:35:3:35:3 | z | +| Test.java:30:3:30:13 | After if (...) | 4 | Test.java:35:7:35:8 | 20 | +| Test.java:30:3:30:13 | After if (...) | 5 | Test.java:35:3:35:8 | ...=... | +| Test.java:30:3:30:13 | After if (...) | 6 | Test.java:35:3:35:8 | After ...=... | +| Test.java:30:3:30:13 | After if (...) | 7 | Test.java:35:3:35:9 | After ; | +| Test.java:30:3:30:13 | After if (...) | 8 | Test.java:38:3:38:14 | while (...) | +| Test.java:30:7:30:12 | After ... == ... [false] | 0 | Test.java:30:7:30:12 | After ... == ... [false] | +| Test.java:30:7:30:12 | After ... == ... [true] | 0 | Test.java:30:7:30:12 | After ... == ... [true] | +| Test.java:30:7:30:12 | After ... == ... [true] | 1 | Test.java:30:15:33:3 | { ... } | +| Test.java:30:7:30:12 | After ... == ... [true] | 2 | Test.java:31:4:31:10 | ; | +| Test.java:30:7:30:12 | After ... == ... [true] | 3 | Test.java:31:4:31:9 | Before ...=... | +| Test.java:30:7:30:12 | After ... == ... [true] | 4 | Test.java:31:4:31:4 | y | +| Test.java:30:7:30:12 | After ... == ... [true] | 5 | Test.java:31:8:31:9 | 60 | +| Test.java:30:7:30:12 | After ... == ... [true] | 6 | Test.java:31:4:31:9 | ...=... | +| Test.java:30:7:30:12 | After ... == ... [true] | 7 | Test.java:31:4:31:9 | After ...=... | +| Test.java:30:7:30:12 | After ... == ... [true] | 8 | Test.java:31:4:31:10 | After ; | +| Test.java:30:7:30:12 | After ... == ... [true] | 9 | Test.java:32:4:32:10 | ; | +| Test.java:30:7:30:12 | After ... == ... [true] | 10 | Test.java:32:4:32:9 | Before ...=... | +| Test.java:30:7:30:12 | After ... == ... [true] | 11 | Test.java:32:4:32:4 | z | +| Test.java:30:7:30:12 | After ... == ... [true] | 12 | Test.java:32:8:32:9 | 10 | +| Test.java:30:7:30:12 | After ... == ... [true] | 13 | Test.java:32:4:32:9 | ...=... | +| Test.java:30:7:30:12 | After ... == ... [true] | 14 | Test.java:32:4:32:9 | After ...=... | +| Test.java:30:7:30:12 | After ... == ... [true] | 15 | Test.java:32:4:32:10 | After ; | +| Test.java:30:7:30:12 | After ... == ... [true] | 16 | Test.java:30:15:33:3 | After { ... } | +| Test.java:38:3:38:14 | [LoopHeader] while (...) | 0 | Test.java:38:3:38:14 | [LoopHeader] while (...) | +| Test.java:38:3:38:14 | [LoopHeader] while (...) | 1 | Test.java:38:9:38:13 | Before ... > ... | +| Test.java:38:3:38:14 | [LoopHeader] while (...) | 2 | Test.java:38:9:38:9 | x | +| Test.java:38:3:38:14 | [LoopHeader] while (...) | 3 | Test.java:38:13:38:13 | 0 | +| Test.java:38:3:38:14 | [LoopHeader] while (...) | 4 | Test.java:38:9:38:13 | ... > ... | +| Test.java:38:9:38:13 | After ... > ... [false] | 0 | Test.java:38:9:38:13 | After ... > ... [false] | +| Test.java:38:9:38:13 | After ... > ... [false] | 1 | Test.java:38:3:38:14 | After while (...) | +| Test.java:38:9:38:13 | After ... > ... [false] | 2 | Test.java:43:3:43:9 | ; | +| Test.java:38:9:38:13 | After ... > ... [false] | 3 | Test.java:43:3:43:8 | Before ...=... | +| Test.java:38:9:38:13 | After ... > ... [false] | 4 | Test.java:43:3:43:3 | z | +| Test.java:38:9:38:13 | After ... > ... [false] | 5 | Test.java:43:7:43:8 | 30 | +| Test.java:38:9:38:13 | After ... > ... [false] | 6 | Test.java:43:3:43:8 | ...=... | +| Test.java:38:9:38:13 | After ... > ... [false] | 7 | Test.java:43:3:43:8 | After ...=... | +| Test.java:38:9:38:13 | After ... > ... [false] | 8 | Test.java:43:3:43:9 | After ; | +| Test.java:38:9:38:13 | After ... > ... [false] | 9 | Test.java:46:3:46:29 | for (...;...;...) | +| Test.java:38:9:38:13 | After ... > ... [false] | 10 | Test.java:46:11:46:15 | Before j | +| Test.java:38:9:38:13 | After ... > ... [false] | 11 | Test.java:46:15:46:15 | 0 | +| Test.java:38:9:38:13 | After ... > ... [false] | 12 | Test.java:46:11:46:15 | j | +| Test.java:38:9:38:13 | After ... > ... [false] | 13 | Test.java:46:11:46:15 | After j | +| Test.java:38:9:38:13 | After ... > ... [true] | 0 | Test.java:38:9:38:13 | After ... > ... [true] | +| Test.java:38:9:38:13 | After ... > ... [true] | 1 | Test.java:38:16:41:3 | { ... } | +| Test.java:38:9:38:13 | After ... > ... [true] | 2 | Test.java:39:4:39:10 | ; | +| Test.java:38:9:38:13 | After ... > ... [true] | 3 | Test.java:39:4:39:9 | Before ...=... | +| Test.java:38:9:38:13 | After ... > ... [true] | 4 | Test.java:39:4:39:4 | y | +| Test.java:38:9:38:13 | After ... > ... [true] | 5 | Test.java:39:8:39:9 | 10 | +| Test.java:38:9:38:13 | After ... > ... [true] | 6 | Test.java:39:4:39:9 | ...=... | +| Test.java:38:9:38:13 | After ... > ... [true] | 7 | Test.java:39:4:39:9 | After ...=... | +| Test.java:38:9:38:13 | After ... > ... [true] | 8 | Test.java:39:4:39:10 | After ; | +| Test.java:38:9:38:13 | After ... > ... [true] | 9 | Test.java:40:4:40:7 | ; | +| Test.java:38:9:38:13 | After ... > ... [true] | 10 | Test.java:40:4:40:6 | Before ...-- | +| Test.java:38:9:38:13 | After ... > ... [true] | 11 | Test.java:40:4:40:4 | x | +| Test.java:38:9:38:13 | After ... > ... [true] | 12 | Test.java:40:4:40:6 | ...-- | +| Test.java:38:9:38:13 | After ... > ... [true] | 13 | Test.java:40:4:40:6 | After ...-- | +| Test.java:38:9:38:13 | After ... > ... [true] | 14 | Test.java:40:4:40:7 | After ; | +| Test.java:38:9:38:13 | After ... > ... [true] | 15 | Test.java:38:16:41:3 | After { ... } | +| Test.java:46:18:46:23 | After ... < ... [false] | 0 | Test.java:46:18:46:23 | After ... < ... [false] | +| Test.java:46:18:46:23 | After ... < ... [false] | 1 | Test.java:46:3:46:29 | After for (...;...;...) | +| Test.java:46:18:46:23 | After ... < ... [false] | 2 | Test.java:51:3:51:9 | ; | +| Test.java:46:18:46:23 | After ... < ... [false] | 3 | Test.java:51:3:51:8 | Before ...=... | +| Test.java:46:18:46:23 | After ... < ... [false] | 4 | Test.java:51:3:51:3 | z | +| Test.java:46:18:46:23 | After ... < ... [false] | 5 | Test.java:51:7:51:8 | 40 | +| Test.java:46:18:46:23 | After ... < ... [false] | 6 | Test.java:51:3:51:8 | ...=... | +| Test.java:46:18:46:23 | After ... < ... [false] | 7 | Test.java:51:3:51:8 | After ...=... | +| Test.java:46:18:46:23 | After ... < ... [false] | 8 | Test.java:51:3:51:9 | After ; | +| Test.java:46:18:46:23 | After ... < ... [false] | 9 | Test.java:54:3:54:29 | for (...;...;...) | +| Test.java:46:18:46:23 | After ... < ... [false] | 10 | Test.java:54:11:54:15 | Before j | +| Test.java:46:18:46:23 | After ... < ... [false] | 11 | Test.java:54:15:54:15 | 0 | +| Test.java:46:18:46:23 | After ... < ... [false] | 12 | Test.java:54:11:54:15 | j | +| Test.java:46:18:46:23 | After ... < ... [false] | 13 | Test.java:54:11:54:15 | After j | +| Test.java:46:18:46:23 | After ... < ... [true] | 0 | Test.java:46:18:46:23 | After ... < ... [true] | +| Test.java:46:18:46:23 | After ... < ... [true] | 1 | Test.java:46:31:49:3 | { ... } | +| Test.java:46:18:46:23 | After ... < ... [true] | 2 | Test.java:47:4:47:9 | ; | +| Test.java:46:18:46:23 | After ... < ... [true] | 3 | Test.java:47:4:47:8 | Before ...=... | +| Test.java:46:18:46:23 | After ... < ... [true] | 4 | Test.java:47:4:47:4 | y | +| Test.java:46:18:46:23 | After ... < ... [true] | 5 | Test.java:47:8:47:8 | 0 | +| Test.java:46:18:46:23 | After ... < ... [true] | 6 | Test.java:47:4:47:8 | ...=... | +| Test.java:46:18:46:23 | After ... < ... [true] | 7 | Test.java:47:4:47:8 | After ...=... | +| Test.java:46:18:46:23 | After ... < ... [true] | 8 | Test.java:47:4:47:9 | After ; | +| Test.java:46:18:46:23 | After ... < ... [true] | 9 | Test.java:48:4:48:10 | ; | +| Test.java:46:18:46:23 | After ... < ... [true] | 10 | Test.java:48:4:48:9 | Before ...=... | +| Test.java:46:18:46:23 | After ... < ... [true] | 11 | Test.java:48:4:48:4 | w | +| Test.java:46:18:46:23 | After ... < ... [true] | 12 | Test.java:48:8:48:9 | 10 | +| Test.java:46:18:46:23 | After ... < ... [true] | 13 | Test.java:48:4:48:9 | ...=... | +| Test.java:46:18:46:23 | After ... < ... [true] | 14 | Test.java:48:4:48:9 | After ...=... | +| Test.java:46:18:46:23 | After ... < ... [true] | 15 | Test.java:48:4:48:10 | After ; | +| Test.java:46:18:46:23 | After ... < ... [true] | 16 | Test.java:46:31:49:3 | After { ... } | +| Test.java:46:18:46:23 | After ... < ... [true] | 17 | Test.java:46:3:46:29 | [LoopHeader] for (...;...;...) | +| Test.java:46:18:46:23 | After ... < ... [true] | 18 | Test.java:46:26:46:28 | Before ...++ | +| Test.java:46:18:46:23 | After ... < ... [true] | 19 | Test.java:46:26:46:26 | j | +| Test.java:46:18:46:23 | After ... < ... [true] | 20 | Test.java:46:26:46:28 | ...++ | +| Test.java:46:18:46:23 | After ... < ... [true] | 21 | Test.java:46:26:46:28 | After ...++ | +| Test.java:46:18:46:23 | Before ... < ... | 0 | Test.java:46:18:46:23 | Before ... < ... | +| Test.java:46:18:46:23 | Before ... < ... | 1 | Test.java:46:18:46:18 | j | +| Test.java:46:18:46:23 | Before ... < ... | 2 | Test.java:46:22:46:23 | 10 | +| Test.java:46:18:46:23 | Before ... < ... | 3 | Test.java:46:18:46:23 | ... < ... | +| Test.java:54:3:54:29 | After for (...;...;...) | 0 | Test.java:54:3:54:29 | After for (...;...;...) | +| Test.java:54:3:54:29 | After for (...;...;...) | 1 | Test.java:70:3:70:9 | ; | +| Test.java:54:3:54:29 | After for (...;...;...) | 2 | Test.java:70:3:70:8 | Before ...=... | +| Test.java:54:3:54:29 | After for (...;...;...) | 3 | Test.java:70:3:70:3 | z | +| Test.java:54:3:54:29 | After for (...;...;...) | 4 | Test.java:70:7:70:8 | 50 | +| Test.java:54:3:54:29 | After for (...;...;...) | 5 | Test.java:70:3:70:8 | ...=... | +| Test.java:54:3:54:29 | After for (...;...;...) | 6 | Test.java:70:3:70:8 | After ...=... | +| Test.java:54:3:54:29 | After for (...;...;...) | 7 | Test.java:70:3:70:9 | After ; | +| Test.java:54:3:54:29 | After for (...;...;...) | 8 | Test.java:74:3:74:9 | ; | +| Test.java:54:3:54:29 | After for (...;...;...) | 9 | Test.java:74:3:74:8 | Before ...=... | +| Test.java:54:3:54:29 | After for (...;...;...) | 10 | Test.java:74:3:74:3 | w | +| Test.java:54:3:54:29 | After for (...;...;...) | 11 | Test.java:74:7:74:8 | 40 | +| Test.java:54:3:54:29 | After for (...;...;...) | 12 | Test.java:74:3:74:8 | ...=... | +| Test.java:54:3:54:29 | After for (...;...;...) | 13 | Test.java:74:3:74:8 | After ...=... | +| Test.java:54:3:54:29 | After for (...;...;...) | 14 | Test.java:74:3:74:9 | After ; | +| Test.java:54:3:54:29 | After for (...;...;...) | 15 | Test.java:75:3:75:9 | Before return ... | +| Test.java:54:3:54:29 | After for (...;...;...) | 16 | Test.java:75:3:75:9 | return ... | +| Test.java:54:3:54:29 | [LoopHeader] for (...;...;...) | 0 | Test.java:54:3:54:29 | [LoopHeader] for (...;...;...) | +| Test.java:54:3:54:29 | [LoopHeader] for (...;...;...) | 1 | Test.java:54:26:54:28 | Before ...++ | +| Test.java:54:3:54:29 | [LoopHeader] for (...;...;...) | 2 | Test.java:54:26:54:26 | j | +| Test.java:54:3:54:29 | [LoopHeader] for (...;...;...) | 3 | Test.java:54:26:54:28 | ...++ | +| Test.java:54:3:54:29 | [LoopHeader] for (...;...;...) | 4 | Test.java:54:26:54:28 | After ...++ | +| Test.java:54:18:54:23 | After ... < ... [false] | 0 | Test.java:54:18:54:23 | After ... < ... [false] | +| Test.java:54:18:54:23 | After ... < ... [true] | 0 | Test.java:54:18:54:23 | After ... < ... [true] | +| Test.java:54:18:54:23 | After ... < ... [true] | 1 | Test.java:54:31:68:3 | { ... } | +| Test.java:54:18:54:23 | After ... < ... [true] | 2 | Test.java:55:4:55:10 | ; | +| Test.java:54:18:54:23 | After ... < ... [true] | 3 | Test.java:55:4:55:9 | Before ...=... | +| Test.java:54:18:54:23 | After ... < ... [true] | 4 | Test.java:55:4:55:4 | y | +| Test.java:54:18:54:23 | After ... < ... [true] | 5 | Test.java:55:8:55:9 | 30 | +| Test.java:54:18:54:23 | After ... < ... [true] | 6 | Test.java:55:4:55:9 | ...=... | +| Test.java:54:18:54:23 | After ... < ... [true] | 7 | Test.java:55:4:55:9 | After ...=... | +| Test.java:54:18:54:23 | After ... < ... [true] | 8 | Test.java:55:4:55:10 | After ; | +| Test.java:54:18:54:23 | After ... < ... [true] | 9 | Test.java:56:4:56:12 | if (...) | +| Test.java:54:18:54:23 | After ... < ... [true] | 10 | Test.java:56:7:56:11 | Before ... > ... | +| Test.java:54:18:54:23 | After ... < ... [true] | 11 | Test.java:56:7:56:7 | z | +| Test.java:54:18:54:23 | After ... < ... [true] | 12 | Test.java:56:11:56:11 | 0 | +| Test.java:54:18:54:23 | After ... < ... [true] | 13 | Test.java:56:7:56:11 | ... > ... | +| Test.java:54:18:54:23 | Before ... < ... | 0 | Test.java:54:18:54:23 | Before ... < ... | +| Test.java:54:18:54:23 | Before ... < ... | 1 | Test.java:54:18:54:18 | j | +| Test.java:54:18:54:23 | Before ... < ... | 2 | Test.java:54:22:54:23 | 10 | +| Test.java:54:18:54:23 | Before ... < ... | 3 | Test.java:54:18:54:23 | ... < ... | +| Test.java:56:7:56:11 | After ... > ... [false] | 0 | Test.java:56:7:56:11 | After ... > ... [false] | +| Test.java:56:7:56:11 | After ... > ... [false] | 1 | Test.java:63:9:66:4 | { ... } | +| Test.java:56:7:56:11 | After ... > ... [false] | 2 | Test.java:64:5:64:11 | ; | +| Test.java:56:7:56:11 | After ... > ... [false] | 3 | Test.java:64:5:64:10 | Before ...=... | +| Test.java:56:7:56:11 | After ... > ... [false] | 4 | Test.java:64:5:64:5 | w | +| Test.java:56:7:56:11 | After ... > ... [false] | 5 | Test.java:64:9:64:10 | 10 | +| Test.java:56:7:56:11 | After ... > ... [false] | 6 | Test.java:64:5:64:10 | ...=... | +| Test.java:56:7:56:11 | After ... > ... [false] | 7 | Test.java:64:5:64:10 | After ...=... | +| Test.java:56:7:56:11 | After ... > ... [false] | 8 | Test.java:64:5:64:11 | After ; | +| Test.java:56:7:56:11 | After ... > ... [false] | 9 | Test.java:65:5:65:13 | Before continue | +| Test.java:56:7:56:11 | After ... > ... [false] | 10 | Test.java:65:5:65:13 | continue | +| Test.java:56:7:56:11 | After ... > ... [true] | 0 | Test.java:56:7:56:11 | After ... > ... [true] | +| Test.java:56:7:56:11 | After ... > ... [true] | 1 | Test.java:57:5:57:13 | if (...) | +| Test.java:56:7:56:11 | After ... > ... [true] | 2 | Test.java:57:8:57:12 | Before ... > ... | +| Test.java:56:7:56:11 | After ... > ... [true] | 3 | Test.java:57:8:57:8 | y | +| Test.java:56:7:56:11 | After ... > ... [true] | 4 | Test.java:57:12:57:12 | 0 | +| Test.java:56:7:56:11 | After ... > ... [true] | 5 | Test.java:57:8:57:12 | ... > ... | +| Test.java:57:8:57:12 | After ... > ... [false] | 0 | Test.java:57:8:57:12 | After ... > ... [false] | +| Test.java:57:8:57:12 | After ... > ... [false] | 1 | Test.java:60:12:62:5 | { ... } | +| Test.java:57:8:57:12 | After ... > ... [false] | 2 | Test.java:61:6:61:12 | ; | +| Test.java:57:8:57:12 | After ... > ... [false] | 3 | Test.java:61:6:61:11 | Before ...=... | +| Test.java:57:8:57:12 | After ... > ... [false] | 4 | Test.java:61:6:61:6 | w | +| Test.java:57:8:57:12 | After ... > ... [false] | 5 | Test.java:61:10:61:11 | 20 | +| Test.java:57:8:57:12 | After ... > ... [false] | 6 | Test.java:61:6:61:11 | ...=... | +| Test.java:57:8:57:12 | After ... > ... [false] | 7 | Test.java:61:6:61:11 | After ...=... | +| Test.java:57:8:57:12 | After ... > ... [false] | 8 | Test.java:61:6:61:12 | After ; | +| Test.java:57:8:57:12 | After ... > ... [false] | 9 | Test.java:60:12:62:5 | After { ... } | +| Test.java:57:8:57:12 | After ... > ... [false] | 10 | Test.java:57:5:57:13 | After if (...) | +| Test.java:57:8:57:12 | After ... > ... [false] | 11 | Test.java:56:4:56:12 | After if (...) | +| Test.java:57:8:57:12 | After ... > ... [false] | 12 | Test.java:67:4:67:9 | ; | +| Test.java:57:8:57:12 | After ... > ... [false] | 13 | Test.java:67:4:67:8 | Before ...=... | +| Test.java:57:8:57:12 | After ... > ... [false] | 14 | Test.java:67:4:67:4 | x | +| Test.java:57:8:57:12 | After ... > ... [false] | 15 | Test.java:67:8:67:8 | 0 | +| Test.java:57:8:57:12 | After ... > ... [false] | 16 | Test.java:67:4:67:8 | ...=... | +| Test.java:57:8:57:12 | After ... > ... [false] | 17 | Test.java:67:4:67:8 | After ...=... | +| Test.java:57:8:57:12 | After ... > ... [false] | 18 | Test.java:67:4:67:9 | After ; | +| Test.java:57:8:57:12 | After ... > ... [false] | 19 | Test.java:54:31:68:3 | After { ... } | +| Test.java:57:8:57:12 | After ... > ... [true] | 0 | Test.java:57:8:57:12 | After ... > ... [true] | +| Test.java:57:8:57:12 | After ... > ... [true] | 1 | Test.java:57:15:60:5 | { ... } | +| Test.java:57:8:57:12 | After ... > ... [true] | 2 | Test.java:58:6:58:11 | ; | +| Test.java:57:8:57:12 | After ... > ... [true] | 3 | Test.java:58:6:58:10 | Before ...=... | +| Test.java:57:8:57:12 | After ... > ... [true] | 4 | Test.java:58:6:58:6 | w | +| Test.java:57:8:57:12 | After ... > ... [true] | 5 | Test.java:58:10:58:10 | 0 | +| Test.java:57:8:57:12 | After ... > ... [true] | 6 | Test.java:58:6:58:10 | ...=... | +| Test.java:57:8:57:12 | After ... > ... [true] | 7 | Test.java:58:6:58:10 | After ...=... | +| Test.java:57:8:57:12 | After ... > ... [true] | 8 | Test.java:58:6:58:11 | After ; | +| Test.java:57:8:57:12 | After ... > ... [true] | 9 | Test.java:59:6:59:11 | Before break | +| Test.java:57:8:57:12 | After ... > ... [true] | 10 | Test.java:59:6:59:11 | break | diff --git a/java/ql/test/library-tests/controlflow/basic/bbStrictDominance.expected b/java/ql/test/library-tests/controlflow/basic/bbStrictDominance.expected index be658fb29158..afa917bf12ca 100644 --- a/java/ql/test/library-tests/controlflow/basic/bbStrictDominance.expected +++ b/java/ql/test/library-tests/controlflow/basic/bbStrictDominance.expected @@ -1,6 +1,3 @@ -| Test.java:3:14:3:17 | { ... } | Test.java:3:14:3:17 | Exit | -| Test.java:4:14:4:17 | Normal Exit | Test.java:4:14:4:17 | Exit | -| Test.java:4:21:76:2 | { ... } | Test.java:4:14:4:17 | Exit | | Test.java:4:21:76:2 | { ... } | Test.java:4:14:4:17 | Normal Exit | | Test.java:4:21:76:2 | { ... } | Test.java:11:14:14:3 | { ... } | | Test.java:4:21:76:2 | { ... } | Test.java:14:10:16:3 | { ... } | @@ -23,7 +20,6 @@ | Test.java:4:21:76:2 | { ... } | Test.java:60:12:62:5 | { ... } | | Test.java:4:21:76:2 | { ... } | Test.java:63:9:66:4 | { ... } | | Test.java:4:21:76:2 | { ... } | Test.java:70:3:70:9 | ; | -| Test.java:18:3:18:8 | ; | Test.java:4:14:4:17 | Exit | | Test.java:18:3:18:8 | ; | Test.java:4:14:4:17 | Normal Exit | | Test.java:18:3:18:8 | ; | Test.java:22:4:22:10 | ; | | Test.java:18:3:18:8 | ; | Test.java:24:4:24:10 | return ... | diff --git a/java/ql/test/library-tests/controlflow/basic/bbStrictDominance.ql b/java/ql/test/library-tests/controlflow/basic/bbStrictDominance.ql index de1e23b649cc..72de0cc435d3 100644 --- a/java/ql/test/library-tests/controlflow/basic/bbStrictDominance.ql +++ b/java/ql/test/library-tests/controlflow/basic/bbStrictDominance.ql @@ -1,6 +1,7 @@ import java import semmle.code.java.controlflow.Dominance +import utils.test.BasicBlock from BasicBlock b, BasicBlock b2 where b.strictlyDominates(b2) -select b, b2 +select getFirstAstNode(b), getFirstAstNode(b2) diff --git a/java/ql/test/library-tests/controlflow/basic/bbSuccessor.expected b/java/ql/test/library-tests/controlflow/basic/bbSuccessor.expected index a6e5d8430c12..95799e5862b0 100644 --- a/java/ql/test/library-tests/controlflow/basic/bbSuccessor.expected +++ b/java/ql/test/library-tests/controlflow/basic/bbSuccessor.expected @@ -1,16 +1,13 @@ -| Test.java:3:14:3:17 | Exceptional Exit | Test.java:3:14:3:17 | Exit | -| Test.java:3:14:3:17 | { ... } | Test.java:3:14:3:17 | Exit | -| Test.java:4:14:4:17 | Exceptional Exit | Test.java:4:14:4:17 | Exit | -| Test.java:4:14:4:17 | Normal Exit | Test.java:4:14:4:17 | Exit | | Test.java:4:21:76:2 | { ... } | Test.java:11:14:14:3 | { ... } | | Test.java:4:21:76:2 | { ... } | Test.java:14:10:16:3 | { ... } | | Test.java:11:14:14:3 | { ... } | Test.java:18:3:18:8 | ; | | Test.java:14:10:16:3 | { ... } | Test.java:18:3:18:8 | ; | | Test.java:18:3:18:8 | ; | Test.java:22:4:22:10 | ; | | Test.java:18:3:18:8 | ; | Test.java:24:4:24:10 | return ... | +| Test.java:22:4:22:10 | ; | Test.java:30:7:30:12 | After ... == ... [false] | | Test.java:22:4:22:10 | ; | Test.java:30:15:33:3 | { ... } | -| Test.java:22:4:22:10 | ; | Test.java:35:3:35:9 | ; | | Test.java:24:4:24:10 | return ... | Test.java:4:14:4:17 | Normal Exit | +| Test.java:30:7:30:12 | After ... == ... [false] | Test.java:35:3:35:9 | ; | | Test.java:30:15:33:3 | { ... } | Test.java:35:3:35:9 | ; | | Test.java:35:3:35:9 | ; | Test.java:38:9:38:9 | x | | Test.java:38:9:38:9 | x | Test.java:38:16:41:3 | { ... } | @@ -21,8 +18,9 @@ | Test.java:46:18:46:18 | j | Test.java:51:3:51:9 | ; | | Test.java:46:31:49:3 | { ... } | Test.java:46:18:46:18 | j | | Test.java:51:3:51:9 | ; | Test.java:54:18:54:18 | j | +| Test.java:54:18:54:18 | j | Test.java:54:18:54:23 | After ... < ... [false] | | Test.java:54:18:54:18 | j | Test.java:54:31:68:3 | { ... } | -| Test.java:54:18:54:18 | j | Test.java:70:3:70:9 | ; | +| Test.java:54:18:54:23 | After ... < ... [false] | Test.java:70:3:70:9 | ; | | Test.java:54:26:54:26 | j | Test.java:54:18:54:18 | j | | Test.java:54:31:68:3 | { ... } | Test.java:57:5:57:13 | if (...) | | Test.java:54:31:68:3 | { ... } | Test.java:63:9:66:4 | { ... } | diff --git a/java/ql/test/library-tests/controlflow/basic/bbSuccessor.ql b/java/ql/test/library-tests/controlflow/basic/bbSuccessor.ql index ae2d8a393b47..ae8dc5d188d6 100644 --- a/java/ql/test/library-tests/controlflow/basic/bbSuccessor.ql +++ b/java/ql/test/library-tests/controlflow/basic/bbSuccessor.ql @@ -1,5 +1,6 @@ import java +import utils.test.BasicBlock from BasicBlock b, BasicBlock b2 where b.getASuccessor() = b2 -select b, b2 +select getFirstAstNodeOrSynth(b), getFirstAstNodeOrSynth(b2) diff --git a/java/ql/test/library-tests/controlflow/dominance/dominanceWrong.ql b/java/ql/test/library-tests/controlflow/dominance/dominanceWrong.ql index 4eadcddc61a6..6deead2df73b 100644 --- a/java/ql/test/library-tests/controlflow/dominance/dominanceWrong.ql +++ b/java/ql/test/library-tests/controlflow/dominance/dominanceWrong.ql @@ -17,5 +17,6 @@ predicate dominanceCounterExample(ControlFlowNode entry, ControlFlowNode dom, Co from Callable c, ControlFlowNode dom, ControlFlowNode node where strictlyDominates(dom, node) and - dominanceCounterExample(c.getBody().getControlFlowNode(), dom, node) + dominanceCounterExample(any(ControlFlow::EntryNode entry | entry.getEnclosingCallable() = c), dom, + node) select c, dom, node diff --git a/java/ql/test/library-tests/controlflow/dominance/dominator.expected b/java/ql/test/library-tests/controlflow/dominance/dominator.expected index 1e385c4fd62f..9836d4eed50c 100644 --- a/java/ql/test/library-tests/controlflow/dominance/dominator.expected +++ b/java/ql/test/library-tests/controlflow/dominance/dominator.expected @@ -1,176 +1,33 @@ -| Test.java:2:32:72:2 | { ... } | Test.java:3:3:3:8 | var ...; | -| Test.java:3:3:3:8 | var ...; | Test.java:3:7:3:7 | j | -| Test.java:3:7:3:7 | j | Test.java:4:3:4:14 | var ...; | -| Test.java:4:3:4:14 | var ...; | Test.java:4:12:4:13 | 50 | -| Test.java:4:8:4:13 | y | Test.java:7:3:7:12 | if (...) | -| Test.java:4:12:4:13 | 50 | Test.java:4:8:4:13 | y | -| Test.java:7:3:7:12 | if (...) | Test.java:7:7:7:7 | x | -| Test.java:7:7:7:7 | x | Test.java:7:11:7:11 | 0 | -| Test.java:7:7:7:11 | ... > ... | Test.java:7:14:10:3 | { ... } | -| Test.java:7:7:7:11 | ... > ... | Test.java:10:10:12:3 | { ... } | -| Test.java:7:7:7:11 | ... > ... | Test.java:14:3:14:20 | ; | -| Test.java:7:11:7:11 | 0 | Test.java:7:7:7:11 | ... > ... | -| Test.java:7:14:10:3 | { ... } | Test.java:8:4:8:10 | ; | -| Test.java:8:4:8:9 | ...=... | Test.java:9:4:9:10 | ; | -| Test.java:8:4:8:10 | ; | Test.java:8:8:8:9 | 20 | -| Test.java:8:8:8:9 | 20 | Test.java:8:4:8:9 | ...=... | -| Test.java:9:4:9:10 | ; | Test.java:9:8:9:9 | 10 | -| Test.java:9:8:9:9 | 10 | Test.java:9:4:9:9 | ...=... | -| Test.java:10:10:12:3 | { ... } | Test.java:11:4:11:10 | ; | -| Test.java:11:4:11:10 | ; | Test.java:11:8:11:9 | 30 | -| Test.java:11:8:11:9 | 30 | Test.java:11:4:11:9 | ...=... | -| Test.java:14:3:14:19 | ...=... | Test.java:17:3:17:12 | if (...) | -| Test.java:14:3:14:20 | ; | Test.java:14:14:14:14 | x | -| Test.java:14:7:14:19 | (...)... | Test.java:14:3:14:19 | ...=... | -| Test.java:14:14:14:14 | x | Test.java:14:18:14:18 | y | -| Test.java:14:14:14:18 | ... + ... | Test.java:14:7:14:19 | (...)... | -| Test.java:14:18:14:18 | y | Test.java:14:14:14:18 | ... + ... | -| Test.java:17:3:17:12 | if (...) | Test.java:17:7:17:7 | x | -| Test.java:17:7:17:7 | x | Test.java:17:11:17:11 | 0 | -| Test.java:17:7:17:11 | ... < ... | Test.java:2:6:2:9 | Normal Exit | -| Test.java:17:7:17:11 | ... < ... | Test.java:18:4:18:10 | ; | -| Test.java:17:7:17:11 | ... < ... | Test.java:20:11:20:11 | z | -| Test.java:17:11:17:11 | 0 | Test.java:17:7:17:11 | ... < ... | -| Test.java:18:4:18:9 | ...=... | Test.java:23:3:23:9 | ; | -| Test.java:18:4:18:10 | ; | Test.java:18:8:18:9 | 40 | -| Test.java:18:8:18:9 | 40 | Test.java:18:4:18:9 | ...=... | -| Test.java:20:11:20:11 | z | Test.java:20:4:20:12 | return ... | -| Test.java:23:3:23:8 | ...=... | Test.java:26:3:26:13 | if (...) | -| Test.java:23:3:23:9 | ; | Test.java:23:7:23:8 | 10 | -| Test.java:23:7:23:8 | 10 | Test.java:23:3:23:8 | ...=... | -| Test.java:26:3:26:13 | if (...) | Test.java:26:7:26:7 | x | -| Test.java:26:7:26:7 | x | Test.java:26:12:26:12 | 0 | -| Test.java:26:7:26:12 | ... == ... | Test.java:26:15:29:3 | { ... } | -| Test.java:26:7:26:12 | ... == ... | Test.java:31:3:31:9 | ; | -| Test.java:26:12:26:12 | 0 | Test.java:26:7:26:12 | ... == ... | -| Test.java:26:15:29:3 | { ... } | Test.java:27:4:27:10 | ; | -| Test.java:27:4:27:9 | ...=... | Test.java:28:4:28:10 | ; | -| Test.java:27:4:27:10 | ; | Test.java:27:8:27:9 | 60 | -| Test.java:27:8:27:9 | 60 | Test.java:27:4:27:9 | ...=... | -| Test.java:28:4:28:10 | ; | Test.java:28:8:28:9 | 10 | -| Test.java:28:8:28:9 | 10 | Test.java:28:4:28:9 | ...=... | -| Test.java:31:3:31:3 | z | Test.java:31:8:31:8 | x | -| Test.java:31:3:31:8 | ...+=... | Test.java:34:3:34:15 | while (...) | -| Test.java:31:3:31:9 | ; | Test.java:31:3:31:3 | z | -| Test.java:31:8:31:8 | x | Test.java:31:3:31:8 | ...+=... | -| Test.java:34:3:34:15 | while (...) | Test.java:34:10:34:10 | x | -| Test.java:34:10:34:10 | x | Test.java:34:14:34:14 | 0 | -| Test.java:34:10:34:14 | ... > ... | Test.java:34:17:37:3 | { ... } | -| Test.java:34:10:34:14 | ... > ... | Test.java:39:3:39:9 | ; | -| Test.java:34:14:34:14 | 0 | Test.java:34:10:34:14 | ... > ... | -| Test.java:34:17:37:3 | { ... } | Test.java:35:4:35:10 | ; | -| Test.java:35:4:35:9 | ...=... | Test.java:36:4:36:7 | ; | -| Test.java:35:4:35:10 | ; | Test.java:35:8:35:9 | 10 | -| Test.java:35:8:35:9 | 10 | Test.java:35:4:35:9 | ...=... | -| Test.java:36:4:36:4 | x | Test.java:36:4:36:6 | ...-- | -| Test.java:36:4:36:7 | ; | Test.java:36:4:36:4 | x | -| Test.java:39:3:39:3 | z | Test.java:39:8:39:8 | y | -| Test.java:39:3:39:8 | ...+=... | Test.java:42:3:42:26 | for (...;...;...) | -| Test.java:39:3:39:9 | ; | Test.java:39:3:39:3 | z | -| Test.java:39:8:39:8 | y | Test.java:39:3:39:8 | ...+=... | -| Test.java:42:3:42:26 | for (...;...;...) | Test.java:42:12:42:12 | 0 | -| Test.java:42:8:42:12 | ...=... | Test.java:42:15:42:15 | j | -| Test.java:42:12:42:12 | 0 | Test.java:42:8:42:12 | ...=... | -| Test.java:42:15:42:15 | j | Test.java:42:19:42:20 | 10 | -| Test.java:42:15:42:20 | ... < ... | Test.java:42:28:45:3 | { ... } | -| Test.java:42:15:42:20 | ... < ... | Test.java:47:3:47:9 | ; | -| Test.java:42:19:42:20 | 10 | Test.java:42:15:42:20 | ... < ... | -| Test.java:42:23:42:23 | j | Test.java:42:23:42:25 | ...++ | -| Test.java:42:28:45:3 | { ... } | Test.java:43:4:43:9 | ; | -| Test.java:43:4:43:8 | ...=... | Test.java:44:4:44:10 | ; | -| Test.java:43:4:43:9 | ; | Test.java:43:8:43:8 | 0 | -| Test.java:43:8:43:8 | 0 | Test.java:43:4:43:8 | ...=... | -| Test.java:44:4:44:9 | ...=... | Test.java:42:23:42:23 | j | -| Test.java:44:4:44:10 | ; | Test.java:44:8:44:9 | 10 | -| Test.java:44:8:44:9 | 10 | Test.java:44:4:44:9 | ...=... | -| Test.java:47:3:47:3 | z | Test.java:47:8:47:8 | w | -| Test.java:47:3:47:8 | ...+=... | Test.java:50:3:50:26 | for (...;...;...) | -| Test.java:47:3:47:9 | ; | Test.java:47:3:47:3 | z | -| Test.java:47:8:47:8 | w | Test.java:47:3:47:8 | ...+=... | -| Test.java:50:3:50:26 | for (...;...;...) | Test.java:50:12:50:12 | 0 | -| Test.java:50:8:50:12 | ...=... | Test.java:50:15:50:15 | j | -| Test.java:50:12:50:12 | 0 | Test.java:50:8:50:12 | ...=... | -| Test.java:50:15:50:15 | j | Test.java:50:19:50:20 | 10 | -| Test.java:50:15:50:20 | ... < ... | Test.java:50:28:64:3 | { ... } | -| Test.java:50:15:50:20 | ... < ... | Test.java:66:3:66:17 | ; | -| Test.java:50:19:50:20 | 10 | Test.java:50:15:50:20 | ... < ... | -| Test.java:50:23:50:23 | j | Test.java:50:23:50:25 | ...++ | -| Test.java:50:28:64:3 | { ... } | Test.java:51:4:51:10 | ; | -| Test.java:51:4:51:9 | ...=... | Test.java:52:4:52:13 | if (...) | -| Test.java:51:4:51:10 | ; | Test.java:51:8:51:9 | 30 | -| Test.java:51:8:51:9 | 30 | Test.java:51:4:51:9 | ...=... | -| Test.java:52:4:52:13 | if (...) | Test.java:52:8:52:8 | z | -| Test.java:52:8:52:8 | z | Test.java:52:12:52:12 | 0 | -| Test.java:52:8:52:12 | ... > ... | Test.java:50:23:50:23 | j | -| Test.java:52:8:52:12 | ... > ... | Test.java:53:5:53:14 | if (...) | -| Test.java:52:8:52:12 | ... > ... | Test.java:59:9:62:4 | { ... } | -| Test.java:52:12:52:12 | 0 | Test.java:52:8:52:12 | ... > ... | -| Test.java:53:5:53:14 | if (...) | Test.java:53:9:53:9 | y | -| Test.java:53:9:53:9 | y | Test.java:53:13:53:13 | 0 | -| Test.java:53:9:53:13 | ... > ... | Test.java:53:16:56:5 | { ... } | -| Test.java:53:9:53:13 | ... > ... | Test.java:56:12:58:5 | { ... } | -| Test.java:53:13:53:13 | 0 | Test.java:53:9:53:13 | ... > ... | -| Test.java:53:16:56:5 | { ... } | Test.java:54:6:54:11 | ; | -| Test.java:54:6:54:10 | ...=... | Test.java:55:6:55:11 | break | -| Test.java:54:6:54:11 | ; | Test.java:54:10:54:10 | 0 | -| Test.java:54:10:54:10 | 0 | Test.java:54:6:54:10 | ...=... | -| Test.java:56:12:58:5 | { ... } | Test.java:57:6:57:12 | ; | -| Test.java:57:6:57:11 | ...=... | Test.java:63:4:63:9 | ; | -| Test.java:57:6:57:12 | ; | Test.java:57:10:57:11 | 20 | -| Test.java:57:10:57:11 | 20 | Test.java:57:6:57:11 | ...=... | -| Test.java:59:9:62:4 | { ... } | Test.java:60:5:60:11 | ; | -| Test.java:60:5:60:10 | ...=... | Test.java:61:5:61:13 | continue | -| Test.java:60:5:60:11 | ; | Test.java:60:9:60:10 | 10 | -| Test.java:60:9:60:10 | 10 | Test.java:60:5:60:10 | ...=... | -| Test.java:63:4:63:9 | ; | Test.java:63:8:63:8 | 0 | -| Test.java:63:8:63:8 | 0 | Test.java:63:4:63:8 | ...=... | -| Test.java:66:3:66:3 | z | Test.java:66:8:66:8 | x | -| Test.java:66:3:66:16 | ...+=... | Test.java:70:3:70:9 | ; | -| Test.java:66:3:66:17 | ; | Test.java:66:3:66:3 | z | -| Test.java:66:8:66:8 | x | Test.java:66:12:66:12 | y | -| Test.java:66:8:66:12 | ... + ... | Test.java:66:16:66:16 | w | -| Test.java:66:8:66:16 | ... + ... | Test.java:66:3:66:16 | ...+=... | -| Test.java:66:12:66:12 | y | Test.java:66:8:66:12 | ... + ... | -| Test.java:66:16:66:16 | w | Test.java:66:8:66:16 | ... + ... | -| Test.java:70:3:70:8 | ...=... | Test.java:71:10:71:10 | w | -| Test.java:70:3:70:9 | ; | Test.java:70:7:70:8 | 40 | -| Test.java:70:7:70:8 | 40 | Test.java:70:3:70:8 | ...=... | -| Test.java:71:10:71:10 | w | Test.java:71:3:71:11 | return ... | -| Test.java:74:19:91:2 | { ... } | Test.java:76:3:76:8 | var ...; | -| Test.java:76:3:76:8 | var ...; | Test.java:76:7:76:7 | b | -| Test.java:76:7:76:7 | b | Test.java:77:3:77:8 | var ...; | -| Test.java:77:3:77:8 | var ...; | Test.java:77:7:77:7 | c | -| Test.java:77:7:77:7 | c | Test.java:78:3:78:8 | ; | -| Test.java:78:3:78:7 | ...=... | Test.java:79:3:79:13 | while (...) | -| Test.java:78:3:78:8 | ; | Test.java:78:7:78:7 | 0 | -| Test.java:78:7:78:7 | 0 | Test.java:78:3:78:7 | ...=... | -| Test.java:79:3:79:13 | while (...) | Test.java:79:9:79:12 | true | -| Test.java:79:9:79:12 | true | Test.java:79:15:89:3 | { ... } | -| Test.java:79:15:89:3 | { ... } | Test.java:80:4:80:10 | ; | -| Test.java:80:4:80:9 | ...=... | Test.java:81:4:81:15 | if (...) | -| Test.java:80:4:80:10 | ; | Test.java:80:8:80:9 | 10 | -| Test.java:80:8:80:9 | 10 | Test.java:80:4:80:9 | ...=... | -| Test.java:81:4:81:15 | if (...) | Test.java:81:8:81:8 | a | -| Test.java:81:8:81:8 | a | Test.java:81:12:81:14 | 100 | -| Test.java:81:8:81:14 | ... > ... | Test.java:81:17:84:4 | { ... } | -| Test.java:81:8:81:14 | ... > ... | Test.java:85:4:85:15 | if (...) | -| Test.java:81:12:81:14 | 100 | Test.java:81:8:81:14 | ... > ... | -| Test.java:81:17:84:4 | { ... } | Test.java:82:5:82:11 | ; | -| Test.java:82:5:82:10 | ...=... | Test.java:83:5:83:10 | ; | -| Test.java:82:5:82:11 | ; | Test.java:82:9:82:10 | 10 | -| Test.java:82:9:82:10 | 10 | Test.java:82:5:82:10 | ...=... | -| Test.java:83:5:83:10 | ; | Test.java:83:9:83:9 | c | -| Test.java:83:9:83:9 | c | Test.java:83:5:83:9 | ...=... | -| Test.java:85:4:85:15 | if (...) | Test.java:85:8:85:8 | a | -| Test.java:85:8:85:8 | a | Test.java:85:13:85:14 | 10 | -| Test.java:85:8:85:14 | ... == ... | Test.java:74:6:74:10 | Normal Exit | -| Test.java:85:8:85:14 | ... == ... | Test.java:86:5:86:10 | break | -| Test.java:85:8:85:14 | ... == ... | Test.java:87:4:87:15 | if (...) | -| Test.java:85:13:85:14 | 10 | Test.java:85:8:85:14 | ... == ... | -| Test.java:86:5:86:10 | break | Test.java:90:10:90:10 | b | -| Test.java:87:4:87:15 | if (...) | Test.java:87:8:87:8 | a | -| Test.java:87:8:87:8 | a | Test.java:87:13:87:14 | 20 | -| Test.java:87:8:87:14 | ... == ... | Test.java:88:12:88:12 | c | -| Test.java:87:13:87:14 | 20 | Test.java:87:8:87:14 | ... == ... | -| Test.java:88:12:88:12 | c | Test.java:88:5:88:13 | return ... | -| Test.java:90:10:90:10 | b | Test.java:90:3:90:11 | return ... | +| Test.java:2:32:72:2 | { ... } | Test.java:7:14:10:3 | { ... } | +| Test.java:2:32:72:2 | { ... } | Test.java:10:10:12:3 | { ... } | +| Test.java:2:32:72:2 | { ... } | Test.java:14:3:14:20 | ; | +| Test.java:14:3:14:20 | ; | Test.java:2:6:2:9 | Normal Exit | +| Test.java:14:3:14:20 | ; | Test.java:18:4:18:10 | ; | +| Test.java:14:3:14:20 | ; | Test.java:20:11:20:11 | z | +| Test.java:18:4:18:10 | ; | Test.java:26:7:26:12 | After ... == ... [false] | +| Test.java:18:4:18:10 | ; | Test.java:26:15:29:3 | { ... } | +| Test.java:18:4:18:10 | ; | Test.java:31:3:31:9 | ; | +| Test.java:31:3:31:9 | ; | Test.java:34:10:34:10 | x | +| Test.java:34:10:34:10 | x | Test.java:34:17:37:3 | { ... } | +| Test.java:34:10:34:10 | x | Test.java:39:3:39:9 | ; | +| Test.java:39:3:39:9 | ; | Test.java:42:15:42:15 | j | +| Test.java:42:15:42:15 | j | Test.java:42:28:45:3 | { ... } | +| Test.java:42:15:42:15 | j | Test.java:47:3:47:9 | ; | +| Test.java:47:3:47:9 | ; | Test.java:50:15:50:15 | j | +| Test.java:50:15:50:15 | j | Test.java:50:15:50:20 | After ... < ... [false] | +| Test.java:50:15:50:15 | j | Test.java:50:28:64:3 | { ... } | +| Test.java:50:15:50:15 | j | Test.java:66:3:66:17 | ; | +| Test.java:50:28:64:3 | { ... } | Test.java:50:23:50:23 | j | +| Test.java:50:28:64:3 | { ... } | Test.java:53:5:53:14 | if (...) | +| Test.java:50:28:64:3 | { ... } | Test.java:59:9:62:4 | { ... } | +| Test.java:53:5:53:14 | if (...) | Test.java:53:16:56:5 | { ... } | +| Test.java:53:5:53:14 | if (...) | Test.java:56:12:58:5 | { ... } | +| Test.java:74:19:91:2 | { ... } | Test.java:79:9:79:12 | true | +| Test.java:79:9:79:12 | true | Test.java:81:8:81:14 | After ... > ... [false] | +| Test.java:79:9:79:12 | true | Test.java:81:17:84:4 | { ... } | +| Test.java:79:9:79:12 | true | Test.java:85:4:85:15 | if (...) | +| Test.java:85:4:85:15 | if (...) | Test.java:74:6:74:10 | Normal Exit | +| Test.java:85:4:85:15 | if (...) | Test.java:86:5:86:10 | break | +| Test.java:85:4:85:15 | if (...) | Test.java:87:4:87:15 | if (...) | +| Test.java:87:4:87:15 | if (...) | Test.java:87:8:87:14 | After ... == ... [false] | +| Test.java:87:4:87:15 | if (...) | Test.java:88:12:88:12 | c | diff --git a/java/ql/test/library-tests/controlflow/dominance/dominator.ql b/java/ql/test/library-tests/controlflow/dominance/dominator.ql index 701640bf7209..7fc18484febf 100644 --- a/java/ql/test/library-tests/controlflow/dominance/dominator.ql +++ b/java/ql/test/library-tests/controlflow/dominance/dominator.ql @@ -1,9 +1,9 @@ -import default -import semmle.code.java.controlflow.Dominance +import java +import utils.test.BasicBlock -from Method func, ControlFlowNode dominator, ControlFlowNode node +from Method func, BasicBlock dominator, BasicBlock bb where - iDominates(dominator, node) and - dominator.getEnclosingStmt().getEnclosingCallable() = func and + dominator.immediatelyDominates(bb) and + dominator.getEnclosingCallable() = func and func.getDeclaringType().hasName("Test") -select dominator, node +select getFirstAstNodeOrSynth(dominator), getFirstAstNodeOrSynth(bb) diff --git a/java/ql/test/library-tests/controlflow/dominance/dominatorUnique.ql b/java/ql/test/library-tests/controlflow/dominance/dominatorUnique.ql index eaf75ab7bfaa..54b0d1863624 100644 --- a/java/ql/test/library-tests/controlflow/dominance/dominatorUnique.ql +++ b/java/ql/test/library-tests/controlflow/dominance/dominatorUnique.ql @@ -7,5 +7,5 @@ where iDominates(dom1, node) and iDominates(dom2, node) and dom1 != dom2 and - func = node.getEnclosingStmt().getEnclosingCallable() + func = node.getEnclosingCallable() select func, node, dom1, dom2 diff --git a/java/ql/test/library-tests/dataflow/capture/test.expected b/java/ql/test/library-tests/dataflow/capture/test.expected index a744f468fbe9..16ec39314eb0 100644 --- a/java/ql/test/library-tests/dataflow/capture/test.expected +++ b/java/ql/test/library-tests/dataflow/capture/test.expected @@ -16,8 +16,8 @@ | A.java:21:11:21:13 | "B" : String | A.java:14:11:14:20 | f2(...) : new A(...) { ... } [String s] | | A.java:21:11:21:13 | "B" : String | A.java:15:16:15:16 | a : new A(...) { ... } [String s] | | A.java:21:11:21:13 | "B" : String | A.java:15:16:15:22 | get(...) : String | +| A.java:21:11:21:13 | "B" : String | A.java:20:5:20:15 | SSA phi(s) : String | | A.java:21:11:21:13 | "B" : String | A.java:21:7:21:13 | ...=... : String | -| A.java:21:11:21:13 | "B" : String | A.java:25:5:25:26 | SSA phi(s) : String | | A.java:21:11:21:13 | "B" : String | A.java:28:11:38:5 | String s : String | | A.java:21:11:21:13 | "B" : String | A.java:28:11:38:5 | new (...) : new A(...) { ... } [String s] | | A.java:21:11:21:13 | "B" : String | A.java:30:14:30:16 | parameter this : new A(...) { ... } [String s] | @@ -32,8 +32,8 @@ | A.java:23:11:23:13 | "C" : String | A.java:14:11:14:20 | f2(...) : new A(...) { ... } [String s] | | A.java:23:11:23:13 | "C" : String | A.java:15:16:15:16 | a : new A(...) { ... } [String s] | | A.java:23:11:23:13 | "C" : String | A.java:15:16:15:22 | get(...) : String | +| A.java:23:11:23:13 | "C" : String | A.java:20:5:20:15 | SSA phi(s) : String | | A.java:23:11:23:13 | "C" : String | A.java:23:7:23:13 | ...=... : String | -| A.java:23:11:23:13 | "C" : String | A.java:25:5:25:26 | SSA phi(s) : String | | A.java:23:11:23:13 | "C" : String | A.java:28:11:38:5 | String s : String | | A.java:23:11:23:13 | "C" : String | A.java:28:11:38:5 | new (...) : new A(...) { ... } [String s] | | A.java:23:11:23:13 | "C" : String | A.java:30:14:30:16 | parameter this : new A(...) { ... } [String s] | diff --git a/java/ql/test/library-tests/flexible-constructors/SuperPredecessor.expected b/java/ql/test/library-tests/flexible-constructors/SuperPredecessor.expected deleted file mode 100644 index dba8b4acf988..000000000000 --- a/java/ql/test/library-tests/flexible-constructors/SuperPredecessor.expected +++ /dev/null @@ -1,7 +0,0 @@ -| FlexibleConstructors.java:10:15:10:17 | msg | FlexibleConstructors.java:10:9:10:19 | super(...) | predecessor of explicit super() | -| FlexibleConstructors.java:18:13:18:17 | ... < ... | FlexibleConstructors.java:19:9:19:16 | super(...) | predecessor of explicit super() | -| FlexibleConstructors.java:38:17:38:48 | combined | FlexibleConstructors.java:39:13:39:20 | super(...) | predecessor of explicit super() | -| FlexibleConstructors.java:52:9:52:40 | ...=... | FlexibleConstructors.java:53:9:53:16 | super(...) | predecessor of explicit super() | -| FlexibleConstructors.java:65:15:65:18 | temp | FlexibleConstructors.java:65:9:65:20 | super(...) | predecessor of explicit super() | -| FlexibleConstructors.java:77:9:77:24 | ...=... | FlexibleConstructors.java:78:9:78:16 | super(...) | predecessor of explicit super() | -| FlexibleConstructors.java:91:13:91:41 | string | FlexibleConstructors.java:92:9:92:16 | super(...) | predecessor of explicit super() | diff --git a/java/ql/test/library-tests/flexible-constructors/SuperPredecessor.ql b/java/ql/test/library-tests/flexible-constructors/SuperPredecessor.ql deleted file mode 100644 index 2a291c5e82a3..000000000000 --- a/java/ql/test/library-tests/flexible-constructors/SuperPredecessor.ql +++ /dev/null @@ -1,11 +0,0 @@ -import java - -from ControlFlowNode pred, ControlFlowNode supNode, SuperConstructorInvocationStmt sc -where - supNode.asStmt() = sc and - pred.getASuccessor() = supNode and - pred != supNode and - not pred.asStmt() instanceof BlockStmt and - exists(sc.getEnclosingCallable().getFile().getRelativePath()) and - sc.getLocation().getEndColumn() > sc.getLocation().getStartColumn() -select pred, sc, "predecessor of explicit super()" diff --git a/java/ql/test/library-tests/frameworks/android/taint-database/flowSteps.ql b/java/ql/test/library-tests/frameworks/android/taint-database/flowSteps.ql index ae4f8ca0da02..578846438bee 100644 --- a/java/ql/test/library-tests/frameworks/android/taint-database/flowSteps.ql +++ b/java/ql/test/library-tests/frameworks/android/taint-database/flowSteps.ql @@ -9,7 +9,7 @@ module Config implements DataFlow::ConfigSig { source.asExpr().(MethodCall).getMethod().hasName("taint") } - predicate isSink(DataFlow::Node sink) { sink.asExpr() = any(ReturnStmt r).getResult() } + predicate isSink(DataFlow::Node sink) { sink.asExpr() = any(ReturnStmt r).getExpr() } } module Flow = TaintTracking::Global; diff --git a/java/ql/test/library-tests/guards/Guards.java b/java/ql/test/library-tests/guards/Guards.java index 689795038c6e..35e3b7c09a9a 100644 --- a/java/ql/test/library-tests/guards/Guards.java +++ b/java/ql/test/library-tests/guards/Guards.java @@ -39,10 +39,10 @@ void t1(int[] a, String s) { chk(); // $ guarded='s:match "bar"' guarded='s:bar' break; case "foo": - chk(); // $ guarded='s:match "foo"' guarded='s:foo' guarded=g(3):false + chk(); // $ guarded='s:non-match "bar"' guarded='s:not bar' guarded='s:match "foo"' guarded='s:foo' guarded=g(3):false break; default: - chk(); // $ guarded='s:non-match "bar"' guarded='s:non-match "foo"' guarded='s:not bar' guarded='s:not foo' guarded='s:match default' guarded=g(3):false + chk(); // $ guarded='s:non-match "bar"' guarded='s:non-match "foo"' guarded='s:not bar' guarded='s:not foo' guarded=g(3):false break; } @@ -92,10 +92,10 @@ void t4() { chk(); // $ guarded='x:match E1' guarded='x:E1' guarded=g(1):true guarded=g(2):false guarded=g(Alt2):false guarded=g(3):false break; case E2: - chk(); // $ guarded='x:match E2' guarded='x:E2' guarded=g(3):false + chk(); // $ guarded='x:non-match E1' guarded='x:not E1' guarded='x:match E2' guarded='x:E2' guarded=g(3):false break; case E3: - chk(); // $ guarded='x:match E3' guarded='x:E3' guarded=g(3):true + chk(); // $ guarded='x:non-match E1' guarded='x:non-match E2' guarded='x:not E1' guarded='x:not E2' guarded='x:match E3' guarded='x:E3' guarded=g(3):true break; } Object o = g(4) ? new Object() : null; @@ -198,7 +198,7 @@ void testWrappers(String s, Integer i) { chk(); // $ guarded='testEnumWrapper(...):SUCCESS' guarded='testEnumWrapper(...):match SUCCESS' guarded=g(1):true break; case FAILURE: - chk(); // $ guarded='testEnumWrapper(...):FAILURE' guarded='testEnumWrapper(...):match FAILURE' guarded=g(1):false + chk(); // $ guarded='testEnumWrapper(...):not SUCCESS' guarded='testEnumWrapper(...):non-match SUCCESS' guarded='testEnumWrapper(...):FAILURE' guarded='testEnumWrapper(...):match FAILURE' guarded=g(1):false break; } } diff --git a/java/ql/test/library-tests/guards/GuardsInline.expected b/java/ql/test/library-tests/guards/GuardsInline.expected index b0bd3b04c62d..9d5ea1992c69 100644 --- a/java/ql/test/library-tests/guards/GuardsInline.expected +++ b/java/ql/test/library-tests/guards/GuardsInline.expected @@ -18,8 +18,9 @@ | Guards.java:39:9:39:13 | chk(...) | 's:match "bar"' | | Guards.java:42:9:42:13 | chk(...) | 's:foo' | | Guards.java:42:9:42:13 | chk(...) | 's:match "foo"' | +| Guards.java:42:9:42:13 | chk(...) | 's:non-match "bar"' | +| Guards.java:42:9:42:13 | chk(...) | 's:not bar' | | Guards.java:42:9:42:13 | chk(...) | g(3):false | -| Guards.java:45:9:45:13 | chk(...) | 's:match default' | | Guards.java:45:9:45:13 | chk(...) | 's:non-match "bar"' | | Guards.java:45:9:45:13 | chk(...) | 's:non-match "foo"' | | Guards.java:45:9:45:13 | chk(...) | 's:not bar' | @@ -61,9 +62,15 @@ | Guards.java:92:9:92:13 | chk(...) | g(Alt2):false | | Guards.java:95:9:95:13 | chk(...) | 'x:E2' | | Guards.java:95:9:95:13 | chk(...) | 'x:match E2' | +| Guards.java:95:9:95:13 | chk(...) | 'x:non-match E1' | +| Guards.java:95:9:95:13 | chk(...) | 'x:not E1' | | Guards.java:95:9:95:13 | chk(...) | g(3):false | | Guards.java:98:9:98:13 | chk(...) | 'x:E3' | | Guards.java:98:9:98:13 | chk(...) | 'x:match E3' | +| Guards.java:98:9:98:13 | chk(...) | 'x:non-match E1' | +| Guards.java:98:9:98:13 | chk(...) | 'x:non-match E2' | +| Guards.java:98:9:98:13 | chk(...) | 'x:not E1' | +| Guards.java:98:9:98:13 | chk(...) | 'x:not E2' | | Guards.java:98:9:98:13 | chk(...) | g(3):true | | Guards.java:103:7:103:11 | chk(...) | '...?...:...:null' | | Guards.java:103:7:103:11 | chk(...) | 'o == null:true' | @@ -113,6 +120,8 @@ | Guards.java:198:9:198:13 | chk(...) | g(1):true | | Guards.java:201:9:201:13 | chk(...) | 'testEnumWrapper(...):FAILURE' | | Guards.java:201:9:201:13 | chk(...) | 'testEnumWrapper(...):match FAILURE' | +| Guards.java:201:9:201:13 | chk(...) | 'testEnumWrapper(...):non-match SUCCESS' | +| Guards.java:201:9:201:13 | chk(...) | 'testEnumWrapper(...):not SUCCESS' | | Guards.java:201:9:201:13 | chk(...) | g(1):false | | Guards.java:213:5:213:9 | chk(...) | 'ensureNotNull(...):no exception' | | Guards.java:213:5:213:9 | chk(...) | 's:not null' | diff --git a/java/ql/test/library-tests/guards/guards.ql b/java/ql/test/library-tests/guards/guards.ql index e2d80a4e7387..21a23534ed66 100644 --- a/java/ql/test/library-tests/guards/guards.ql +++ b/java/ql/test/library-tests/guards/guards.ql @@ -1,8 +1,9 @@ import java import semmle.code.java.controlflow.Guards +import utils.test.BasicBlock from ConditionBlock cb, boolean testIsTrue, BasicBlock controlled where cb.controls(controlled, testIsTrue) and cb.getEnclosingCallable().getDeclaringType().hasName("Test") -select cb.getCondition(), testIsTrue, controlled +select cb.getCondition(), testIsTrue, getFirstAstNode(controlled) diff --git a/java/ql/test/library-tests/guards/guardslogic.expected b/java/ql/test/library-tests/guards/guardslogic.expected index 6bf536d3ce1c..f186c385b8ce 100644 --- a/java/ql/test/library-tests/guards/guardslogic.expected +++ b/java/ql/test/library-tests/guards/guardslogic.expected @@ -19,13 +19,15 @@ | Logic.java:17:11:17:15 | ... > ... | false | Logic.java:15:29:15:29 | i | | Logic.java:17:11:17:15 | ... > ... | true | Logic.java:17:18:17:23 | break | | Logic.java:19:9:19:12 | g(...) | false | Logic.java:24:7:24:17 | case ... | +| Logic.java:19:9:19:12 | g(...) | false | Logic.java:24:12:24:16 | "foo" | | Logic.java:19:9:19:12 | g(...) | false | Logic.java:26:7:26:14 | default | | Logic.java:19:9:19:12 | g(...) | true | Logic.java:20:7:20:16 | ; | +| Logic.java:22:7:22:17 | case ... | false | Logic.java:24:7:24:17 | case ... | +| Logic.java:22:7:22:17 | case ... | false | Logic.java:24:12:24:16 | "foo" | | Logic.java:22:7:22:17 | case ... | false | Logic.java:26:7:26:14 | default | -| Logic.java:22:7:22:17 | case ... | true | Logic.java:22:7:22:17 | case ... | +| Logic.java:22:7:22:17 | case ... | true | Logic.java:22:12:22:16 | "bar" | | Logic.java:24:7:24:17 | case ... | false | Logic.java:26:7:26:14 | default | -| Logic.java:24:7:24:17 | case ... | true | Logic.java:24:7:24:17 | case ... | -| Logic.java:26:7:26:14 | default | true | Logic.java:26:7:26:14 | default | +| Logic.java:24:7:24:17 | case ... | true | Logic.java:24:12:24:16 | "foo" | | Logic.java:29:16:29:19 | g(...) | false | Logic.java:29:30:29:30 | s | | Logic.java:29:16:29:19 | g(...) | false | Logic.java:30:30:31:5 | { ... } | | Logic.java:29:16:29:19 | g(...) | true | Logic.java:29:23:29:26 | null | diff --git a/java/ql/test/library-tests/guards/guardslogic.ql b/java/ql/test/library-tests/guards/guardslogic.ql index f2ce9fdaa365..e68be505ff71 100644 --- a/java/ql/test/library-tests/guards/guardslogic.ql +++ b/java/ql/test/library-tests/guards/guardslogic.ql @@ -1,9 +1,10 @@ import java import semmle.code.java.controlflow.Guards +import utils.test.BasicBlock from Guard g, BasicBlock bb, GuardValue gv where g.valueControls(bb, gv) and g.getEnclosingCallable().getDeclaringType().hasName("Logic") and (exists(gv.asBooleanValue()) or gv.isThrowsException() or gv.getDualValue().isThrowsException()) -select g, gv, bb +select g, gv, getFirstAstNode(bb) diff --git a/java/ql/test/library-tests/guards/guardspreconditions.ql b/java/ql/test/library-tests/guards/guardspreconditions.ql index 77e4a4e48c08..849ee6087bf8 100644 --- a/java/ql/test/library-tests/guards/guardspreconditions.ql +++ b/java/ql/test/library-tests/guards/guardspreconditions.ql @@ -1,9 +1,10 @@ import java import semmle.code.java.controlflow.Guards +import utils.test.BasicBlock from Guard g, BasicBlock bb, GuardValue gv where g.valueControls(bb, gv) and g.getEnclosingCallable().getDeclaringType().hasName("Preconditions") and (gv.isThrowsException() or gv.getDualValue().isThrowsException()) -select g, gv, bb +select g, gv, getFirstAstNode(bb) diff --git a/java/ql/test/library-tests/guards12/guard.expected b/java/ql/test/library-tests/guards12/guard.expected index fade9fd4e8fc..e12bf8c6edb6 100644 --- a/java/ql/test/library-tests/guards12/guard.expected +++ b/java/ql/test/library-tests/guards12/guard.expected @@ -1,55 +1,80 @@ hasBranchEdge -| Test.java:4:7:4:22 | case ... | Test.java:2:39:36:3 | { ... } | Test.java:4:7:4:22 | case ... | true | -| Test.java:5:7:5:17 | case ... | Test.java:2:39:36:3 | { ... } | Test.java:5:7:5:17 | case ... | true | -| Test.java:6:7:6:17 | case ... | Test.java:2:39:36:3 | { ... } | Test.java:6:7:6:17 | case ... | true | -| Test.java:7:7:7:16 | default | Test.java:2:39:36:3 | { ... } | Test.java:7:7:7:16 | default | true | -| Test.java:10:7:10:22 | case ... | Test.java:3:9:3:21 | x | Test.java:10:7:10:22 | case ... | true | -| Test.java:11:7:11:17 | case ... | Test.java:3:9:3:21 | x | Test.java:11:7:11:17 | case ... | true | -| Test.java:12:7:12:17 | case ... | Test.java:3:9:3:21 | x | Test.java:12:7:12:17 | case ... | true | -| Test.java:13:7:13:16 | default | Test.java:3:9:3:21 | x | Test.java:13:7:13:16 | default | true | +| Test.java:4:7:4:22 | case ... | Test.java:2:39:36:3 | { ... } | Test.java:4:7:4:22 | After case ... [match] | true | +| Test.java:4:7:4:22 | case ... | Test.java:2:39:36:3 | { ... } | Test.java:5:7:5:17 | case ... | false | +| Test.java:5:7:5:17 | case ... | Test.java:5:7:5:17 | case ... | Test.java:5:12:5:14 | "c" | true | +| Test.java:5:7:5:17 | case ... | Test.java:5:7:5:17 | case ... | Test.java:6:7:6:17 | case ... | false | +| Test.java:6:7:6:17 | case ... | Test.java:6:7:6:17 | case ... | Test.java:6:12:6:14 | "d" | true | +| Test.java:6:7:6:17 | case ... | Test.java:6:7:6:17 | case ... | Test.java:7:7:7:16 | default | false | +| Test.java:10:7:10:22 | case ... | Test.java:3:9:3:21 | x | Test.java:10:7:10:22 | After case ... [match] | true | +| Test.java:10:7:10:22 | case ... | Test.java:3:9:3:21 | x | Test.java:11:7:11:17 | case ... | false | +| Test.java:11:7:11:17 | case ... | Test.java:11:7:11:17 | case ... | Test.java:11:12:11:14 | "c" | true | +| Test.java:11:7:11:17 | case ... | Test.java:11:7:11:17 | case ... | Test.java:12:7:12:17 | case ... | false | +| Test.java:12:7:12:17 | case ... | Test.java:12:7:12:17 | case ... | Test.java:12:12:12:14 | "d" | true | +| Test.java:12:7:12:17 | case ... | Test.java:12:7:12:17 | case ... | Test.java:13:7:13:16 | default | false | +| Test.java:17:7:17:36 | case | Test.java:15:5:15:25 | var ...; | Test.java:17:7:17:36 | After case [no-match] | false | | Test.java:17:7:17:36 | case | Test.java:15:5:15:25 | var ...; | Test.java:17:19:17:19 | | true | -| Test.java:17:7:17:36 | case | Test.java:15:5:15:25 | var ...; | Test.java:18:7:18:17 | case ... | false | -| Test.java:17:7:17:36 | case | Test.java:15:5:15:25 | var ...; | Test.java:19:7:19:16 | default | false | +| Test.java:17:26:17:33 | ... == ... | Test.java:17:19:17:19 | | Test.java:17:26:17:33 | After ... == ... [false] | false | | Test.java:17:26:17:33 | ... == ... | Test.java:17:19:17:19 | | Test.java:17:38:17:40 | { ... } | true | -| Test.java:17:26:17:33 | ... == ... | Test.java:17:19:17:19 | | Test.java:18:7:18:17 | case ... | false | -| Test.java:17:26:17:33 | ... == ... | Test.java:17:19:17:19 | | Test.java:19:7:19:16 | default | false | -| Test.java:18:7:18:17 | case ... | Test.java:15:5:15:25 | var ...; | Test.java:18:7:18:17 | case ... | true | -| Test.java:18:7:18:17 | case ... | Test.java:17:19:17:19 | | Test.java:18:7:18:17 | case ... | true | -| Test.java:19:7:19:16 | default | Test.java:15:5:15:25 | var ...; | Test.java:19:7:19:16 | default | true | -| Test.java:19:7:19:16 | default | Test.java:17:19:17:19 | | Test.java:19:7:19:16 | default | true | +| Test.java:18:7:18:17 | case ... | Test.java:18:7:18:17 | case ... | Test.java:18:12:18:14 | "e" | true | +| Test.java:18:7:18:17 | case ... | Test.java:18:7:18:17 | case ... | Test.java:19:7:19:16 | default | false | | Test.java:21:13:21:19 | unknown | Test.java:21:5:21:42 | switch (...) | Test.java:21:23:21:23 | s | true | | Test.java:21:13:21:19 | unknown | Test.java:21:5:21:42 | switch (...) | Test.java:21:27:21:27 | s | false | -| Test.java:22:7:22:17 | case ... | Test.java:21:23:21:23 | s | Test.java:22:7:22:17 | case ... | true | -| Test.java:22:7:22:17 | case ... | Test.java:21:27:21:27 | s | Test.java:22:7:22:17 | case ... | true | +| Test.java:22:7:22:17 | case ... | Test.java:22:7:22:17 | case ... | Test.java:22:12:22:14 | "f" | true | +| Test.java:22:7:22:17 | case ... | Test.java:22:7:22:17 | case ... | Test.java:23:7:23:37 | case | false | +| Test.java:23:7:23:37 | case | Test.java:23:7:23:37 | case | Test.java:23:7:23:37 | After case [no-match] | false | | Test.java:23:7:23:37 | case | Test.java:23:7:23:37 | case | Test.java:23:19:23:20 | s2 | true | -| Test.java:23:7:23:37 | case | Test.java:23:7:23:37 | case | Test.java:24:7:24:17 | case ... | false | -| Test.java:23:7:23:37 | case | Test.java:23:7:23:37 | case | Test.java:25:7:25:16 | default | false | +| Test.java:23:27:23:34 | ... == ... | Test.java:23:19:23:20 | s2 | Test.java:23:27:23:34 | After ... == ... [false] | false | | Test.java:23:27:23:34 | ... == ... | Test.java:23:19:23:20 | s2 | Test.java:23:39:23:41 | { ... } | true | -| Test.java:23:27:23:34 | ... == ... | Test.java:23:19:23:20 | s2 | Test.java:24:7:24:17 | case ... | false | -| Test.java:23:27:23:34 | ... == ... | Test.java:23:19:23:20 | s2 | Test.java:25:7:25:16 | default | false | -| Test.java:24:7:24:17 | case ... | Test.java:23:7:23:37 | case | Test.java:24:7:24:17 | case ... | true | -| Test.java:24:7:24:17 | case ... | Test.java:23:19:23:20 | s2 | Test.java:24:7:24:17 | case ... | true | -| Test.java:25:7:25:16 | default | Test.java:23:7:23:37 | case | Test.java:25:7:25:16 | default | true | -| Test.java:25:7:25:16 | default | Test.java:23:19:23:20 | s2 | Test.java:25:7:25:16 | default | true | -| Test.java:28:7:28:15 | case ... | Test.java:27:5:27:14 | switch (...) | Test.java:28:7:28:15 | case ... | true | +| Test.java:24:7:24:17 | case ... | Test.java:24:7:24:17 | case ... | Test.java:24:12:24:14 | "g" | true | +| Test.java:24:7:24:17 | case ... | Test.java:24:7:24:17 | case ... | Test.java:25:7:25:16 | default | false | +| Test.java:28:7:28:15 | case ... | Test.java:27:5:27:14 | switch (...) | Test.java:28:12:28:14 | "h" | true | +| Test.java:28:7:28:15 | case ... | Test.java:27:5:27:14 | switch (...) | Test.java:29:7:29:34 | case | false | +| Test.java:29:7:29:34 | case | Test.java:29:7:29:34 | case | Test.java:29:7:29:34 | After case [no-match] | false | | Test.java:29:7:29:34 | case | Test.java:29:7:29:34 | case | Test.java:29:19:29:19 | | true | -| Test.java:29:7:29:34 | case | Test.java:29:7:29:34 | case | Test.java:30:7:30:15 | case ... | false | -| Test.java:29:7:29:34 | case | Test.java:29:7:29:34 | case | Test.java:33:7:33:14 | default | false | -| Test.java:29:26:29:33 | ... == ... | Test.java:29:19:29:19 | | Test.java:30:7:30:15 | case ... | false | -| Test.java:29:26:29:33 | ... == ... | Test.java:29:19:29:19 | | Test.java:30:7:30:15 | case ... | true | -| Test.java:29:26:29:33 | ... == ... | Test.java:29:19:29:19 | | Test.java:33:7:33:14 | default | false | -| Test.java:30:7:30:15 | case ... | Test.java:29:7:29:34 | case | Test.java:30:7:30:15 | case ... | true | -| Test.java:33:7:33:14 | default | Test.java:29:7:29:34 | case | Test.java:33:7:33:14 | default | true | -| Test.java:33:7:33:14 | default | Test.java:29:19:29:19 | | Test.java:33:7:33:14 | default | true | +| Test.java:29:26:29:33 | ... == ... | Test.java:29:19:29:19 | | Test.java:29:26:29:33 | After ... == ... [false] | false | +| Test.java:29:26:29:33 | ... == ... | Test.java:29:19:29:19 | | Test.java:29:26:29:33 | After ... == ... [true] | true | +| Test.java:30:7:30:15 | case ... | Test.java:30:7:30:15 | case ... | Test.java:30:12:30:14 | "i" | true | +| Test.java:30:7:30:15 | case ... | Test.java:30:7:30:15 | case ... | Test.java:33:7:33:14 | default | false | #select +| Test.java:5:7:5:17 | case ... | Test.java:3:20:3:20 | s | Test.java:5:12:5:14 | "c" | true | false | Test.java:6:7:6:17 | case ... | +| Test.java:5:7:5:17 | case ... | Test.java:3:20:3:20 | s | Test.java:5:12:5:14 | "c" | true | false | Test.java:6:12:6:14 | "d" | | Test.java:5:7:5:17 | case ... | Test.java:3:20:3:20 | s | Test.java:5:12:5:14 | "c" | true | false | Test.java:7:7:7:16 | default | -| Test.java:5:7:5:17 | case ... | Test.java:3:20:3:20 | s | Test.java:5:12:5:14 | "c" | true | true | Test.java:5:7:5:17 | case ... | +| Test.java:5:7:5:17 | case ... | Test.java:3:20:3:20 | s | Test.java:5:12:5:14 | "c" | true | true | Test.java:5:12:5:14 | "c" | | Test.java:6:7:6:17 | case ... | Test.java:3:20:3:20 | s | Test.java:6:12:6:14 | "d" | true | false | Test.java:7:7:7:16 | default | -| Test.java:6:7:6:17 | case ... | Test.java:3:20:3:20 | s | Test.java:6:12:6:14 | "d" | true | true | Test.java:6:7:6:17 | case ... | +| Test.java:6:7:6:17 | case ... | Test.java:3:20:3:20 | s | Test.java:6:12:6:14 | "d" | true | true | Test.java:6:12:6:14 | "d" | +| Test.java:11:7:11:17 | case ... | Test.java:9:13:9:13 | s | Test.java:11:12:11:14 | "c" | true | false | Test.java:12:7:12:17 | case ... | +| Test.java:11:7:11:17 | case ... | Test.java:9:13:9:13 | s | Test.java:11:12:11:14 | "c" | true | false | Test.java:12:12:12:14 | "d" | | Test.java:11:7:11:17 | case ... | Test.java:9:13:9:13 | s | Test.java:11:12:11:14 | "c" | true | false | Test.java:13:7:13:16 | default | -| Test.java:11:7:11:17 | case ... | Test.java:9:13:9:13 | s | Test.java:11:12:11:14 | "c" | true | true | Test.java:11:7:11:17 | case ... | +| Test.java:11:7:11:17 | case ... | Test.java:9:13:9:13 | s | Test.java:11:12:11:14 | "c" | true | true | Test.java:11:12:11:14 | "c" | | Test.java:12:7:12:17 | case ... | Test.java:9:13:9:13 | s | Test.java:12:12:12:14 | "d" | true | false | Test.java:13:7:13:16 | default | -| Test.java:12:7:12:17 | case ... | Test.java:9:13:9:13 | s | Test.java:12:12:12:14 | "d" | true | true | Test.java:12:7:12:17 | case ... | +| Test.java:12:7:12:17 | case ... | Test.java:9:13:9:13 | s | Test.java:12:12:12:14 | "d" | true | true | Test.java:12:12:12:14 | "d" | +| Test.java:17:26:17:33 | ... == ... | Test.java:17:26:17:28 | len | Test.java:17:33:17:33 | 4 | true | false | Test.java:17:26:17:33 | After ... == ... [false] | | Test.java:17:26:17:33 | ... == ... | Test.java:17:26:17:28 | len | Test.java:17:33:17:33 | 4 | true | true | Test.java:17:38:17:40 | { ... } | +| Test.java:18:7:18:17 | case ... | Test.java:16:13:16:13 | s | Test.java:18:12:18:14 | "e" | true | false | Test.java:19:7:19:16 | default | +| Test.java:18:7:18:17 | case ... | Test.java:16:13:16:13 | s | Test.java:18:12:18:14 | "e" | true | true | Test.java:18:12:18:14 | "e" | +| Test.java:22:7:22:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:22:12:22:14 | "f" | true | false | Test.java:23:7:23:37 | After case [no-match] | +| Test.java:22:7:22:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:22:12:22:14 | "f" | true | false | Test.java:23:7:23:37 | case | +| Test.java:22:7:22:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:22:12:22:14 | "f" | true | false | Test.java:23:19:23:20 | s2 | +| Test.java:22:7:22:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:22:12:22:14 | "f" | true | false | Test.java:23:27:23:34 | After ... == ... [false] | +| Test.java:22:7:22:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:22:12:22:14 | "f" | true | false | Test.java:23:39:23:41 | { ... } | +| Test.java:22:7:22:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:22:12:22:14 | "f" | true | false | Test.java:24:7:24:17 | case ... | +| Test.java:22:7:22:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:22:12:22:14 | "f" | true | false | Test.java:24:12:24:14 | "g" | +| Test.java:22:7:22:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:22:12:22:14 | "f" | true | false | Test.java:25:7:25:16 | default | +| Test.java:22:7:22:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:22:12:22:14 | "f" | true | true | Test.java:22:12:22:14 | "f" | +| Test.java:23:27:23:34 | ... == ... | Test.java:23:27:23:29 | len | Test.java:23:34:23:34 | 4 | true | false | Test.java:23:27:23:34 | After ... == ... [false] | | Test.java:23:27:23:34 | ... == ... | Test.java:23:27:23:29 | len | Test.java:23:34:23:34 | 4 | true | true | Test.java:23:39:23:41 | { ... } | -| Test.java:28:7:28:15 | case ... | Test.java:27:13:27:13 | s | Test.java:28:12:28:14 | "h" | true | true | Test.java:28:7:28:15 | case ... | +| Test.java:24:7:24:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:24:12:24:14 | "g" | true | false | Test.java:25:7:25:16 | default | +| Test.java:24:7:24:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:24:12:24:14 | "g" | true | true | Test.java:24:12:24:14 | "g" | +| Test.java:28:7:28:15 | case ... | Test.java:27:13:27:13 | s | Test.java:28:12:28:14 | "h" | true | false | Test.java:29:7:29:34 | After case [no-match] | +| Test.java:28:7:28:15 | case ... | Test.java:27:13:27:13 | s | Test.java:28:12:28:14 | "h" | true | false | Test.java:29:7:29:34 | case | +| Test.java:28:7:28:15 | case ... | Test.java:27:13:27:13 | s | Test.java:28:12:28:14 | "h" | true | false | Test.java:29:19:29:19 | | +| Test.java:28:7:28:15 | case ... | Test.java:27:13:27:13 | s | Test.java:28:12:28:14 | "h" | true | false | Test.java:29:26:29:33 | After ... == ... [false] | +| Test.java:28:7:28:15 | case ... | Test.java:27:13:27:13 | s | Test.java:28:12:28:14 | "h" | true | false | Test.java:29:26:29:33 | After ... == ... [true] | +| Test.java:28:7:28:15 | case ... | Test.java:27:13:27:13 | s | Test.java:28:12:28:14 | "h" | true | false | Test.java:30:7:30:15 | case ... | +| Test.java:28:7:28:15 | case ... | Test.java:27:13:27:13 | s | Test.java:28:12:28:14 | "h" | true | false | Test.java:30:12:30:14 | "i" | +| Test.java:28:7:28:15 | case ... | Test.java:27:13:27:13 | s | Test.java:28:12:28:14 | "h" | true | false | Test.java:33:7:33:14 | default | +| Test.java:28:7:28:15 | case ... | Test.java:27:13:27:13 | s | Test.java:28:12:28:14 | "h" | true | true | Test.java:28:12:28:14 | "h" | +| Test.java:29:26:29:33 | ... == ... | Test.java:29:26:29:28 | len | Test.java:29:33:29:33 | 4 | true | false | Test.java:29:26:29:33 | After ... == ... [false] | +| Test.java:29:26:29:33 | ... == ... | Test.java:29:26:29:28 | len | Test.java:29:33:29:33 | 4 | true | true | Test.java:29:26:29:33 | After ... == ... [true] | +| Test.java:30:7:30:15 | case ... | Test.java:27:13:27:13 | s | Test.java:30:12:30:14 | "i" | true | false | Test.java:33:7:33:14 | default | +| Test.java:30:7:30:15 | case ... | Test.java:27:13:27:13 | s | Test.java:30:12:30:14 | "i" | true | true | Test.java:30:12:30:14 | "i" | diff --git a/java/ql/test/library-tests/guards12/guard.ql b/java/ql/test/library-tests/guards12/guard.ql index d53dfdbc7135..39f9fdbe9394 100644 --- a/java/ql/test/library-tests/guards12/guard.ql +++ b/java/ql/test/library-tests/guards12/guard.ql @@ -1,8 +1,15 @@ import java import semmle.code.java.controlflow.Guards +import utils.test.BasicBlock -query predicate hasBranchEdge(Guard g, BasicBlock bb1, BasicBlock bb2, GuardValue branch) { - g.hasValueBranchEdge(bb1, bb2, branch) +query predicate hasBranchEdge( + Guard g, ControlFlowNode bb1ref, ControlFlowNode bb2ref, GuardValue branch +) { + exists(BasicBlock bb1, BasicBlock bb2 | + getFirstAstNodeOrSynth(bb1) = bb1ref and + getFirstAstNodeOrSynth(bb2) = bb2ref and + g.hasValueBranchEdge(bb1, bb2, branch) + ) } from Guard g, BasicBlock bb, boolean branch, Expr e1, Expr e2, boolean pol @@ -10,4 +17,4 @@ where g.controls(bb, branch) and g.isEquality(e1, e2, pol) and not e1 instanceof Literal -select g, e1, e2, pol, branch, bb +select g, e1, e2, pol, branch, getFirstAstNodeOrSynth(bb) diff --git a/java/ql/test/library-tests/java7/MultiCatch/MultiCatchControlFlow.expected b/java/ql/test/library-tests/java7/MultiCatch/MultiCatchControlFlow.expected index d389eb658f5e..54bd6b9388f2 100644 --- a/java/ql/test/library-tests/java7/MultiCatch/MultiCatchControlFlow.expected +++ b/java/ql/test/library-tests/java7/MultiCatch/MultiCatchControlFlow.expected @@ -1,5 +1,9 @@ +| MultiCatch.java:6:14:6:23 | Entry | MultiCatch.java:6:14:6:23 | { ... } | +| MultiCatch.java:6:14:6:23 | Normal Exit | MultiCatch.java:6:14:6:23 | Exit | | MultiCatch.java:6:14:6:23 | super(...) | MultiCatch.java:6:14:6:23 | Normal Exit | | MultiCatch.java:6:14:6:23 | { ... } | MultiCatch.java:6:14:6:23 | super(...) | +| MultiCatch.java:7:14:7:23 | Entry | MultiCatch.java:8:2:20:2 | { ... } | +| MultiCatch.java:7:14:7:23 | Exceptional Exit | MultiCatch.java:7:14:7:23 | Exit | | MultiCatch.java:8:2:20:2 | { ... } | MultiCatch.java:9:3:19:3 | try ... | | MultiCatch.java:9:3:19:3 | try ... | MultiCatch.java:10:3:15:3 | { ... } | | MultiCatch.java:10:3:15:3 | { ... } | MultiCatch.java:11:4:11:8 | if (...) | @@ -10,6 +14,7 @@ | MultiCatch.java:12:11:12:27 | new IOException(...) | MultiCatch.java:12:5:12:28 | throw ... | | MultiCatch.java:14:5:14:29 | throw ... | MultiCatch.java:15:5:15:37 | catch (...) | | MultiCatch.java:14:11:14:28 | new SQLException(...) | MultiCatch.java:14:5:14:29 | throw ... | +| MultiCatch.java:15:5:15:37 | catch (...) | MultiCatch.java:7:14:7:23 | Exceptional Exit | | MultiCatch.java:15:5:15:37 | catch (...) | MultiCatch.java:15:36:15:36 | e | | MultiCatch.java:15:36:15:36 | e | MultiCatch.java:16:3:19:3 | { ... } | | MultiCatch.java:16:3:19:3 | { ... } | MultiCatch.java:17:4:17:23 | ; | @@ -18,6 +23,9 @@ | MultiCatch.java:17:4:17:23 | ; | MultiCatch.java:17:4:17:4 | e | | MultiCatch.java:18:4:18:11 | throw ... | MultiCatch.java:7:14:7:23 | Exceptional Exit | | MultiCatch.java:18:10:18:10 | e | MultiCatch.java:18:4:18:11 | throw ... | +| MultiCatch.java:22:14:22:24 | Entry | MultiCatch.java:23:2:33:2 | { ... } | +| MultiCatch.java:22:14:22:24 | Exceptional Exit | MultiCatch.java:22:14:22:24 | Exit | +| MultiCatch.java:22:14:22:24 | Normal Exit | MultiCatch.java:22:14:22:24 | Exit | | MultiCatch.java:23:2:33:2 | { ... } | MultiCatch.java:24:3:32:4 | try ... | | MultiCatch.java:24:3:32:4 | try ... | MultiCatch.java:25:3:31:3 | { ... } | | MultiCatch.java:25:3:31:3 | { ... } | MultiCatch.java:26:4:26:8 | if (...) | @@ -31,12 +39,14 @@ | MultiCatch.java:28:12:28:12 | c | MultiCatch.java:30:10:30:24 | new Exception(...) | | MultiCatch.java:29:5:29:29 | throw ... | MultiCatch.java:31:5:31:37 | catch (...) | | MultiCatch.java:29:11:29:28 | new SQLException(...) | MultiCatch.java:29:5:29:29 | throw ... | -| MultiCatch.java:30:4:30:25 | throw ... | MultiCatch.java:22:14:22:24 | Exceptional Exit | | MultiCatch.java:30:4:30:25 | throw ... | MultiCatch.java:31:5:31:37 | catch (...) | | MultiCatch.java:30:10:30:24 | new Exception(...) | MultiCatch.java:30:4:30:25 | throw ... | +| MultiCatch.java:31:5:31:37 | catch (...) | MultiCatch.java:22:14:22:24 | Exceptional Exit | | MultiCatch.java:31:5:31:37 | catch (...) | MultiCatch.java:31:36:31:36 | e | | MultiCatch.java:31:36:31:36 | e | MultiCatch.java:32:3:32:4 | { ... } | | MultiCatch.java:32:3:32:4 | { ... } | MultiCatch.java:22:14:22:24 | Normal Exit | +| MultiCatch.java:35:14:35:26 | Entry | MultiCatch.java:36:2:42:2 | { ... } | +| MultiCatch.java:35:14:35:26 | Normal Exit | MultiCatch.java:35:14:35:26 | Exit | | MultiCatch.java:36:2:42:2 | { ... } | MultiCatch.java:37:3:41:4 | try ... | | MultiCatch.java:37:3:41:4 | try ... | MultiCatch.java:38:3:40:3 | { ... } | | MultiCatch.java:38:3:40:3 | { ... } | MultiCatch.java:39:10:39:26 | new IOException(...) | diff --git a/java/ql/test/library-tests/java7/MultiCatch/MultiCatchControlFlow.ql b/java/ql/test/library-tests/java7/MultiCatch/MultiCatchControlFlow.ql index d9263e160888..1f589cc46083 100644 --- a/java/ql/test/library-tests/java7/MultiCatch/MultiCatchControlFlow.ql +++ b/java/ql/test/library-tests/java7/MultiCatch/MultiCatchControlFlow.ql @@ -1,5 +1,6 @@ import default +import utils.test.AstCfg from ControlFlowNode n -where n.getEnclosingStmt().getCompilationUnit().fromSource() -select n, n.getASuccessor() +where n.getEnclosingCallable().getCompilationUnit().fromSource() +select n, getAnAstSuccessor(n) diff --git a/java/ql/test/library-tests/locations/NegativeLiteralLocation.ql b/java/ql/test/library-tests/locations/NegativeLiteralLocation.ql index c91c02639945..a5e9054cd756 100644 --- a/java/ql/test/library-tests/locations/NegativeLiteralLocation.ql +++ b/java/ql/test/library-tests/locations/NegativeLiteralLocation.ql @@ -1,5 +1,5 @@ import default from MinusExpr me, Literal l -where l = me.getExpr() +where l = me.getOperand() select me, l diff --git a/java/ql/test/library-tests/pattern-instanceof/cfg.expected b/java/ql/test/library-tests/pattern-instanceof/cfg.expected index 5ef73c8ac78d..92f64965223d 100644 --- a/java/ql/test/library-tests/pattern-instanceof/cfg.expected +++ b/java/ql/test/library-tests/pattern-instanceof/cfg.expected @@ -1,8 +1,8 @@ -| Test.java:1:14:1:17 | Exceptional Exit | Test.java:1:14:1:17 | Exit | +| Test.java:1:14:1:17 | Entry | Test.java:1:14:1:17 | { ... } | | Test.java:1:14:1:17 | Normal Exit | Test.java:1:14:1:17 | Exit | | Test.java:1:14:1:17 | super(...) | Test.java:1:14:1:17 | Normal Exit | | Test.java:1:14:1:17 | { ... } | Test.java:1:14:1:17 | super(...) | -| Test.java:3:22:3:25 | Exceptional Exit | Test.java:3:22:3:25 | Exit | +| Test.java:3:22:3:25 | Entry | Test.java:3:40:20:3 | { ... } | | Test.java:3:22:3:25 | Normal Exit | Test.java:3:22:3:25 | Exit | | Test.java:3:40:20:3 | { ... } | Test.java:5:5:5:34 | var ...; | | Test.java:5:5:5:34 | var ...; | Test.java:5:26:5:33 | source(...) | @@ -50,35 +50,39 @@ | Test.java:17:7:17:26 | sink(...) | Test.java:3:22:3:25 | Normal Exit | | Test.java:17:7:17:27 | ; | Test.java:17:12:17:25 | alsoNotTainted | | Test.java:17:12:17:25 | alsoNotTainted | Test.java:17:7:17:26 | sink(...) | -| Test.java:22:24:22:29 | Exceptional Exit | Test.java:22:24:22:29 | Exit | +| Test.java:22:24:22:29 | Entry | Test.java:22:33:22:53 | { ... } | | Test.java:22:24:22:29 | Normal Exit | Test.java:22:24:22:29 | Exit | | Test.java:22:33:22:53 | { ... } | Test.java:22:42:22:50 | "tainted" | | Test.java:22:35:22:51 | return ... | Test.java:22:24:22:29 | Normal Exit | | Test.java:22:42:22:50 | "tainted" | Test.java:22:35:22:51 | return ... | -| Test.java:23:22:23:25 | Exceptional Exit | Test.java:23:22:23:25 | Exit | +| Test.java:23:22:23:25 | Entry | Test.java:23:40:23:42 | { ... } | | Test.java:23:22:23:25 | Normal Exit | Test.java:23:22:23:25 | Exit | | Test.java:23:40:23:42 | { ... } | Test.java:23:22:23:25 | Normal Exit | | Test.java:27:8:27:12 | ...=... | Test.java:27:8:27:12 | ; | | Test.java:27:8:27:12 | ...=... | Test.java:27:8:27:12 | Normal Exit | | Test.java:27:8:27:12 | ; | Test.java:27:8:27:12 | this | | Test.java:27:8:27:12 | ; | Test.java:27:8:27:12 | this | -| Test.java:27:8:27:12 | Exceptional Exit | Test.java:27:8:27:12 | Exit | +| Test.java:27:8:27:12 | Entry | Test.java:27:8:27:12 | { ... } | | Test.java:27:8:27:12 | Normal Exit | Test.java:27:8:27:12 | Exit | | Test.java:27:8:27:12 | i | Test.java:27:8:27:12 | ...=... | | Test.java:27:8:27:12 | otherField | Test.java:27:8:27:12 | ...=... | | Test.java:27:8:27:12 | super(...) | Test.java:27:8:27:12 | ; | -| Test.java:27:8:27:12 | this | Test.java:27:8:27:12 | i | -| Test.java:27:8:27:12 | this | Test.java:27:8:27:12 | otherField | +| Test.java:27:8:27:12 | this | Test.java:27:8:27:12 | this.i | +| Test.java:27:8:27:12 | this | Test.java:27:8:27:12 | this.otherField | +| Test.java:27:8:27:12 | this.i | Test.java:27:8:27:12 | i | +| Test.java:27:8:27:12 | this.otherField | Test.java:27:8:27:12 | otherField | | Test.java:27:8:27:12 | { ... } | Test.java:27:8:27:12 | super(...) | | Test.java:28:8:28:12 | ...=... | Test.java:28:8:28:12 | ; | | Test.java:28:8:28:12 | ...=... | Test.java:28:8:28:12 | Normal Exit | | Test.java:28:8:28:12 | ; | Test.java:28:8:28:12 | this | | Test.java:28:8:28:12 | ; | Test.java:28:8:28:12 | this | -| Test.java:28:8:28:12 | Exceptional Exit | Test.java:28:8:28:12 | Exit | +| Test.java:28:8:28:12 | Entry | Test.java:28:8:28:12 | { ... } | | Test.java:28:8:28:12 | Normal Exit | Test.java:28:8:28:12 | Exit | | Test.java:28:8:28:12 | nonTaintedField | Test.java:28:8:28:12 | ...=... | | Test.java:28:8:28:12 | super(...) | Test.java:28:8:28:12 | ; | | Test.java:28:8:28:12 | taintedField | Test.java:28:8:28:12 | ...=... | -| Test.java:28:8:28:12 | this | Test.java:28:8:28:12 | nonTaintedField | -| Test.java:28:8:28:12 | this | Test.java:28:8:28:12 | taintedField | +| Test.java:28:8:28:12 | this | Test.java:28:8:28:12 | this.nonTaintedField | +| Test.java:28:8:28:12 | this | Test.java:28:8:28:12 | this.taintedField | +| Test.java:28:8:28:12 | this.nonTaintedField | Test.java:28:8:28:12 | nonTaintedField | +| Test.java:28:8:28:12 | this.taintedField | Test.java:28:8:28:12 | taintedField | | Test.java:28:8:28:12 | { ... } | Test.java:28:8:28:12 | super(...) | diff --git a/java/ql/test/library-tests/pattern-instanceof/cfg.ql b/java/ql/test/library-tests/pattern-instanceof/cfg.ql index db2cc49bc0b6..7f87f2d61f5c 100644 --- a/java/ql/test/library-tests/pattern-instanceof/cfg.ql +++ b/java/ql/test/library-tests/pattern-instanceof/cfg.ql @@ -1,5 +1,6 @@ import java +import utils.test.AstCfg from ControlFlowNode cn where cn.getLocation().getFile().getBaseName() = "Test.java" -select cn, cn.getASuccessor() +select cn, getAnAstSuccessor(cn) diff --git a/java/ql/test/library-tests/pattern-switch/cfg/test.expected b/java/ql/test/library-tests/pattern-switch/cfg/test.expected index f9058bd8f4c2..d398c5f6ecd3 100644 --- a/java/ql/test/library-tests/pattern-switch/cfg/test.expected +++ b/java/ql/test/library-tests/pattern-switch/cfg/test.expected @@ -1,32 +1,35 @@ -| Exhaustive.java:1:14:1:23 | Exceptional Exit | Exhaustive.java:1:14:1:23 | Exit | +| Exhaustive.java:1:14:1:23 | Entry | Exhaustive.java:1:14:1:23 | { ... } | | Exhaustive.java:1:14:1:23 | Normal Exit | Exhaustive.java:1:14:1:23 | Exit | | Exhaustive.java:1:14:1:23 | super(...) | Exhaustive.java:1:14:1:23 | Normal Exit | | Exhaustive.java:1:14:1:23 | { ... } | Exhaustive.java:1:14:1:23 | super(...) | -| Exhaustive.java:3:8:3:8 | Exceptional Exit | Exhaustive.java:3:8:3:8 | Exit | -| Exhaustive.java:3:8:3:8 | Exceptional Exit | Exhaustive.java:3:8:3:8 | Exit | +| Exhaustive.java:3:8:3:8 | Entry | Exhaustive.java:3:8:3:8 | { ... } | +| Exhaustive.java:3:8:3:8 | Entry | Exhaustive.java:3:8:3:8 | { ... } | | Exhaustive.java:3:8:3:8 | Normal Exit | Exhaustive.java:3:8:3:8 | Exit | | Exhaustive.java:3:8:3:8 | Normal Exit | Exhaustive.java:3:8:3:8 | Exit | | Exhaustive.java:3:8:3:8 | super(...) | Exhaustive.java:3:8:3:8 | Normal Exit | | Exhaustive.java:3:8:3:8 | { ... } | Exhaustive.java:3:8:3:8 | super(...) | | Exhaustive.java:3:8:3:8 | { ... } | Exhaustive.java:3:12:3:12 | ; | | Exhaustive.java:3:12:3:12 | ...=... | Exhaustive.java:3:15:3:15 | ; | -| Exhaustive.java:3:12:3:12 | ; | Exhaustive.java:3:12:3:12 | new E(...) | +| Exhaustive.java:3:12:3:12 | ; | Exhaustive.java:3:12:3:12 | A | +| Exhaustive.java:3:12:3:12 | A | Exhaustive.java:3:12:3:12 | new E(...) | | Exhaustive.java:3:12:3:12 | new E(...) | Exhaustive.java:3:12:3:12 | ...=... | | Exhaustive.java:3:15:3:15 | ...=... | Exhaustive.java:3:18:3:18 | ; | -| Exhaustive.java:3:15:3:15 | ; | Exhaustive.java:3:15:3:15 | new E(...) | +| Exhaustive.java:3:15:3:15 | ; | Exhaustive.java:3:15:3:15 | B | +| Exhaustive.java:3:15:3:15 | B | Exhaustive.java:3:15:3:15 | new E(...) | | Exhaustive.java:3:15:3:15 | new E(...) | Exhaustive.java:3:15:3:15 | ...=... | | Exhaustive.java:3:18:3:18 | ...=... | Exhaustive.java:3:8:3:8 | Normal Exit | -| Exhaustive.java:3:18:3:18 | ; | Exhaustive.java:3:18:3:18 | new E(...) | +| Exhaustive.java:3:18:3:18 | ; | Exhaustive.java:3:18:3:18 | C | +| Exhaustive.java:3:18:3:18 | C | Exhaustive.java:3:18:3:18 | new E(...) | | Exhaustive.java:3:18:3:18 | new E(...) | Exhaustive.java:3:18:3:18 | ...=... | -| Exhaustive.java:5:15:5:15 | Exceptional Exit | Exhaustive.java:5:15:5:15 | Exit | +| Exhaustive.java:5:15:5:15 | Entry | Exhaustive.java:5:15:5:15 | { ... } | | Exhaustive.java:5:15:5:15 | Normal Exit | Exhaustive.java:5:15:5:15 | Exit | | Exhaustive.java:5:15:5:15 | super(...) | Exhaustive.java:5:15:5:15 | Normal Exit | | Exhaustive.java:5:15:5:15 | { ... } | Exhaustive.java:5:15:5:15 | super(...) | -| Exhaustive.java:6:15:6:15 | Exceptional Exit | Exhaustive.java:6:15:6:15 | Exit | +| Exhaustive.java:6:15:6:15 | Entry | Exhaustive.java:6:15:6:15 | { ... } | | Exhaustive.java:6:15:6:15 | Normal Exit | Exhaustive.java:6:15:6:15 | Exit | | Exhaustive.java:6:15:6:15 | super(...) | Exhaustive.java:6:15:6:15 | Normal Exit | | Exhaustive.java:6:15:6:15 | { ... } | Exhaustive.java:6:15:6:15 | super(...) | -| Exhaustive.java:8:22:8:25 | Exceptional Exit | Exhaustive.java:8:22:8:25 | Exit | +| Exhaustive.java:8:22:8:25 | Entry | Exhaustive.java:8:47:35:3 | { ... } | | Exhaustive.java:8:22:8:25 | Normal Exit | Exhaustive.java:8:22:8:25 | Exit | | Exhaustive.java:8:47:35:3 | { ... } | Exhaustive.java:11:5:11:14 | switch (...) | | Exhaustive.java:11:5:11:14 | switch (...) | Exhaustive.java:11:13:11:13 | o | @@ -40,14 +43,17 @@ | Exhaustive.java:13:25:13:27 | { ... } | Exhaustive.java:18:5:18:14 | switch (...) | | Exhaustive.java:18:5:18:14 | switch (...) | Exhaustive.java:18:13:18:13 | e | | Exhaustive.java:18:13:18:13 | e | Exhaustive.java:19:7:19:15 | case ... | -| Exhaustive.java:18:13:18:13 | e | Exhaustive.java:20:7:20:15 | case ... | -| Exhaustive.java:18:13:18:13 | e | Exhaustive.java:21:7:21:15 | case ... | -| Exhaustive.java:18:13:18:13 | e | Exhaustive.java:24:5:24:14 | switch (...) | -| Exhaustive.java:19:7:19:15 | case ... | Exhaustive.java:19:17:19:19 | { ... } | +| Exhaustive.java:19:7:19:15 | case ... | Exhaustive.java:19:12:19:12 | A | +| Exhaustive.java:19:7:19:15 | case ... | Exhaustive.java:20:7:20:15 | case ... | +| Exhaustive.java:19:12:19:12 | A | Exhaustive.java:19:17:19:19 | { ... } | | Exhaustive.java:19:17:19:19 | { ... } | Exhaustive.java:24:5:24:14 | switch (...) | -| Exhaustive.java:20:7:20:15 | case ... | Exhaustive.java:20:17:20:19 | { ... } | +| Exhaustive.java:20:7:20:15 | case ... | Exhaustive.java:20:12:20:12 | B | +| Exhaustive.java:20:7:20:15 | case ... | Exhaustive.java:21:7:21:15 | case ... | +| Exhaustive.java:20:12:20:12 | B | Exhaustive.java:20:17:20:19 | { ... } | | Exhaustive.java:20:17:20:19 | { ... } | Exhaustive.java:24:5:24:14 | switch (...) | -| Exhaustive.java:21:7:21:15 | case ... | Exhaustive.java:21:17:21:19 | { ... } | +| Exhaustive.java:21:7:21:15 | case ... | Exhaustive.java:21:12:21:12 | C | +| Exhaustive.java:21:7:21:15 | case ... | Exhaustive.java:24:5:24:14 | switch (...) | +| Exhaustive.java:21:12:21:12 | C | Exhaustive.java:21:17:21:19 | { ... } | | Exhaustive.java:21:17:21:19 | { ... } | Exhaustive.java:24:5:24:14 | switch (...) | | Exhaustive.java:24:5:24:14 | switch (...) | Exhaustive.java:24:13:24:13 | i | | Exhaustive.java:24:13:24:13 | i | Exhaustive.java:25:7:25:17 | case | @@ -65,11 +71,11 @@ | Exhaustive.java:31:14:31:14 | | Exhaustive.java:8:22:8:25 | Normal Exit | | Exhaustive.java:32:7:32:15 | case | Exhaustive.java:32:14:32:14 | | | Exhaustive.java:32:14:32:14 | | Exhaustive.java:8:22:8:25 | Normal Exit | -| Test.java:1:14:1:17 | Exceptional Exit | Test.java:1:14:1:17 | Exit | +| Test.java:1:14:1:17 | Entry | Test.java:1:14:1:17 | { ... } | | Test.java:1:14:1:17 | Normal Exit | Test.java:1:14:1:17 | Exit | | Test.java:1:14:1:17 | super(...) | Test.java:1:14:1:17 | Normal Exit | | Test.java:1:14:1:17 | { ... } | Test.java:1:14:1:17 | super(...) | -| Test.java:3:22:3:25 | Exceptional Exit | Test.java:3:22:3:25 | Exit | +| Test.java:3:22:3:25 | Entry | Test.java:3:41:134:3 | { ... } | | Test.java:3:22:3:25 | Normal Exit | Test.java:3:22:3:25 | Exit | | Test.java:3:41:134:3 | { ... } | Test.java:5:6:5:19 | switch (...) | | Test.java:5:6:5:19 | switch (...) | Test.java:5:14:5:18 | thing | @@ -79,14 +85,12 @@ | Test.java:6:20:6:20 | s | Test.java:6:25:6:34 | System.out | | Test.java:6:25:6:34 | System.out | Test.java:6:44:6:44 | s | | Test.java:6:25:6:45 | println(...) | Test.java:11:6:11:19 | switch (...) | -| Test.java:6:25:6:46 | ; | Test.java:6:25:6:34 | System.out | | Test.java:6:44:6:44 | s | Test.java:6:25:6:45 | println(...) | | Test.java:7:8:7:24 | case | Test.java:7:21:7:21 | i | | Test.java:7:8:7:24 | case | Test.java:8:8:8:17 | default | | Test.java:7:21:7:21 | i | Test.java:7:26:7:35 | System.out | | Test.java:7:26:7:35 | System.out | Test.java:7:45:7:58 | "An integer: " | | Test.java:7:26:7:63 | println(...) | Test.java:11:6:11:19 | switch (...) | -| Test.java:7:26:7:64 | ; | Test.java:7:26:7:35 | System.out | | Test.java:7:45:7:58 | "An integer: " | Test.java:7:62:7:62 | i | | Test.java:7:45:7:62 | ... + ... | Test.java:7:26:7:63 | println(...) | | Test.java:7:62:7:62 | i | Test.java:7:45:7:62 | ... + ... | @@ -136,19 +140,19 @@ | Test.java:28:34:28:38 | thing | Test.java:29:8:29:21 | case | | Test.java:29:8:29:21 | case | Test.java:29:20:29:20 | s | | Test.java:29:8:29:21 | case | Test.java:31:8:31:22 | case | -| Test.java:29:20:29:20 | s | Test.java:30:10:30:17 | yield ... | -| Test.java:30:10:30:17 | yield ... | Test.java:30:16:30:16 | s | -| Test.java:30:16:30:16 | s | Test.java:28:10:28:39 | thingAsString2 | +| Test.java:29:20:29:20 | s | Test.java:30:16:30:16 | s | +| Test.java:30:10:30:17 | yield ... | Test.java:28:10:28:39 | thingAsString2 | +| Test.java:30:16:30:16 | s | Test.java:30:10:30:17 | yield ... | | Test.java:31:8:31:22 | case | Test.java:31:21:31:21 | i | | Test.java:31:8:31:22 | case | Test.java:33:8:33:15 | default | -| Test.java:31:21:31:21 | i | Test.java:32:10:32:34 | yield ... | -| Test.java:32:10:32:34 | yield ... | Test.java:32:16:32:29 | "An integer: " | +| Test.java:31:21:31:21 | i | Test.java:32:16:32:29 | "An integer: " | +| Test.java:32:10:32:34 | yield ... | Test.java:28:10:28:39 | thingAsString2 | | Test.java:32:16:32:29 | "An integer: " | Test.java:32:33:32:33 | i | -| Test.java:32:16:32:33 | ... + ... | Test.java:28:10:28:39 | thingAsString2 | +| Test.java:32:16:32:33 | ... + ... | Test.java:32:10:32:34 | yield ... | | Test.java:32:33:32:33 | i | Test.java:32:16:32:33 | ... + ... | -| Test.java:33:8:33:15 | default | Test.java:34:10:34:32 | yield ... | -| Test.java:34:10:34:32 | yield ... | Test.java:34:16:34:31 | "Something else" | -| Test.java:34:16:34:31 | "Something else" | Test.java:28:10:28:39 | thingAsString2 | +| Test.java:33:8:33:15 | default | Test.java:34:16:34:31 | "Something else" | +| Test.java:34:10:34:32 | yield ... | Test.java:28:10:28:39 | thingAsString2 | +| Test.java:34:16:34:31 | "Something else" | Test.java:34:10:34:32 | yield ... | | Test.java:37:6:37:18 | switch (...) | Test.java:37:13:37:17 | thing | | Test.java:37:13:37:17 | thing | Test.java:38:8:38:42 | case | | Test.java:38:8:38:42 | case | Test.java:38:20:38:20 | s | @@ -195,7 +199,6 @@ | Test.java:50:41:50:41 | 3 | Test.java:50:27:50:41 | ... == ... | | Test.java:50:46:50:55 | System.out | Test.java:50:65:50:74 | "Length 3" | | Test.java:50:46:50:75 | println(...) | Test.java:55:6:55:26 | switch (...) | -| Test.java:50:46:50:76 | ; | Test.java:50:46:50:55 | System.out | | Test.java:50:65:50:74 | "Length 3" | Test.java:50:46:50:75 | println(...) | | Test.java:51:8:51:44 | case | Test.java:51:20:51:20 | s | | Test.java:51:8:51:44 | case | Test.java:52:8:52:17 | default | @@ -207,22 +210,22 @@ | Test.java:51:41:51:41 | 5 | Test.java:51:27:51:41 | ... == ... | | Test.java:51:46:51:55 | System.out | Test.java:51:65:51:74 | "Length 5" | | Test.java:51:46:51:75 | println(...) | Test.java:55:6:55:26 | switch (...) | -| Test.java:51:46:51:76 | ; | Test.java:51:46:51:55 | System.out | | Test.java:51:65:51:74 | "Length 5" | Test.java:51:46:51:75 | println(...) | | Test.java:52:8:52:17 | default | Test.java:52:19:52:21 | { ... } | | Test.java:52:19:52:21 | { ... } | Test.java:55:6:55:26 | switch (...) | | Test.java:55:6:55:26 | switch (...) | Test.java:55:21:55:25 | thing | | Test.java:55:13:55:25 | (...)... | Test.java:56:8:56:21 | case ... | -| Test.java:55:13:55:25 | (...)... | Test.java:58:8:58:21 | case ... | -| Test.java:55:13:55:25 | (...)... | Test.java:61:8:61:42 | case | -| Test.java:55:13:55:25 | (...)... | Test.java:69:8:69:26 | case null, default | | Test.java:55:21:55:25 | thing | Test.java:55:13:55:25 | (...)... | -| Test.java:56:8:56:21 | case ... | Test.java:57:10:57:44 | ; | +| Test.java:56:8:56:21 | case ... | Test.java:56:13:56:20 | "Const1" | +| Test.java:56:8:56:21 | case ... | Test.java:58:8:58:21 | case ... | +| Test.java:56:13:56:20 | "Const1" | Test.java:57:10:57:44 | ; | | Test.java:57:10:57:19 | System.out | Test.java:57:29:57:42 | "It's Const1!" | -| Test.java:57:10:57:43 | println(...) | Test.java:58:8:58:21 | case ... | +| Test.java:57:10:57:43 | println(...) | Test.java:59:10:59:54 | ; | | Test.java:57:10:57:44 | ; | Test.java:57:10:57:19 | System.out | | Test.java:57:29:57:42 | "It's Const1!" | Test.java:57:10:57:43 | println(...) | -| Test.java:58:8:58:21 | case ... | Test.java:59:10:59:54 | ; | +| Test.java:58:8:58:21 | case ... | Test.java:58:13:58:20 | "Const2" | +| Test.java:58:8:58:21 | case ... | Test.java:61:8:61:42 | case | +| Test.java:58:13:58:20 | "Const2" | Test.java:59:10:59:54 | ; | | Test.java:59:10:59:19 | System.out | Test.java:59:29:59:52 | "It's Const1 or Const2!" | | Test.java:59:10:59:53 | println(...) | Test.java:60:10:60:15 | break | | Test.java:59:10:59:54 | ; | Test.java:59:10:59:19 | System.out | @@ -230,27 +233,27 @@ | Test.java:60:10:60:15 | break | Test.java:73:6:73:18 | switch (...) | | Test.java:61:8:61:42 | case | Test.java:61:20:61:20 | s | | Test.java:61:8:61:42 | case | Test.java:63:8:63:21 | case ... | -| Test.java:61:8:61:42 | case | Test.java:66:8:66:22 | case ... | -| Test.java:61:8:61:42 | case | Test.java:69:8:69:26 | case null, default | | Test.java:61:20:61:20 | s | Test.java:61:27:61:27 | s | | Test.java:61:27:61:27 | s | Test.java:61:27:61:36 | length(...) | | Test.java:61:27:61:36 | length(...) | Test.java:61:41:61:41 | 6 | | Test.java:61:27:61:41 | ... <= ... | Test.java:62:10:62:83 | ; | | Test.java:61:27:61:41 | ... <= ... | Test.java:63:8:63:21 | case ... | -| Test.java:61:27:61:41 | ... <= ... | Test.java:66:8:66:22 | case ... | -| Test.java:61:27:61:41 | ... <= ... | Test.java:69:8:69:26 | case null, default | | Test.java:61:41:61:41 | 6 | Test.java:61:27:61:41 | ... <= ... | | Test.java:62:10:62:19 | System.out | Test.java:62:29:62:81 | "It's <= 6 chars long, and neither Const1 nor Const2" | -| Test.java:62:10:62:82 | println(...) | Test.java:63:8:63:21 | case ... | +| Test.java:62:10:62:82 | println(...) | Test.java:64:10:64:96 | ; | | Test.java:62:10:62:83 | ; | Test.java:62:10:62:19 | System.out | | Test.java:62:29:62:81 | "It's <= 6 chars long, and neither Const1 nor Const2" | Test.java:62:10:62:82 | println(...) | -| Test.java:63:8:63:21 | case ... | Test.java:64:10:64:96 | ; | +| Test.java:63:8:63:21 | case ... | Test.java:63:13:63:20 | "Const3" | +| Test.java:63:8:63:21 | case ... | Test.java:66:8:66:22 | case ... | +| Test.java:63:13:63:20 | "Const3" | Test.java:64:10:64:96 | ; | | Test.java:64:10:64:19 | System.out | Test.java:64:29:64:94 | "It's (<= 6 chars long, and neither Const1 nor Const2), or Const3" | | Test.java:64:10:64:95 | println(...) | Test.java:65:10:65:15 | break | | Test.java:64:10:64:96 | ; | Test.java:64:10:64:19 | System.out | | Test.java:64:29:64:94 | "It's (<= 6 chars long, and neither Const1 nor Const2), or Const3" | Test.java:64:10:64:95 | println(...) | | Test.java:65:10:65:15 | break | Test.java:73:6:73:18 | switch (...) | -| Test.java:66:8:66:22 | case ... | Test.java:67:10:67:44 | ; | +| Test.java:66:8:66:22 | case ... | Test.java:66:13:66:21 | "Const30" | +| Test.java:66:8:66:22 | case ... | Test.java:69:8:69:26 | case null, default | +| Test.java:66:13:66:21 | "Const30" | Test.java:67:10:67:44 | ; | | Test.java:67:10:67:19 | System.out | Test.java:67:29:67:42 | "It's Const30" | | Test.java:67:10:67:43 | println(...) | Test.java:68:10:68:15 | break | | Test.java:67:10:67:44 | ; | Test.java:67:10:67:19 | System.out | @@ -263,16 +266,17 @@ | Test.java:70:29:70:58 | "It's null, or something else" | Test.java:70:10:70:59 | println(...) | | Test.java:73:6:73:18 | switch (...) | Test.java:73:13:73:17 | thing | | Test.java:73:13:73:17 | thing | Test.java:74:8:74:21 | case | -| Test.java:73:13:73:17 | thing | Test.java:77:8:77:17 | case ... | | Test.java:74:8:74:21 | case | Test.java:74:20:74:20 | s | -| Test.java:74:8:74:21 | case | Test.java:80:8:80:22 | case | +| Test.java:74:8:74:21 | case | Test.java:77:8:77:17 | case ... | | Test.java:74:20:74:20 | s | Test.java:75:10:75:31 | ; | | Test.java:75:10:75:19 | System.out | Test.java:75:29:75:29 | s | | Test.java:75:10:75:30 | println(...) | Test.java:76:10:76:15 | break | | Test.java:75:10:75:31 | ; | Test.java:75:10:75:19 | System.out | | Test.java:75:29:75:29 | s | Test.java:75:10:75:30 | println(...) | | Test.java:76:10:76:15 | break | Test.java:87:6:87:18 | switch (...) | -| Test.java:77:8:77:17 | case ... | Test.java:78:10:78:41 | ; | +| Test.java:77:8:77:17 | case ... | Test.java:77:13:77:16 | null | +| Test.java:77:8:77:17 | case ... | Test.java:80:8:80:22 | case | +| Test.java:77:13:77:16 | null | Test.java:78:10:78:41 | ; | | Test.java:78:10:78:19 | System.out | Test.java:78:29:78:39 | "It's null" | | Test.java:78:10:78:40 | println(...) | Test.java:79:10:79:15 | break | | Test.java:78:10:78:41 | ; | Test.java:78:10:78:19 | System.out | @@ -347,7 +351,7 @@ | Test.java:110:26:110:30 | thing | Test.java:111:8:111:20 | case | | Test.java:111:8:111:20 | case | Test.java:111:15:111:15 | | | Test.java:111:8:111:20 | case | Test.java:112:8:112:77 | case | -| Test.java:111:13:111:19 | B(...) | Test.java:114:10:114:17 | yield ... | +| Test.java:111:13:111:19 | B(...) | Test.java:114:16:114:16 | 1 | | Test.java:111:15:111:15 | | Test.java:111:18:111:18 | | | Test.java:111:18:111:18 | | Test.java:111:13:111:19 | B(...) | | Test.java:112:8:112:77 | case | Test.java:112:21:112:21 | | @@ -362,32 +366,34 @@ | Test.java:112:47:112:51 | thing | Test.java:112:47:112:62 | toString(...) | | Test.java:112:47:112:62 | toString(...) | Test.java:112:71:112:75 | "abc" | | Test.java:112:47:112:76 | equals(...) | Test.java:113:8:113:20 | case | -| Test.java:112:47:112:76 | equals(...) | Test.java:114:10:114:17 | yield ... | +| Test.java:112:47:112:76 | equals(...) | Test.java:114:16:114:16 | 1 | | Test.java:112:71:112:75 | "abc" | Test.java:112:47:112:76 | equals(...) | | Test.java:113:8:113:20 | case | Test.java:113:19:113:19 | | | Test.java:113:8:113:20 | case | Test.java:115:8:115:15 | default | -| Test.java:113:19:113:19 | | Test.java:114:10:114:17 | yield ... | -| Test.java:114:10:114:17 | yield ... | Test.java:114:16:114:16 | 1 | -| Test.java:114:16:114:16 | 1 | Test.java:110:10:110:31 | result | -| Test.java:115:8:115:15 | default | Test.java:116:10:116:17 | yield ... | -| Test.java:116:10:116:17 | yield ... | Test.java:116:16:116:16 | 2 | -| Test.java:116:16:116:16 | 2 | Test.java:110:10:110:31 | result | +| Test.java:113:19:113:19 | | Test.java:114:16:114:16 | 1 | +| Test.java:114:10:114:17 | yield ... | Test.java:110:10:110:31 | result | +| Test.java:114:16:114:16 | 1 | Test.java:114:10:114:17 | yield ... | +| Test.java:115:8:115:15 | default | Test.java:116:16:116:16 | 2 | +| Test.java:116:10:116:17 | yield ... | Test.java:110:10:110:31 | result | +| Test.java:116:16:116:16 | 2 | Test.java:116:10:116:17 | yield ... | | Test.java:119:6:119:27 | switch (...) | Test.java:119:22:119:26 | thing | | Test.java:119:14:119:26 | (...)... | Test.java:120:8:120:16 | case ... | -| Test.java:119:14:119:26 | (...)... | Test.java:121:8:121:56 | case | | Test.java:119:22:119:26 | thing | Test.java:119:14:119:26 | (...)... | -| Test.java:120:8:120:16 | case ... | Test.java:122:8:122:16 | case ... | +| Test.java:120:8:120:16 | case ... | Test.java:120:13:120:15 | "a" | +| Test.java:120:8:120:16 | case ... | Test.java:121:8:121:56 | case | +| Test.java:120:13:120:15 | "a" | Test.java:123:10:123:15 | break | | Test.java:121:8:121:56 | case | Test.java:121:20:121:20 | | | Test.java:121:8:121:56 | case | Test.java:122:8:122:16 | case ... | -| Test.java:121:8:121:56 | case | Test.java:124:8:124:15 | default | | Test.java:121:20:121:20 | | Test.java:121:36:121:40 | thing | | Test.java:121:27:121:50 | length(...) | Test.java:121:55:121:55 | 5 | | Test.java:121:27:121:55 | ... == ... | Test.java:122:8:122:16 | case ... | -| Test.java:121:27:121:55 | ... == ... | Test.java:124:8:124:15 | default | +| Test.java:121:27:121:55 | ... == ... | Test.java:123:10:123:15 | break | | Test.java:121:28:121:40 | (...)... | Test.java:121:27:121:50 | length(...) | | Test.java:121:36:121:40 | thing | Test.java:121:28:121:40 | (...)... | | Test.java:121:55:121:55 | 5 | Test.java:121:27:121:55 | ... == ... | -| Test.java:122:8:122:16 | case ... | Test.java:123:10:123:15 | break | +| Test.java:122:8:122:16 | case ... | Test.java:122:13:122:15 | "b" | +| Test.java:122:8:122:16 | case ... | Test.java:124:8:124:15 | default | +| Test.java:122:13:122:15 | "b" | Test.java:123:10:123:15 | break | | Test.java:123:10:123:15 | break | Test.java:129:6:129:18 | switch (...) | | Test.java:124:8:124:15 | default | Test.java:125:10:125:15 | break | | Test.java:125:10:125:15 | break | Test.java:129:6:129:18 | switch (...) | @@ -395,29 +401,33 @@ | Test.java:129:13:129:17 | thing | Test.java:130:8:130:21 | case | | Test.java:130:8:130:21 | case | Test.java:130:20:130:20 | | | Test.java:130:8:130:21 | case | Test.java:131:8:131:15 | default | -| Test.java:130:20:130:20 | | Test.java:131:8:131:15 | default | +| Test.java:130:20:130:20 | | Test.java:3:22:3:25 | Normal Exit | | Test.java:131:8:131:15 | default | Test.java:3:22:3:25 | Normal Exit | | Test.java:138:8:138:8 | ...=... | Test.java:138:8:138:8 | ; | | Test.java:138:8:138:8 | ...=... | Test.java:138:8:138:8 | Normal Exit | | Test.java:138:8:138:8 | ; | Test.java:138:8:138:8 | this | | Test.java:138:8:138:8 | ; | Test.java:138:8:138:8 | this | -| Test.java:138:8:138:8 | Exceptional Exit | Test.java:138:8:138:8 | Exit | +| Test.java:138:8:138:8 | Entry | Test.java:138:8:138:8 | { ... } | | Test.java:138:8:138:8 | Normal Exit | Test.java:138:8:138:8 | Exit | | Test.java:138:8:138:8 | b | Test.java:138:8:138:8 | ...=... | | Test.java:138:8:138:8 | field3 | Test.java:138:8:138:8 | ...=... | | Test.java:138:8:138:8 | super(...) | Test.java:138:8:138:8 | ; | -| Test.java:138:8:138:8 | this | Test.java:138:8:138:8 | b | -| Test.java:138:8:138:8 | this | Test.java:138:8:138:8 | field3 | +| Test.java:138:8:138:8 | this | Test.java:138:8:138:8 | this.b | +| Test.java:138:8:138:8 | this | Test.java:138:8:138:8 | this.field3 | +| Test.java:138:8:138:8 | this.b | Test.java:138:8:138:8 | b | +| Test.java:138:8:138:8 | this.field3 | Test.java:138:8:138:8 | field3 | | Test.java:138:8:138:8 | { ... } | Test.java:138:8:138:8 | super(...) | | Test.java:139:8:139:8 | ...=... | Test.java:139:8:139:8 | ; | | Test.java:139:8:139:8 | ...=... | Test.java:139:8:139:8 | Normal Exit | | Test.java:139:8:139:8 | ; | Test.java:139:8:139:8 | this | | Test.java:139:8:139:8 | ; | Test.java:139:8:139:8 | this | -| Test.java:139:8:139:8 | Exceptional Exit | Test.java:139:8:139:8 | Exit | +| Test.java:139:8:139:8 | Entry | Test.java:139:8:139:8 | { ... } | | Test.java:139:8:139:8 | Normal Exit | Test.java:139:8:139:8 | Exit | | Test.java:139:8:139:8 | field1 | Test.java:139:8:139:8 | ...=... | | Test.java:139:8:139:8 | field2 | Test.java:139:8:139:8 | ...=... | | Test.java:139:8:139:8 | super(...) | Test.java:139:8:139:8 | ; | -| Test.java:139:8:139:8 | this | Test.java:139:8:139:8 | field1 | -| Test.java:139:8:139:8 | this | Test.java:139:8:139:8 | field2 | +| Test.java:139:8:139:8 | this | Test.java:139:8:139:8 | this.field1 | +| Test.java:139:8:139:8 | this | Test.java:139:8:139:8 | this.field2 | +| Test.java:139:8:139:8 | this.field1 | Test.java:139:8:139:8 | field1 | +| Test.java:139:8:139:8 | this.field2 | Test.java:139:8:139:8 | field2 | | Test.java:139:8:139:8 | { ... } | Test.java:139:8:139:8 | super(...) | diff --git a/java/ql/test/library-tests/pattern-switch/cfg/test.ql b/java/ql/test/library-tests/pattern-switch/cfg/test.ql index 7e0a85af822a..f858ec60eeb7 100644 --- a/java/ql/test/library-tests/pattern-switch/cfg/test.ql +++ b/java/ql/test/library-tests/pattern-switch/cfg/test.ql @@ -1,5 +1,6 @@ import java +import utils.test.AstCfg from ControlFlowNode cn where cn.getLocation().getFile().getBaseName() = ["Test.java", "Exhaustive.java"] -select cn, cn.getASuccessor() +select cn, getAnAstSuccessor(cn) diff --git a/java/ql/test/library-tests/ssa/captures.expected b/java/ql/test/library-tests/ssa/captures.expected index 3d8b8e136024..e3ccd98ce162 100644 --- a/java/ql/test/library-tests/ssa/captures.expected +++ b/java/ql/test/library-tests/ssa/captures.expected @@ -1,9 +1,9 @@ -| Nested.java:8:29:8:57 | SSA capture def(next(..).p1) | Nested.java:4:34:10:3 | SSA param(p1) | -| Nested.java:8:29:8:57 | SSA capture def(next(..).x1) | Nested.java:5:9:5:14 | SSA def(x1) | +| Nested.java:8:22:8:25 | SSA capture def(next(..).p1) | Nested.java:4:21:4:24 | SSA param(p1) | +| Nested.java:8:22:8:25 | SSA capture def(next(..).x1) | Nested.java:5:9:5:14 | SSA def(x1) | | Nested.java:16:22:16:34 | SSA capture def(getInt(..).obj) | Nested.java:15:12:15:29 | SSA def(obj) | -| Nested.java:19:27:22:7 | SSA capture def(getInt(..).hash) | Nested.java:16:15:16:34 | SSA def(hash) | -| Nested.java:19:27:22:7 | SSA capture def(getInt(..).x2) | Nested.java:17:9:17:15 | SSA def(x2) | +| Nested.java:19:18:19:23 | SSA capture def(getInt(..).hash) | Nested.java:16:15:16:34 | SSA def(hash) | +| Nested.java:19:18:19:23 | SSA capture def(getInt(..).x2) | Nested.java:17:9:17:15 | SSA def(x2) | | Nested.java:20:27:20:39 | SSA capture def(getInt(..).obj) | Nested.java:15:12:15:29 | SSA def(obj) | -| Nested.java:30:23:30:36 | SSA capture def(getInt(..).obj2) | Nested.java:30:5:30:37 | SSA phi(obj2) | -| Nested.java:37:20:37:25 | SSA capture def(getInt(..).x3) | Nested.java:36:7:36:12 | SSA def(x3) | -| Nested.java:40:20:40:25 | SSA capture def(getInt(..).x3) | Nested.java:39:7:39:12 | SSA def(x3) | +| Nested.java:30:23:30:36 | SSA capture def(getInt(..).obj2) | Nested.java:25:5:25:24 | SSA phi(obj2) | +| Nested.java:37:14:37:25 | SSA capture def(getInt(..).x3) | Nested.java:36:7:36:12 | SSA def(x3) | +| Nested.java:40:14:40:25 | SSA capture def(getInt(..).x3) | Nested.java:39:7:39:12 | SSA def(x3) | diff --git a/java/ql/test/library-tests/ssa/firstUse.expected b/java/ql/test/library-tests/ssa/firstUse.expected index 6494791be346..a92573377387 100644 --- a/java/ql/test/library-tests/ssa/firstUse.expected +++ b/java/ql/test/library-tests/ssa/firstUse.expected @@ -1,11 +1,11 @@ -| Fields.java:12:19:21:3 | SSA entry def(this.xs) | Fields.java:13:15:13:16 | xs | +| Fields.java:12:15:12:15 | SSA entry def(this.xs) | Fields.java:13:15:13:16 | xs | | Fields.java:14:5:14:9 | SSA call def(this.xs) | Fields.java:15:9:15:10 | xs | | Fields.java:15:5:15:10 | SSA def(x) | Fields.java:16:9:16:9 | x | +| Fields.java:16:5:16:17 | SSA phi(this.xs) | Fields.java:18:9:18:15 | this.xs | | Fields.java:17:7:17:11 | SSA call def(this.xs) | Fields.java:18:9:18:15 | this.xs | -| Fields.java:18:5:18:16 | SSA phi(this.xs) | Fields.java:18:9:18:15 | this.xs | | Fields.java:19:5:19:19 | SSA def(this.xs) | Fields.java:20:9:20:10 | xs | -| Fields.java:23:19:49:3 | SSA entry def(Fields.stat) | Fields.java:27:15:27:18 | stat | -| Fields.java:23:19:49:3 | SSA entry def(this.xs) | Fields.java:26:15:26:16 | xs | +| Fields.java:23:15:23:15 | SSA entry def(Fields.stat) | Fields.java:27:15:27:18 | stat | +| Fields.java:23:15:23:15 | SSA entry def(this.xs) | Fields.java:26:15:26:16 | xs | | Fields.java:24:12:24:27 | SSA def(f) | Fields.java:25:15:25:15 | f | | Fields.java:24:12:24:27 | SSA qualifier def(f.xs) | Fields.java:25:15:25:18 | f.xs | | Fields.java:24:16:24:27 | SSA call def(Fields.stat) | Fields.java:27:15:27:18 | stat | @@ -18,52 +18,52 @@ | Fields.java:36:5:36:19 | SSA def(this.xs) | Fields.java:38:9:38:10 | xs | | Fields.java:39:5:39:21 | SSA def(f.xs) | Fields.java:40:9:40:12 | f.xs | | Fields.java:41:5:41:10 | SSA def(z) | Fields.java:42:9:42:9 | z | +| Fields.java:42:5:42:17 | SSA phi(Fields.stat) | Fields.java:48:9:48:12 | stat | +| Fields.java:42:5:42:17 | SSA phi(f) | Fields.java:44:9:44:9 | f | +| Fields.java:42:5:42:17 | SSA phi(f.xs) | Fields.java:44:9:44:12 | f.xs | | Fields.java:43:7:43:22 | SSA def(f) | Fields.java:44:9:44:9 | f | | Fields.java:43:7:43:22 | SSA qualifier def(f.xs) | Fields.java:44:9:44:12 | f.xs | | Fields.java:43:11:43:22 | SSA call def(Fields.stat) | Fields.java:48:9:48:12 | stat | -| Fields.java:44:5:44:13 | SSA phi(Fields.stat) | Fields.java:48:9:48:12 | stat | -| Fields.java:44:5:44:13 | SSA phi(f) | Fields.java:44:9:44:9 | f | -| Fields.java:44:5:44:13 | SSA phi(f.xs) | Fields.java:44:9:44:12 | f.xs | | Fields.java:45:5:45:16 | SSA call def(Fields.stat) | Fields.java:48:9:48:12 | stat | -| Nested.java:8:29:8:57 | SSA capture def(next(..).p1) | Nested.java:8:38:8:39 | p1 | -| Nested.java:8:29:8:57 | SSA capture def(next(..).x1) | Nested.java:8:43:8:44 | x1 | +| Nested.java:8:22:8:25 | SSA capture def(next(..).p1) | Nested.java:8:38:8:39 | p1 | +| Nested.java:8:22:8:25 | SSA capture def(next(..).x1) | Nested.java:8:43:8:44 | x1 | | Nested.java:16:22:16:34 | SSA capture def(getInt(..).obj) | Nested.java:16:22:16:24 | obj | | Nested.java:18:15:23:5 | SSA def(h2) | Nested.java:25:9:25:10 | h2 | -| Nested.java:19:27:22:7 | SSA capture def(getInt(..).hash) | Nested.java:21:21:21:24 | hash | -| Nested.java:19:27:22:7 | SSA capture def(getInt(..).x2) | Nested.java:21:16:21:17 | x2 | +| Nested.java:19:18:19:23 | SSA capture def(getInt(..).hash) | Nested.java:21:21:21:24 | hash | +| Nested.java:19:18:19:23 | SSA capture def(getInt(..).x2) | Nested.java:21:16:21:17 | x2 | | Nested.java:20:19:20:39 | SSA def(hnest) | Nested.java:21:37:21:41 | hnest | | Nested.java:20:27:20:39 | SSA capture def(getInt(..).obj) | Nested.java:20:27:20:29 | obj | | Nested.java:30:23:30:36 | SSA capture def(getInt(..).obj2) | Nested.java:30:23:30:26 | obj2 | -| Nested.java:33:29:42:3 | SSA param(p3) | Nested.java:35:9:35:10 | p3 | -| Nested.java:37:20:37:25 | SSA capture def(getInt(..).x3) | Nested.java:37:20:37:21 | x3 | -| Nested.java:40:20:40:25 | SSA capture def(getInt(..).x3) | Nested.java:40:20:40:21 | x3 | -| Test.java:4:19:32:2 | SSA param(param) | Test.java:9:7:9:11 | param | +| Nested.java:33:13:33:19 | SSA param(p3) | Nested.java:35:9:35:10 | p3 | +| Nested.java:37:14:37:25 | SSA capture def(getInt(..).x3) | Nested.java:37:20:37:21 | x3 | +| Nested.java:40:14:40:25 | SSA capture def(getInt(..).x3) | Nested.java:40:20:40:21 | x3 | +| Test.java:4:6:4:6 | SSA param(param) | Test.java:9:7:9:11 | param | | Test.java:6:7:6:11 | SSA def(x) | Test.java:10:4:10:4 | x | | Test.java:6:7:6:11 | SSA def(x) | Test.java:20:10:20:10 | x | +| Test.java:9:3:9:16 | SSA phi(x) | Test.java:20:10:20:10 | x | +| Test.java:9:3:9:16 | SSA phi(y) | Test.java:20:14:20:14 | y | | Test.java:10:4:10:6 | SSA def(x) | Test.java:11:10:11:10 | x | | Test.java:11:4:11:10 | SSA def(y) | Test.java:20:14:20:14 | y | | Test.java:11:8:11:10 | SSA def(x) | Test.java:20:10:20:10 | x | | Test.java:14:4:14:8 | SSA def(y) | Test.java:15:4:15:4 | y | | Test.java:15:4:15:9 | SSA def(y) | Test.java:20:14:20:14 | y | -| Test.java:19:3:19:3 | SSA phi(x) | Test.java:20:10:20:10 | x | -| Test.java:19:3:19:3 | SSA phi(y) | Test.java:20:14:20:14 | y | -| Test.java:20:10:20:10 | SSA phi(param) | Test.java:21:8:21:12 | param | -| Test.java:20:10:20:10 | SSA phi(y) | Test.java:20:14:20:14 | y | +| Test.java:20:3:20:15 | SSA phi(param) | Test.java:21:8:21:12 | param | +| Test.java:20:3:20:15 | SSA phi(y) | Test.java:20:14:20:14 | y | | Test.java:21:8:21:14 | SSA def(param) | Test.java:21:8:21:12 | param | | Test.java:24:4:24:9 | SSA def(y) | Test.java:20:14:20:14 | y | | Test.java:27:12:27:16 | SSA def(i) | Test.java:27:19:27:19 | i | -| Test.java:27:19:27:19 | SSA phi(i) | Test.java:27:19:27:19 | i | -| Test.java:27:19:27:19 | SSA phi(x) | Test.java:28:4:28:4 | x | -| Test.java:27:19:27:19 | SSA phi(x) | Test.java:31:10:31:10 | x | +| Test.java:27:19:27:22 | SSA phi(i) | Test.java:27:19:27:19 | i | +| Test.java:27:19:27:22 | SSA phi(x) | Test.java:28:4:28:4 | x | +| Test.java:27:19:27:22 | SSA phi(x) | Test.java:31:10:31:10 | x | | Test.java:27:25:27:27 | SSA def(i) | Test.java:27:19:27:19 | i | | Test.java:28:4:28:9 | SSA def(x) | Test.java:28:4:28:4 | x | | Test.java:28:4:28:9 | SSA def(x) | Test.java:31:10:31:10 | x | -| TestInstanceOfPattern.java:3:24:9:2 | SSA param(obj) | TestInstanceOfPattern.java:4:7:4:9 | obj | +| TestInstanceOfPattern.java:3:7:3:10 | SSA param(obj) | TestInstanceOfPattern.java:4:7:4:9 | obj | | TestInstanceOfPattern.java:4:29:4:29 | SSA def(s) | TestInstanceOfPattern.java:5:8:5:8 | s | -| TestInstanceOfPattern.java:10:25:16:2 | SSA param(obj) | TestInstanceOfPattern.java:11:9:11:11 | obj | +| TestInstanceOfPattern.java:10:7:10:11 | SSA param(obj) | TestInstanceOfPattern.java:11:9:11:11 | obj | | TestInstanceOfPattern.java:11:31:11:31 | SSA def(s) | TestInstanceOfPattern.java:14:8:14:8 | s | -| TestInstanceOfPattern.java:17:25:23:2 | SSA param(obj) | TestInstanceOfPattern.java:18:7:18:9 | obj | +| TestInstanceOfPattern.java:17:7:17:11 | SSA param(obj) | TestInstanceOfPattern.java:18:7:18:9 | obj | | TestInstanceOfPattern.java:18:29:18:29 | SSA def(s) | TestInstanceOfPattern.java:18:34:18:34 | s | -| TestInstanceOfPattern.java:24:25:30:2 | SSA entry def(this.s) | TestInstanceOfPattern.java:25:34:25:34 | s | -| TestInstanceOfPattern.java:24:25:30:2 | SSA entry def(this.s) | TestInstanceOfPattern.java:26:8:26:8 | s | -| TestInstanceOfPattern.java:24:25:30:2 | SSA param(obj) | TestInstanceOfPattern.java:25:7:25:9 | obj | +| TestInstanceOfPattern.java:24:7:24:11 | SSA entry def(this.s) | TestInstanceOfPattern.java:25:34:25:34 | s | +| TestInstanceOfPattern.java:24:7:24:11 | SSA entry def(this.s) | TestInstanceOfPattern.java:26:8:26:8 | s | +| TestInstanceOfPattern.java:24:7:24:11 | SSA param(obj) | TestInstanceOfPattern.java:25:7:25:9 | obj | diff --git a/java/ql/test/library-tests/ssa/ssaDef.expected b/java/ql/test/library-tests/ssa/ssaDef.expected index a10b9d327b27..2deba0dcebba 100644 --- a/java/ql/test/library-tests/ssa/ssaDef.expected +++ b/java/ql/test/library-tests/ssa/ssaDef.expected @@ -1,75 +1,75 @@ | Fields.java:13:5:13:17 | x | Fields.java:15:5:15:10 | ...=... | SSA def(x) | -| Fields.java:13:15:13:16 | this.xs | Fields.java:12:19:21:3 | { ... } | SSA entry def(this.xs) | +| Fields.java:13:15:13:16 | this.xs | Fields.java:12:15:12:15 | Entry | SSA entry def(this.xs) | | Fields.java:13:15:13:16 | this.xs | Fields.java:14:5:14:9 | upd(...) | SSA call def(this.xs) | +| Fields.java:13:15:13:16 | this.xs | Fields.java:16:5:16:17 | After if (...) | SSA phi(this.xs) | | Fields.java:13:15:13:16 | this.xs | Fields.java:17:7:17:11 | upd(...) | SSA call def(this.xs) | -| Fields.java:13:15:13:16 | this.xs | Fields.java:18:5:18:16 | ; | SSA phi(this.xs) | | Fields.java:13:15:13:16 | this.xs | Fields.java:19:5:19:19 | ...=... | SSA def(this.xs) | | Fields.java:24:5:24:28 | f | Fields.java:24:12:24:27 | f | SSA def(f) | +| Fields.java:24:5:24:28 | f | Fields.java:42:5:42:17 | After if (...) | SSA phi(f) | | Fields.java:24:5:24:28 | f | Fields.java:43:7:43:22 | ...=... | SSA def(f) | -| Fields.java:24:5:24:28 | f | Fields.java:44:5:44:13 | ; | SSA phi(f) | | Fields.java:25:15:25:18 | f.xs | Fields.java:24:12:24:27 | f | SSA qualifier def(f.xs) | | Fields.java:25:15:25:18 | f.xs | Fields.java:28:5:28:12 | f(...) | SSA call def(f.xs) | | Fields.java:25:15:25:18 | f.xs | Fields.java:32:5:32:9 | f(...) | SSA call def(f.xs) | | Fields.java:25:15:25:18 | f.xs | Fields.java:39:5:39:21 | ...=... | SSA def(f.xs) | +| Fields.java:25:15:25:18 | f.xs | Fields.java:42:5:42:17 | After if (...) | SSA phi(f.xs) | | Fields.java:25:15:25:18 | f.xs | Fields.java:43:7:43:22 | ...=... | SSA qualifier def(f.xs) | -| Fields.java:25:15:25:18 | f.xs | Fields.java:44:5:44:13 | ; | SSA phi(f.xs) | | Fields.java:26:5:26:17 | z | Fields.java:41:5:41:10 | ...=... | SSA def(z) | -| Fields.java:26:15:26:16 | this.xs | Fields.java:23:19:49:3 | { ... } | SSA entry def(this.xs) | +| Fields.java:26:15:26:16 | this.xs | Fields.java:23:15:23:15 | Entry | SSA entry def(this.xs) | | Fields.java:26:15:26:16 | this.xs | Fields.java:28:5:28:12 | f(...) | SSA call def(this.xs) | | Fields.java:26:15:26:16 | this.xs | Fields.java:32:5:32:9 | f(...) | SSA call def(this.xs) | | Fields.java:26:15:26:16 | this.xs | Fields.java:36:5:36:19 | ...=... | SSA def(this.xs) | -| Fields.java:27:15:27:18 | Fields.stat | Fields.java:23:19:49:3 | { ... } | SSA entry def(Fields.stat) | +| Fields.java:27:15:27:18 | Fields.stat | Fields.java:23:15:23:15 | Entry | SSA entry def(Fields.stat) | | Fields.java:27:15:27:18 | Fields.stat | Fields.java:24:16:24:27 | new Fields(...) | SSA call def(Fields.stat) | | Fields.java:27:15:27:18 | Fields.stat | Fields.java:28:5:28:12 | f(...) | SSA call def(Fields.stat) | | Fields.java:27:15:27:18 | Fields.stat | Fields.java:32:5:32:9 | f(...) | SSA call def(Fields.stat) | +| Fields.java:27:15:27:18 | Fields.stat | Fields.java:42:5:42:17 | After if (...) | SSA phi(Fields.stat) | | Fields.java:27:15:27:18 | Fields.stat | Fields.java:43:11:43:22 | new Fields(...) | SSA call def(Fields.stat) | -| Fields.java:27:15:27:18 | Fields.stat | Fields.java:44:5:44:13 | ; | SSA phi(Fields.stat) | | Fields.java:27:15:27:18 | Fields.stat | Fields.java:45:5:45:16 | new Fields(...) | SSA call def(Fields.stat) | -| Nested.java:4:26:4:31 | next(..).p1 | Nested.java:8:29:8:57 | { ... } | SSA capture def(next(..).p1) | -| Nested.java:4:26:4:31 | p1 | Nested.java:4:34:10:3 | { ... } | SSA param(p1) | -| Nested.java:5:5:5:15 | next(..).x1 | Nested.java:8:29:8:57 | { ... } | SSA capture def(next(..).x1) | +| Nested.java:4:26:4:31 | next(..).p1 | Nested.java:8:22:8:25 | Entry | SSA capture def(next(..).p1) | +| Nested.java:4:26:4:31 | p1 | Nested.java:4:21:4:24 | Entry | SSA param(p1) | +| Nested.java:5:5:5:15 | next(..).x1 | Nested.java:8:22:8:25 | Entry | SSA capture def(next(..).x1) | | Nested.java:5:5:5:15 | x1 | Nested.java:5:9:5:14 | x1 | SSA def(x1) | -| Nested.java:15:5:15:30 | getInt(..).obj | Nested.java:16:22:16:34 | { ... } | SSA capture def(getInt(..).obj) | -| Nested.java:15:5:15:30 | getInt(..).obj | Nested.java:20:27:20:39 | { ... } | SSA capture def(getInt(..).obj) | +| Nested.java:15:5:15:30 | getInt(..).obj | Nested.java:16:22:16:34 | Entry | SSA capture def(getInt(..).obj) | +| Nested.java:15:5:15:30 | getInt(..).obj | Nested.java:20:27:20:39 | Entry | SSA capture def(getInt(..).obj) | | Nested.java:15:5:15:30 | obj | Nested.java:15:12:15:29 | obj | SSA def(obj) | -| Nested.java:16:5:16:35 | getInt(..).hash | Nested.java:19:27:22:7 | { ... } | SSA capture def(getInt(..).hash) | +| Nested.java:16:5:16:35 | getInt(..).hash | Nested.java:19:18:19:23 | Entry | SSA capture def(getInt(..).hash) | | Nested.java:16:5:16:35 | hash | Nested.java:16:15:16:34 | hash | SSA def(hash) | -| Nested.java:17:5:17:16 | getInt(..).x2 | Nested.java:19:27:22:7 | { ... } | SSA capture def(getInt(..).x2) | +| Nested.java:17:5:17:16 | getInt(..).x2 | Nested.java:19:18:19:23 | Entry | SSA capture def(getInt(..).x2) | | Nested.java:17:5:17:16 | x2 | Nested.java:17:9:17:15 | x2 | SSA def(x2) | | Nested.java:18:5:23:6 | h2 | Nested.java:18:15:23:5 | h2 | SSA def(h2) | | Nested.java:20:9:20:40 | hnest | Nested.java:20:19:20:39 | hnest | SSA def(hnest) | -| Nested.java:24:5:24:31 | getInt(..).obj2 | Nested.java:30:23:30:36 | { ... } | SSA capture def(getInt(..).obj2) | +| Nested.java:24:5:24:31 | getInt(..).obj2 | Nested.java:30:23:30:36 | Entry | SSA capture def(getInt(..).obj2) | +| Nested.java:24:5:24:31 | obj2 | Nested.java:25:5:25:24 | After if (...) | SSA phi(obj2) | | Nested.java:24:5:24:31 | obj2 | Nested.java:26:7:26:25 | ...=... | SSA def(obj2) | | Nested.java:24:5:24:31 | obj2 | Nested.java:28:7:28:25 | ...=... | SSA def(obj2) | -| Nested.java:24:5:24:31 | obj2 | Nested.java:30:5:30:37 | var ...; | SSA phi(obj2) | -| Nested.java:33:21:33:26 | p3 | Nested.java:33:29:42:3 | { ... } | SSA param(p3) | -| Nested.java:34:5:34:11 | getInt(..).x3 | Nested.java:37:20:37:25 | { ... } | SSA capture def(getInt(..).x3) | -| Nested.java:34:5:34:11 | getInt(..).x3 | Nested.java:40:20:40:25 | { ... } | SSA capture def(getInt(..).x3) | +| Nested.java:33:21:33:26 | p3 | Nested.java:33:13:33:19 | Entry | SSA param(p3) | +| Nested.java:34:5:34:11 | getInt(..).x3 | Nested.java:37:14:37:25 | Entry | SSA capture def(getInt(..).x3) | +| Nested.java:34:5:34:11 | getInt(..).x3 | Nested.java:40:14:40:25 | Entry | SSA capture def(getInt(..).x3) | | Nested.java:34:5:34:11 | x3 | Nested.java:36:7:36:12 | ...=... | SSA def(x3) | | Nested.java:34:5:34:11 | x3 | Nested.java:39:7:39:12 | ...=... | SSA def(x3) | -| Test.java:4:8:4:16 | param | Test.java:4:19:32:2 | { ... } | SSA param(param) | -| Test.java:4:8:4:16 | param | Test.java:20:10:20:10 | x | SSA phi(param) | +| Test.java:4:8:4:16 | param | Test.java:4:6:4:6 | Entry | SSA param(param) | +| Test.java:4:8:4:16 | param | Test.java:20:3:20:15 | [LoopHeader] while (...) | SSA phi(param) | | Test.java:4:8:4:16 | param | Test.java:21:8:21:14 | ...++ | SSA def(param) | | Test.java:6:3:6:12 | x | Test.java:6:7:6:11 | x | SSA def(x) | +| Test.java:6:3:6:12 | x | Test.java:9:3:9:16 | After if (...) | SSA phi(x) | | Test.java:6:3:6:12 | x | Test.java:10:4:10:6 | ...++ | SSA def(x) | | Test.java:6:3:6:12 | x | Test.java:11:8:11:10 | ++... | SSA def(x) | -| Test.java:6:3:6:12 | x | Test.java:19:3:19:3 | ; | SSA phi(x) | -| Test.java:6:3:6:12 | x | Test.java:27:19:27:19 | i | SSA phi(x) | +| Test.java:6:3:6:12 | x | Test.java:27:19:27:22 | Before ... < ... | SSA phi(x) | | Test.java:6:3:6:12 | x | Test.java:28:4:28:9 | ...+=... | SSA def(x) | +| Test.java:7:3:7:8 | y | Test.java:9:3:9:16 | After if (...) | SSA phi(y) | | Test.java:7:3:7:8 | y | Test.java:11:4:11:10 | ...=... | SSA def(y) | | Test.java:7:3:7:8 | y | Test.java:14:4:14:8 | ...=... | SSA def(y) | | Test.java:7:3:7:8 | y | Test.java:15:4:15:9 | ...+=... | SSA def(y) | -| Test.java:7:3:7:8 | y | Test.java:19:3:19:3 | ; | SSA phi(y) | -| Test.java:7:3:7:8 | y | Test.java:20:10:20:10 | x | SSA phi(y) | +| Test.java:7:3:7:8 | y | Test.java:20:3:20:15 | [LoopHeader] while (...) | SSA phi(y) | | Test.java:7:3:7:8 | y | Test.java:24:4:24:9 | ...-=... | SSA def(y) | | Test.java:27:8:27:16 | i | Test.java:27:12:27:16 | i | SSA def(i) | -| Test.java:27:8:27:16 | i | Test.java:27:19:27:19 | i | SSA phi(i) | +| Test.java:27:8:27:16 | i | Test.java:27:19:27:22 | Before ... < ... | SSA phi(i) | | Test.java:27:8:27:16 | i | Test.java:27:25:27:27 | ...++ | SSA def(i) | -| TestInstanceOfPattern.java:3:12:3:21 | obj | TestInstanceOfPattern.java:3:24:9:2 | { ... } | SSA param(obj) | +| TestInstanceOfPattern.java:3:12:3:21 | obj | TestInstanceOfPattern.java:3:7:3:10 | Entry | SSA param(obj) | | TestInstanceOfPattern.java:4:22:4:29 | s | TestInstanceOfPattern.java:4:29:4:29 | s | SSA def(s) | -| TestInstanceOfPattern.java:10:13:10:22 | obj | TestInstanceOfPattern.java:10:25:16:2 | { ... } | SSA param(obj) | +| TestInstanceOfPattern.java:10:13:10:22 | obj | TestInstanceOfPattern.java:10:7:10:11 | Entry | SSA param(obj) | | TestInstanceOfPattern.java:11:24:11:31 | s | TestInstanceOfPattern.java:11:31:11:31 | s | SSA def(s) | -| TestInstanceOfPattern.java:17:13:17:22 | obj | TestInstanceOfPattern.java:17:25:23:2 | { ... } | SSA param(obj) | +| TestInstanceOfPattern.java:17:13:17:22 | obj | TestInstanceOfPattern.java:17:7:17:11 | Entry | SSA param(obj) | | TestInstanceOfPattern.java:18:22:18:29 | s | TestInstanceOfPattern.java:18:29:18:29 | s | SSA def(s) | -| TestInstanceOfPattern.java:24:13:24:22 | obj | TestInstanceOfPattern.java:24:25:30:2 | { ... } | SSA param(obj) | -| TestInstanceOfPattern.java:25:34:25:34 | this.s | TestInstanceOfPattern.java:24:25:30:2 | { ... } | SSA entry def(this.s) | +| TestInstanceOfPattern.java:24:13:24:22 | obj | TestInstanceOfPattern.java:24:7:24:11 | Entry | SSA param(obj) | +| TestInstanceOfPattern.java:25:34:25:34 | this.s | TestInstanceOfPattern.java:24:7:24:11 | Entry | SSA entry def(this.s) | diff --git a/java/ql/test/library-tests/ssa/ssaPhi.expected b/java/ql/test/library-tests/ssa/ssaPhi.expected index b002ee81b3e3..afdf8bde2bdf 100644 --- a/java/ql/test/library-tests/ssa/ssaPhi.expected +++ b/java/ql/test/library-tests/ssa/ssaPhi.expected @@ -1,22 +1,22 @@ -| Fields.java:13:15:13:16 | this.xs | Fields.java:18:5:18:16 | ; | Fields.java:14:5:14:9 | upd(...) | -| Fields.java:13:15:13:16 | this.xs | Fields.java:18:5:18:16 | ; | Fields.java:17:7:17:11 | upd(...) | -| Fields.java:24:5:24:28 | f | Fields.java:44:5:44:13 | ; | Fields.java:24:12:24:27 | f | -| Fields.java:24:5:24:28 | f | Fields.java:44:5:44:13 | ; | Fields.java:43:7:43:22 | ...=... | -| Fields.java:25:15:25:18 | f.xs | Fields.java:44:5:44:13 | ; | Fields.java:39:5:39:21 | ...=... | -| Fields.java:25:15:25:18 | f.xs | Fields.java:44:5:44:13 | ; | Fields.java:43:7:43:22 | ...=... | -| Fields.java:27:15:27:18 | Fields.stat | Fields.java:44:5:44:13 | ; | Fields.java:32:5:32:9 | f(...) | -| Fields.java:27:15:27:18 | Fields.stat | Fields.java:44:5:44:13 | ; | Fields.java:43:11:43:22 | new Fields(...) | -| Nested.java:24:5:24:31 | obj2 | Nested.java:30:5:30:37 | var ...; | Nested.java:26:7:26:25 | ...=... | -| Nested.java:24:5:24:31 | obj2 | Nested.java:30:5:30:37 | var ...; | Nested.java:28:7:28:25 | ...=... | -| Test.java:4:8:4:16 | param | Test.java:20:10:20:10 | x | Test.java:4:19:32:2 | { ... } | -| Test.java:4:8:4:16 | param | Test.java:20:10:20:10 | x | Test.java:21:8:21:14 | ...++ | -| Test.java:6:3:6:12 | x | Test.java:19:3:19:3 | ; | Test.java:6:7:6:11 | x | -| Test.java:6:3:6:12 | x | Test.java:19:3:19:3 | ; | Test.java:11:8:11:10 | ++... | -| Test.java:6:3:6:12 | x | Test.java:27:19:27:19 | i | Test.java:19:3:19:3 | ; | -| Test.java:6:3:6:12 | x | Test.java:27:19:27:19 | i | Test.java:28:4:28:9 | ...+=... | -| Test.java:7:3:7:8 | y | Test.java:19:3:19:3 | ; | Test.java:11:4:11:10 | ...=... | -| Test.java:7:3:7:8 | y | Test.java:19:3:19:3 | ; | Test.java:15:4:15:9 | ...+=... | -| Test.java:7:3:7:8 | y | Test.java:20:10:20:10 | x | Test.java:19:3:19:3 | ; | -| Test.java:7:3:7:8 | y | Test.java:20:10:20:10 | x | Test.java:24:4:24:9 | ...-=... | -| Test.java:27:8:27:16 | i | Test.java:27:19:27:19 | i | Test.java:27:12:27:16 | i | -| Test.java:27:8:27:16 | i | Test.java:27:19:27:19 | i | Test.java:27:25:27:27 | ...++ | +| Fields.java:13:15:13:16 | this.xs | Fields.java:16:5:16:17 | After if (...) | Fields.java:14:5:14:9 | upd(...) | +| Fields.java:13:15:13:16 | this.xs | Fields.java:16:5:16:17 | After if (...) | Fields.java:17:7:17:11 | upd(...) | +| Fields.java:24:5:24:28 | f | Fields.java:42:5:42:17 | After if (...) | Fields.java:24:12:24:27 | f | +| Fields.java:24:5:24:28 | f | Fields.java:42:5:42:17 | After if (...) | Fields.java:43:7:43:22 | ...=... | +| Fields.java:25:15:25:18 | f.xs | Fields.java:42:5:42:17 | After if (...) | Fields.java:39:5:39:21 | ...=... | +| Fields.java:25:15:25:18 | f.xs | Fields.java:42:5:42:17 | After if (...) | Fields.java:43:7:43:22 | ...=... | +| Fields.java:27:15:27:18 | Fields.stat | Fields.java:42:5:42:17 | After if (...) | Fields.java:32:5:32:9 | f(...) | +| Fields.java:27:15:27:18 | Fields.stat | Fields.java:42:5:42:17 | After if (...) | Fields.java:43:11:43:22 | new Fields(...) | +| Nested.java:24:5:24:31 | obj2 | Nested.java:25:5:25:24 | After if (...) | Nested.java:26:7:26:25 | ...=... | +| Nested.java:24:5:24:31 | obj2 | Nested.java:25:5:25:24 | After if (...) | Nested.java:28:7:28:25 | ...=... | +| Test.java:4:8:4:16 | param | Test.java:20:3:20:15 | [LoopHeader] while (...) | Test.java:4:6:4:6 | Entry | +| Test.java:4:8:4:16 | param | Test.java:20:3:20:15 | [LoopHeader] while (...) | Test.java:21:8:21:14 | ...++ | +| Test.java:6:3:6:12 | x | Test.java:9:3:9:16 | After if (...) | Test.java:6:7:6:11 | x | +| Test.java:6:3:6:12 | x | Test.java:9:3:9:16 | After if (...) | Test.java:11:8:11:10 | ++... | +| Test.java:6:3:6:12 | x | Test.java:27:19:27:22 | Before ... < ... | Test.java:9:3:9:16 | After if (...) | +| Test.java:6:3:6:12 | x | Test.java:27:19:27:22 | Before ... < ... | Test.java:28:4:28:9 | ...+=... | +| Test.java:7:3:7:8 | y | Test.java:9:3:9:16 | After if (...) | Test.java:11:4:11:10 | ...=... | +| Test.java:7:3:7:8 | y | Test.java:9:3:9:16 | After if (...) | Test.java:15:4:15:9 | ...+=... | +| Test.java:7:3:7:8 | y | Test.java:20:3:20:15 | [LoopHeader] while (...) | Test.java:9:3:9:16 | After if (...) | +| Test.java:7:3:7:8 | y | Test.java:20:3:20:15 | [LoopHeader] while (...) | Test.java:24:4:24:9 | ...-=... | +| Test.java:27:8:27:16 | i | Test.java:27:19:27:22 | Before ... < ... | Test.java:27:12:27:16 | i | +| Test.java:27:8:27:16 | i | Test.java:27:19:27:22 | Before ... < ... | Test.java:27:25:27:27 | ...++ | diff --git a/java/ql/test/library-tests/ssa/ssaUse.expected b/java/ql/test/library-tests/ssa/ssaUse.expected index 8525f62a883c..b1e309591e34 100644 --- a/java/ql/test/library-tests/ssa/ssaUse.expected +++ b/java/ql/test/library-tests/ssa/ssaUse.expected @@ -1,7 +1,7 @@ | Fields.java:13:5:13:17 | x | Fields.java:15:5:15:10 | ...=... | SSA def(x) | Fields.java:16:9:16:9 | x | -| Fields.java:13:15:13:16 | this.xs | Fields.java:12:19:21:3 | { ... } | SSA entry def(this.xs) | Fields.java:13:15:13:16 | xs | +| Fields.java:13:15:13:16 | this.xs | Fields.java:12:15:12:15 | Entry | SSA entry def(this.xs) | Fields.java:13:15:13:16 | xs | | Fields.java:13:15:13:16 | this.xs | Fields.java:14:5:14:9 | upd(...) | SSA call def(this.xs) | Fields.java:15:9:15:10 | xs | -| Fields.java:13:15:13:16 | this.xs | Fields.java:18:5:18:16 | ; | SSA phi(this.xs) | Fields.java:18:9:18:15 | this.xs | +| Fields.java:13:15:13:16 | this.xs | Fields.java:16:5:16:17 | After if (...) | SSA phi(this.xs) | Fields.java:18:9:18:15 | this.xs | | Fields.java:13:15:13:16 | this.xs | Fields.java:19:5:19:19 | ...=... | SSA def(this.xs) | Fields.java:20:9:20:10 | xs | | Fields.java:24:5:24:28 | f | Fields.java:24:12:24:27 | f | SSA def(f) | Fields.java:25:15:25:15 | f | | Fields.java:24:5:24:28 | f | Fields.java:24:12:24:27 | f | SSA def(f) | Fields.java:29:9:29:9 | f | @@ -10,17 +10,17 @@ | Fields.java:24:5:24:28 | f | Fields.java:24:12:24:27 | f | SSA def(f) | Fields.java:37:9:37:9 | f | | Fields.java:24:5:24:28 | f | Fields.java:24:12:24:27 | f | SSA def(f) | Fields.java:39:5:39:5 | f | | Fields.java:24:5:24:28 | f | Fields.java:24:12:24:27 | f | SSA def(f) | Fields.java:40:9:40:9 | f | -| Fields.java:24:5:24:28 | f | Fields.java:44:5:44:13 | ; | SSA phi(f) | Fields.java:44:9:44:9 | f | -| Fields.java:24:5:24:28 | f | Fields.java:44:5:44:13 | ; | SSA phi(f) | Fields.java:46:9:46:9 | f | +| Fields.java:24:5:24:28 | f | Fields.java:42:5:42:17 | After if (...) | SSA phi(f) | Fields.java:44:9:44:9 | f | +| Fields.java:24:5:24:28 | f | Fields.java:42:5:42:17 | After if (...) | SSA phi(f) | Fields.java:46:9:46:9 | f | | Fields.java:25:15:25:18 | f.xs | Fields.java:24:12:24:27 | f | SSA qualifier def(f.xs) | Fields.java:25:15:25:18 | f.xs | | Fields.java:25:15:25:18 | f.xs | Fields.java:28:5:28:12 | f(...) | SSA call def(f.xs) | Fields.java:29:9:29:12 | f.xs | | Fields.java:25:15:25:18 | f.xs | Fields.java:32:5:32:9 | f(...) | SSA call def(f.xs) | Fields.java:33:9:33:12 | f.xs | | Fields.java:25:15:25:18 | f.xs | Fields.java:32:5:32:9 | f(...) | SSA call def(f.xs) | Fields.java:37:9:37:12 | f.xs | | Fields.java:25:15:25:18 | f.xs | Fields.java:39:5:39:21 | ...=... | SSA def(f.xs) | Fields.java:40:9:40:12 | f.xs | -| Fields.java:25:15:25:18 | f.xs | Fields.java:44:5:44:13 | ; | SSA phi(f.xs) | Fields.java:44:9:44:12 | f.xs | -| Fields.java:25:15:25:18 | f.xs | Fields.java:44:5:44:13 | ; | SSA phi(f.xs) | Fields.java:46:9:46:12 | f.xs | +| Fields.java:25:15:25:18 | f.xs | Fields.java:42:5:42:17 | After if (...) | SSA phi(f.xs) | Fields.java:44:9:44:12 | f.xs | +| Fields.java:25:15:25:18 | f.xs | Fields.java:42:5:42:17 | After if (...) | SSA phi(f.xs) | Fields.java:46:9:46:12 | f.xs | | Fields.java:26:5:26:17 | z | Fields.java:41:5:41:10 | ...=... | SSA def(z) | Fields.java:42:9:42:9 | z | -| Fields.java:26:15:26:16 | this.xs | Fields.java:23:19:49:3 | { ... } | SSA entry def(this.xs) | Fields.java:26:15:26:16 | xs | +| Fields.java:26:15:26:16 | this.xs | Fields.java:23:15:23:15 | Entry | SSA entry def(this.xs) | Fields.java:26:15:26:16 | xs | | Fields.java:26:15:26:16 | this.xs | Fields.java:28:5:28:12 | f(...) | SSA call def(this.xs) | Fields.java:30:9:30:10 | xs | | Fields.java:26:15:26:16 | this.xs | Fields.java:32:5:32:9 | f(...) | SSA call def(this.xs) | Fields.java:34:9:34:10 | xs | | Fields.java:26:15:26:16 | this.xs | Fields.java:36:5:36:19 | ...=... | SSA def(this.xs) | Fields.java:38:9:38:10 | xs | @@ -30,42 +30,42 @@ | Fields.java:27:15:27:18 | Fields.stat | Fields.java:28:5:28:12 | f(...) | SSA call def(Fields.stat) | Fields.java:31:9:31:12 | stat | | Fields.java:27:15:27:18 | Fields.stat | Fields.java:32:5:32:9 | f(...) | SSA call def(Fields.stat) | Fields.java:35:9:35:12 | stat | | Fields.java:27:15:27:18 | Fields.stat | Fields.java:45:5:45:16 | new Fields(...) | SSA call def(Fields.stat) | Fields.java:48:9:48:12 | stat | -| Nested.java:4:26:4:31 | next(..).p1 | Nested.java:8:29:8:57 | { ... } | SSA capture def(next(..).p1) | Nested.java:8:38:8:39 | p1 | -| Nested.java:5:5:5:15 | next(..).x1 | Nested.java:8:29:8:57 | { ... } | SSA capture def(next(..).x1) | Nested.java:8:43:8:44 | x1 | -| Nested.java:5:5:5:15 | next(..).x1 | Nested.java:8:29:8:57 | { ... } | SSA capture def(next(..).x1) | Nested.java:8:48:8:49 | x1 | -| Nested.java:5:5:5:15 | next(..).x1 | Nested.java:8:29:8:57 | { ... } | SSA capture def(next(..).x1) | Nested.java:8:53:8:54 | x1 | -| Nested.java:15:5:15:30 | getInt(..).obj | Nested.java:16:22:16:34 | { ... } | SSA capture def(getInt(..).obj) | Nested.java:16:22:16:24 | obj | -| Nested.java:15:5:15:30 | getInt(..).obj | Nested.java:20:27:20:39 | { ... } | SSA capture def(getInt(..).obj) | Nested.java:20:27:20:29 | obj | -| Nested.java:16:5:16:35 | getInt(..).hash | Nested.java:19:27:22:7 | { ... } | SSA capture def(getInt(..).hash) | Nested.java:21:21:21:24 | hash | -| Nested.java:17:5:17:16 | getInt(..).x2 | Nested.java:19:27:22:7 | { ... } | SSA capture def(getInt(..).x2) | Nested.java:21:16:21:17 | x2 | +| Nested.java:4:26:4:31 | next(..).p1 | Nested.java:8:22:8:25 | Entry | SSA capture def(next(..).p1) | Nested.java:8:38:8:39 | p1 | +| Nested.java:5:5:5:15 | next(..).x1 | Nested.java:8:22:8:25 | Entry | SSA capture def(next(..).x1) | Nested.java:8:43:8:44 | x1 | +| Nested.java:5:5:5:15 | next(..).x1 | Nested.java:8:22:8:25 | Entry | SSA capture def(next(..).x1) | Nested.java:8:48:8:49 | x1 | +| Nested.java:5:5:5:15 | next(..).x1 | Nested.java:8:22:8:25 | Entry | SSA capture def(next(..).x1) | Nested.java:8:53:8:54 | x1 | +| Nested.java:15:5:15:30 | getInt(..).obj | Nested.java:16:22:16:34 | Entry | SSA capture def(getInt(..).obj) | Nested.java:16:22:16:24 | obj | +| Nested.java:15:5:15:30 | getInt(..).obj | Nested.java:20:27:20:39 | Entry | SSA capture def(getInt(..).obj) | Nested.java:20:27:20:29 | obj | +| Nested.java:16:5:16:35 | getInt(..).hash | Nested.java:19:18:19:23 | Entry | SSA capture def(getInt(..).hash) | Nested.java:21:21:21:24 | hash | +| Nested.java:17:5:17:16 | getInt(..).x2 | Nested.java:19:18:19:23 | Entry | SSA capture def(getInt(..).x2) | Nested.java:21:16:21:17 | x2 | | Nested.java:18:5:23:6 | h2 | Nested.java:18:15:23:5 | h2 | SSA def(h2) | Nested.java:25:9:25:10 | h2 | | Nested.java:20:9:20:40 | hnest | Nested.java:20:19:20:39 | hnest | SSA def(hnest) | Nested.java:21:37:21:41 | hnest | -| Nested.java:24:5:24:31 | getInt(..).obj2 | Nested.java:30:23:30:36 | { ... } | SSA capture def(getInt(..).obj2) | Nested.java:30:23:30:26 | obj2 | -| Nested.java:33:21:33:26 | p3 | Nested.java:33:29:42:3 | { ... } | SSA param(p3) | Nested.java:35:9:35:10 | p3 | -| Nested.java:34:5:34:11 | getInt(..).x3 | Nested.java:37:20:37:25 | { ... } | SSA capture def(getInt(..).x3) | Nested.java:37:20:37:21 | x3 | -| Nested.java:34:5:34:11 | getInt(..).x3 | Nested.java:40:20:40:25 | { ... } | SSA capture def(getInt(..).x3) | Nested.java:40:20:40:21 | x3 | -| Test.java:4:8:4:16 | param | Test.java:4:19:32:2 | { ... } | SSA param(param) | Test.java:9:7:9:11 | param | -| Test.java:4:8:4:16 | param | Test.java:20:10:20:10 | x | SSA phi(param) | Test.java:21:8:21:12 | param | +| Nested.java:24:5:24:31 | getInt(..).obj2 | Nested.java:30:23:30:36 | Entry | SSA capture def(getInt(..).obj2) | Nested.java:30:23:30:26 | obj2 | +| Nested.java:33:21:33:26 | p3 | Nested.java:33:13:33:19 | Entry | SSA param(p3) | Nested.java:35:9:35:10 | p3 | +| Nested.java:34:5:34:11 | getInt(..).x3 | Nested.java:37:14:37:25 | Entry | SSA capture def(getInt(..).x3) | Nested.java:37:20:37:21 | x3 | +| Nested.java:34:5:34:11 | getInt(..).x3 | Nested.java:40:14:40:25 | Entry | SSA capture def(getInt(..).x3) | Nested.java:40:20:40:21 | x3 | +| Test.java:4:8:4:16 | param | Test.java:4:6:4:6 | Entry | SSA param(param) | Test.java:9:7:9:11 | param | +| Test.java:4:8:4:16 | param | Test.java:20:3:20:15 | [LoopHeader] while (...) | SSA phi(param) | Test.java:21:8:21:12 | param | | Test.java:6:3:6:12 | x | Test.java:6:7:6:11 | x | SSA def(x) | Test.java:10:4:10:4 | x | +| Test.java:6:3:6:12 | x | Test.java:9:3:9:16 | After if (...) | SSA phi(x) | Test.java:20:10:20:10 | x | | Test.java:6:3:6:12 | x | Test.java:10:4:10:6 | ...++ | SSA def(x) | Test.java:11:10:11:10 | x | -| Test.java:6:3:6:12 | x | Test.java:19:3:19:3 | ; | SSA phi(x) | Test.java:20:10:20:10 | x | -| Test.java:6:3:6:12 | x | Test.java:27:19:27:19 | i | SSA phi(x) | Test.java:28:4:28:4 | x | -| Test.java:6:3:6:12 | x | Test.java:27:19:27:19 | i | SSA phi(x) | Test.java:31:10:31:10 | x | +| Test.java:6:3:6:12 | x | Test.java:27:19:27:22 | Before ... < ... | SSA phi(x) | Test.java:28:4:28:4 | x | +| Test.java:6:3:6:12 | x | Test.java:27:19:27:22 | Before ... < ... | SSA phi(x) | Test.java:31:10:31:10 | x | | Test.java:7:3:7:8 | y | Test.java:14:4:14:8 | ...=... | SSA def(y) | Test.java:15:4:15:4 | y | -| Test.java:7:3:7:8 | y | Test.java:20:10:20:10 | x | SSA phi(y) | Test.java:20:14:20:14 | y | -| Test.java:7:3:7:8 | y | Test.java:20:10:20:10 | x | SSA phi(y) | Test.java:24:4:24:4 | y | -| Test.java:7:3:7:8 | y | Test.java:20:10:20:10 | x | SSA phi(y) | Test.java:31:14:31:14 | y | -| Test.java:27:8:27:16 | i | Test.java:27:19:27:19 | i | SSA phi(i) | Test.java:27:19:27:19 | i | -| Test.java:27:8:27:16 | i | Test.java:27:19:27:19 | i | SSA phi(i) | Test.java:27:25:27:25 | i | -| Test.java:27:8:27:16 | i | Test.java:27:19:27:19 | i | SSA phi(i) | Test.java:28:9:28:9 | i | -| TestInstanceOfPattern.java:3:12:3:21 | obj | TestInstanceOfPattern.java:3:24:9:2 | { ... } | SSA param(obj) | TestInstanceOfPattern.java:4:7:4:9 | obj | +| Test.java:7:3:7:8 | y | Test.java:20:3:20:15 | [LoopHeader] while (...) | SSA phi(y) | Test.java:20:14:20:14 | y | +| Test.java:7:3:7:8 | y | Test.java:20:3:20:15 | [LoopHeader] while (...) | SSA phi(y) | Test.java:24:4:24:4 | y | +| Test.java:7:3:7:8 | y | Test.java:20:3:20:15 | [LoopHeader] while (...) | SSA phi(y) | Test.java:31:14:31:14 | y | +| Test.java:27:8:27:16 | i | Test.java:27:19:27:22 | Before ... < ... | SSA phi(i) | Test.java:27:19:27:19 | i | +| Test.java:27:8:27:16 | i | Test.java:27:19:27:22 | Before ... < ... | SSA phi(i) | Test.java:27:25:27:25 | i | +| Test.java:27:8:27:16 | i | Test.java:27:19:27:22 | Before ... < ... | SSA phi(i) | Test.java:28:9:28:9 | i | +| TestInstanceOfPattern.java:3:12:3:21 | obj | TestInstanceOfPattern.java:3:7:3:10 | Entry | SSA param(obj) | TestInstanceOfPattern.java:4:7:4:9 | obj | | TestInstanceOfPattern.java:4:22:4:29 | s | TestInstanceOfPattern.java:4:29:4:29 | s | SSA def(s) | TestInstanceOfPattern.java:5:8:5:8 | s | -| TestInstanceOfPattern.java:10:13:10:22 | obj | TestInstanceOfPattern.java:10:25:16:2 | { ... } | SSA param(obj) | TestInstanceOfPattern.java:11:9:11:11 | obj | +| TestInstanceOfPattern.java:10:13:10:22 | obj | TestInstanceOfPattern.java:10:7:10:11 | Entry | SSA param(obj) | TestInstanceOfPattern.java:11:9:11:11 | obj | | TestInstanceOfPattern.java:11:24:11:31 | s | TestInstanceOfPattern.java:11:31:11:31 | s | SSA def(s) | TestInstanceOfPattern.java:14:8:14:8 | s | -| TestInstanceOfPattern.java:17:13:17:22 | obj | TestInstanceOfPattern.java:17:25:23:2 | { ... } | SSA param(obj) | TestInstanceOfPattern.java:18:7:18:9 | obj | +| TestInstanceOfPattern.java:17:13:17:22 | obj | TestInstanceOfPattern.java:17:7:17:11 | Entry | SSA param(obj) | TestInstanceOfPattern.java:18:7:18:9 | obj | | TestInstanceOfPattern.java:18:22:18:29 | s | TestInstanceOfPattern.java:18:29:18:29 | s | SSA def(s) | TestInstanceOfPattern.java:18:34:18:34 | s | | TestInstanceOfPattern.java:18:22:18:29 | s | TestInstanceOfPattern.java:18:29:18:29 | s | SSA def(s) | TestInstanceOfPattern.java:19:8:19:8 | s | -| TestInstanceOfPattern.java:24:13:24:22 | obj | TestInstanceOfPattern.java:24:25:30:2 | { ... } | SSA param(obj) | TestInstanceOfPattern.java:25:7:25:9 | obj | -| TestInstanceOfPattern.java:25:34:25:34 | this.s | TestInstanceOfPattern.java:24:25:30:2 | { ... } | SSA entry def(this.s) | TestInstanceOfPattern.java:25:34:25:34 | s | -| TestInstanceOfPattern.java:25:34:25:34 | this.s | TestInstanceOfPattern.java:24:25:30:2 | { ... } | SSA entry def(this.s) | TestInstanceOfPattern.java:26:8:26:8 | s | -| TestInstanceOfPattern.java:25:34:25:34 | this.s | TestInstanceOfPattern.java:24:25:30:2 | { ... } | SSA entry def(this.s) | TestInstanceOfPattern.java:28:8:28:8 | s | +| TestInstanceOfPattern.java:24:13:24:22 | obj | TestInstanceOfPattern.java:24:7:24:11 | Entry | SSA param(obj) | TestInstanceOfPattern.java:25:7:25:9 | obj | +| TestInstanceOfPattern.java:25:34:25:34 | this.s | TestInstanceOfPattern.java:24:7:24:11 | Entry | SSA entry def(this.s) | TestInstanceOfPattern.java:25:34:25:34 | s | +| TestInstanceOfPattern.java:25:34:25:34 | this.s | TestInstanceOfPattern.java:24:7:24:11 | Entry | SSA entry def(this.s) | TestInstanceOfPattern.java:26:8:26:8 | s | +| TestInstanceOfPattern.java:25:34:25:34 | this.s | TestInstanceOfPattern.java:24:7:24:11 | Entry | SSA entry def(this.s) | TestInstanceOfPattern.java:28:8:28:8 | s | diff --git a/java/ql/test/library-tests/successors/CloseReaderTest/FalseSuccessors.expected b/java/ql/test/library-tests/successors/CloseReaderTest/FalseSuccessors.expected deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/java/ql/test/library-tests/successors/CloseReaderTest/FalseSuccessors.ql b/java/ql/test/library-tests/successors/CloseReaderTest/FalseSuccessors.ql deleted file mode 100644 index aee4021bee69..000000000000 --- a/java/ql/test/library-tests/successors/CloseReaderTest/FalseSuccessors.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java - -from ConditionNode c -select c, c.getAFalseSuccessor() diff --git a/java/ql/test/library-tests/successors/CloseReaderTest/TestSucc.expected b/java/ql/test/library-tests/successors/CloseReaderTest/TestSucc.expected index fc529feba134..6889eb8da32d 100644 --- a/java/ql/test/library-tests/successors/CloseReaderTest/TestSucc.expected +++ b/java/ql/test/library-tests/successors/CloseReaderTest/TestSucc.expected @@ -1,7 +1,8 @@ -| CloseReaderTest.java:8:14:8:28 | Exceptional Exit | CloseReaderTest.java:8:14:8:28 | Exit | +| CloseReaderTest.java:8:14:8:28 | Entry | CloseReaderTest.java:8:14:8:28 | { ... } | | CloseReaderTest.java:8:14:8:28 | Normal Exit | CloseReaderTest.java:8:14:8:28 | Exit | | CloseReaderTest.java:8:14:8:28 | super(...) | CloseReaderTest.java:8:14:8:28 | Normal Exit | | CloseReaderTest.java:8:14:8:28 | { ... } | CloseReaderTest.java:8:14:8:28 | super(...) | +| CloseReaderTest.java:9:23:9:34 | Entry | CloseReaderTest.java:10:2:24:2 | { ... } | | CloseReaderTest.java:9:23:9:34 | Exceptional Exit | CloseReaderTest.java:9:23:9:34 | Exit | | CloseReaderTest.java:9:23:9:34 | Normal Exit | CloseReaderTest.java:9:23:9:34 | Exit | | CloseReaderTest.java:10:2:24:2 | { ... } | CloseReaderTest.java:12:3:13:42 | ; | @@ -27,6 +28,7 @@ | CloseReaderTest.java:19:11:19:15 | stdin | CloseReaderTest.java:19:11:19:26 | readLine(...) | | CloseReaderTest.java:19:11:19:26 | readLine(...) | CloseReaderTest.java:19:4:19:27 | return ... | | CloseReaderTest.java:19:11:19:26 | readLine(...) | CloseReaderTest.java:20:5:20:26 | catch (...) | +| CloseReaderTest.java:20:5:20:26 | catch (...) | CloseReaderTest.java:9:23:9:34 | Exceptional Exit | | CloseReaderTest.java:20:5:20:26 | catch (...) | CloseReaderTest.java:20:24:20:25 | ex | | CloseReaderTest.java:20:24:20:25 | ex | CloseReaderTest.java:21:3:23:3 | { ... } | | CloseReaderTest.java:21:3:23:3 | { ... } | CloseReaderTest.java:22:11:22:14 | null | diff --git a/java/ql/test/library-tests/successors/CloseReaderTest/TestSucc.ql b/java/ql/test/library-tests/successors/CloseReaderTest/TestSucc.ql index 6fca436fbfdb..68c50a85c58a 100644 --- a/java/ql/test/library-tests/successors/CloseReaderTest/TestSucc.ql +++ b/java/ql/test/library-tests/successors/CloseReaderTest/TestSucc.ql @@ -1,8 +1,9 @@ import java +import utils.test.AstCfg from ControlFlowNode n, ControlFlowNode succ where - succ = n.getASuccessor() and + succ = getAnAstSuccessor(n) and n.getLocation().getFile().getExtension() = "java" and not n.getLocation().getFile().getStem() = "PopulateRuntimeException" select n, succ diff --git a/java/ql/test/library-tests/successors/LoopVarReadTest/FalseSuccessors.expected b/java/ql/test/library-tests/successors/LoopVarReadTest/FalseSuccessors.expected deleted file mode 100644 index 9d836931bede..000000000000 --- a/java/ql/test/library-tests/successors/LoopVarReadTest/FalseSuccessors.expected +++ /dev/null @@ -1 +0,0 @@ -| LoopVarReadTest.java:7:19:7:24 | ... < ... | LoopVarReadTest.java:12:3:12:13 | var ...; | diff --git a/java/ql/test/library-tests/successors/LoopVarReadTest/FalseSuccessors.ql b/java/ql/test/library-tests/successors/LoopVarReadTest/FalseSuccessors.ql deleted file mode 100644 index aee4021bee69..000000000000 --- a/java/ql/test/library-tests/successors/LoopVarReadTest/FalseSuccessors.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java - -from ConditionNode c -select c, c.getAFalseSuccessor() diff --git a/java/ql/test/library-tests/successors/LoopVarReadTest/TestSucc.expected b/java/ql/test/library-tests/successors/LoopVarReadTest/TestSucc.expected index 3566cc8753f2..61b12a6f5d7e 100644 --- a/java/ql/test/library-tests/successors/LoopVarReadTest/TestSucc.expected +++ b/java/ql/test/library-tests/successors/LoopVarReadTest/TestSucc.expected @@ -1,8 +1,8 @@ -| LoopVarReadTest.java:3:14:3:28 | Exceptional Exit | LoopVarReadTest.java:3:14:3:28 | Exit | +| LoopVarReadTest.java:3:14:3:28 | Entry | LoopVarReadTest.java:3:14:3:28 | { ... } | | LoopVarReadTest.java:3:14:3:28 | Normal Exit | LoopVarReadTest.java:3:14:3:28 | Exit | | LoopVarReadTest.java:3:14:3:28 | super(...) | LoopVarReadTest.java:3:14:3:28 | Normal Exit | | LoopVarReadTest.java:3:14:3:28 | { ... } | LoopVarReadTest.java:3:14:3:28 | super(...) | -| LoopVarReadTest.java:4:21:4:28 | Exceptional Exit | LoopVarReadTest.java:4:21:4:28 | Exit | +| LoopVarReadTest.java:4:21:4:28 | Entry | LoopVarReadTest.java:5:2:15:2 | { ... } | | LoopVarReadTest.java:4:21:4:28 | Normal Exit | LoopVarReadTest.java:4:21:4:28 | Exit | | LoopVarReadTest.java:5:2:15:2 | { ... } | LoopVarReadTest.java:6:3:6:12 | var ...; | | LoopVarReadTest.java:6:3:6:12 | var ...; | LoopVarReadTest.java:6:11:6:11 | 2 | diff --git a/java/ql/test/library-tests/successors/LoopVarReadTest/TestSucc.ql b/java/ql/test/library-tests/successors/LoopVarReadTest/TestSucc.ql index 6fca436fbfdb..68c50a85c58a 100644 --- a/java/ql/test/library-tests/successors/LoopVarReadTest/TestSucc.ql +++ b/java/ql/test/library-tests/successors/LoopVarReadTest/TestSucc.ql @@ -1,8 +1,9 @@ import java +import utils.test.AstCfg from ControlFlowNode n, ControlFlowNode succ where - succ = n.getASuccessor() and + succ = getAnAstSuccessor(n) and n.getLocation().getFile().getExtension() = "java" and not n.getLocation().getFile().getStem() = "PopulateRuntimeException" select n, succ diff --git a/java/ql/test/library-tests/successors/SaveFileTest/FalseSuccessors.expected b/java/ql/test/library-tests/successors/SaveFileTest/FalseSuccessors.expected deleted file mode 100644 index 8f3e2d0dd3e8..000000000000 --- a/java/ql/test/library-tests/successors/SaveFileTest/FalseSuccessors.expected +++ /dev/null @@ -1,2 +0,0 @@ -| SaveFileTest.java:18:7:18:26 | startsWith(...) | SaveFileTest.java:24:3:24:33 | var ...; | -| SaveFileTest.java:34:11:34:54 | ... != ... | SaveFileTest.java:39:4:40:41 | ; | diff --git a/java/ql/test/library-tests/successors/SaveFileTest/FalseSuccessors.ql b/java/ql/test/library-tests/successors/SaveFileTest/FalseSuccessors.ql deleted file mode 100644 index aee4021bee69..000000000000 --- a/java/ql/test/library-tests/successors/SaveFileTest/FalseSuccessors.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java - -from ConditionNode c -select c, c.getAFalseSuccessor() diff --git a/java/ql/test/library-tests/successors/SaveFileTest/TestSucc.expected b/java/ql/test/library-tests/successors/SaveFileTest/TestSucc.expected index 640e731147f9..19943a7ab1a1 100644 --- a/java/ql/test/library-tests/successors/SaveFileTest/TestSucc.expected +++ b/java/ql/test/library-tests/successors/SaveFileTest/TestSucc.expected @@ -1,7 +1,8 @@ -| SaveFileTest.java:11:14:11:25 | Exceptional Exit | SaveFileTest.java:11:14:11:25 | Exit | +| SaveFileTest.java:11:14:11:25 | Entry | SaveFileTest.java:11:14:11:25 | { ... } | | SaveFileTest.java:11:14:11:25 | Normal Exit | SaveFileTest.java:11:14:11:25 | Exit | | SaveFileTest.java:11:14:11:25 | super(...) | SaveFileTest.java:11:14:11:25 | Normal Exit | | SaveFileTest.java:11:14:11:25 | { ... } | SaveFileTest.java:11:14:11:25 | super(...) | +| SaveFileTest.java:12:14:12:21 | Entry | SaveFileTest.java:15:2:55:2 | { ... } | | SaveFileTest.java:12:14:12:21 | Exceptional Exit | SaveFileTest.java:12:14:12:21 | Exit | | SaveFileTest.java:12:14:12:21 | Normal Exit | SaveFileTest.java:12:14:12:21 | Exit | | SaveFileTest.java:15:2:55:2 | { ... } | SaveFileTest.java:17:3:17:25 | var ...; | @@ -14,8 +15,9 @@ | SaveFileTest.java:18:7:18:26 | startsWith(...) | SaveFileTest.java:24:3:24:33 | var ...; | | SaveFileTest.java:18:23:18:25 | "/" | SaveFileTest.java:18:7:18:26 | startsWith(...) | | SaveFileTest.java:19:3:21:3 | { ... } | SaveFileTest.java:20:4:20:32 | ; | +| SaveFileTest.java:20:4:20:11 | savePath | SaveFileTest.java:20:15:20:18 | path | | SaveFileTest.java:20:4:20:31 | ...=... | SaveFileTest.java:24:3:24:33 | var ...; | -| SaveFileTest.java:20:4:20:32 | ; | SaveFileTest.java:20:15:20:18 | path | +| SaveFileTest.java:20:4:20:32 | ; | SaveFileTest.java:20:4:20:11 | savePath | | SaveFileTest.java:20:15:20:18 | path | SaveFileTest.java:20:30:20:30 | 1 | | SaveFileTest.java:20:15:20:31 | substring(...) | SaveFileTest.java:20:4:20:31 | ...=... | | SaveFileTest.java:20:30:20:30 | 1 | SaveFileTest.java:20:15:20:31 | substring(...) | @@ -44,20 +46,20 @@ | SaveFileTest.java:30:22:30:25 | null | SaveFileTest.java:30:16:30:25 | bos | | SaveFileTest.java:31:3:53:3 | try ... | SaveFileTest.java:32:3:41:3 | { ... } | | SaveFileTest.java:32:3:41:3 | { ... } | SaveFileTest.java:33:4:33:40 | ; | +| SaveFileTest.java:33:4:33:6 | bos | SaveFileTest.java:33:31:33:38 | saveFile | | SaveFileTest.java:33:4:33:39 | ...=... | SaveFileTest.java:34:4:34:55 | while (...) | -| SaveFileTest.java:33:4:33:40 | ; | SaveFileTest.java:33:31:33:38 | saveFile | +| SaveFileTest.java:33:4:33:40 | ; | SaveFileTest.java:33:4:33:6 | bos | | SaveFileTest.java:33:10:33:39 | new FileOutputStream(...) | SaveFileTest.java:33:4:33:39 | ...=... | | SaveFileTest.java:33:10:33:39 | new FileOutputStream(...) | SaveFileTest.java:41:5:41:23 | catch (...) | -| SaveFileTest.java:33:10:33:39 | new FileOutputStream(...) | SaveFileTest.java:45:3:53:3 | { ... } | | SaveFileTest.java:33:31:33:38 | saveFile | SaveFileTest.java:33:10:33:39 | new FileOutputStream(...) | -| SaveFileTest.java:34:4:34:55 | while (...) | SaveFileTest.java:34:24:34:25 | is | +| SaveFileTest.java:34:4:34:55 | while (...) | SaveFileTest.java:34:12:34:20 | bytesRead | | SaveFileTest.java:34:11:34:54 | ... != ... | SaveFileTest.java:35:4:37:4 | { ... } | | SaveFileTest.java:34:11:34:54 | ... != ... | SaveFileTest.java:39:4:40:41 | ; | +| SaveFileTest.java:34:12:34:20 | bytesRead | SaveFileTest.java:34:24:34:25 | is | | SaveFileTest.java:34:12:34:47 | ...=... | SaveFileTest.java:34:54:34:54 | 1 | | SaveFileTest.java:34:24:34:25 | is | SaveFileTest.java:34:32:34:37 | buffer | | SaveFileTest.java:34:24:34:47 | read(...) | SaveFileTest.java:34:12:34:47 | ...=... | | SaveFileTest.java:34:24:34:47 | read(...) | SaveFileTest.java:41:5:41:23 | catch (...) | -| SaveFileTest.java:34:24:34:47 | read(...) | SaveFileTest.java:45:3:53:3 | { ... } | | SaveFileTest.java:34:32:34:37 | buffer | SaveFileTest.java:34:40:34:40 | 0 | | SaveFileTest.java:34:40:34:40 | 0 | SaveFileTest.java:34:43:34:46 | 8192 | | SaveFileTest.java:34:43:34:46 | 8192 | SaveFileTest.java:34:24:34:47 | read(...) | @@ -65,9 +67,8 @@ | SaveFileTest.java:34:54:34:54 | 1 | SaveFileTest.java:34:53:34:54 | -... | | SaveFileTest.java:35:4:37:4 | { ... } | SaveFileTest.java:36:5:36:36 | ; | | SaveFileTest.java:36:5:36:7 | bos | SaveFileTest.java:36:15:36:20 | buffer | -| SaveFileTest.java:36:5:36:35 | write(...) | SaveFileTest.java:34:24:34:25 | is | +| SaveFileTest.java:36:5:36:35 | write(...) | SaveFileTest.java:34:12:34:20 | bytesRead | | SaveFileTest.java:36:5:36:35 | write(...) | SaveFileTest.java:41:5:41:23 | catch (...) | -| SaveFileTest.java:36:5:36:35 | write(...) | SaveFileTest.java:45:3:53:3 | { ... } | | SaveFileTest.java:36:5:36:36 | ; | SaveFileTest.java:36:5:36:7 | bos | | SaveFileTest.java:36:15:36:20 | buffer | SaveFileTest.java:36:23:36:23 | 0 | | SaveFileTest.java:36:23:36:23 | 0 | SaveFileTest.java:36:26:36:34 | bytesRead | @@ -82,7 +83,6 @@ | SaveFileTest.java:40:8:40:15 | saveFile | SaveFileTest.java:40:8:40:33 | getAbsolutePath(...) | | SaveFileTest.java:40:8:40:33 | getAbsolutePath(...) | SaveFileTest.java:39:23:40:33 | ... + ... | | SaveFileTest.java:40:8:40:33 | getAbsolutePath(...) | SaveFileTest.java:41:5:41:23 | catch (...) | -| SaveFileTest.java:40:8:40:33 | getAbsolutePath(...) | SaveFileTest.java:45:3:53:3 | { ... } | | SaveFileTest.java:40:37:40:39 | "]" | SaveFileTest.java:39:23:40:39 | ... + ... | | SaveFileTest.java:41:5:41:23 | catch (...) | SaveFileTest.java:41:22:41:22 | e | | SaveFileTest.java:41:22:41:22 | e | SaveFileTest.java:42:3:44:3 | { ... } | diff --git a/java/ql/test/library-tests/successors/SaveFileTest/TestSucc.ql b/java/ql/test/library-tests/successors/SaveFileTest/TestSucc.ql index 6fca436fbfdb..68c50a85c58a 100644 --- a/java/ql/test/library-tests/successors/SaveFileTest/TestSucc.ql +++ b/java/ql/test/library-tests/successors/SaveFileTest/TestSucc.ql @@ -1,8 +1,9 @@ import java +import utils.test.AstCfg from ControlFlowNode n, ControlFlowNode succ where - succ = n.getASuccessor() and + succ = getAnAstSuccessor(n) and n.getLocation().getFile().getExtension() = "java" and not n.getLocation().getFile().getStem() = "PopulateRuntimeException" select n, succ diff --git a/java/ql/test/library-tests/successors/SchackTest/FalseSuccessors.expected b/java/ql/test/library-tests/successors/SchackTest/FalseSuccessors.expected deleted file mode 100644 index 3f3f897cda80..000000000000 --- a/java/ql/test/library-tests/successors/SchackTest/FalseSuccessors.expected +++ /dev/null @@ -1,6 +0,0 @@ -| SchackTest.java:8:9:8:12 | ... == ... | SchackTest.java:10:5:10:13 | if (...) | -| SchackTest.java:10:9:10:12 | ... == ... | SchackTest.java:12:14:15:4 | { ... } | -| SchackTest.java:13:9:13:13 | bar(...) | SchackTest.java:16:4:16:41 | ; | -| SchackTest.java:13:9:13:13 | bar(...) | SchackTest.java:17:5:17:17 | catch (...) | -| SchackTest.java:13:9:13:13 | bar(...) | SchackTest.java:21:13:23:3 | { ... } | -| SchackTest.java:27:7:27:24 | ... > ... | SchackTest.java:29:10:29:22 | random(...) | diff --git a/java/ql/test/library-tests/successors/SchackTest/FalseSuccessors.ql b/java/ql/test/library-tests/successors/SchackTest/FalseSuccessors.ql deleted file mode 100644 index aee4021bee69..000000000000 --- a/java/ql/test/library-tests/successors/SchackTest/FalseSuccessors.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java - -from ConditionNode c -select c, c.getAFalseSuccessor() diff --git a/java/ql/test/library-tests/successors/SchackTest/TestSucc.expected b/java/ql/test/library-tests/successors/SchackTest/TestSucc.expected index a23f6a2bc54e..19fef193edba 100644 --- a/java/ql/test/library-tests/successors/SchackTest/TestSucc.expected +++ b/java/ql/test/library-tests/successors/SchackTest/TestSucc.expected @@ -1,15 +1,16 @@ -| SchackTest.java:1:14:1:23 | Exceptional Exit | SchackTest.java:1:14:1:23 | Exit | +| SchackTest.java:1:14:1:23 | Entry | SchackTest.java:1:14:1:23 | { ... } | | SchackTest.java:1:14:1:23 | Normal Exit | SchackTest.java:1:14:1:23 | Exit | | SchackTest.java:1:14:1:23 | super(...) | SchackTest.java:1:14:1:23 | Normal Exit | | SchackTest.java:1:14:1:23 | { ... } | SchackTest.java:1:14:1:23 | super(...) | -| SchackTest.java:2:8:2:10 | Exceptional Exit | SchackTest.java:2:8:2:10 | Exit | +| SchackTest.java:2:8:2:10 | Entry | SchackTest.java:2:8:2:10 | { ... } | | SchackTest.java:2:8:2:10 | Normal Exit | SchackTest.java:2:8:2:10 | Exit | | SchackTest.java:2:8:2:10 | super(...) | SchackTest.java:2:8:2:10 | Normal Exit | | SchackTest.java:2:8:2:10 | { ... } | SchackTest.java:2:8:2:10 | super(...) | -| SchackTest.java:3:8:3:10 | Exceptional Exit | SchackTest.java:3:8:3:10 | Exit | +| SchackTest.java:3:8:3:10 | Entry | SchackTest.java:3:8:3:10 | { ... } | | SchackTest.java:3:8:3:10 | Normal Exit | SchackTest.java:3:8:3:10 | Exit | | SchackTest.java:3:8:3:10 | super(...) | SchackTest.java:3:8:3:10 | Normal Exit | | SchackTest.java:3:8:3:10 | { ... } | SchackTest.java:3:8:3:10 | super(...) | +| SchackTest.java:5:7:5:9 | Entry | SchackTest.java:5:18:24:2 | { ... } | | SchackTest.java:5:7:5:9 | Exceptional Exit | SchackTest.java:5:7:5:9 | Exit | | SchackTest.java:5:7:5:9 | Normal Exit | SchackTest.java:5:7:5:9 | Exit | | SchackTest.java:5:18:24:2 | { ... } | SchackTest.java:6:3:23:3 | try ... | @@ -36,7 +37,6 @@ | SchackTest.java:13:9:13:13 | bar(...) | SchackTest.java:14:6:14:42 | ; | | SchackTest.java:13:9:13:13 | bar(...) | SchackTest.java:16:4:16:41 | ; | | SchackTest.java:13:9:13:13 | bar(...) | SchackTest.java:17:5:17:17 | catch (...) | -| SchackTest.java:13:9:13:13 | bar(...) | SchackTest.java:19:5:19:17 | catch (...) | | SchackTest.java:13:9:13:13 | bar(...) | SchackTest.java:21:13:23:3 | { ... } | | SchackTest.java:14:6:14:15 | System.out | SchackTest.java:14:25:14:40 | "true successor" | | SchackTest.java:14:6:14:41 | println(...) | SchackTest.java:16:4:16:41 | ; | @@ -45,10 +45,12 @@ | SchackTest.java:14:6:14:42 | ; | SchackTest.java:14:6:14:15 | System.out | | SchackTest.java:14:25:14:40 | "true successor" | SchackTest.java:14:6:14:41 | println(...) | | SchackTest.java:16:4:16:13 | System.out | SchackTest.java:16:23:16:39 | "false successor" | +| SchackTest.java:16:4:16:40 | println(...) | SchackTest.java:17:5:17:17 | catch (...) | | SchackTest.java:16:4:16:40 | println(...) | SchackTest.java:21:13:23:3 | { ... } | | SchackTest.java:16:4:16:41 | ; | SchackTest.java:16:4:16:13 | System.out | | SchackTest.java:16:23:16:39 | "false successor" | SchackTest.java:16:4:16:40 | println(...) | | SchackTest.java:17:5:17:17 | catch (...) | SchackTest.java:17:16:17:16 | e | +| SchackTest.java:17:5:17:17 | catch (...) | SchackTest.java:19:5:19:17 | catch (...) | | SchackTest.java:17:16:17:16 | e | SchackTest.java:17:19:19:3 | { ... } | | SchackTest.java:17:19:19:3 | { ... } | SchackTest.java:18:4:18:41 | ; | | SchackTest.java:18:4:18:13 | System.out | SchackTest.java:18:23:18:39 | "false successor" | @@ -56,6 +58,7 @@ | SchackTest.java:18:4:18:41 | ; | SchackTest.java:18:4:18:13 | System.out | | SchackTest.java:18:23:18:39 | "false successor" | SchackTest.java:18:4:18:40 | println(...) | | SchackTest.java:19:5:19:17 | catch (...) | SchackTest.java:19:16:19:16 | e | +| SchackTest.java:19:5:19:17 | catch (...) | SchackTest.java:21:13:23:3 | { ... } | | SchackTest.java:19:16:19:16 | e | SchackTest.java:19:19:21:3 | { ... } | | SchackTest.java:19:19:21:3 | { ... } | SchackTest.java:20:4:20:74 | ; | | SchackTest.java:20:4:20:13 | System.out | SchackTest.java:20:23:20:72 | "successor (but neither true nor false successor)" | @@ -68,6 +71,7 @@ | SchackTest.java:22:4:22:40 | println(...) | SchackTest.java:5:7:5:9 | Normal Exit | | SchackTest.java:22:4:22:41 | ; | SchackTest.java:22:4:22:13 | System.out | | SchackTest.java:22:23:22:39 | "false successor" | SchackTest.java:22:4:22:40 | println(...) | +| SchackTest.java:26:18:26:20 | Entry | SchackTest.java:26:35:30:2 | { ... } | | SchackTest.java:26:18:26:20 | Exceptional Exit | SchackTest.java:26:18:26:20 | Exit | | SchackTest.java:26:18:26:20 | Normal Exit | SchackTest.java:26:18:26:20 | Exit | | SchackTest.java:26:35:30:2 | { ... } | SchackTest.java:27:3:27:25 | if (...) | diff --git a/java/ql/test/library-tests/successors/SchackTest/TestSucc.ql b/java/ql/test/library-tests/successors/SchackTest/TestSucc.ql index 6fca436fbfdb..68c50a85c58a 100644 --- a/java/ql/test/library-tests/successors/SchackTest/TestSucc.ql +++ b/java/ql/test/library-tests/successors/SchackTest/TestSucc.ql @@ -1,8 +1,9 @@ import java +import utils.test.AstCfg from ControlFlowNode n, ControlFlowNode succ where - succ = n.getASuccessor() and + succ = getAnAstSuccessor(n) and n.getLocation().getFile().getExtension() = "java" and not n.getLocation().getFile().getStem() = "PopulateRuntimeException" select n, succ diff --git a/java/ql/test/library-tests/successors/TestBreak/FalseSuccessors.expected b/java/ql/test/library-tests/successors/TestBreak/FalseSuccessors.expected deleted file mode 100644 index 6d5fbfbded61..000000000000 --- a/java/ql/test/library-tests/successors/TestBreak/FalseSuccessors.expected +++ /dev/null @@ -1,5 +0,0 @@ -| TestBreak.java:12:9:12:14 | ... == ... | TestBreak.java:16:5:27:5 | { ... } | -| TestBreak.java:19:11:19:16 | ... == ... | TestBreak.java:23:7:25:7 | { ... } | -| TestBreak.java:32:8:32:13 | ... == ... | TestBreak.java:36:4:46:4 | { ... } | -| TestBreak.java:39:10:39:15 | ... == ... | TestBreak.java:43:6:43:15 | ; | -| TestBreak.java:44:14:44:19 | ... == ... | TestBreak.java:45:5:45:11 | ; | diff --git a/java/ql/test/library-tests/successors/TestBreak/FalseSuccessors.ql b/java/ql/test/library-tests/successors/TestBreak/FalseSuccessors.ql deleted file mode 100644 index aee4021bee69..000000000000 --- a/java/ql/test/library-tests/successors/TestBreak/FalseSuccessors.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java - -from ConditionNode c -select c, c.getAFalseSuccessor() diff --git a/java/ql/test/library-tests/successors/TestBreak/TestSucc.expected b/java/ql/test/library-tests/successors/TestBreak/TestSucc.expected index 3fc266a0928c..ad033101fd6f 100644 --- a/java/ql/test/library-tests/successors/TestBreak/TestSucc.expected +++ b/java/ql/test/library-tests/successors/TestBreak/TestSucc.expected @@ -1,8 +1,8 @@ -| TestBreak.java:3:14:3:22 | Exceptional Exit | TestBreak.java:3:14:3:22 | Exit | +| TestBreak.java:3:14:3:22 | Entry | TestBreak.java:3:14:3:22 | { ... } | | TestBreak.java:3:14:3:22 | Normal Exit | TestBreak.java:3:14:3:22 | Exit | | TestBreak.java:3:14:3:22 | super(...) | TestBreak.java:3:14:3:22 | Normal Exit | | TestBreak.java:3:14:3:22 | { ... } | TestBreak.java:3:14:3:22 | super(...) | -| TestBreak.java:4:14:4:14 | Exceptional Exit | TestBreak.java:4:14:4:14 | Exit | +| TestBreak.java:4:14:4:14 | Entry | TestBreak.java:5:2:85:2 | { ... } | | TestBreak.java:4:14:4:14 | Normal Exit | TestBreak.java:4:14:4:14 | Exit | | TestBreak.java:5:2:85:2 | { ... } | TestBreak.java:7:3:8:11 |