diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000000..89d6d3d66e2 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,13 @@ +### Pull Request checklist + +#### All query authors + +- [ ] A change note is added if necessary. See [the documentation](https://github.com/github/codeql/blob/main/docs/change-notes.md) in this repository. +- [ ] All new queries have appropriate `.qhelp`. See [the documentation](https://github.com/github/codeql/blob/main/docs/query-help-style-guide.md) in this repository. +- [ ] QL tests are added if necessary. See [Testing custom queries](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/testing-custom-queries) in the GitHub documentation. +- [ ] New and changed queries have correct query metadata. See [the documentation](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md) in this repository. + +#### Internal query authors only + +- [ ] Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to `.ql`, `.qll`, or `.qhelp` files. See [the documentation](https://github.com/github/codeql-team/blob/main/docs/best-practices/validating-autofix-for-query-changes.md) (internal access required). +- [ ] Changes are validated [at scale](https://github.com/github/codeql-dca/) (internal access required). diff --git a/.github/workflows/csharp-qltest.yml b/.github/workflows/csharp-qltest.yml index 66326539e6e..35bbcf0896a 100644 --- a/.github/workflows/csharp-qltest.yml +++ b/.github/workflows/csharp-qltest.yml @@ -29,45 +29,6 @@ permissions: contents: read jobs: - qlupgrade: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/fetch-codeql - - name: Check DB upgrade scripts - run: | - echo >empty.trap - codeql dataset import -S ql/lib/upgrades/initial/semmlecode.csharp.dbscheme testdb empty.trap - codeql dataset upgrade testdb --additional-packs ql/lib - diff -q testdb/semmlecode.csharp.dbscheme ql/lib/semmlecode.csharp.dbscheme - - name: Check DB downgrade scripts - run: | - echo >empty.trap - rm -rf testdb; codeql dataset import -S ql/lib/semmlecode.csharp.dbscheme testdb empty.trap - codeql resolve upgrades --format=lines --allow-downgrades --additional-packs downgrades \ - --dbscheme=ql/lib/semmlecode.csharp.dbscheme --target-dbscheme=downgrades/initial/semmlecode.csharp.dbscheme | - xargs codeql execute upgrades testdb - diff -q testdb/semmlecode.csharp.dbscheme downgrades/initial/semmlecode.csharp.dbscheme - qltest: - if: github.repository_owner == 'github' - runs-on: ubuntu-latest-xl - strategy: - fail-fast: false - matrix: - slice: ["1/2", "2/2"] - steps: - - uses: actions/checkout@v4 - - uses: ./csharp/actions/create-extractor-pack - - name: Cache compilation cache - id: query-cache - uses: ./.github/actions/cache-query-compilation - with: - key: csharp-qltest-${{ matrix.slice }} - - name: Run QL tests - run: | - codeql test run --threads=0 --ram 50000 --slice ${{ matrix.slice }} --search-path "${{ github.workspace }}" --check-databases --check-undefined-labels --check-repeated-labels --check-redefined-labels --consistency-queries ql/consistency-queries ql/test --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" - env: - GITHUB_TOKEN: ${{ github.token }} unit-tests: strategy: matrix: diff --git a/.github/workflows/ruby-build.yml b/.github/workflows/ruby-build.yml index cc0944e5909..4a3242ce604 100644 --- a/.github/workflows/ruby-build.yml +++ b/.github/workflows/ruby-build.yml @@ -140,6 +140,7 @@ jobs: path: | ${{ runner.temp }}/query-packs/* retention-days: 1 + include-hidden-files: true package: runs-on: ubuntu-latest @@ -176,6 +177,7 @@ jobs: name: codeql-ruby-pack path: ruby/codeql-ruby.zip retention-days: 1 + include-hidden-files: true - uses: actions/download-artifact@v3 with: name: codeql-ruby-queries @@ -193,6 +195,7 @@ jobs: name: codeql-ruby-bundle path: ruby/codeql-ruby-bundle.zip retention-days: 1 + include-hidden-files: true test: defaults: diff --git a/MODULE.bazel b/MODULE.bazel index 783c35dc5fc..e969e805bf6 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -15,7 +15,7 @@ local_path_override( # see https://registry.bazel.build/ for a list of available packages bazel_dep(name = "platforms", version = "0.0.10") -bazel_dep(name = "rules_go", version = "0.49.0") +bazel_dep(name = "rules_go", version = "0.50.0") bazel_dep(name = "rules_pkg", version = "0.10.1") bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1") bazel_dep(name = "rules_python", version = "0.32.2") diff --git a/cpp/downgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/downgrades.ql b/cpp/downgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/downgrades.ql new file mode 100644 index 00000000000..3425ec2f672 --- /dev/null +++ b/cpp/downgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/downgrades.ql @@ -0,0 +1,32 @@ +/* + * Approach: replace conversion expressions of kind 389 (= @c11_generic) by + * conversion expressions of kind 12 (= @parexpr), i.e., a `ParenthesisExpr`, + * and drop the relation which its child expressions, which are just syntactic + * sugar. Parenthesis expressions are equally benign as C11 _Generic expressions, + * and behave similarly in the context of the IR. + */ + +class Expr extends @expr { + string toString() { none() } +} + +class Location extends @location { + string toString() { none() } +} + +class ExprParent extends @exprparent { + string toString() { none() } +} + +query predicate new_exprs(Expr expr, int new_kind, Location loc) { + exists(int kind | exprs(expr, kind, loc) | if kind = 389 then new_kind = 12 else new_kind = kind) +} + +query predicate new_exprparents(Expr expr, int index, ExprParent expr_parent) { + exprparents(expr, index, expr_parent) and + ( + not expr_parent instanceof @expr + or + exists(int kind | exprs(expr_parent.(Expr), kind, _) | kind != 389) + ) +} diff --git a/cpp/downgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/old.dbscheme b/cpp/downgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/old.dbscheme new file mode 100644 index 00000000000..0fea0ee7026 --- /dev/null +++ b/cpp/downgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/old.dbscheme @@ -0,0 +1,2319 @@ + +/** + * 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 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, 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 +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * 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( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * 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_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * 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_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: 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_default 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 +); + +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 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 + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // 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 +); + +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, + int handle: @variable ref, + int promise: @variable 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 +); + +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_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable 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 +); + +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: @functionorblock ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +; + +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 +; + +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 +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator. For example: + * ``` + * int a; + * decltype(1+a) b; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * would change the semantics of this 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. + */ +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @usertype.kind of + 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +| 5 = @typedef // classic C: typedef typedef type name +| 6 = @template +| 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 // a using name = type style typedef +; +*/ + +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 +); + +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 +); + +is_proxy_class_for( + unique int id: @usertype ref, + unique int templ_param_id: @usertype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location 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 +); + +/* + Fixed point types + precision(1) = short, precision(2) = default, precision(3) = long + is_unsigned(1) = unsigned is_unsigned(2) = signed + is_fract_type(1) = declared with _Fract + saturating(1) = declared with _Sat +*/ +/* TODO +fixedpointtypes( + unique int id: @fixedpointtype, + int precision: int ref, + int is_unsigned: int ref, + int is_fract_type: int ref, + int saturating: int 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 +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + /* TODO | @fixedpointtype */ + | @routinetype + | @ptrtomember + | @decltype; + +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; + +@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; + +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_expr 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_expr 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 +; + +@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 + ; + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref +); + +/** + * 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 +); + +@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 +); + +@runtime_sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof; + +sizeof_bind( + unique int expr: @runtime_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 +); + +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_stmt 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 +; + +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 +); + +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 +); + +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 +); + +@functionorblock = @function | @stmt_block; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @functionorblock ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue; + +@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 +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/downgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/semmlecode.cpp.dbscheme b/cpp/downgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/semmlecode.cpp.dbscheme new file mode 100644 index 00000000000..02a123a1a68 --- /dev/null +++ b/cpp/downgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/semmlecode.cpp.dbscheme @@ -0,0 +1,2317 @@ + +/** + * 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 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, 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 +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * 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( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * 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_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * 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_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: 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_default 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 +); + +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 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 + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // 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 +); + +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, + int handle: @variable ref, + int promise: @variable 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 +); + +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_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable 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 +); + +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: @functionorblock ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +; + +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 +; + +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 +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator. For example: + * ``` + * int a; + * decltype(1+a) b; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * would change the semantics of this 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. + */ +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @usertype.kind of + 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +| 5 = @typedef // classic C: typedef typedef type name +| 6 = @template +| 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 // a using name = type style typedef +; +*/ + +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 +); + +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 +); + +is_proxy_class_for( + unique int id: @usertype ref, + unique int templ_param_id: @usertype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location 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 +); + +/* + Fixed point types + precision(1) = short, precision(2) = default, precision(3) = long + is_unsigned(1) = unsigned is_unsigned(2) = signed + is_fract_type(1) = declared with _Fract + saturating(1) = declared with _Sat +*/ +/* TODO +fixedpointtypes( + unique int id: @fixedpointtype, + int precision: int ref, + int is_unsigned: int ref, + int is_fract_type: int ref, + int saturating: int 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 +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + /* TODO | @fixedpointtype */ + | @routinetype + | @ptrtomember + | @decltype; + +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; + +@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 + ; + +/* +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; + +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_expr 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_expr 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 +; + +@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 + ; + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref +); + +/** + * 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 +); + +@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 +); + +@runtime_sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof; + +sizeof_bind( + unique int expr: @runtime_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 +); + +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_stmt 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 +; + +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 +); + +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 +); + +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 +); + +@functionorblock = @function | @stmt_block; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @functionorblock ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue; + +@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 +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/downgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/upgrade.properties b/cpp/downgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/upgrade.properties new file mode 100644 index 00000000000..1f42059fd60 --- /dev/null +++ b/cpp/downgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/upgrade.properties @@ -0,0 +1,4 @@ +description: Expose C11 _Generics +compatibility: partial +exprs.rel: run downgrades.ql new_exprs +exprparents.rel: run downgrades.ql new_exprparents diff --git a/cpp/downgrades/7ff6a6e53dbcff09d1b9b758b594bc6d17366863/coroutine.ql b/cpp/downgrades/7ff6a6e53dbcff09d1b9b758b594bc6d17366863/coroutine.ql new file mode 100644 index 00000000000..bb9ca91c04d --- /dev/null +++ b/cpp/downgrades/7ff6a6e53dbcff09d1b9b758b594bc6d17366863/coroutine.ql @@ -0,0 +1,18 @@ +class Function extends @function { + string toString() { none() } +} + +class Type extends @type { + string toString() { none() } +} + +class Variable extends @variable { + string toString() { none() } +} + +from Function func, Type traits, Variable handle, Variable promise +where + coroutine(func, traits) and + coroutine_placeholder_variable(handle, 1, func) and + coroutine_placeholder_variable(promise, 2, func) +select func, traits, handle, promise diff --git a/cpp/downgrades/7ff6a6e53dbcff09d1b9b758b594bc6d17366863/old.dbscheme b/cpp/downgrades/7ff6a6e53dbcff09d1b9b758b594bc6d17366863/old.dbscheme new file mode 100644 index 00000000000..7ff6a6e53db --- /dev/null +++ b/cpp/downgrades/7ff6a6e53dbcff09d1b9b758b594bc6d17366863/old.dbscheme @@ -0,0 +1,2315 @@ + +/** + * 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 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, 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 +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * 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( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * 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_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * 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_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: 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_default 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 +); + +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 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 + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // 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 +); + +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 +); + +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_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable 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 +); + +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: @functionorblock ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +; + +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 +; + +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 +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator. For example: + * ``` + * int a; + * decltype(1+a) b; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * would change the semantics of this 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. + */ +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @usertype.kind of + 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +| 5 = @typedef // classic C: typedef typedef type name +| 6 = @template +| 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 // a using name = type style typedef +; +*/ + +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 +); + +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 +); + +is_proxy_class_for( + unique int id: @usertype ref, + unique int templ_param_id: @usertype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location 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 +); + +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 +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + /* TODO | @fixedpointtype */ + | @routinetype + | @ptrtomember + | @decltype; + +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; + +@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; + +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_expr 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_expr 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 +; + +@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 + ; + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref +); + +/** + * 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 +); + +@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 +); + +@runtime_sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof; + +sizeof_bind( + unique int expr: @runtime_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 +); + +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_stmt 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 +; + +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 +); + +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 +); + +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 +); + +@functionorblock = @function | @stmt_block; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @functionorblock ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue; + +@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 +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/downgrades/7ff6a6e53dbcff09d1b9b758b594bc6d17366863/semmlecode.cpp.dbscheme b/cpp/downgrades/7ff6a6e53dbcff09d1b9b758b594bc6d17366863/semmlecode.cpp.dbscheme new file mode 100644 index 00000000000..0fea0ee7026 --- /dev/null +++ b/cpp/downgrades/7ff6a6e53dbcff09d1b9b758b594bc6d17366863/semmlecode.cpp.dbscheme @@ -0,0 +1,2319 @@ + +/** + * 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 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, 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 +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * 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( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * 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_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * 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_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: 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_default 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 +); + +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 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 + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // 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 +); + +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, + int handle: @variable ref, + int promise: @variable 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 +); + +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_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable 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 +); + +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: @functionorblock ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +; + +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 +; + +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 +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator. For example: + * ``` + * int a; + * decltype(1+a) b; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * would change the semantics of this 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. + */ +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @usertype.kind of + 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +| 5 = @typedef // classic C: typedef typedef type name +| 6 = @template +| 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 // a using name = type style typedef +; +*/ + +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 +); + +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 +); + +is_proxy_class_for( + unique int id: @usertype ref, + unique int templ_param_id: @usertype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location 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 +); + +/* + Fixed point types + precision(1) = short, precision(2) = default, precision(3) = long + is_unsigned(1) = unsigned is_unsigned(2) = signed + is_fract_type(1) = declared with _Fract + saturating(1) = declared with _Sat +*/ +/* TODO +fixedpointtypes( + unique int id: @fixedpointtype, + int precision: int ref, + int is_unsigned: int ref, + int is_fract_type: int ref, + int saturating: int 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 +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + /* TODO | @fixedpointtype */ + | @routinetype + | @ptrtomember + | @decltype; + +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; + +@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; + +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_expr 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_expr 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 +; + +@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 + ; + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref +); + +/** + * 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 +); + +@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 +); + +@runtime_sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof; + +sizeof_bind( + unique int expr: @runtime_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 +); + +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_stmt 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 +; + +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 +); + +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 +); + +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 +); + +@functionorblock = @function | @stmt_block; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @functionorblock ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue; + +@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 +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/downgrades/7ff6a6e53dbcff09d1b9b758b594bc6d17366863/upgrade.properties b/cpp/downgrades/7ff6a6e53dbcff09d1b9b758b594bc6d17366863/upgrade.properties new file mode 100644 index 00000000000..cb2077596c3 --- /dev/null +++ b/cpp/downgrades/7ff6a6e53dbcff09d1b9b758b594bc6d17366863/upgrade.properties @@ -0,0 +1,4 @@ +description: Improve handling of coroutine placeholder variables +compatibility: full +coroutine.rel: run coroutine.qlo +coroutine_placeholder_variable.rel: delete diff --git a/cpp/ql/lib/CHANGELOG.md b/cpp/ql/lib/CHANGELOG.md index 646199bb39c..c66bc4a4552 100644 --- a/cpp/ql/lib/CHANGELOG.md +++ b/cpp/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.4.1 + +No user-facing changes. + ## 1.4.0 ### New Features diff --git a/cpp/ql/lib/change-notes/2024-08-30-c11-generics.md b/cpp/ql/lib/change-notes/2024-08-30-c11-generics.md new file mode 100644 index 00000000000..29f3579090b --- /dev/null +++ b/cpp/ql/lib/change-notes/2024-08-30-c11-generics.md @@ -0,0 +1,4 @@ +--- +category: feature +--- +* Added a class `C11GenericExpr` to represent C11 generic selection expressions. The generic selection is represented as a `Conversion` on the expression that will be selected. diff --git a/cpp/ql/lib/change-notes/2024-09-03-outdated-deprecations.md b/cpp/ql/lib/change-notes/2024-09-03-outdated-deprecations.md new file mode 100644 index 00000000000..9db308c5d62 --- /dev/null +++ b/cpp/ql/lib/change-notes/2024-09-03-outdated-deprecations.md @@ -0,0 +1,11 @@ +--- +category: breaking +--- +* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`. +* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`. +* Deleted the deprecated `hasQualifiedName` and `isDefined` predicates from the `Declaration` class, use `hasGlobalName` and `hasDefinition` respectively instead. +* Deleted the `getFullSignature` predicate from the `Function` class, use `getIdentityString(Declaration)` from `semmle.code.cpp.Print` instead. +* Deleted the deprecated `freeCall` predicate from `Alloc.qll`. Use `DeallocationExpr` instead. +* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration` instead. +* Deleted the deprecated `getFieldExpr` predicate from `ClassAggregateLiteral`, use `getAFieldExpr` instead. +* Deleted the deprecated `getElementExpr` predicate from `ArrayOrVectorAggregateLiteral`, use `getAnElementExpr` instead. diff --git a/cpp/ql/lib/change-notes/2024-09-03-realloc-data-flow.md b/cpp/ql/lib/change-notes/2024-09-03-realloc-data-flow.md new file mode 100644 index 00000000000..9245894c97e --- /dev/null +++ b/cpp/ql/lib/change-notes/2024-09-03-realloc-data-flow.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Added a data flow model for `realloc`-like functions, which were previously modeled as a taint tracking functions. This change improves the precision of queries where flow through `realloc`-like functions might affect the results. diff --git a/cpp/ql/lib/change-notes/2024-09-04-swap-data-flow.md b/cpp/ql/lib/change-notes/2024-09-04-swap-data-flow.md new file mode 100644 index 00000000000..22acd48ee32 --- /dev/null +++ b/cpp/ql/lib/change-notes/2024-09-04-swap-data-flow.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Added a data flow model for `swap` member functions, which were previously modeled as taint tracking functions. This change improves the precision of queries where flow through `swap` member functions might affect the results. diff --git a/cpp/ql/lib/change-notes/released/1.4.1.md b/cpp/ql/lib/change-notes/released/1.4.1.md new file mode 100644 index 00000000000..38987aa49cd --- /dev/null +++ b/cpp/ql/lib/change-notes/released/1.4.1.md @@ -0,0 +1,3 @@ +## 1.4.1 + +No user-facing changes. diff --git a/cpp/ql/lib/codeql-pack.release.yml b/cpp/ql/lib/codeql-pack.release.yml index b8b2e97d508..43ccf4467be 100644 --- a/cpp/ql/lib/codeql-pack.release.yml +++ b/cpp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.4.0 +lastReleaseVersion: 1.4.1 diff --git a/cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll b/cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll index e733940bdc1..99cd8bfb7fd 100644 --- a/cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll +++ b/cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll @@ -36,16 +36,6 @@ module PrivateCleartextWrite { } } - deprecated class WriteConfig extends TaintTracking::Configuration { - WriteConfig() { this = "Write configuration" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } - } - private module WriteConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof Source } diff --git a/cpp/ql/lib/qlpack.yml b/cpp/ql/lib/qlpack.yml index 830e4f75408..049e5afd0eb 100644 --- a/cpp/ql/lib/qlpack.yml +++ b/cpp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-all -version: 1.4.1-dev +version: 1.4.2-dev groups: cpp dbscheme: semmlecode.cpp.dbscheme extractor: cpp diff --git a/cpp/ql/lib/semmle/code/cpp/Declaration.qll b/cpp/ql/lib/semmle/code/cpp/Declaration.qll index 7d7dee45aa9..61fe2018026 100644 --- a/cpp/ql/lib/semmle/code/cpp/Declaration.qll +++ b/cpp/ql/lib/semmle/code/cpp/Declaration.qll @@ -60,18 +60,6 @@ class Declaration extends Locatable, @declaration { */ string getQualifiedName() { result = underlyingElement(this).(Q::Declaration).getQualifiedName() } - /** - * DEPRECATED: Prefer `hasGlobalName` or the 2-argument or 3-argument - * `hasQualifiedName` predicates. To get the exact same results as this - * predicate in all edge cases, use `getQualifiedName()`. - * - * Holds if this declaration has the fully-qualified name `qualifiedName`. - * See `getQualifiedName`. - */ - deprecated predicate hasQualifiedName(string qualifiedName) { - this.getQualifiedName() = qualifiedName - } - /** * Holds if this declaration has a fully-qualified name with a name-space * component of `namespaceQualifier`, a declaring type of `typeQualifier`, @@ -185,9 +173,6 @@ class Declaration extends Locatable, @declaration { /** Holds if the declaration has a definition. */ predicate hasDefinition() { exists(this.getDefinition()) } - /** DEPRECATED: Use `hasDefinition` instead. */ - deprecated predicate isDefined() { this.hasDefinition() } - /** Gets the preferred location of this declaration, if any. */ override Location getLocation() { none() } diff --git a/cpp/ql/lib/semmle/code/cpp/Function.qll b/cpp/ql/lib/semmle/code/cpp/Function.qll index a2d8d078024..f23b04e19d6 100644 --- a/cpp/ql/lib/semmle/code/cpp/Function.qll +++ b/cpp/ql/lib/semmle/code/cpp/Function.qll @@ -30,46 +30,6 @@ class Function extends Declaration, ControlFlowNode, AccessHolder, @function { override string getName() { functions(underlyingElement(this), result, _) } - /** - * DEPRECATED: Use `getIdentityString(Declaration)` from `semmle.code.cpp.Print` instead. - * Gets the full signature of this function, including return type, parameter - * types, and template arguments. - * - * For example, in the following code: - * ``` - * template T min(T x, T y); - * int z = min(5, 7); - * ``` - * The full signature of the function called on the last line would be - * `min(int, int) -> int`, and the full signature of the uninstantiated - * template on the first line would be `min(T, T) -> T`. - */ - deprecated string getFullSignature() { - exists(string name, string templateArgs, string args | - result = name + templateArgs + args + " -> " + this.getType().toString() and - name = this.getQualifiedName() and - ( - if exists(this.getATemplateArgument()) - then - templateArgs = - "<" + - concat(int i | - exists(this.getTemplateArgument(i)) - | - this.getTemplateArgument(i).toString(), ", " order by i - ) + ">" - else templateArgs = "" - ) and - args = - "(" + - concat(int i | - exists(this.getParameter(i)) - | - this.getParameter(i).getType().toString(), ", " order by i - ) + ")" - ) - } - /** Gets a specifier of this function. */ override Specifier getASpecifier() { funspecifiers(underlyingElement(this), unresolveElement(result)) or diff --git a/cpp/ql/lib/semmle/code/cpp/PrintAST.qll b/cpp/ql/lib/semmle/code/cpp/PrintAST.qll index b515a346bf3..6194710f0c5 100644 --- a/cpp/ql/lib/semmle/code/cpp/PrintAST.qll +++ b/cpp/ql/lib/semmle/code/cpp/PrintAST.qll @@ -286,9 +286,6 @@ abstract class BaseAstNode extends PrintAstNode { * Gets the AST represented by this node. */ final Locatable getAst() { result = ast } - - /** DEPRECATED: Alias for getAst */ - deprecated Locatable getAST() { result = this.getAst() } } /** @@ -385,6 +382,21 @@ class CastNode extends ConversionNode { } } +/** + * A node representing a `C11GenericExpr`. + */ +class C11GenericNode extends ConversionNode { + C11GenericExpr generic; + + C11GenericNode() { generic = conv } + + override AstNode getChildInternal(int childIndex) { + result = super.getChildInternal(childIndex - count(generic.getAChild())) + or + result.getAst() = generic.getChild(childIndex) + } +} + /** * A node representing a `StmtExpr`. */ @@ -860,6 +872,15 @@ private predicate namedExprChildPredicates(Expr expr, Element ele, string pred) or expr.(BuiltInVarArgsStart).getLastNamedParameter() = ele and pred = "getLastNamedParameter()" or + expr.(C11GenericExpr).getControllingExpr() = ele and pred = "getControllingExpr()" + or + exists(int n | + expr.(C11GenericExpr).getAssociationType(n) = ele.(TypeName).getType() and + pred = "getAssociationType(" + n + ")" + or + expr.(C11GenericExpr).getAssociationExpr(n) = ele and pred = "getAssociationExpr(" + n + ")" + ) + or expr.(Call).getQualifier() = ele and pred = "getQualifier()" or exists(int n | expr.(Call).getArgument(n) = ele and pred = "getArgument(" + n.toString() + ")") diff --git a/cpp/ql/lib/semmle/code/cpp/Variable.qll b/cpp/ql/lib/semmle/code/cpp/Variable.qll index 8d78dbd2c71..96bfabb4de0 100644 --- a/cpp/ql/lib/semmle/code/cpp/Variable.qll +++ b/cpp/ql/lib/semmle/code/cpp/Variable.qll @@ -409,11 +409,18 @@ class LocalVariable extends LocalScopeVariable, @localvariable { exists(ConditionDeclExpr e | e.getVariable() = this and e.getEnclosingFunction() = result) or orphaned_variables(underlyingElement(this), unresolveElement(result)) + or + coroutine_placeholder_variable(underlyingElement(this), _, unresolveElement(result)) } override predicate isStatic() { super.isStatic() or orphaned_variables(underlyingElement(this), _) } + + override predicate isCompilerGenerated() { + super.isCompilerGenerated() or + coroutine_placeholder_variable(underlyingElement(this), _, _) + } } /** diff --git a/cpp/ql/lib/semmle/code/cpp/commons/Alloc.qll b/cpp/ql/lib/semmle/code/cpp/commons/Alloc.qll index a6fb84d3227..386a0e85aac 100644 --- a/cpp/ql/lib/semmle/code/cpp/commons/Alloc.qll +++ b/cpp/ql/lib/semmle/code/cpp/commons/Alloc.qll @@ -7,15 +7,6 @@ import semmle.code.cpp.models.interfaces.Deallocation */ predicate freeFunction(Function f, int argNum) { argNum = f.(DeallocationFunction).getFreedArg() } -/** - * A call to a library routine that frees memory. - * - * DEPRECATED: Use `DeallocationExpr` instead (this also includes `delete` expressions). - */ -deprecated predicate freeCall(FunctionCall fc, Expr arg) { - arg = fc.(DeallocationExpr).getFreedExpr() -} - /** * Is e some kind of allocation or deallocation (`new`, `alloc`, `realloc`, `delete`, `free` etc)? */ diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll index 3b1439511d1..359fa71744b 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl1.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll index 3b1439511d1..359fa71744b 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll index 3b1439511d1..359fa71744b 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll index 3b1439511d1..359fa71744b 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll index 3b1439511d1..359fa71744b 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll b/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll index d85962b9fe7..91b57049a54 100644 --- a/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll +++ b/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll @@ -632,6 +632,106 @@ class ParenthesisExpr extends Conversion, @parexpr { override string getAPrimaryQlClass() { result = "ParenthesisExpr" } } +/** + * A node representing a C11 `_Generic` selection expression. + * + * For example: + * ``` + * _Generic(e, int: "int", default: "unknown") + * ``` + */ +class C11GenericExpr extends Conversion, @c11_generic { + int associationCount; + + C11GenericExpr() { associationCount = (count(this.getAChild()) - 1) / 2 } + + override string toString() { result = "_Generic" } + + override string getAPrimaryQlClass() { result = "C11GenericExpr" } + + /** + * Gets the controlling expression of the generic selection. + * + * For example, for + * ``` + * _Generic(e, int: "a", default: "b") + * ``` + * the result is `e`. + */ + Expr getControllingExpr() { result = this.getChild(0) } + + /** + * Gets the type of the `n`th element in the association list of the generic selection. + * + * For example, for + * ``` + * _Generic(e, int: "a", default: "b") + * ``` + * the type of the 0th element is `int`. In the case of the default element the + * type will an instance of `VoidType`. + */ + Type getAssociationType(int n) { + n in [0 .. associationCount - 1] and + result = this.getChild(n * 2 + 1).(TypeName).getType() + } + + /** + * Gets the type of an element in the association list of the generic selection. + */ + Type getAnAssociationType() { result = this.getAssociationType(_) } + + /** + * Gets the expression of the `n`th element in the association list of + * the generic selection. + * + * For example, for + * ``` + * _Generic(e, int: "a", default: "b") + * ``` + * the expression for 0th element is `"a"`, and the expression for the + * 1st element is `"b"`. For the selected expression, this predicate + * will yield a `ReuseExpr`, such that + * ``` + * this.getAssociationExpr(n).(ReuseExpr).getReusedExpr() = this.getExpr() + * ``` + */ + Expr getAssociationExpr(int n) { + n in [0 .. associationCount - 1] and + result = this.getChild(n * 2 + 2) + } + + /** + * Gets the expression of an element in the association list of the generic selection. + */ + Expr getAnAssociationExpr() { result = this.getAssociationExpr(_) } + + /** + * Holds if the `n`th element of the association list of the generic selection is the + * default element. + * + * For example, for + * ``` + * _Generic(e, int: "a", default: "b") + * ``` + * this holds for 1. + */ + predicate isDefaultAssociation(int n) { this.getAssociationType(n) instanceof VoidType } + + /** + * Holds if the `n`th element of the association list of the generic selection is the + * one whose expression was selected. + * + * For example, with `e` of type `int` and + * ``` + * _Generic(e, int: "a", default: "b") + * ``` + * this holds for 0. + */ + predicate isSelectedAssociation(int n) { + this.getAssociationExpr(n).(ReuseExpr).getReusedExpr() = this.getExpr() + } +} + /** * A C/C++ expression that could not be resolved, or that can no longer be * represented due to a database upgrade or downgrade. @@ -668,6 +768,8 @@ class AssumeExpr extends Expr, @assume { /** * A C/C++ comma expression. + * + * For example: * ``` * int c = compute1(), compute2(), resulting_value; * ``` diff --git a/cpp/ql/lib/semmle/code/cpp/exprs/Literal.qll b/cpp/ql/lib/semmle/code/cpp/exprs/Literal.qll index 32e16747c22..a36758417bb 100644 --- a/cpp/ql/lib/semmle/code/cpp/exprs/Literal.qll +++ b/cpp/ql/lib/semmle/code/cpp/exprs/Literal.qll @@ -195,17 +195,6 @@ class ClassAggregateLiteral extends AggregateLiteral { */ Expr getAFieldExpr(Field field) { result = this.getFieldExpr(field, _) } - /** - * DEPRECATED: Use `getAFieldExpr` instead. - * - * Gets the expression within the aggregate literal that is used to initialize - * field `field`, if present. - * - * This predicate may have multiple results since a field can be initialized - * multiple times in the same initializer. - */ - deprecated Expr getFieldExpr(Field field) { result = this.getFieldExpr(field, _) } - /** * Gets the expression within the aggregate literal that is used to initialize * field `field`, if present. The expression is the `position`'th entry in the @@ -300,17 +289,6 @@ class ArrayOrVectorAggregateLiteral extends AggregateLiteral { */ Expr getAnElementExpr(int elementIndex) { result = this.getElementExpr(elementIndex, _) } - /** - * DEPRECATED: Use `getAnElementExpr` instead. - * - * Gets the expression within the aggregate literal that is used to initialize - * element `elementIndex`, if present. - * - * This predicate may have multiple results since an element can be initialized - * multiple times in the same initializer. - */ - deprecated Expr getElementExpr(int elementIndex) { result = this.getElementExpr(elementIndex, _) } - /** * Gets the expression within the aggregate literal that is used to initialize * element `elementIndex`, if present. The expression is the `position`'th entry diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll index 3b1439511d1..359fa71744b 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl1.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll index 3b1439511d1..359fa71744b 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll index 3b1439511d1..359fa71744b 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll index 3b1439511d1..359fa71744b 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRVariable.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRVariable.qll index 24135820ab8..43217ed4c60 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRVariable.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRVariable.qll @@ -50,9 +50,6 @@ abstract private class AbstractIRVariable extends TIRVariable { */ abstract Language::AST getAst(); - /** DEPRECATED: Alias for getAst */ - deprecated Language::AST getAST() { result = this.getAst() } - /** * Gets an identifier string for the variable. This identifier is unique * within the function. @@ -96,9 +93,6 @@ class IRUserVariable extends AbstractIRVariable, TIRUserVariable { final override Language::AST getAst() { result = var } - /** DEPRECATED: Alias for getAst */ - deprecated override Language::AST getAST() { result = this.getAst() } - final override string getUniqueId() { result = this.getVariable().toString() + " " + this.getVariable().getLocation().toString() } @@ -163,9 +157,6 @@ abstract private class AbstractIRGeneratedVariable extends AbstractIRVariable { final override Language::AST getAst() { result = ast } - /** DEPRECATED: Alias for getAst */ - deprecated override Language::AST getAST() { result = this.getAst() } - override string toString() { result = this.getBaseString() + this.getLocationString() } override string getUniqueId() { none() } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasedSSA.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasedSSA.qll index 4db00eee608..b63a543d9ae 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasedSSA.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasedSSA.qll @@ -285,9 +285,6 @@ abstract private class MemoryLocation0 extends TMemoryLocation { predicate isAlwaysAllocatedOnStack() { none() } final predicate canReuseSsa() { none() } - - /** DEPRECATED: Alias for canReuseSsa */ - deprecated predicate canReuseSSA() { this.canReuseSsa() } } /** diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRVariable.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRVariable.qll index 24135820ab8..43217ed4c60 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRVariable.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRVariable.qll @@ -50,9 +50,6 @@ abstract private class AbstractIRVariable extends TIRVariable { */ abstract Language::AST getAst(); - /** DEPRECATED: Alias for getAst */ - deprecated Language::AST getAST() { result = this.getAst() } - /** * Gets an identifier string for the variable. This identifier is unique * within the function. @@ -96,9 +93,6 @@ class IRUserVariable extends AbstractIRVariable, TIRUserVariable { final override Language::AST getAst() { result = var } - /** DEPRECATED: Alias for getAst */ - deprecated override Language::AST getAST() { result = this.getAst() } - final override string getUniqueId() { result = this.getVariable().toString() + " " + this.getVariable().getLocation().toString() } @@ -163,9 +157,6 @@ abstract private class AbstractIRGeneratedVariable extends AbstractIRVariable { final override Language::AST getAst() { result = ast } - /** DEPRECATED: Alias for getAst */ - deprecated override Language::AST getAST() { result = this.getAst() } - override string toString() { result = this.getBaseString() + this.getLocationString() } override string getUniqueId() { none() } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll index 7e3dc3cd9e2..daa6bdaafcf 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll @@ -216,9 +216,6 @@ abstract class TranslatedSideEffects extends TranslatedElement { final override Locatable getAst() { result = this.getExpr() } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final override Declaration getFunction() { result = getEnclosingDeclaration(this.getExpr()) } final override TranslatedElement getChild(int i) { @@ -616,9 +613,6 @@ class TranslatedArgumentExprSideEffect extends TranslatedArgumentSideEffect, final override Locatable getAst() { result = arg } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final override Type getIndirectionType() { result = arg.getUnspecifiedType().(DerivedType).getBaseType() or @@ -651,9 +645,6 @@ class TranslatedStructorQualifierSideEffect extends TranslatedArgumentSideEffect final override Locatable getAst() { result = call } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final override Type getIndirectionType() { result = call.getTarget().getDeclaringType() } final override string getArgString() { result = "this" } @@ -675,9 +666,6 @@ class TranslatedCallSideEffect extends TranslatedSideEffect, TTranslatedCallSide override Locatable getAst() { result = expr } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - override Expr getPrimaryExpr() { result = expr } override predicate sortOrder(int group, int indexInGroup) { @@ -716,9 +704,6 @@ class TranslatedAllocationSideEffect extends TranslatedSideEffect, TTranslatedAl override Locatable getAst() { result = expr } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - override Expr getPrimaryExpr() { result = expr } override predicate sortOrder(int group, int indexInGroup) { diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCondition.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCondition.qll index 77864969068..1616c9c434b 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCondition.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCondition.qll @@ -29,9 +29,6 @@ abstract class TranslatedCondition extends TranslatedElement { final override Locatable getAst() { result = expr } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final ConditionContext getConditionContext() { result = this.getParent() } final Expr getExpr() { result = expr } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedDeclarationEntry.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedDeclarationEntry.qll index 55b5aa179f4..c0fe9cd2207 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedDeclarationEntry.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedDeclarationEntry.qll @@ -45,9 +45,6 @@ abstract class TranslatedDeclarationEntry extends TranslatedElement, TTranslated final override string toString() { result = entry.toString() } final override Locatable getAst() { result = entry.getAst() } - - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } } /** @@ -248,9 +245,6 @@ class TranslatedStaticLocalVariableInitialization extends TranslatedElement, final override Locatable getAst() { result = entry.getAst() } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final override LocalVariable getVariable() { result = var } final override Declaration getFunction() { result = var.getFunction() } @@ -277,9 +271,6 @@ class TranslatedConditionDecl extends TranslatedLocalVariableDeclaration, TTrans override Locatable getAst() { result = conditionDeclExpr } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - override Declaration getFunction() { result = getEnclosingFunction(conditionDeclExpr) } override LocalVariable getVariable() { result = conditionDeclExpr.getVariable() } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll index 4d2b1a95d31..917626daa0c 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedElement.qll @@ -128,6 +128,9 @@ private predicate ignoreExprAndDescendants(Expr expr) { vaStartExpr.getLastNamedParameter().getFullyConverted() = expr ) or + // The children of C11 _Generic expressions are just surface syntax. + exists(C11GenericExpr generic | generic.getAChild() = expr) + or // Do not translate implicit destructor calls for unnamed temporary variables that are // conditionally constructed (until we have a mechanism for calling these only when the // temporary's constructor was run) @@ -432,6 +435,9 @@ predicate ignoreLoad(Expr expr) { // The load is duplicated from the right operand. isExtractorFrontendVersion65OrHigher() and expr instanceof CommaExpr or + // The load is duplicated from the chosen expression. + expr instanceof C11GenericExpr + or expr.(PointerDereferenceExpr).getOperand().getFullyConverted().getType().getUnspecifiedType() instanceof FunctionPointerType or @@ -920,9 +926,6 @@ abstract class TranslatedElement extends TTranslatedElement { */ abstract Locatable getAst(); - /** DEPRECATED: Alias for getAst */ - deprecated Locatable getAST() { result = this.getAst() } - /** Gets the location of this element. */ Location getLocation() { result = this.getAst().getLocation() } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll index c2e216cc963..e7ccac24eb9 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll @@ -893,7 +893,8 @@ class TranslatedTransparentConversion extends TranslatedTransparentExpr { ( expr instanceof ParenthesisExpr or expr instanceof ReferenceDereferenceExpr or - expr instanceof ReferenceToExpr + expr instanceof ReferenceToExpr or + expr instanceof C11GenericExpr ) } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedFunction.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedFunction.qll index 3e4e83965e2..26fc341735b 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedFunction.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedFunction.qll @@ -67,9 +67,6 @@ class TranslatedFunction extends TranslatedRootElement, TTranslatedFunction { final override Locatable getAst() { result = func } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - /** * Gets the function being translated. */ @@ -483,9 +480,6 @@ class TranslatedThisParameter extends TranslatedParameter, TTranslatedThisParame final override Locatable getAst() { result = func } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final override Function getFunction() { result = func } final override predicate hasIndirection() { any() } @@ -518,9 +512,6 @@ class TranslatedPositionalParameter extends TranslatedParameter, TTranslatedPara final override Locatable getAst() { result = param } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final override Function getFunction() { result = param.getFunction() or result = param.getCatchBlock().getEnclosingFunction() @@ -558,9 +549,6 @@ class TranslatedEllipsisParameter extends TranslatedParameter, TTranslatedEllips final override Locatable getAst() { result = func } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final override Function getFunction() { result = func } final override predicate hasIndirection() { any() } @@ -597,9 +585,6 @@ class TranslatedConstructorInitList extends TranslatedElement, InitializationCon override Locatable getAst() { result = func } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - override TranslatedElement getChild(int id) { exists(ConstructorFieldInit fieldInit | fieldInit = func.(Constructor).getInitializer(id) and @@ -677,9 +662,6 @@ class TranslatedDestructorDestructionList extends TranslatedElement, override Locatable getAst() { result = func } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - override TranslatedElement getChild(int id) { exists(DestructorFieldDestruction fieldDestruction | fieldDestruction = func.(Destructor).getDestruction(id) and @@ -733,9 +715,6 @@ class TranslatedReadEffects extends TranslatedElement, TTranslatedReadEffects { override Locatable getAst() { result = func } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - override Function getFunction() { result = func } override string toString() { result = "read effects: " + func.toString() } @@ -839,9 +818,6 @@ class TranslatedThisReadEffect extends TranslatedReadEffect, TTranslatedThisRead override Locatable getAst() { result = func } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - override Function getFunction() { result = func } override string toString() { result = "read effect: this" } @@ -865,9 +841,6 @@ class TranslatedParameterReadEffect extends TranslatedReadEffect, TTranslatedPar override Locatable getAst() { result = param } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - override string toString() { result = "read effect: " + param.toString() } override Function getFunction() { result = param.getFunction() } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedInitialization.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedInitialization.qll index 9b6165d0782..06ce9193205 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedInitialization.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedInitialization.qll @@ -153,9 +153,6 @@ abstract class TranslatedInitialization extends TranslatedElement, TTranslatedIn final override Locatable getAst() { result = expr } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - /** * Gets the expression that is doing the initialization. */ @@ -528,9 +525,6 @@ abstract class TranslatedFieldInitialization extends TranslatedElement { final override Locatable getAst() { result = ast } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final override Declaration getFunction() { result = getEnclosingFunction(ast) or result = getEnclosingVariable(ast).(GlobalOrNamespaceVariable) or @@ -701,9 +695,6 @@ abstract class TranslatedElementInitialization extends TranslatedElement { final override Locatable getAst() { result = initList } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final override Declaration getFunction() { result = getEnclosingFunction(initList) or @@ -912,9 +903,6 @@ abstract class TranslatedStructorCallFromStructor extends TranslatedElement, Str final override Locatable getAst() { result = call } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final override TranslatedElement getChild(int id) { id = 0 and result = this.getStructorCall() @@ -1058,9 +1046,6 @@ class TranslatedConstructorBareInit extends TranslatedElement, TTranslatedConstr override Locatable getAst() { result = init } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final override string toString() { result = "construct base (no constructor)" } override Instruction getFirstInstruction(EdgeKind kind) { 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 ad17722477f..d04514c31aa 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 @@ -268,9 +268,6 @@ abstract class TranslatedStmt extends TranslatedElement, TTranslatedStmt { final override Locatable getAst() { result = stmt } - /** DEPRECATED: Alias for getAst */ - deprecated override Locatable getAST() { result = this.getAst() } - final override Function getFunction() { result = stmt.getEnclosingFunction() } } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRVariable.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRVariable.qll index 24135820ab8..43217ed4c60 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRVariable.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRVariable.qll @@ -50,9 +50,6 @@ abstract private class AbstractIRVariable extends TIRVariable { */ abstract Language::AST getAst(); - /** DEPRECATED: Alias for getAst */ - deprecated Language::AST getAST() { result = this.getAst() } - /** * Gets an identifier string for the variable. This identifier is unique * within the function. @@ -96,9 +93,6 @@ class IRUserVariable extends AbstractIRVariable, TIRUserVariable { final override Language::AST getAst() { result = var } - /** DEPRECATED: Alias for getAst */ - deprecated override Language::AST getAST() { result = this.getAst() } - final override string getUniqueId() { result = this.getVariable().toString() + " " + this.getVariable().getLocation().toString() } @@ -163,9 +157,6 @@ abstract private class AbstractIRGeneratedVariable extends AbstractIRVariable { final override Language::AST getAst() { result = ast } - /** DEPRECATED: Alias for getAst */ - deprecated override Language::AST getAST() { result = this.getAst() } - override string toString() { result = this.getBaseString() + this.getLocationString() } override string getUniqueId() { none() } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll index 648fa0e197b..8bee2bf86a7 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll @@ -71,9 +71,6 @@ class MemoryLocation extends TMemoryLocation { final string getUniqueId() { result = var.getUniqueId() } final predicate canReuseSsa() { canReuseSsaForVariable(var) } - - /** DEPRECATED: Alias for canReuseSsa */ - deprecated predicate canReuseSSA() { this.canReuseSsa() } } predicate canReuseSsaForOldResult(Instruction instr) { none() } diff --git a/cpp/ql/lib/semmle/code/cpp/models/implementations/Allocation.qll b/cpp/ql/lib/semmle/code/cpp/models/implementations/Allocation.qll index c07e840b811..df6d9491729 100644 --- a/cpp/ql/lib/semmle/code/cpp/models/implementations/Allocation.qll +++ b/cpp/ql/lib/semmle/code/cpp/models/implementations/Allocation.qll @@ -5,13 +5,13 @@ */ import semmle.code.cpp.models.interfaces.Allocation -import semmle.code.cpp.models.interfaces.Taint +import semmle.code.cpp.models.interfaces.DataFlow /** * An allocation function (such as `realloc`) that has an argument for the size * in bytes, and an argument for an existing pointer that is to be reallocated. */ -private class ReallocAllocationFunction extends AllocationFunction, TaintFunction { +private class ReallocAllocationFunction extends AllocationFunction, DataFlowFunction { int sizeArg; int reallocArg; @@ -44,7 +44,7 @@ private class ReallocAllocationFunction extends AllocationFunction, TaintFunctio override int getReallocPtrArg() { result = reallocArg } - override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) { + override predicate hasDataFlow(FunctionInput input, FunctionOutput output) { input.isParameterDeref(this.getReallocPtrArg()) and output.isReturnValueDeref() } } diff --git a/cpp/ql/lib/semmle/code/cpp/models/implementations/Swap.qll b/cpp/ql/lib/semmle/code/cpp/models/implementations/Swap.qll index 446e659fac5..2e8e7ef6e90 100644 --- a/cpp/ql/lib/semmle/code/cpp/models/implementations/Swap.qll +++ b/cpp/ql/lib/semmle/code/cpp/models/implementations/Swap.qll @@ -26,7 +26,7 @@ private class Swap extends DataFlowFunction { * obj1.swap(obj2) * ``` */ -private class MemberSwap extends TaintFunction, MemberFunction, AliasFunction { +private class MemberSwap extends DataFlowFunction, MemberFunction, AliasFunction { MemberSwap() { this.hasName("swap") and this.getNumberOfParameters() = 1 and @@ -34,7 +34,7 @@ private class MemberSwap extends TaintFunction, MemberFunction, AliasFunction { this.getDeclaringType() } - override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) { + override predicate hasDataFlow(FunctionInput input, FunctionOutput output) { input.isQualifierObject() and output.isParameterDeref(0) or diff --git a/cpp/ql/lib/semmle/code/cpp/security/boostorg/asio/protocols.qll b/cpp/ql/lib/semmle/code/cpp/security/boostorg/asio/protocols.qll index 8668ecf078c..559ebd444f3 100644 --- a/cpp/ql/lib/semmle/code/cpp/security/boostorg/asio/protocols.qll +++ b/cpp/ql/lib/semmle/code/cpp/security/boostorg/asio/protocols.qll @@ -353,22 +353,6 @@ module BoostorgAsio { } //////////////////////// Dataflow ///////////////////// - /** - * Abstract class for flows of protocol values to the first argument of a context - * constructor. - */ - abstract deprecated class SslContextCallAbstractConfig extends DataFlow::Configuration { - bindingset[this] - SslContextCallAbstractConfig() { any() } - - override predicate isSink(DataFlow::Node sink) { - exists(ConstructorCall cc, SslContextClass c, Expr e | e = sink.asExpr() | - c.getAContructorCall() = cc and - cc.getArgument(0) = e - ) - } - } - /** * Signature for flows of protocol values to the first argument of a context * constructor. @@ -402,20 +386,6 @@ module BoostorgAsio { import DataFlow::Global } - /** - * Any protocol value that flows to the first argument of a context constructor. - */ - deprecated class SslContextCallConfig extends SslContextCallAbstractConfig { - SslContextCallConfig() { this = "SslContextCallConfig" } - - override predicate isSource(DataFlow::Node source) { - exists(Expr e | e = source.asExpr() | - e.fromSource() and - not e.getLocation().getFile().toString().matches("%/boost/asio/%") - ) - } - } - /** * Any protocol value that flows to the first argument of a context constructor. */ @@ -430,21 +400,6 @@ module BoostorgAsio { module SslContextCallFlow = SslContextCallGlobal; - /** - * A banned protocol value that flows to the first argument of a context constructor. - */ - deprecated class SslContextCallBannedProtocolConfig extends SslContextCallAbstractConfig { - SslContextCallBannedProtocolConfig() { this = "SslContextCallBannedProtocolConfig" } - - override predicate isSource(DataFlow::Node source) { - exists(Expr e | e = source.asExpr() | - e.fromSource() and - not e.getLocation().getFile().toString().matches("%/boost/asio/%") and - isExprBannedBoostProtocol(e) - ) - } - } - /** * A banned protocol value that flows to the first argument of a context constructor. */ @@ -461,21 +416,6 @@ module BoostorgAsio { module SslContextCallBannedProtocolFlow = SslContextCallGlobal; - /** - * A TLS 1.2 protocol value that flows to the first argument of a context constructor. - */ - deprecated class SslContextCallTls12ProtocolConfig extends SslContextCallAbstractConfig { - SslContextCallTls12ProtocolConfig() { this = "SslContextCallTls12ProtocolConfig" } - - override predicate isSource(DataFlow::Node source) { - exists(Expr e | e = source.asExpr() | - e.fromSource() and - not e.getLocation().getFile().toString().matches("%/boost/asio/%") and - isExprTls12BoostProtocol(e) - ) - } - } - /** * A TLS 1.2 protocol value that flows to the first argument of a context constructor. */ @@ -491,21 +431,6 @@ module BoostorgAsio { module SslContextCallTls12ProtocolFlow = SslContextCallGlobal; - /** - * A TLS 1.3 protocol value that flows to the first argument of a context constructor. - */ - deprecated class SslContextCallTls13ProtocolConfig extends SslContextCallAbstractConfig { - SslContextCallTls13ProtocolConfig() { this = "SslContextCallTls12ProtocolConfig" } - - override predicate isSource(DataFlow::Node source) { - exists(Expr e | e = source.asExpr() | - e.fromSource() and - not e.getLocation().getFile().toString().matches("%/boost/asio/%") and - isExprTls13BoostProtocol(e) - ) - } - } - /** * A TLS 1.3 protocol value that flows to the first argument of a context constructor. */ @@ -521,21 +446,6 @@ module BoostorgAsio { module SslContextCallTls13ProtocolFlow = SslContextCallGlobal; - /** - * A generic TLS protocol value that flows to the first argument of a context constructor. - */ - deprecated class SslContextCallTlsProtocolConfig extends SslContextCallAbstractConfig { - SslContextCallTlsProtocolConfig() { this = "SslContextCallTlsProtocolConfig" } - - override predicate isSource(DataFlow::Node source) { - exists(Expr e | e = source.asExpr() | - e.fromSource() and - not e.getLocation().getFile().toString().matches("%/boost/asio/%") and - isExprTlsBoostProtocol(e) - ) - } - } - /** * A generic TLS protocol value that flows to the first argument of a context constructor. */ @@ -551,30 +461,6 @@ module BoostorgAsio { module SslContextCallTlsProtocolFlow = SslContextCallGlobal; - /** - * A context constructor call that flows to a call to `SetOptions()`. - */ - deprecated class SslContextFlowsToSetOptionConfig extends DataFlow::Configuration { - SslContextFlowsToSetOptionConfig() { this = "SslContextFlowsToSetOptionConfig" } - - override predicate isSource(DataFlow::Node source) { - exists(SslContextClass c, ConstructorCall cc | - cc = source.asExpr() and - c.getAContructorCall() = cc - ) - } - - override predicate isSink(DataFlow::Node sink) { - exists(FunctionCall fc, SslSetOptionsFunction f, Variable v, VariableAccess va | - va = sink.asExpr() - | - f.getACallToThisFunction() = fc and - v.getAnAccess() = va and - va = fc.getQualifier() - ) - } - } - /** * A context constructor call that flows to a call to `SetOptions()`. */ @@ -599,28 +485,6 @@ module BoostorgAsio { module SslContextFlowsToSetOptionFlow = DataFlow::Global; - /** - * An option value that flows to the first parameter of a call to `SetOptions()`. - */ - deprecated class SslOptionConfig extends DataFlow::Configuration { - SslOptionConfig() { this = "SslOptionConfig" } - - override predicate isSource(DataFlow::Node source) { - exists(Expr e | e = source.asExpr() | - e.fromSource() and - not e.getLocation().getFile().toString().matches("%/boost/asio/%") - ) - } - - override predicate isSink(DataFlow::Node sink) { - exists(SslSetOptionsFunction f, FunctionCall call | - sink.asExpr() = call.getArgument(0) and - f.getACallToThisFunction() = call and - not sink.getLocation().getFile().toString().matches("%/boost/asio/%") - ) - } - } - /** * An option value that flows to the first parameter of a call to `SetOptions()`. */ diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme index 02a123a1a68..7ff6a6e53db 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme @@ -384,11 +384,23 @@ function_return_type( */ coroutine( unique int function: @function ref, - int traits: @type ref, - int handle: @variable ref, - int promise: @variable 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, @@ -829,22 +841,6 @@ variable_template_argument_value( int arg_value: @expr ref ); -/* - Fixed point types - precision(1) = short, precision(2) = default, precision(3) = long - is_unsigned(1) = unsigned is_unsigned(2) = signed - is_fract_type(1) = declared with _Fract - saturating(1) = declared with _Sat -*/ -/* TODO -fixedpointtypes( - unique int id: @fixedpointtype, - int precision: int ref, - int is_unsigned: int ref, - int is_fract_type: int ref, - int saturating: int ref); -*/ - routinetypes( unique int id: @routinetype, int return_type: @type ref @@ -1210,6 +1206,7 @@ conversionkinds( | @reference_to | @ref_indirect | @temp_init + | @c11_generic ; /* @@ -1792,6 +1789,7 @@ case @expr.kind of | 386 = @isscopedenum | 387 = @istriviallyrelocatable | 388 = @datasizeof +| 389 = @c11_generic ; @var_args_expr = @vastartexpr diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats index d2d1f3a4e63..07045b0bd67 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats @@ -18,27 +18,27 @@ @location_default - 29768335 + 29765023 @location_stmt 3819884 + + @location_expr + 13187951 + @diagnostic 4996 @file - 123268 + 123252 @folder - 16342 - - - @location_expr - 13187951 + 16340 @macro_expansion @@ -46,23 +46,23 @@ @other_macro_reference - 859141 + 859032 @function - 4179912 + 4179381 @fun_decl - 4544113 + 4543537 @var_decl - 8040448 + 8039427 @type_decl - 3283883 + 3283466 @namespace_decl @@ -70,7 +70,7 @@ @using_declaration - 363267 + 363221 @using_directive @@ -86,7 +86,7 @@ @parameter - 6191425 + 6190639 @membervariable @@ -98,7 +98,7 @@ @localvariable - 576952 + 576946 @enumconstant @@ -330,15 +330,15 @@ @pointer - 568247 + 568175 @type_with_specifiers - 852138 + 852029 @array - 110194 + 110180 @routineptr @@ -346,7 +346,7 @@ @reference - 1276572 + 1276410 @gnu_vector @@ -358,7 +358,7 @@ @rvalue_reference - 333384 + 333342 @block @@ -366,15 +366,15 @@ @decltype - 27081 + 27078 @usertype - 5234696 + 5234965 @mangledname - 6062554 + 6061784 @type_mention @@ -386,19 +386,39 @@ @ptrtomember - 37820 + 37816 @specifier - 24747 + 24743 + + + @gnuattribute + 553702 + + + @stdattribute + 253563 + + + @declspec + 239153 + + + @msattribute + 3 + + + @alignas + 4668 @attribute_arg_token - 25213 + 25210 @attribute_arg_constant_expr - 318442 + 318402 @attribute_arg_empty @@ -416,26 +436,6 @@ @attribute_arg_expr 3 - - @gnuattribute - 553773 - - - @stdattribute - 253563 - - - @declspec - 239153 - - - @msattribute - 3 - - - @alignas - 4669 - @derivation 391568 @@ -450,7 +450,7 @@ @namespace - 12140 + 12138 @specialnamequalifyingelement @@ -468,10 +468,6 @@ @initialiser 1710781 - - @lambdacapture - 28015 - @address_of 438815 @@ -482,11 +478,11 @@ @array_to_pointer - 1430839 + 1430838 @parexpr - 3587480 + 3587479 @arithnegexpr @@ -522,7 +518,7 @@ @conditionalexpr - 657238 + 657237 @addexpr @@ -586,11 +582,11 @@ @gtexpr - 104124 + 104111 @ltexpr - 101789 + 101776 @geexpr @@ -638,7 +634,7 @@ @assignorexpr - 23628 + 23627 @assignxorexpr @@ -666,7 +662,7 @@ @subscriptexpr - 364482 + 364478 @callexpr @@ -834,7 +830,7 @@ @sizeof_pack - 5603 + 5602 @hasassignexpr @@ -982,7 +978,7 @@ @lambdaexpr - 21478 + 21475 @param_ref @@ -1026,7 +1022,7 @@ @istriviallycopyableexpr - 3735 + 3734 @isliteraltypeexpr @@ -1356,6 +1352,14 @@ @datasizeof 10 + + @c11_generic + 8 + + + @lambdacapture + 28011 + @stmt_expr 1486025 @@ -1410,7 +1414,7 @@ @stmt_empty - 192685 + 192683 @stmt_continue @@ -1442,7 +1446,7 @@ @stmt_range_based_for - 8404 + 8403 @stmt_handler @@ -1458,31 +1462,31 @@ @ppd_if - 667235 + 667151 @ppd_ifdef - 263345 + 263312 @ppd_ifndef - 266614 + 266580 @ppd_elif - 25213 + 25210 @ppd_else - 209182 + 209155 @ppd_endif - 1197195 + 1197043 @ppd_plain_include - 311438 + 311399 @ppd_define @@ -1490,7 +1494,7 @@ @ppd_undef - 258676 + 258643 @ppd_include_next @@ -1498,7 +1502,7 @@ @ppd_line - 27521 + 27520 @ppd_error @@ -2144,7 +2148,7 @@ seconds - 9628 + 9149 @@ -2225,12 +2229,12 @@ 3 4 - 679 + 759 4 5 - 319 + 239 5 @@ -2239,38 +2243,33 @@ 8 - 9 - 79 + 10 + 119 10 11 - 199 + 159 11 - 17 + 15 159 17 - 18 - 39 - - - 18 19 159 - 21 - 53 + 20 + 44 159 - 95 - 96 - 39 + 50 + 92 + 79 @@ -2338,41 +2337,41 @@ 3 4 - 1398 + 1478 4 5 - 359 + 279 5 6 - 279 + 239 6 7 - 399 + 479 7 8 - 79 + 39 8 9 - 239 - - - 9 - 20 279 - 24 - 92 + 9 + 24 + 239 + + + 25 + 88 279 @@ -2421,16 +2420,21 @@ 3 4 - 79 - - - 135 - 136 39 - 138 - 139 + 4 + 5 + 39 + + + 124 + 125 + 39 + + + 129 + 130 39 @@ -2447,27 +2451,27 @@ 1 2 - 4794 + 4394 2 3 - 2037 + 1757 3 4 - 1478 + 1518 4 5 - 878 + 998 5 - 47 - 439 + 46 + 479 @@ -2483,32 +2487,32 @@ 1 2 - 4394 + 4115 2 3 - 1717 + 1478 3 4 - 1757 + 1478 4 5 - 719 + 799 5 - 9 - 838 + 6 + 559 - 9 - 77 - 199 + 6 + 75 + 719 @@ -2524,12 +2528,12 @@ 1 2 - 8110 + 7910 2 3 - 1518 + 1238 @@ -2923,17 +2927,22 @@ 1 2 - 5633 + 5655 2 3 - 925 + 857 3 - 17 - 541 + 7 + 553 + + + 11 + 13 + 33 @@ -2949,12 +2958,12 @@ 1 2 - 6344 + 6400 2 3 - 756 + 699 @@ -2978,43 +2987,38 @@ 11 - 9 - 10 + 8 + 9 11 - 12 - 13 + 13 + 14 + 22 + + + 51 + 52 11 - 17 - 18 + 159 + 160 11 - 47 - 48 + 177 + 178 11 - 165 - 166 + 185 + 186 11 - 174 - 175 - 11 - - - 187 - 188 - 11 - - - 242 - 243 + 247 + 248 11 @@ -3039,8 +3043,8 @@ 11 - 9 - 10 + 8 + 9 11 @@ -3049,33 +3053,33 @@ 11 - 17 - 18 + 13 + 14 11 - 46 - 47 + 49 + 50 11 - 115 - 116 + 112 + 113 11 - 126 - 127 + 124 + 125 11 - 142 - 143 + 145 + 146 11 - 219 - 220 + 218 + 219 11 @@ -4848,31 +4852,31 @@ locations_default - 29768335 + 29765023 id - 29768335 + 29765023 container - 123268 + 123252 startLine - 2095559 + 2095293 startColumn - 36887 + 36882 endLine - 2099761 + 2099495 endColumn - 48093 + 48087 @@ -4886,7 +4890,7 @@ 1 2 - 29768335 + 29765023 @@ -4902,7 +4906,7 @@ 1 2 - 29768335 + 29765023 @@ -4918,7 +4922,7 @@ 1 2 - 29768335 + 29765023 @@ -4934,7 +4938,7 @@ 1 2 - 29768335 + 29765023 @@ -4950,7 +4954,7 @@ 1 2 - 29768335 + 29765023 @@ -4966,67 +4970,67 @@ 1 11 - 9805 + 9804 11 18 - 10272 + 10271 18 30 - 9338 + 9337 30 42 - 9805 + 9804 43 61 - 9805 + 9804 61 79 - 9338 + 9337 80 106 - 9805 + 9804 108 149 - 9338 + 9337 149 199 - 9338 + 9337 206 291 - 9338 + 9337 304 469 - 9338 + 9337 482 850 - 9338 + 9337 936 2380 - 8404 + 8403 @@ -5042,67 +5046,67 @@ 1 8 - 9338 + 9337 8 13 - 9338 + 9337 13 20 - 9805 + 9804 20 32 - 9338 + 9337 32 43 - 9805 + 9804 44 61 - 9338 + 9337 62 72 - 9338 + 9337 73 93 - 9338 + 9337 97 128 - 9338 + 9337 128 180 - 9338 + 9337 180 267 - 9338 + 9337 277 414 - 9338 + 9337 439 1465 - 9338 + 9337 1557 @@ -5123,67 +5127,67 @@ 1 4 - 8871 + 8870 4 5 - 7937 + 7936 5 6 - 7470 + 7469 6 8 - 11206 + 11204 8 10 - 9338 + 9337 10 15 - 10739 + 10737 15 23 - 9805 + 9804 23 28 - 11206 + 11204 28 34 - 9805 + 9804 34 44 - 9338 + 9337 44 55 - 9338 + 9337 55 66 - 9805 + 9804 66 77 - 8404 + 8403 @@ -5199,67 +5203,67 @@ 1 8 - 9338 + 9337 8 13 - 9338 + 9337 13 20 - 9805 + 9804 20 32 - 9338 + 9337 32 43 - 9805 + 9804 43 60 - 9338 + 9337 61 71 - 9338 + 9337 72 93 - 9338 + 9337 94 127 - 9338 + 9337 128 179 - 9338 + 9337 180 268 - 9338 + 9337 278 413 - 9338 + 9337 437 1465 - 9338 + 9337 1554 @@ -5280,67 +5284,67 @@ 1 9 - 9805 + 9804 9 13 - 9338 + 9337 13 18 - 9338 + 9337 18 26 - 10272 + 10271 27 33 - 9338 + 9337 33 39 - 9338 + 9337 39 47 - 10272 + 10271 47 53 - 9338 + 9337 53 60 - 10272 + 10271 60 66 - 9338 + 9337 66 74 - 9805 + 9804 74 78 - 9805 + 9804 78 90 - 7003 + 7002 @@ -5356,52 +5360,52 @@ 1 2 - 583189 + 583115 2 3 - 314240 + 314200 3 4 - 195641 + 195616 4 6 - 162022 + 162002 6 10 - 183034 + 183011 10 16 - 162956 + 162936 16 25 - 169026 + 169005 25 46 - 161089 + 161068 46 169 - 157353 + 157333 169 265 - 7003 + 7002 @@ -5417,42 +5421,42 @@ 1 2 - 871282 + 871171 2 3 - 273618 + 273583 3 5 - 193773 + 193749 5 8 - 173696 + 173674 8 13 - 188170 + 188146 13 20 - 161089 + 161068 20 51 - 159688 + 159668 51 265 - 74241 + 74231 @@ -5468,47 +5472,47 @@ 1 2 - 612138 + 612060 2 3 - 313306 + 313266 3 4 - 198443 + 198417 4 6 - 183034 + 183011 6 9 - 173229 + 173207 9 13 - 163423 + 163402 13 19 - 174629 + 174607 19 29 - 164824 + 164803 29 52 - 112528 + 112514 @@ -5524,22 +5528,22 @@ 1 2 - 1531980 + 1531786 2 3 - 348792 + 348748 3 5 - 162022 + 162002 5 16 - 52762 + 52755 @@ -5555,47 +5559,47 @@ 1 2 - 587858 + 587783 2 3 - 316108 + 316068 3 4 - 197509 + 197484 4 6 - 168559 + 168538 6 9 - 158287 + 158267 9 14 - 170894 + 170872 14 21 - 175096 + 175074 21 32 - 162489 + 162469 32 63 - 157820 + 157800 64 @@ -6011,52 +6015,52 @@ 1 2 - 593461 + 593386 2 3 - 306302 + 306263 3 4 - 198443 + 198417 4 6 - 159688 + 159668 6 10 - 182567 + 182544 10 16 - 162022 + 162002 16 25 - 171361 + 171339 25 46 - 158754 + 158734 46 161 - 158287 + 158267 162 265 - 8871 + 8870 @@ -6072,47 +6076,47 @@ 1 2 - 886690 + 886577 2 3 - 260077 + 260044 3 4 - 125135 + 125120 4 6 - 141011 + 140993 6 10 - 184902 + 184878 10 15 - 168559 + 168538 15 26 - 163423 + 163402 26 120 - 158287 + 158267 121 265 - 11673 + 11671 @@ -6128,22 +6132,22 @@ 1 2 - 1529646 + 1529452 2 3 - 341789 + 341745 3 5 - 170894 + 170872 5 10 - 57431 + 57424 @@ -6159,47 +6163,47 @@ 1 2 - 623344 + 623265 2 3 - 303501 + 303462 3 4 - 201711 + 201685 4 6 - 183968 + 183945 6 9 - 169960 + 169939 9 13 - 166692 + 166671 13 19 - 175096 + 175074 19 29 - 161089 + 161068 29 52 - 114396 + 114382 @@ -6215,52 +6219,52 @@ 1 2 - 599998 + 599922 2 3 - 306302 + 306263 3 4 - 197042 + 197017 4 6 - 169026 + 169005 6 9 - 156419 + 156400 9 14 - 169026 + 169005 14 21 - 177898 + 177875 21 32 - 162022 + 162002 32 60 - 158287 + 158267 60 65 - 3735 + 3734 @@ -6276,62 +6280,62 @@ 1 2 - 5136 + 5135 2 8 - 3735 + 3734 9 186 - 3735 + 3734 193 288 - 3735 + 3734 294 495 - 3735 + 3734 503 - 554 - 3735 + 555 + 3734 561 633 - 3735 + 3734 640 758 - 3735 + 3734 758 869 - 3735 + 3734 875 1074 - 3735 + 3734 1074 1281 - 3735 + 3734 1289 1590 - 3735 + 3734 1685 @@ -6352,62 +6356,62 @@ 1 2 - 5603 + 5602 2 5 - 3735 + 3734 5 65 - 3735 + 3734 70 100 - 3735 + 3734 100 111 - 3735 + 3734 112 122 - 4202 + 4201 122 140 - 3735 + 3734 143 153 - 3735 + 3734 153 161 - 4202 + 4201 161 173 - 4202 + 4201 173 178 - 3735 + 3734 188 265 - 3735 + 3734 @@ -6423,62 +6427,62 @@ 1 2 - 5603 + 5602 2 8 - 3735 + 3734 9 105 - 3735 + 3734 155 241 - 3735 + 3734 253 336 - 3735 + 3734 340 426 - 3735 + 3734 434 488 - 3735 + 3734 489 572 - 3735 + 3734 573 623 - 3735 + 3734 626 696 - 4202 + 4201 701 813 - 3735 + 3734 818 1095 - 3735 + 3734 1172 @@ -6499,37 +6503,37 @@ 1 2 - 6070 + 6069 2 4 - 3735 + 3734 4 8 - 4202 + 4201 8 15 - 3735 + 3734 15 23 - 3735 + 3734 23 29 - 3735 + 3734 29 35 - 4202 + 4201 35 @@ -6549,12 +6553,12 @@ 44 46 - 3735 + 3734 46 49 - 3735 + 3734 49 @@ -6575,62 +6579,62 @@ 1 2 - 5603 + 5602 2 8 - 3735 + 3734 9 156 - 3735 + 3734 159 240 - 3735 + 3734 251 335 - 3735 + 3734 342 430 - 3735 + 3734 432 490 - 3735 + 3734 490 573 - 3735 + 3734 574 622 - 3735 + 3734 626 698 - 3735 + 3734 700 798 - 3735 + 3734 811 987 - 3735 + 3734 1096 @@ -10559,23 +10563,23 @@ numlines - 1383965 + 1383789 element_id - 1376961 + 1376786 num_lines - 101789 + 101776 num_code - 84980 + 84969 num_comment - 59766 + 59758 @@ -10589,12 +10593,12 @@ 1 2 - 1369957 + 1369783 2 3 - 7003 + 7002 @@ -10610,12 +10614,12 @@ 1 2 - 1370891 + 1370717 2 3 - 6070 + 6069 @@ -10631,7 +10635,7 @@ 1 2 - 1376961 + 1376786 @@ -10647,27 +10651,27 @@ 1 2 - 68171 + 68162 2 3 - 12140 + 12138 3 4 - 7470 + 7469 4 21 - 7937 + 7936 29 921 - 6070 + 6069 @@ -10683,22 +10687,22 @@ 1 2 - 70505 + 70496 2 3 - 12140 + 12138 3 4 - 8404 + 8403 4 6 - 9338 + 9337 6 @@ -10719,17 +10723,17 @@ 1 2 - 69571 + 69562 2 3 - 14941 + 14939 3 4 - 10739 + 10737 4 @@ -10750,12 +10754,12 @@ 1 2 - 52762 + 52755 2 3 - 14474 + 14472 3 @@ -10770,7 +10774,7 @@ 44 922 - 4669 + 4668 @@ -10786,17 +10790,17 @@ 1 2 - 52762 + 52755 2 3 - 16809 + 16807 3 5 - 6070 + 6069 5 @@ -10822,22 +10826,22 @@ 1 2 - 53229 + 53222 2 3 - 15875 + 15873 3 5 - 7470 + 7469 5 7 - 5136 + 5135 7 @@ -10858,27 +10862,27 @@ 1 2 - 34552 + 34548 2 3 - 9338 + 9337 3 4 - 4202 + 4201 4 6 - 4669 + 4668 6 11 - 5136 + 5135 17 @@ -10899,27 +10903,27 @@ 1 2 - 34552 + 34548 2 3 - 9338 + 9337 3 4 - 4202 + 4201 4 6 - 4669 + 4668 6 8 - 4669 + 4668 10 @@ -10940,27 +10944,27 @@ 1 2 - 34552 + 34548 2 3 - 9338 + 9337 3 4 - 4202 + 4201 4 6 - 4669 + 4668 6 10 - 4669 + 4668 10 @@ -11607,15 +11611,15 @@ files - 123268 + 123252 id - 123268 + 123252 name - 123268 + 123252 @@ -11629,7 +11633,7 @@ 1 2 - 123268 + 123252 @@ -11645,7 +11649,7 @@ 1 2 - 123268 + 123252 @@ -11655,15 +11659,15 @@ folders - 16342 + 16340 id - 16342 + 16340 name - 16342 + 16340 @@ -11677,7 +11681,7 @@ 1 2 - 16342 + 16340 @@ -11693,7 +11697,7 @@ 1 2 - 16342 + 16340 @@ -11703,15 +11707,15 @@ containerparent - 138676 + 138659 parent - 16342 + 16340 child - 138676 + 138659 @@ -11725,7 +11729,7 @@ 1 2 - 7470 + 7469 2 @@ -11766,7 +11770,7 @@ 1 2 - 138676 + 138659 @@ -12352,15 +12356,15 @@ inmacroexpansion - 109779198 + 109779137 id - 18027369 + 18027366 inv - 2700171 + 2700175 @@ -12374,32 +12378,32 @@ 1 3 - 1581956 + 1581965 3 5 - 1077799 + 1077798 5 6 - 1184884 + 1184883 6 7 - 4819927 + 4819923 7 8 - 6385963 + 6385959 8 9 - 2605255 + 2605253 9 @@ -12420,12 +12424,12 @@ 1 2 - 378424 + 378428 2 3 - 544106 + 544105 3 @@ -12435,7 +12439,7 @@ 4 7 - 200659 + 200660 7 @@ -12455,12 +12459,12 @@ 10 11 - 325487 + 325486 11 337 - 224848 + 224849 339 @@ -12480,15 +12484,15 @@ affectedbymacroexpansion - 35689096 + 35689082 id - 5156743 + 5156745 inv - 2784774 + 2784776 @@ -12502,12 +12506,12 @@ 1 2 - 2815934 + 2815933 2 3 - 560129 + 560132 3 @@ -12548,7 +12552,7 @@ 1 4 - 229116 + 229120 4 @@ -12563,7 +12567,7 @@ 9 12 - 251088 + 251087 12 @@ -13567,15 +13571,15 @@ functions - 4179912 + 4179381 id - 4179912 + 4179381 name - 1895715 + 1895474 kind @@ -13593,7 +13597,7 @@ 1 2 - 4179912 + 4179381 @@ -13609,7 +13613,7 @@ 1 2 - 4179912 + 4179381 @@ -13625,22 +13629,22 @@ 1 2 - 1498362 + 1498172 2 3 - 153151 + 153131 3 5 - 142879 + 142860 5 952 - 101322 + 101309 @@ -13656,7 +13660,7 @@ 1 2 - 1895248 + 1895007 2 @@ -13811,15 +13815,15 @@ function_return_type - 4185048 + 4184517 id - 4179912 + 4179381 return_type - 818052 + 817948 @@ -13833,12 +13837,12 @@ 1 2 - 4174776 + 4174246 2 3 - 5136 + 5135 @@ -13854,22 +13858,22 @@ 1 2 - 506146 + 506082 2 3 - 211517 + 211490 3 7 - 66303 + 66294 7 2231 - 34085 + 34081 @@ -13889,14 +13893,6 @@ traits 3 - - handle - 6 - - - promise - 6 - @@ -13916,8 +13912,8 @@ - function - handle + traits + function 12 @@ -13925,6 +13921,116 @@ 1 2 + 1 + + + 2 + 3 + 1 + + + 3 + 4 + 1 + + + + + + + + + coroutine_placeholder_variable + 18 + + + placeholder_variable + 18 + + + kind + 3 + + + function + 6 + + + + + placeholder_variable + kind + + + 12 + + + 1 + 2 + 18 + + + + + + + placeholder_variable + function + + + 12 + + + 1 + 2 + 18 + + + + + + + kind + placeholder_variable + + + 12 + + + 6 + 7 + 3 + + + + + + + kind + function + + + 12 + + + 6 + 7 + 3 + + + + + + + function + placeholder_variable + + + 12 + + + 3 + 4 6 @@ -13933,188 +14039,14 @@ function - promise + kind 12 - - 1 - 2 - 6 - - - - - - - traits - function - - - 12 - - - 1 - 2 - 1 - - - 2 - 3 - 1 - 3 4 - 1 - - - - - - - traits - handle - - - 12 - - - 1 - 2 - 1 - - - 2 - 3 - 1 - - - 3 - 4 - 1 - - - - - - - traits - promise - - - 12 - - - 1 - 2 - 1 - - - 2 - 3 - 1 - - - 3 - 4 - 1 - - - - - - - handle - function - - - 12 - - - 1 - 2 - 6 - - - - - - - handle - traits - - - 12 - - - 1 - 2 - 6 - - - - - - - handle - promise - - - 12 - - - 1 - 2 - 6 - - - - - - - promise - function - - - 12 - - - 1 - 2 - 6 - - - - - - - promise - traits - - - 12 - - - 1 - 2 - 6 - - - - - - - promise - handle - - - 12 - - - 1 - 2 6 @@ -14232,33 +14164,33 @@ function_deleted - 96186 + 96174 id - 96186 + 96174 function_defaulted - 73774 + 73764 id - 73774 + 73764 function_prototyped - 4087928 + 4087409 id - 4087928 + 4087409 @@ -14411,27 +14343,27 @@ fun_decls - 4549250 + 4548672 id - 4544113 + 4543537 function - 4036099 + 4035587 type_id - 816651 + 816548 name - 1798128 + 1797899 location - 3371198 + 3370770 @@ -14445,7 +14377,7 @@ 1 2 - 4544113 + 4543537 @@ -14461,12 +14393,12 @@ 1 2 - 4538977 + 4538401 2 3 - 5136 + 5135 @@ -14482,7 +14414,7 @@ 1 2 - 4544113 + 4543537 @@ -14498,7 +14430,7 @@ 1 2 - 4544113 + 4543537 @@ -14514,17 +14446,17 @@ 1 2 - 3606995 + 3606537 2 3 - 356263 + 356218 3 7 - 72840 + 72831 @@ -14540,12 +14472,12 @@ 1 2 - 3996410 + 3995903 2 3 - 39688 + 39683 @@ -14561,7 +14493,7 @@ 1 2 - 4036099 + 4035587 @@ -14577,17 +14509,17 @@ 1 2 - 3663493 + 3663028 2 3 - 311905 + 311866 3 6 - 60700 + 60692 @@ -14603,22 +14535,22 @@ 1 2 - 431438 + 431383 2 3 - 274084 + 274050 3 6 - 63501 + 63493 6 2476 - 47626 + 47620 @@ -14634,22 +14566,22 @@ 1 2 - 515485 + 515419 2 3 - 203112 + 203086 3 7 - 63034 + 63026 7 2192 - 35019 + 35014 @@ -14665,17 +14597,17 @@ 1 2 - 690115 + 690027 2 4 - 67237 + 67228 4 773 - 59299 + 59291 @@ -14691,22 +14623,22 @@ 1 2 - 595329 + 595253 2 3 - 121400 + 121385 3 7 - 63501 + 63493 7 1959 - 36420 + 36415 @@ -14722,27 +14654,27 @@ 1 2 - 1228479 + 1228323 2 3 - 267081 + 267047 3 4 - 77976 + 77966 4 7 - 146147 + 146128 7 986 - 78443 + 78433 @@ -14758,22 +14690,22 @@ 1 2 - 1407778 + 1407600 2 3 - 152217 + 152198 3 5 - 136809 + 136791 5 936 - 101322 + 101309 @@ -14789,17 +14721,17 @@ 1 2 - 1579607 + 1579406 2 4 - 134941 + 134924 4 562 - 83579 + 83568 @@ -14815,27 +14747,27 @@ 1 2 - 1236417 + 1236260 2 3 - 293228 + 293191 3 4 - 78910 + 78900 4 8 - 137275 + 137258 8 542 - 52295 + 52288 @@ -14851,17 +14783,17 @@ 1 2 - 2966841 + 2966464 2 4 - 277820 + 277785 4 55 - 126536 + 126520 @@ -14877,17 +14809,17 @@ 1 2 - 3034078 + 3033693 2 7 - 244201 + 244170 7 55 - 92918 + 92906 @@ -14903,12 +14835,12 @@ 1 2 - 3207774 + 3207367 2 18 - 163423 + 163402 @@ -14924,12 +14856,12 @@ 1 2 - 3232988 + 3232578 2 13 - 138209 + 138192 @@ -14939,22 +14871,22 @@ fun_def - 1889178 + 1888938 id - 1889178 + 1888938 fun_specialized - 26147 + 26144 id - 26147 + 26144 @@ -14972,11 +14904,11 @@ fun_decl_specifiers - 2907074 + 2906705 id - 1689801 + 1689587 name @@ -14994,17 +14926,17 @@ 1 2 - 491205 + 491142 2 3 - 1179919 + 1179769 3 4 - 18676 + 18674 @@ -15176,11 +15108,11 @@ fun_decl_empty_throws - 1472214 + 1472027 fun_decl - 1472214 + 1472027 @@ -15240,11 +15172,11 @@ fun_decl_empty_noexcept - 863344 + 863234 fun_decl - 863344 + 863234 @@ -15349,19 +15281,19 @@ param_decl_bind - 6995937 + 6995048 id - 6995937 + 6995048 index - 7937 + 7936 fun_decl - 3835788 + 3835301 @@ -15375,7 +15307,7 @@ 1 2 - 6995937 + 6995048 @@ -15391,7 +15323,7 @@ 1 2 - 6995937 + 6995048 @@ -15569,27 +15501,27 @@ 1 2 - 1974158 + 1973908 2 3 - 1061787 + 1061652 3 4 - 502878 + 502814 4 8 - 290894 + 290857 8 18 - 6070 + 6069 @@ -15605,27 +15537,27 @@ 1 2 - 1974158 + 1973908 2 3 - 1061787 + 1061652 3 4 - 502878 + 502814 4 8 - 290894 + 290857 8 18 - 6070 + 6069 @@ -15635,27 +15567,27 @@ var_decls - 8111420 + 8110391 id - 8040448 + 8039427 variable - 7028154 + 7027262 type_id - 2043730 + 2043471 name - 667702 + 667617 location - 5312672 + 5311998 @@ -15669,7 +15601,7 @@ 1 2 - 8040448 + 8039427 @@ -15685,12 +15617,12 @@ 1 2 - 7972277 + 7971265 2 3 - 68171 + 68162 @@ -15706,7 +15638,7 @@ 1 2 - 8040448 + 8039427 @@ -15722,7 +15654,7 @@ 1 2 - 8037646 + 8036626 2 @@ -15743,17 +15675,17 @@ 1 2 - 6176016 + 6175232 2 3 - 698519 + 698431 3 7 - 153618 + 153598 @@ -15769,12 +15701,12 @@ 1 2 - 6856793 + 6855922 2 4 - 171361 + 171339 @@ -15790,12 +15722,12 @@ 1 2 - 6912824 + 6911946 2 3 - 115330 + 115315 @@ -15811,12 +15743,12 @@ 1 2 - 6482786 + 6481963 2 3 - 543033 + 542964 3 @@ -15837,27 +15769,27 @@ 1 2 - 1165911 + 1165763 2 3 - 477197 + 477136 3 4 - 94785 + 94773 4 7 - 184902 + 184878 7 762 - 120933 + 120918 @@ -15873,22 +15805,22 @@ 1 2 - 1299452 + 1299287 2 3 - 452450 + 452392 3 6 - 155952 + 155933 6 724 - 135875 + 135857 @@ -15904,17 +15836,17 @@ 1 2 - 1539451 + 1539256 2 3 - 383345 + 383296 3 128 - 120933 + 120918 @@ -15930,22 +15862,22 @@ 1 2 - 1365755 + 1365582 2 3 - 404357 + 404305 3 7 - 173229 + 173207 7 592 - 100388 + 100376 @@ -15961,37 +15893,37 @@ 1 2 - 341322 + 341278 2 3 - 86848 + 86837 3 4 - 48560 + 48554 4 6 - 51828 + 51822 6 12 - 52295 + 52288 12 33 - 50427 + 50421 34 2384 - 36420 + 36415 @@ -16007,37 +15939,37 @@ 1 2 - 368870 + 368823 2 3 - 77976 + 77966 3 4 - 45291 + 45285 4 6 - 49494 + 49487 6 14 - 53229 + 53222 14 56 - 50894 + 50888 56 2301 - 21945 + 21942 @@ -16053,27 +15985,27 @@ 1 2 - 457119 + 457061 2 3 - 93851 + 93840 3 5 - 46692 + 46686 5 19 - 50894 + 50888 19 1182 - 19143 + 19141 @@ -16089,32 +16021,32 @@ 1 2 - 379143 + 379094 2 3 - 90583 + 90571 3 5 - 59766 + 59758 5 9 - 51361 + 51355 9 21 - 50427 + 50421 21 1010 - 36420 + 36415 @@ -16130,17 +16062,17 @@ 1 2 - 4496954 + 4496383 2 3 - 531827 + 531760 3 896 - 283890 + 283854 @@ -16156,17 +16088,17 @@ 1 2 - 4886369 + 4885749 2 17 - 415563 + 415510 17 892 - 10739 + 10737 @@ -16182,12 +16114,12 @@ 1 2 - 4962478 + 4961848 2 759 - 350193 + 350149 @@ -16203,12 +16135,12 @@ 1 2 - 5303334 + 5302660 2 6 - 9338 + 9337 @@ -16218,22 +16150,22 @@ var_def - 3995477 + 3994969 id - 3995477 + 3994969 var_decl_specifiers - 378676 + 378628 id - 378676 + 378628 name @@ -16251,7 +16183,7 @@ 1 2 - 378676 + 378628 @@ -16303,19 +16235,19 @@ type_decls - 3283883 + 3283466 id - 3283883 + 3283466 type_id - 3233455 + 3233045 location - 3166685 + 3166283 @@ -16329,7 +16261,7 @@ 1 2 - 3283883 + 3283466 @@ -16345,7 +16277,7 @@ 1 2 - 3283883 + 3283466 @@ -16361,12 +16293,12 @@ 1 2 - 3191899 + 3191493 2 5 - 41556 + 41551 @@ -16382,12 +16314,12 @@ 1 2 - 3191899 + 3191493 2 5 - 41556 + 41551 @@ -16403,12 +16335,12 @@ 1 2 - 3114389 + 3113994 2 20 - 52295 + 52288 @@ -16424,12 +16356,12 @@ 1 2 - 3114389 + 3113994 2 20 - 52295 + 52288 @@ -16439,22 +16371,22 @@ type_def - 2642328 + 2641993 id - 2642328 + 2641993 type_decl_top - 743811 + 743717 type_decl - 743811 + 743717 @@ -16827,19 +16759,19 @@ usings - 369804 + 369757 id - 369804 + 369757 element_id - 315641 + 315601 location - 247937 + 247905 kind @@ -16857,7 +16789,7 @@ 1 2 - 369804 + 369757 @@ -16873,7 +16805,7 @@ 1 2 - 369804 + 369757 @@ -16889,7 +16821,7 @@ 1 2 - 369804 + 369757 @@ -16905,12 +16837,12 @@ 1 2 - 263345 + 263312 2 3 - 50894 + 50888 3 @@ -16931,12 +16863,12 @@ 1 2 - 263345 + 263312 2 3 - 50894 + 50888 3 @@ -16957,7 +16889,7 @@ 1 2 - 315641 + 315601 @@ -16973,17 +16905,17 @@ 1 2 - 202645 + 202619 2 4 - 10739 + 10737 4 5 - 31283 + 31280 5 @@ -17004,17 +16936,17 @@ 1 2 - 202645 + 202619 2 4 - 10739 + 10737 4 5 - 31283 + 31280 5 @@ -17035,7 +16967,7 @@ 1 2 - 247937 + 247905 @@ -17819,23 +17751,23 @@ params - 6355316 + 6354509 id - 6191425 + 6190639 function - 3492131 + 3491688 index - 7937 + 7936 type_id - 1846688 + 1846453 @@ -17849,7 +17781,7 @@ 1 2 - 6191425 + 6190639 @@ -17865,7 +17797,7 @@ 1 2 - 6191425 + 6190639 @@ -17881,12 +17813,12 @@ 1 2 - 6067690 + 6066919 2 4 - 123735 + 123719 @@ -17902,22 +17834,22 @@ 1 2 - 1867699 + 1867462 2 3 - 952993 + 952872 3 4 - 430037 + 429983 4 18 - 241400 + 241369 @@ -17933,22 +17865,22 @@ 1 2 - 1867699 + 1867462 2 3 - 952993 + 952872 3 4 - 430037 + 429983 4 18 - 241400 + 241369 @@ -17964,22 +17896,22 @@ 1 2 - 2166065 + 2165790 2 3 - 826924 + 826819 3 4 - 346458 + 346414 4 12 - 152684 + 152665 @@ -18233,22 +18165,22 @@ 1 2 - 1184121 + 1183971 2 3 - 406224 + 406173 3 7 - 154085 + 154065 7 518 - 102256 + 102243 @@ -18264,22 +18196,22 @@ 1 2 - 1404977 + 1404798 2 3 - 212450 + 212423 3 7 - 147548 + 147529 7 502 - 81711 + 81701 @@ -18295,17 +18227,17 @@ 1 2 - 1420385 + 1420205 2 3 - 347392 + 347348 3 13 - 78910 + 78900 @@ -18315,11 +18247,11 @@ overrides - 125735 + 125725 new - 122762 + 122752 old @@ -18337,7 +18269,7 @@ 1 2 - 119798 + 119788 2 @@ -18745,11 +18677,11 @@ localvariables - 576952 + 576946 id - 576952 + 576946 type_id @@ -18757,7 +18689,7 @@ name - 90549 + 90548 @@ -18771,7 +18703,7 @@ 1 2 - 576952 + 576946 @@ -18787,7 +18719,7 @@ 1 2 - 576952 + 576946 @@ -18808,7 +18740,7 @@ 2 3 - 5366 + 5362 3 @@ -18818,7 +18750,7 @@ 4 7 - 3376 + 3380 7 @@ -18844,7 +18776,7 @@ 1 2 - 26913 + 26908 2 @@ -18854,7 +18786,7 @@ 3 5 - 2914 + 2918 5 @@ -18880,7 +18812,7 @@ 1 2 - 57032 + 57031 2 @@ -18926,7 +18858,7 @@ 3 1486 - 6645 + 6644 @@ -19954,19 +19886,19 @@ builtintypes - 26147 + 26144 id - 26147 + 26144 name - 26147 + 26144 kind - 26147 + 26144 size @@ -19992,7 +19924,7 @@ 1 2 - 26147 + 26144 @@ -20008,7 +19940,7 @@ 1 2 - 26147 + 26144 @@ -20024,7 +19956,7 @@ 1 2 - 26147 + 26144 @@ -20040,7 +19972,7 @@ 1 2 - 26147 + 26144 @@ -20056,7 +19988,7 @@ 1 2 - 26147 + 26144 @@ -20072,7 +20004,7 @@ 1 2 - 26147 + 26144 @@ -20088,7 +20020,7 @@ 1 2 - 26147 + 26144 @@ -20104,7 +20036,7 @@ 1 2 - 26147 + 26144 @@ -20120,7 +20052,7 @@ 1 2 - 26147 + 26144 @@ -20136,7 +20068,7 @@ 1 2 - 26147 + 26144 @@ -20152,7 +20084,7 @@ 1 2 - 26147 + 26144 @@ -20168,7 +20100,7 @@ 1 2 - 26147 + 26144 @@ -20184,7 +20116,7 @@ 1 2 - 26147 + 26144 @@ -20200,7 +20132,7 @@ 1 2 - 26147 + 26144 @@ -20216,7 +20148,7 @@ 1 2 - 26147 + 26144 @@ -20661,15 +20593,15 @@ derivedtypes - 3670030 + 3669564 id - 3670030 + 3669564 name - 1552992 + 1552795 kind @@ -20677,7 +20609,7 @@ type_id - 2363107 + 2362807 @@ -20691,7 +20623,7 @@ 1 2 - 3670030 + 3669564 @@ -20707,7 +20639,7 @@ 1 2 - 3670030 + 3669564 @@ -20723,7 +20655,7 @@ 1 2 - 3670030 + 3669564 @@ -20739,17 +20671,17 @@ 1 2 - 1324199 + 1324031 2 4 - 120466 + 120451 4 1153 - 108326 + 108312 @@ -20765,7 +20697,7 @@ 1 2 - 1552058 + 1551861 2 @@ -20786,17 +20718,17 @@ 1 2 - 1324199 + 1324031 2 4 - 120466 + 120451 4 1135 - 108326 + 108312 @@ -20935,22 +20867,22 @@ 1 2 - 1515638 + 1515446 2 3 - 546302 + 546232 3 4 - 218520 + 218493 4 72 - 82645 + 82635 @@ -20966,22 +20898,22 @@ 1 2 - 1526844 + 1526650 2 3 - 538831 + 538763 3 4 - 215719 + 215691 4 72 - 81711 + 81701 @@ -20997,22 +20929,22 @@ 1 2 - 1519840 + 1519647 2 3 - 550037 + 549967 3 4 - 217587 + 217559 4 6 - 75641 + 75632 @@ -21022,11 +20954,11 @@ pointerishsize - 2707698 + 2707354 id - 2707698 + 2707354 size @@ -21048,7 +20980,7 @@ 1 2 - 2707698 + 2707354 @@ -21064,7 +20996,7 @@ 1 2 - 2707698 + 2707354 @@ -21138,19 +21070,19 @@ arraysizes - 88248 + 88237 id - 88248 + 88237 num_elements - 31750 + 31746 bytesize - 33151 + 33147 alignment @@ -21168,7 +21100,7 @@ 1 2 - 88248 + 88237 @@ -21184,7 +21116,7 @@ 1 2 - 88248 + 88237 @@ -21200,7 +21132,7 @@ 1 2 - 88248 + 88237 @@ -21221,7 +21153,7 @@ 2 3 - 23813 + 23810 3 @@ -21252,7 +21184,7 @@ 1 2 - 26614 + 26611 2 @@ -21278,7 +21210,7 @@ 1 2 - 26614 + 26611 2 @@ -21309,7 +21241,7 @@ 2 3 - 23813 + 23810 3 @@ -21340,12 +21272,12 @@ 1 2 - 27548 + 27545 2 3 - 3735 + 3734 3 @@ -21366,12 +21298,12 @@ 1 2 - 27548 + 27545 2 3 - 4669 + 4668 4 @@ -21823,19 +21755,19 @@ usertypes - 5234696 + 5234965 id - 5234696 + 5234965 name - 1352681 + 1352509 kind - 5136 + 5135 @@ -21849,7 +21781,7 @@ 1 2 - 5234696 + 5234965 @@ -21865,7 +21797,7 @@ 1 2 - 5234696 + 5234965 @@ -21881,27 +21813,27 @@ 1 2 - 983810 + 983686 2 3 - 153618 + 153598 3 7 - 104591 + 104577 7 61 - 101789 + 101776 65 874 - 8871 + 8870 @@ -21917,17 +21849,17 @@ 1 2 - 1212137 + 1211983 2 3 - 125602 + 125120 3 7 - 14941 + 15406 @@ -21961,8 +21893,8 @@ 466 - 133 - 134 + 135 + 136 466 @@ -22027,8 +21959,8 @@ 466 - 41 - 42 + 43 + 44 466 @@ -22069,15 +22001,15 @@ usertypesize - 1706610 + 1707327 id - 1706610 + 1707327 size - 13540 + 13539 alignment @@ -22095,7 +22027,7 @@ 1 2 - 1706610 + 1707327 @@ -22111,7 +22043,7 @@ 1 2 - 1706610 + 1707327 @@ -22132,7 +22064,7 @@ 2 3 - 4202 + 4201 3 @@ -22166,7 +22098,7 @@ 740 - 2470 + 2472 933 @@ -22183,7 +22115,7 @@ 1 2 - 10272 + 10271 2 @@ -22227,8 +22159,8 @@ 466 - 3209 - 3210 + 3211 + 3212 466 @@ -22339,15 +22271,15 @@ mangled_name - 9020523 + 9020312 id - 9020523 + 9020312 mangled_name - 6062554 + 6061784 is_complete @@ -22365,7 +22297,7 @@ 1 2 - 9020523 + 9020312 @@ -22381,7 +22313,7 @@ 1 2 - 9020523 + 9020312 @@ -22397,12 +22329,12 @@ 1 2 - 5789869 + 5789134 2 874 - 272684 + 272649 @@ -22418,7 +22350,7 @@ 1 2 - 6062554 + 6061784 @@ -22432,8 +22364,8 @@ 12 - 19319 - 19320 + 19321 + 19322 466 @@ -22471,48 +22403,48 @@ is_standard_layout_class - 1254160 + 1254935 id - 1254160 + 1254935 is_complete - 1645910 + 1646635 id - 1645910 + 1646635 is_class_template - 398287 + 398236 id - 398287 + 398236 class_instantiation - 1089802 + 1089664 to - 1089802 + 1089664 from - 168559 + 168538 @@ -22526,7 +22458,7 @@ 1 2 - 1089802 + 1089664 @@ -22542,42 +22474,42 @@ 1 2 - 59766 + 59758 2 3 - 29416 + 29412 3 4 - 15875 + 15873 4 5 - 13073 + 13072 5 6 - 9805 + 9804 6 10 - 12606 + 12605 10 16 - 13073 + 13072 16 70 - 13540 + 13539 70 @@ -22833,11 +22765,11 @@ class_template_argument_value - 495407 + 495344 type_id - 304902 + 304863 index @@ -22845,7 +22777,7 @@ arg_value - 495407 + 495344 @@ -22859,12 +22791,12 @@ 1 2 - 249804 + 249773 2 3 - 53229 + 53222 3 @@ -22885,22 +22817,22 @@ 1 2 - 189571 + 189547 2 3 - 81244 + 81234 3 4 - 12140 + 12138 4 9 - 21945 + 21942 @@ -22978,7 +22910,7 @@ 1 2 - 495407 + 495344 @@ -22994,7 +22926,7 @@ 1 2 - 495407 + 495344 @@ -23004,15 +22936,15 @@ is_proxy_class_for - 62101 + 63026 id - 62101 + 63026 templ_param_id - 62101 + 63026 @@ -23026,7 +22958,7 @@ 1 2 - 62101 + 63026 @@ -23042,7 +22974,7 @@ 1 2 - 62101 + 63026 @@ -23348,11 +23280,11 @@ is_function_template - 1403109 + 1402931 id - 1403109 + 1402931 @@ -24483,19 +24415,19 @@ routinetypeargs - 983344 + 983219 routine - 423500 + 423447 index - 7937 + 7936 type_id - 226925 + 226896 @@ -24509,27 +24441,27 @@ 1 2 - 152684 + 152665 2 3 - 134007 + 133990 3 4 - 63501 + 63493 4 5 - 45758 + 45752 5 18 - 27548 + 27545 @@ -24545,27 +24477,27 @@ 1 2 - 182567 + 182544 2 3 - 133540 + 133523 3 4 - 58832 + 58825 4 5 - 33618 + 33614 5 11 - 14941 + 14939 @@ -24723,27 +24655,27 @@ 1 2 - 146614 + 146595 2 3 - 30817 + 30813 3 5 - 16809 + 16807 5 12 - 18210 + 18207 12 110 - 14474 + 14472 @@ -24759,22 +24691,22 @@ 1 2 - 172762 + 172740 2 3 - 30817 + 30813 3 6 - 18676 + 18674 6 14 - 4669 + 4668 @@ -24784,19 +24716,19 @@ ptrtomembers - 37820 + 37816 id - 37820 + 37816 type_id - 37820 + 37816 class_id - 15408 + 15406 @@ -24810,7 +24742,7 @@ 1 2 - 37820 + 37816 @@ -24826,7 +24758,7 @@ 1 2 - 37820 + 37816 @@ -24842,7 +24774,7 @@ 1 2 - 37820 + 37816 @@ -24858,7 +24790,7 @@ 1 2 - 37820 + 37816 @@ -24874,7 +24806,7 @@ 1 2 - 13540 + 13539 8 @@ -24900,7 +24832,7 @@ 1 2 - 13540 + 13539 8 @@ -24920,15 +24852,15 @@ specifiers - 24747 + 24743 id - 24747 + 24743 str - 24747 + 24743 @@ -24942,7 +24874,7 @@ 1 2 - 24747 + 24743 @@ -24958,7 +24890,7 @@ 1 2 - 24747 + 24743 @@ -24968,15 +24900,15 @@ typespecifiers - 1132293 + 1133083 type_id - 1114083 + 1114875 spec_id - 3735 + 3734 @@ -24990,12 +24922,12 @@ 1 2 - 1095872 + 1096667 2 3 - 18210 + 18207 @@ -25036,7 +24968,12 @@ 219 220 - 933 + 466 + + + 221 + 222 + 466 1701 @@ -25051,15 +24988,15 @@ funspecifiers - 10305968 + 10304659 func_id - 4068784 + 4068267 spec_id - 8404 + 8403 @@ -25073,27 +25010,27 @@ 1 2 - 1357817 + 1357645 2 3 - 641088 + 641006 3 4 - 985211 + 985086 4 5 - 780231 + 780132 5 8 - 304435 + 304396 @@ -25204,15 +25141,15 @@ varspecifiers - 2246376 + 2246090 var_id - 1225211 + 1225055 spec_id - 3735 + 3734 @@ -25226,22 +25163,22 @@ 1 2 - 730270 + 730177 2 3 - 202645 + 202619 3 4 - 58365 + 58358 4 5 - 233929 + 233899 @@ -25350,11 +25287,11 @@ attributes - 561710 + 561639 id - 561710 + 561639 kind @@ -25362,7 +25299,7 @@ name - 11206 + 11204 name_space @@ -25370,7 +25307,7 @@ location - 481399 + 481338 @@ -25384,7 +25321,7 @@ 1 2 - 561710 + 561639 @@ -25400,7 +25337,7 @@ 1 2 - 561710 + 561639 @@ -25416,7 +25353,7 @@ 1 2 - 561710 + 561639 @@ -25432,7 +25369,7 @@ 1 2 - 561710 + 561639 @@ -25623,7 +25560,7 @@ 1 2 - 10272 + 10271 2 @@ -25644,7 +25581,7 @@ 1 2 - 11206 + 11204 @@ -25815,17 +25752,17 @@ 1 2 - 431905 + 431850 2 3 - 20077 + 20075 3 7 - 29416 + 29412 @@ -25841,7 +25778,7 @@ 1 2 - 481399 + 481338 @@ -25857,17 +25794,17 @@ 1 2 - 433306 + 433251 2 3 - 19610 + 19608 3 4 - 28482 + 28478 @@ -25883,7 +25820,7 @@ 1 2 - 481399 + 481338 @@ -25893,11 +25830,11 @@ attribute_args - 344123 + 344080 id - 344123 + 344080 kind @@ -25905,7 +25842,7 @@ attribute - 262878 + 262845 index @@ -25913,7 +25850,7 @@ location - 327781 + 327739 @@ -25927,7 +25864,7 @@ 1 2 - 344123 + 344080 @@ -25943,7 +25880,7 @@ 1 2 - 344123 + 344080 @@ -25959,7 +25896,7 @@ 1 2 - 344123 + 344080 @@ -25975,7 +25912,7 @@ 1 2 - 344123 + 344080 @@ -26090,17 +26027,17 @@ 1 2 - 197509 + 197484 2 3 - 49494 + 49487 3 4 - 15875 + 15873 @@ -26116,12 +26053,12 @@ 1 2 - 252606 + 252574 2 3 - 10272 + 10271 @@ -26137,17 +26074,17 @@ 1 2 - 197509 + 197484 2 3 - 49494 + 49487 3 4 - 15875 + 15873 @@ -26163,17 +26100,17 @@ 1 2 - 197509 + 197484 2 3 - 49494 + 49487 3 4 - 15875 + 15873 @@ -26288,12 +26225,12 @@ 1 2 - 313773 + 313733 2 7 - 14007 + 14005 @@ -26309,12 +26246,12 @@ 1 2 - 315174 + 315134 2 3 - 12606 + 12605 @@ -26330,12 +26267,12 @@ 1 2 - 313773 + 313733 2 7 - 14007 + 14005 @@ -26351,7 +26288,7 @@ 1 2 - 327781 + 327739 @@ -26361,15 +26298,15 @@ attribute_arg_value - 25213 + 25210 arg - 25213 + 25210 value - 15875 + 15873 @@ -26383,7 +26320,7 @@ 1 2 - 25213 + 25210 @@ -26399,7 +26336,7 @@ 1 2 - 14474 + 14472 2 @@ -26462,15 +26399,15 @@ attribute_arg_constant - 318442 + 318402 arg - 318442 + 318402 constant - 318442 + 318402 @@ -26484,7 +26421,7 @@ 1 2 - 318442 + 318402 @@ -26500,7 +26437,7 @@ 1 2 - 318442 + 318402 @@ -26674,15 +26611,15 @@ funcattributes - 630348 + 630268 func_id - 443578 + 443522 spec_id - 524823 + 524757 @@ -26696,17 +26633,17 @@ 1 2 - 338520 + 338477 2 3 - 64435 + 64427 3 6 - 39688 + 39683 6 @@ -26727,12 +26664,12 @@ 1 2 - 506146 + 506082 2 17 - 18676 + 18674 @@ -26868,15 +26805,15 @@ unspecifiedtype - 9489316 + 9489045 type_id - 9489316 + 9489045 unspecified_type_id - 6491191 + 6491300 @@ -26890,7 +26827,7 @@ 1 2 - 9489316 + 9489045 @@ -26906,17 +26843,17 @@ 1 2 - 4559522 + 4559877 2 3 - 1715949 + 1715731 3 145 - 215719 + 215691 @@ -26926,19 +26863,19 @@ member - 3881547 + 3881054 parent - 545835 + 545766 index - 92918 + 92906 child - 3810107 + 3809624 @@ -26952,47 +26889,47 @@ 1 2 - 129805 + 129788 2 3 - 64902 + 64894 3 4 - 73307 + 73297 4 5 - 75174 + 75165 5 6 - 40622 + 40617 6 8 - 46692 + 46686 8 14 - 45758 + 45752 14 30 - 41556 + 41551 30 200 - 28015 + 28011 @@ -27008,52 +26945,52 @@ 1 2 - 129805 + 129788 2 3 - 64902 + 64894 3 4 - 73307 + 73297 4 5 - 76108 + 76099 5 6 - 39688 + 39683 6 7 - 24280 + 24277 7 9 - 42023 + 42017 9 17 - 43890 + 43885 17 41 - 41556 + 41551 41 200 - 10272 + 10271 @@ -27069,57 +27006,57 @@ 1 2 - 26147 + 26144 2 3 - 7003 + 7002 3 4 - 3735 + 3734 4 5 - 7937 + 7936 5 6 - 5603 + 5602 6 7 - 5603 + 5602 7 9 - 7470 + 7469 9 16 - 7003 + 7002 16 52 - 7003 + 7002 52 107 - 7003 + 7002 108 577 - 7003 + 7002 737 @@ -27140,57 +27077,57 @@ 1 2 - 26147 + 26144 2 3 - 7003 + 7002 3 4 - 3735 + 3734 4 5 - 7937 + 7936 5 6 - 5603 + 5602 6 7 - 5603 + 5602 7 9 - 7470 + 7469 9 16 - 7003 + 7002 16 52 - 7003 + 7002 52 107 - 7003 + 7002 108 577 - 7003 + 7002 738 @@ -27211,7 +27148,7 @@ 1 2 - 3810107 + 3809624 @@ -27227,12 +27164,12 @@ 1 2 - 3738668 + 3738193 2 3 - 71439 + 71430 @@ -28762,15 +28699,15 @@ commentbinding - 3091510 + 3091117 id - 2445753 + 2445442 element - 3014934 + 3014551 @@ -28784,12 +28721,12 @@ 1 2 - 2368710 + 2368409 2 97 - 77042 + 77032 @@ -28805,12 +28742,12 @@ 1 2 - 2938358 + 2937985 2 3 - 76575 + 76565 @@ -28820,15 +28757,15 @@ exprconv - 7033025 + 7033022 converted - 7033025 + 7033022 conversion - 7033025 + 7033022 @@ -28842,7 +28779,7 @@ 1 2 - 7033025 + 7033022 @@ -28858,7 +28795,7 @@ 1 2 - 7033025 + 7033022 @@ -29215,15 +29152,15 @@ namespaces - 12140 + 12138 id - 12140 + 12138 name - 9805 + 9804 @@ -29237,7 +29174,7 @@ 1 2 - 12140 + 12138 @@ -29253,7 +29190,7 @@ 1 2 - 8404 + 8403 2 @@ -29284,15 +29221,15 @@ namespacembrs - 2388321 + 2388018 parentid - 10272 + 10271 memberid - 2388321 + 2388018 @@ -29367,7 +29304,7 @@ 1 2 - 2388321 + 2388018 @@ -29863,7 +29800,7 @@ qualifyingelement - 97538 + 97519 location @@ -29977,7 +29914,7 @@ 1 2 - 58420 + 58401 2 @@ -30013,7 +29950,7 @@ 1 2 - 58420 + 58401 2 @@ -30049,7 +29986,7 @@ 1 2 - 63834 + 63815 2 @@ -30162,12 +30099,12 @@ 1 2 - 137055 + 137074 2 3 - 55703 + 55684 3 @@ -30631,15 +30568,15 @@ expr_cond_guard - 657238 + 657237 cond - 657238 + 657237 guard - 657238 + 657237 @@ -30653,7 +30590,7 @@ 1 2 - 657238 + 657237 @@ -30669,7 +30606,7 @@ 1 2 - 657238 + 657237 @@ -30727,15 +30664,15 @@ expr_cond_false - 657238 + 657237 cond - 657238 + 657237 false - 657238 + 657237 @@ -30749,7 +30686,7 @@ 1 2 - 657238 + 657237 @@ -30765,7 +30702,7 @@ 1 2 - 657238 + 657237 @@ -33722,11 +33659,11 @@ lambdas - 21478 + 21475 expr - 21478 + 21475 default_capture @@ -33748,7 +33685,7 @@ 1 2 - 21478 + 21475 @@ -33764,7 +33701,7 @@ 1 2 - 21478 + 21475 @@ -33838,15 +33775,15 @@ lambda_capture - 28015 + 28011 id - 28015 + 28011 lambda - 20544 + 20542 index @@ -33854,7 +33791,7 @@ field - 28015 + 28011 captured_by_reference @@ -33880,7 +33817,7 @@ 1 2 - 28015 + 28011 @@ -33896,7 +33833,7 @@ 1 2 - 28015 + 28011 @@ -33912,7 +33849,7 @@ 1 2 - 28015 + 28011 @@ -33928,7 +33865,7 @@ 1 2 - 28015 + 28011 @@ -33944,7 +33881,7 @@ 1 2 - 28015 + 28011 @@ -33960,7 +33897,7 @@ 1 2 - 28015 + 28011 @@ -33976,12 +33913,12 @@ 1 2 - 13073 + 13072 2 3 - 7470 + 7469 @@ -33997,12 +33934,12 @@ 1 2 - 13073 + 13072 2 3 - 7470 + 7469 @@ -34018,12 +33955,12 @@ 1 2 - 13073 + 13072 2 3 - 7470 + 7469 @@ -34039,7 +33976,7 @@ 1 2 - 20544 + 20542 @@ -34055,7 +33992,7 @@ 1 2 - 20544 + 20542 @@ -34071,12 +34008,12 @@ 1 2 - 13073 + 13072 2 3 - 7470 + 7469 @@ -34208,7 +34145,7 @@ 1 2 - 28015 + 28011 @@ -34224,7 +34161,7 @@ 1 2 - 28015 + 28011 @@ -34240,7 +34177,7 @@ 1 2 - 28015 + 28011 @@ -34256,7 +34193,7 @@ 1 2 - 28015 + 28011 @@ -34272,7 +34209,7 @@ 1 2 - 28015 + 28011 @@ -34288,7 +34225,7 @@ 1 2 - 28015 + 28011 @@ -36334,11 +36271,11 @@ stmt_decl_bind - 580849 + 580843 stmt - 541067 + 541061 num @@ -36346,7 +36283,7 @@ decl - 580745 + 580739 @@ -36360,7 +36297,7 @@ 1 2 - 520378 + 520372 2 @@ -36381,7 +36318,7 @@ 1 2 - 520378 + 520372 2 @@ -36584,7 +36521,7 @@ 1 2 - 580708 + 580702 2 @@ -36605,7 +36542,7 @@ 1 2 - 580745 + 580739 @@ -36615,11 +36552,11 @@ stmt_decl_entry_bind - 580849 + 580843 stmt - 541067 + 541061 num @@ -36627,7 +36564,7 @@ decl_entry - 580791 + 580785 @@ -36641,7 +36578,7 @@ 1 2 - 520378 + 520372 2 @@ -36662,7 +36599,7 @@ 1 2 - 520378 + 520372 2 @@ -36865,7 +36802,7 @@ 1 2 - 580770 + 580764 3 @@ -36886,7 +36823,7 @@ 1 2 - 580791 + 580785 @@ -37135,19 +37072,19 @@ preprocdirects - 4191118 + 4190586 id - 4191118 + 4190586 kind - 5136 + 5135 location - 4150496 + 4149969 @@ -37161,7 +37098,7 @@ 1 2 - 4191118 + 4190586 @@ -37177,7 +37114,7 @@ 1 2 - 4191118 + 4190586 @@ -37325,7 +37262,7 @@ 1 2 - 4150029 + 4149502 88 @@ -37346,7 +37283,7 @@ 1 2 - 4150496 + 4149969 @@ -37356,15 +37293,15 @@ preprocpair - 1431592 + 1431410 begin - 1197195 + 1197043 elseelifend - 1431592 + 1431410 @@ -37378,17 +37315,17 @@ 1 2 - 978674 + 978550 2 3 - 208248 + 208222 3 11 - 10272 + 10271 @@ -37404,7 +37341,7 @@ 1 2 - 1431592 + 1431410 @@ -37414,22 +37351,22 @@ preproctrue - 767157 + 767060 branch - 767157 + 767060 preprocfalse - 331516 + 331474 branch - 331516 + 331474 @@ -37582,15 +37519,15 @@ includes - 313306 + 313266 id - 313306 + 313266 included - 117198 + 117183 @@ -37604,7 +37541,7 @@ 1 2 - 313306 + 313266 @@ -37620,27 +37557,27 @@ 1 2 - 61167 + 61159 2 3 - 21945 + 21942 3 4 - 12606 + 12605 4 6 - 10272 + 10271 6 14 - 8871 + 8870 14 diff --git a/cpp/ql/lib/upgrades/02a123a1a681f98cf502f189a2a79b0dfb398e59/old.dbscheme b/cpp/ql/lib/upgrades/02a123a1a681f98cf502f189a2a79b0dfb398e59/old.dbscheme new file mode 100644 index 00000000000..02a123a1a68 --- /dev/null +++ b/cpp/ql/lib/upgrades/02a123a1a681f98cf502f189a2a79b0dfb398e59/old.dbscheme @@ -0,0 +1,2317 @@ + +/** + * 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 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, 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 +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * 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( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * 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_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * 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_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: 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_default 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 +); + +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 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 + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // 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 +); + +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, + int handle: @variable ref, + int promise: @variable 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 +); + +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_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable 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 +); + +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: @functionorblock ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +; + +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 +; + +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 +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator. For example: + * ``` + * int a; + * decltype(1+a) b; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * would change the semantics of this 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. + */ +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @usertype.kind of + 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +| 5 = @typedef // classic C: typedef typedef type name +| 6 = @template +| 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 // a using name = type style typedef +; +*/ + +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 +); + +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 +); + +is_proxy_class_for( + unique int id: @usertype ref, + unique int templ_param_id: @usertype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location 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 +); + +/* + Fixed point types + precision(1) = short, precision(2) = default, precision(3) = long + is_unsigned(1) = unsigned is_unsigned(2) = signed + is_fract_type(1) = declared with _Fract + saturating(1) = declared with _Sat +*/ +/* TODO +fixedpointtypes( + unique int id: @fixedpointtype, + int precision: int ref, + int is_unsigned: int ref, + int is_fract_type: int ref, + int saturating: int 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 +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + /* TODO | @fixedpointtype */ + | @routinetype + | @ptrtomember + | @decltype; + +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; + +@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 + ; + +/* +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; + +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_expr 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_expr 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 +; + +@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 + ; + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref +); + +/** + * 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 +); + +@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 +); + +@runtime_sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof; + +sizeof_bind( + unique int expr: @runtime_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 +); + +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_stmt 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 +; + +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 +); + +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 +); + +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 +); + +@functionorblock = @function | @stmt_block; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @functionorblock ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue; + +@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 +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/02a123a1a681f98cf502f189a2a79b0dfb398e59/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/02a123a1a681f98cf502f189a2a79b0dfb398e59/semmlecode.cpp.dbscheme new file mode 100644 index 00000000000..0fea0ee7026 --- /dev/null +++ b/cpp/ql/lib/upgrades/02a123a1a681f98cf502f189a2a79b0dfb398e59/semmlecode.cpp.dbscheme @@ -0,0 +1,2319 @@ + +/** + * 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 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, 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 +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * 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( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * 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_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * 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_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: 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_default 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 +); + +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 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 + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // 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 +); + +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, + int handle: @variable ref, + int promise: @variable 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 +); + +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_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable 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 +); + +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: @functionorblock ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +; + +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 +; + +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 +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator. For example: + * ``` + * int a; + * decltype(1+a) b; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * would change the semantics of this 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. + */ +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @usertype.kind of + 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +| 5 = @typedef // classic C: typedef typedef type name +| 6 = @template +| 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 // a using name = type style typedef +; +*/ + +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 +); + +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 +); + +is_proxy_class_for( + unique int id: @usertype ref, + unique int templ_param_id: @usertype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location 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 +); + +/* + Fixed point types + precision(1) = short, precision(2) = default, precision(3) = long + is_unsigned(1) = unsigned is_unsigned(2) = signed + is_fract_type(1) = declared with _Fract + saturating(1) = declared with _Sat +*/ +/* TODO +fixedpointtypes( + unique int id: @fixedpointtype, + int precision: int ref, + int is_unsigned: int ref, + int is_fract_type: int ref, + int saturating: int 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 +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + /* TODO | @fixedpointtype */ + | @routinetype + | @ptrtomember + | @decltype; + +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; + +@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; + +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_expr 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_expr 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 +; + +@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 + ; + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref +); + +/** + * 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 +); + +@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 +); + +@runtime_sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof; + +sizeof_bind( + unique int expr: @runtime_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 +); + +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_stmt 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 +; + +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 +); + +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 +); + +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 +); + +@functionorblock = @function | @stmt_block; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @functionorblock ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue; + +@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 +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/02a123a1a681f98cf502f189a2a79b0dfb398e59/upgrade.properties b/cpp/ql/lib/upgrades/02a123a1a681f98cf502f189a2a79b0dfb398e59/upgrade.properties new file mode 100644 index 00000000000..477f78902ed --- /dev/null +++ b/cpp/ql/lib/upgrades/02a123a1a681f98cf502f189a2a79b0dfb398e59/upgrade.properties @@ -0,0 +1,2 @@ +description: Expose C11 _Generics +compatibility: backwards diff --git a/cpp/ql/lib/upgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/old.dbscheme b/cpp/ql/lib/upgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/old.dbscheme new file mode 100644 index 00000000000..0fea0ee7026 --- /dev/null +++ b/cpp/ql/lib/upgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/old.dbscheme @@ -0,0 +1,2319 @@ + +/** + * 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 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, 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 +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * 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( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * 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_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * 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_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: 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_default 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 +); + +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 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 + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // 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 +); + +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, + int handle: @variable ref, + int promise: @variable 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 +); + +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_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable 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 +); + +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: @functionorblock ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +; + +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 +; + +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 +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator. For example: + * ``` + * int a; + * decltype(1+a) b; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * would change the semantics of this 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. + */ +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @usertype.kind of + 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +| 5 = @typedef // classic C: typedef typedef type name +| 6 = @template +| 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 // a using name = type style typedef +; +*/ + +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 +); + +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 +); + +is_proxy_class_for( + unique int id: @usertype ref, + unique int templ_param_id: @usertype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location 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 +); + +/* + Fixed point types + precision(1) = short, precision(2) = default, precision(3) = long + is_unsigned(1) = unsigned is_unsigned(2) = signed + is_fract_type(1) = declared with _Fract + saturating(1) = declared with _Sat +*/ +/* TODO +fixedpointtypes( + unique int id: @fixedpointtype, + int precision: int ref, + int is_unsigned: int ref, + int is_fract_type: int ref, + int saturating: int 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 +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + /* TODO | @fixedpointtype */ + | @routinetype + | @ptrtomember + | @decltype; + +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; + +@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; + +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_expr 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_expr 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 +; + +@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 + ; + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref +); + +/** + * 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 +); + +@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 +); + +@runtime_sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof; + +sizeof_bind( + unique int expr: @runtime_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 +); + +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_stmt 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 +; + +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 +); + +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 +); + +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 +); + +@functionorblock = @function | @stmt_block; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @functionorblock ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue; + +@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 +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/semmlecode.cpp.dbscheme new file mode 100644 index 00000000000..7ff6a6e53db --- /dev/null +++ b/cpp/ql/lib/upgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/semmlecode.cpp.dbscheme @@ -0,0 +1,2315 @@ + +/** + * 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 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, 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 +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * 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( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * 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_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * 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_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: 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_default 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 +); + +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 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 + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // 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 +); + +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 +); + +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_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable 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 +); + +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: @functionorblock ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +; + +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 +; + +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 +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator. For example: + * ``` + * int a; + * decltype(1+a) b; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * would change the semantics of this 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. + */ +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @usertype.kind of + 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +| 5 = @typedef // classic C: typedef typedef type name +| 6 = @template +| 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 // a using name = type style typedef +; +*/ + +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 +); + +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 +); + +is_proxy_class_for( + unique int id: @usertype ref, + unique int templ_param_id: @usertype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location 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 +); + +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 +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + /* TODO | @fixedpointtype */ + | @routinetype + | @ptrtomember + | @decltype; + +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; + +@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; + +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_expr 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_expr 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 +; + +@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 + ; + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref +); + +/** + * 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 +); + +@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 +); + +@runtime_sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof; + +sizeof_bind( + unique int expr: @runtime_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 +); + +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_stmt 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 +; + +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 +); + +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 +); + +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 +); + +@functionorblock = @function | @stmt_block; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @functionorblock ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue; + +@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 +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/upgrade.properties b/cpp/ql/lib/upgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/upgrade.properties new file mode 100644 index 00000000000..fcd771ec854 --- /dev/null +++ b/cpp/ql/lib/upgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/upgrade.properties @@ -0,0 +1,4 @@ +description: Improve handling of coroutine placeholder variables +compatibility: partial +coroutine.rel: run upgrades.qlo new_coroutine +coroutine_placeholder_variable.rel: run upgrades.qlo new_coroutine_placeholder_variable diff --git a/cpp/ql/lib/upgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/upgrades.ql b/cpp/ql/lib/upgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/upgrades.ql new file mode 100644 index 00000000000..d34a7c787ae --- /dev/null +++ b/cpp/ql/lib/upgrades/0fea0ee7026c7c3f7d6faef4df4bf67847b67d71/upgrades.ql @@ -0,0 +1,19 @@ +class Function extends @function { + string toString() { none() } +} + +class Type extends @type { + string toString() { none() } +} + +class Variable extends @variable { + string toString() { none() } +} + +query predicate new_coroutine(Function func, Type traits) { coroutine(func, traits, _, _) } + +query predicate new_coroutine_placeholder_variable(Variable var, int kind, Function func) { + coroutine(func, _, var, _) and kind = 1 + or + coroutine(func, _, _, var) and kind = 2 +} diff --git a/cpp/ql/src/CHANGELOG.md b/cpp/ql/src/CHANGELOG.md index 25e322a99b7..d5e4575e097 100644 --- a/cpp/ql/src/CHANGELOG.md +++ b/cpp/ql/src/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.2.1 + +### Minor Analysis Improvements + +* The `cpp/uncontrolled-allocation-size` ("Uncontrolled allocation size") query now considers arithmetic operations that might reduce the size of user input as a barrier. The query therefore produces fewer false positive results. + ## 1.2.0 ### Query Metadata Changes diff --git a/cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll b/cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll index 038af4f1d88..3cff86412e4 100644 --- a/cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll +++ b/cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll @@ -205,20 +205,6 @@ class ChecksForLeapYearFunctionCall extends FunctionCall { ChecksForLeapYearFunctionCall() { this.getTarget() instanceof ChecksForLeapYearFunction } } -/** - * Data flow configuration for finding a variable access that would flow into - * a function call that includes an operation to check for leap year. - */ -deprecated class LeapYearCheckConfiguration extends DataFlow::Configuration { - LeapYearCheckConfiguration() { this = "LeapYearCheckConfiguration" } - - override predicate isSource(DataFlow::Node source) { source.asExpr() instanceof VariableAccess } - - override predicate isSink(DataFlow::Node sink) { - exists(ChecksForLeapYearFunctionCall fc | sink.asExpr() = fc.getAnArgument()) - } -} - /** * Data flow configuration for finding a variable access that would flow into * a function call that includes an operation to check for leap year. @@ -233,33 +219,6 @@ private module LeapYearCheckConfig implements DataFlow::ConfigSig { module LeapYearCheckFlow = DataFlow::Global; -/** - * Data flow configuration for finding an operation with hardcoded 365 that will flow into - * a `FILEINFO` field. - */ -deprecated class FiletimeYearArithmeticOperationCheckConfiguration extends DataFlow::Configuration { - FiletimeYearArithmeticOperationCheckConfiguration() { - this = "FiletimeYearArithmeticOperationCheckConfiguration" - } - - override predicate isSource(DataFlow::Node source) { - exists(Expr e, Operation op | e = source.asExpr() | - op.getAChild*().getValue().toInt() = 365 and - op.getAChild*() = e - ) - } - - override predicate isSink(DataFlow::Node sink) { - exists(StructLikeClass dds, FieldAccess fa, AssignExpr aexpr, Expr e | e = sink.asExpr() | - dds instanceof PackedTimeType and - fa.getQualifier().getUnderlyingType() = dds and - fa.isModified() and - aexpr.getAChild() = fa and - aexpr.getChild(1).getAChild*() = e - ) - } -} - /** * Data flow configuration for finding an operation with hardcoded 365 that will flow into * a `FILEINFO` field. @@ -286,51 +245,6 @@ private module FiletimeYearArithmeticOperationCheckConfig implements DataFlow::C module FiletimeYearArithmeticOperationCheckFlow = DataFlow::Global; -/** - * Taint configuration for finding an operation with hardcoded 365 that will flow into any known date/time field. - */ -deprecated class PossibleYearArithmeticOperationCheckConfiguration extends TaintTracking::Configuration -{ - PossibleYearArithmeticOperationCheckConfiguration() { - this = "PossibleYearArithmeticOperationCheckConfiguration" - } - - override predicate isSource(DataFlow::Node source) { - exists(Operation op | op = source.asExpr() | - op.getAChild*().getValue().toInt() = 365 and - ( - not op.getParent() instanceof Expr or - op.getParent() instanceof Assignment - ) - ) - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - // flow from anything on the RHS of an assignment to a time/date structure to that - // assignment. - exists(StructLikeClass dds, FieldAccess fa, Assignment aexpr, Expr e | - e = node1.asExpr() and - fa = node2.asExpr() - | - (dds instanceof PackedTimeType or dds instanceof UnpackedTimeType) and - fa.getQualifier().getUnderlyingType() = dds and - aexpr.getLValue() = fa and - aexpr.getRValue().getAChild*() = e - ) - } - - override predicate isSink(DataFlow::Node sink) { - exists(StructLikeClass dds, FieldAccess fa, AssignExpr aexpr | - aexpr.getRValue() = sink.asExpr() - | - (dds instanceof PackedTimeType or dds instanceof UnpackedTimeType) and - fa.getQualifier().getUnderlyingType() = dds and - fa.isModified() and - aexpr.getLValue() = fa - ) - } -} - /** * Taint configuration for finding an operation with hardcoded 365 that will flow into any known date/time field. */ diff --git a/cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qll b/cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qll index 53ab3b4df93..ecb60d113d8 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qll +++ b/cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qll @@ -129,24 +129,6 @@ class NetworkFunctionCall extends FunctionCall { NetworkFunctionCall() { this.getTarget().hasName(["ntohd", "ntohf", "ntohl", "ntohll", "ntohs"]) } } -deprecated class NetworkToBufferSizeConfiguration extends DataFlow::Configuration { - NetworkToBufferSizeConfiguration() { this = "NetworkToBufferSizeConfiguration" } - - override predicate isSource(DataFlow::Node node) { node.asExpr() instanceof NetworkFunctionCall } - - override predicate isSink(DataFlow::Node node) { - node.asExpr() = any(BufferAccess ba).getAccessedLength() - } - - override predicate isBarrier(DataFlow::Node node) { - exists(GuardCondition gc, GVN gvn | - gc.getAChild*() = gvn.getAnExpr() and - globalValueNumber(node.asExpr()) = gvn and - gc.controls(node.asExpr().getBasicBlock(), _) - ) - } -} - private module NetworkToBufferSizeConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node node) { node.asExpr() instanceof NetworkFunctionCall } diff --git a/cpp/ql/src/Security/CWE/CWE-020/ExternalAPIsSpecific.qll b/cpp/ql/src/Security/CWE/CWE-020/ExternalAPIsSpecific.qll index 2d9502f2f43..f0876800874 100644 --- a/cpp/ql/src/Security/CWE/CWE-020/ExternalAPIsSpecific.qll +++ b/cpp/ql/src/Security/CWE/CWE-020/ExternalAPIsSpecific.qll @@ -41,20 +41,6 @@ class ExternalApiDataNode extends DataFlow::Node { string getFunctionDescription() { result = this.getExternalFunction().toString() } } -/** A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. */ -deprecated class UntrustedDataToExternalApiConfig extends TaintTracking::Configuration { - UntrustedDataToExternalApiConfig() { this = "UntrustedDataToExternalAPIConfig" } - - override predicate isSource(DataFlow::Node source) { - exists(RemoteFlowSourceFunction remoteFlow | - remoteFlow = source.asExpr().(Call).getTarget() and - remoteFlow.hasRemoteFlowSource(_, _) - ) - } - - override predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } -} - /** A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. */ private module UntrustedDataToExternalApiConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { diff --git a/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIsSpecific.qll b/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIsSpecific.qll index 87e1d6bd7c5..d094439951f 100644 --- a/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIsSpecific.qll +++ b/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIsSpecific.qll @@ -41,15 +41,6 @@ class ExternalApiDataNode extends DataFlow::Node { string getFunctionDescription() { result = this.getExternalFunction().toString() } } -/** A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. */ -deprecated class UntrustedDataToExternalApiConfig extends TaintTracking::Configuration { - UntrustedDataToExternalApiConfig() { this = "UntrustedDataToExternalAPIConfigIR" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } -} - /** A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. */ private module UntrustedDataToExternalApiConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } diff --git a/cpp/ql/src/Security/CWE/CWE-190/Bounded.qll b/cpp/ql/src/Security/CWE/CWE-190/Bounded.qll index bb855da3f44..01f4f94d60e 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/Bounded.qll +++ b/cpp/ql/src/Security/CWE/CWE-190/Bounded.qll @@ -1,6 +1,6 @@ /** - * This file provides the `bounded` predicate that is used in both `cpp/uncontrolled-arithmetic` - * and `cpp/tainted-arithmetic`. + * This file provides the `bounded` predicate that is used in `cpp/uncontrolled-arithmetic`, + * `cpp/tainted-arithmetic` and `cpp/uncontrolled-allocation-size`. */ private import cpp @@ -8,20 +8,18 @@ private import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis private import semmle.code.cpp.rangeanalysis.RangeAnalysisUtils /** - * An operand `e` of a bitwise and expression `andExpr` (i.e., `andExpr` is either an `BitwiseAndExpr` - * or an `AssignAndExpr`) with operands `operand1` and `operand2` is the operand that is not `e` is upper - * bounded by some number that is less than the maximum integer allowed by the result type of `andExpr`. + * An operand `operand` of a bitwise and expression `andExpr` (i.e., `andExpr` is either a + * `BitwiseAndExpr` or an `AssignAndExpr`) is upper bounded by some number that is less than the + * maximum integer allowed by the result type of `andExpr`. */ pragma[inline] -private predicate boundedBitwiseAnd(Expr e, Expr andExpr, Expr operand1, Expr operand2) { - operand1 != operand2 and - e = operand1 and - upperBound(operand2.getFullyConverted()) < exprMaxVal(andExpr.getFullyConverted()) +private predicate boundedBitwiseAnd(Expr operand, Expr andExpr) { + upperBound(operand.getFullyConverted()) < exprMaxVal(andExpr.getFullyConverted()) } /** - * Holds if `e` is an arithmetic expression that cannot overflow, or if `e` is an operand of an - * operation that may greatly reduce the range of possible values. + * Holds if `e` is an arithmetic expression that cannot overflow, or if `e` is an operation that + * may greatly reduce the range of possible values. */ predicate bounded(Expr e) { // There can be two separate reasons for `convertedExprMightOverflow` not holding: @@ -35,25 +33,25 @@ predicate bounded(Expr e) { ) and not convertedExprMightOverflow(e) or - // Optimistically assume that a remainder expression always yields a much smaller value. - e = any(RemExpr rem).getLeftOperand() + // Optimistically assume that the following operations always yields a much smaller value. + e instanceof RemExpr or - e = any(AssignRemExpr rem).getLValue() + e instanceof DivExpr + or + e instanceof RShiftExpr or exists(BitwiseAndExpr andExpr | - boundedBitwiseAnd(e, andExpr, andExpr.getAnOperand(), andExpr.getAnOperand()) + e = andExpr and boundedBitwiseAnd(andExpr.getAnOperand(), andExpr) ) or - exists(AssignAndExpr andExpr | - boundedBitwiseAnd(e, andExpr, andExpr.getAnOperand(), andExpr.getAnOperand()) - ) - or - // Optimistically assume that a division always yields a much smaller value. - e = any(DivExpr div).getLeftOperand() + // For the assignment variant of the operations we place the barrier on the assigned lvalue. + e = any(AssignRemExpr rem).getLValue() or e = any(AssignDivExpr div).getLValue() or - e = any(RShiftExpr shift).getLeftOperand() - or e = any(AssignRShiftExpr div).getLValue() + or + exists(AssignAndExpr andExpr | + e = andExpr.getLValue() and boundedBitwiseAnd(andExpr.getRValue(), andExpr) + ) } diff --git a/cpp/ql/src/change-notes/2024-08-16-uncontrolled-allocation-size.md b/cpp/ql/src/change-notes/released/1.2.1.md similarity index 70% rename from cpp/ql/src/change-notes/2024-08-16-uncontrolled-allocation-size.md rename to cpp/ql/src/change-notes/released/1.2.1.md index 4d0d0593363..c7f2fafb36b 100644 --- a/cpp/ql/src/change-notes/2024-08-16-uncontrolled-allocation-size.md +++ b/cpp/ql/src/change-notes/released/1.2.1.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- -* The `cpp/uncontrolled-allocation-size` ("Uncontrolled allocation size") query now considers arithmetic operations that might reduce the size of user input as a barrier. The query therefore produces fewer false positive results. \ No newline at end of file +## 1.2.1 + +### Minor Analysis Improvements + +* The `cpp/uncontrolled-allocation-size` ("Uncontrolled allocation size") query now considers arithmetic operations that might reduce the size of user input as a barrier. The query therefore produces fewer false positive results. diff --git a/cpp/ql/src/codeql-pack.release.yml b/cpp/ql/src/codeql-pack.release.yml index 75430e73d1c..73dd403938c 100644 --- a/cpp/ql/src/codeql-pack.release.yml +++ b/cpp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.2.0 +lastReleaseVersion: 1.2.1 diff --git a/cpp/ql/src/qlpack.yml b/cpp/ql/src/qlpack.yml index 13d1448bf8d..291bde88faf 100644 --- a/cpp/ql/src/qlpack.yml +++ b/cpp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-queries -version: 1.2.1-dev +version: 1.2.2-dev groups: - cpp - queries diff --git a/cpp/ql/test/library-tests/c11_generic/PrintAST.expected b/cpp/ql/test/library-tests/c11_generic/PrintAST.expected new file mode 100644 index 00000000000..67583c896c6 --- /dev/null +++ b/cpp/ql/test/library-tests/c11_generic/PrintAST.expected @@ -0,0 +1,458 @@ +#-----| [CopyAssignmentOperator] __va_list_tag& __va_list_tag::operator=(__va_list_tag const&) +#-----| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [LValueReferenceType] const __va_list_tag & +#-----| [MoveAssignmentOperator] __va_list_tag& __va_list_tag::operator=(__va_list_tag&&) +#-----| : +#-----| getParameter(0): [Parameter] (unnamed parameter 0) +#-----| Type = [RValueReferenceType] __va_list_tag && +generic.c: +# 3| [FormattingFunction,TopLevelFunction] int printf(char const*) +# 3| : +# 3| getParameter(0): [Parameter] format +# 3| Type = [PointerType] const char * +# 14| [TopLevelFunction] int main() +# 14| : +# 15| getEntryPoint(): [BlockStmt] { ... } +# 16| getStmt(0): [DeclStmt] declaration +# 16| getDeclarationEntry(0): [VariableDeclarationEntry] definition of i +# 16| Type = [IntType] int +# 17| getStmt(1): [DeclStmt] declaration +# 17| getDeclarationEntry(0): [VariableDeclarationEntry] definition of m +# 17| Type = [CTypedefType] MYINT +# 18| getStmt(2): [DeclStmt] declaration +# 18| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 18| Type = [PointerType] const char * +# 19| getStmt(3): [DeclStmt] declaration +# 19| getDeclarationEntry(0): [VariableDeclarationEntry] definition of f +# 19| Type = [PointerType] float *** +# 21| getStmt(4): [ExprStmt] ExprStmt +# 21| getExpr(): [FormattingFunctionCall,FunctionCall] call to printf +# 21| Type = [IntType] int +# 21| ValueCategory = prvalue +# 21| getArgument(0): i is %s\n +# 21| Type = [ArrayType] char[9] +# 21| Value = [StringLiteral] "i is %s\n" +# 21| ValueCategory = lvalue +# 21| getArgument(1): int +# 21| Type = [ArrayType] char[4] +# 21| Value = [StringLiteral] "int" +# 21| ValueCategory = lvalue +# 21| getArgument(0).getFullyConverted(): [CStyleCast] (const char *)... +# 21| Conversion = [PointerConversion] pointer conversion +# 21| Type = [PointerType] const char * +# 21| ValueCategory = prvalue +# 21| getExpr(): [ArrayToPointerConversion] array to pointer conversion +# 21| Type = [CharPointerType] char * +# 21| ValueCategory = prvalue +# 21| getArgument(1).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 21| Type = [CharPointerType] char * +# 21| ValueCategory = prvalue +# 21| getExpr(): [C11GenericExpr] _Generic +# 21| Type = [ArrayType] char[4] +# 21| Value = [C11GenericExpr] int +# 21| ValueCategory = lvalue +# 21| getControllingExpr(): [VariableAccess] i +# 21| Type = [IntType] int +# 21| ValueCategory = prvalue(load) +# 21| getAssociationType(0): [TypeName] int +# 21| Type = [IntType] int +# 21| ValueCategory = prvalue +# 21| getAssociationExpr(0): [ReuseExpr] reuse of int +# 21| Type = [ArrayType] char[4] +# 21| ValueCategory = lvalue +# 21| getAssociationType(1): [TypeName] const char * +# 21| Type = [PointerType] const char * +# 21| ValueCategory = prvalue +# 21| getAssociationExpr(1): string +# 21| Type = [ArrayType] char[7] +# 21| Value = [StringLiteral] "string" +# 21| ValueCategory = lvalue +# 21| getAssociationType(2): [TypeName] void +# 21| Type = [VoidType] void +# 21| ValueCategory = prvalue +# 21| getAssociationExpr(2): unknown +# 21| Type = [ArrayType] char[8] +# 21| Value = [StringLiteral] "unknown" +# 21| ValueCategory = lvalue +# 21| getControllingExpr().getFullyConverted(): [ParenthesisExpr] (...) +# 21| Type = [IntType] int +# 21| ValueCategory = prvalue(load) +# 22| getStmt(5): [ExprStmt] ExprStmt +# 22| getExpr(): [FormattingFunctionCall,FunctionCall] call to printf +# 22| Type = [IntType] int +# 22| ValueCategory = prvalue +# 22| getArgument(0): c is %s\n +# 22| Type = [ArrayType] char[9] +# 22| Value = [StringLiteral] "c is %s\n" +# 22| ValueCategory = lvalue +# 22| getArgument(1): int +# 22| Type = [ArrayType] char[4] +# 22| Value = [StringLiteral] "int" +# 22| ValueCategory = lvalue +# 22| getArgument(0).getFullyConverted(): [CStyleCast] (const char *)... +# 22| Conversion = [PointerConversion] pointer conversion +# 22| Type = [PointerType] const char * +# 22| ValueCategory = prvalue +# 22| getExpr(): [ArrayToPointerConversion] array to pointer conversion +# 22| Type = [CharPointerType] char * +# 22| ValueCategory = prvalue +# 22| getArgument(1).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 22| Type = [CharPointerType] char * +# 22| ValueCategory = prvalue +# 22| getExpr(): [C11GenericExpr] _Generic +# 22| Type = [ArrayType] char[4] +# 22| Value = [C11GenericExpr] int +# 22| ValueCategory = lvalue +# 22| getControllingExpr(): [VariableAccess] m +# 22| Type = [CTypedefType] MYINT +# 22| ValueCategory = prvalue(load) +# 22| getAssociationType(0): [TypeName] int +# 22| Type = [IntType] int +# 22| ValueCategory = prvalue +# 22| getAssociationExpr(0): [ReuseExpr] reuse of int +# 22| Type = [ArrayType] char[4] +# 22| ValueCategory = lvalue +# 22| getAssociationType(1): [TypeName] const char * +# 22| Type = [PointerType] const char * +# 22| ValueCategory = prvalue +# 22| getAssociationExpr(1): string +# 22| Type = [ArrayType] char[7] +# 22| Value = [StringLiteral] "string" +# 22| ValueCategory = lvalue +# 22| getAssociationType(2): [TypeName] void +# 22| Type = [VoidType] void +# 22| ValueCategory = prvalue +# 22| getAssociationExpr(2): unknown +# 22| Type = [ArrayType] char[8] +# 22| Value = [StringLiteral] "unknown" +# 22| ValueCategory = lvalue +# 22| getControllingExpr().getFullyConverted(): [ParenthesisExpr] (...) +# 22| Type = [CTypedefType] MYINT +# 22| ValueCategory = prvalue(load) +# 23| getStmt(6): [ExprStmt] ExprStmt +# 23| getExpr(): [FormattingFunctionCall,FunctionCall] call to printf +# 23| Type = [IntType] int +# 23| ValueCategory = prvalue +# 23| getArgument(0): s is %s\n +# 23| Type = [ArrayType] char[9] +# 23| Value = [StringLiteral] "s is %s\n" +# 23| ValueCategory = lvalue +# 23| getArgument(1): string +# 23| Type = [ArrayType] char[7] +# 23| Value = [StringLiteral] "string" +# 23| ValueCategory = lvalue +# 23| getArgument(0).getFullyConverted(): [CStyleCast] (const char *)... +# 23| Conversion = [PointerConversion] pointer conversion +# 23| Type = [PointerType] const char * +# 23| ValueCategory = prvalue +# 23| getExpr(): [ArrayToPointerConversion] array to pointer conversion +# 23| Type = [CharPointerType] char * +# 23| ValueCategory = prvalue +# 23| getArgument(1).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 23| Type = [CharPointerType] char * +# 23| ValueCategory = prvalue +# 23| getExpr(): [C11GenericExpr] _Generic +# 23| Type = [ArrayType] char[7] +# 23| Value = [C11GenericExpr] string +# 23| ValueCategory = lvalue +# 23| getControllingExpr(): [VariableAccess] s +# 23| Type = [PointerType] const char * +# 23| ValueCategory = prvalue(load) +# 23| getAssociationType(0): [TypeName] int +# 23| Type = [IntType] int +# 23| ValueCategory = prvalue +# 23| getAssociationExpr(0): int +# 23| Type = [ArrayType] char[4] +# 23| Value = [StringLiteral] "int" +# 23| ValueCategory = lvalue +# 23| getAssociationType(1): [TypeName] const char * +# 23| Type = [PointerType] const char * +# 23| ValueCategory = prvalue +# 23| getAssociationExpr(1): [ReuseExpr] reuse of string +# 23| Type = [ArrayType] char[7] +# 23| ValueCategory = lvalue +# 23| getAssociationType(2): [TypeName] void +# 23| Type = [VoidType] void +# 23| ValueCategory = prvalue +# 23| getAssociationExpr(2): unknown +# 23| Type = [ArrayType] char[8] +# 23| Value = [StringLiteral] "unknown" +# 23| ValueCategory = lvalue +# 23| getControllingExpr().getFullyConverted(): [ParenthesisExpr] (...) +# 23| Type = [PointerType] const char * +# 23| ValueCategory = prvalue(load) +# 24| getStmt(7): [ExprStmt] ExprStmt +# 24| getExpr(): [FormattingFunctionCall,FunctionCall] call to printf +# 24| Type = [IntType] int +# 24| ValueCategory = prvalue +# 24| getArgument(0): f is %s\n +# 24| Type = [ArrayType] char[9] +# 24| Value = [StringLiteral] "f is %s\n" +# 24| ValueCategory = lvalue +# 24| getArgument(1): unknown +# 24| Type = [ArrayType] char[8] +# 24| Value = [StringLiteral] "unknown" +# 24| ValueCategory = lvalue +# 24| getArgument(0).getFullyConverted(): [CStyleCast] (const char *)... +# 24| Conversion = [PointerConversion] pointer conversion +# 24| Type = [PointerType] const char * +# 24| ValueCategory = prvalue +# 24| getExpr(): [ArrayToPointerConversion] array to pointer conversion +# 24| Type = [CharPointerType] char * +# 24| ValueCategory = prvalue +# 24| getArgument(1).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 24| Type = [CharPointerType] char * +# 24| ValueCategory = prvalue +# 24| getExpr(): [C11GenericExpr] _Generic +# 24| Type = [ArrayType] char[8] +# 24| Value = [C11GenericExpr] unknown +# 24| ValueCategory = lvalue +# 24| getControllingExpr(): [VariableAccess] f +# 24| Type = [PointerType] float *** +# 24| ValueCategory = prvalue(load) +# 24| getAssociationType(0): [TypeName] int +# 24| Type = [IntType] int +# 24| ValueCategory = prvalue +# 24| getAssociationExpr(0): int +# 24| Type = [ArrayType] char[4] +# 24| Value = [StringLiteral] "int" +# 24| ValueCategory = lvalue +# 24| getAssociationType(1): [TypeName] const char * +# 24| Type = [PointerType] const char * +# 24| ValueCategory = prvalue +# 24| getAssociationExpr(1): string +# 24| Type = [ArrayType] char[7] +# 24| Value = [StringLiteral] "string" +# 24| ValueCategory = lvalue +# 24| getAssociationType(2): [TypeName] void +# 24| Type = [VoidType] void +# 24| ValueCategory = prvalue +# 24| getAssociationExpr(2): [ReuseExpr] reuse of unknown +# 24| Type = [ArrayType] char[8] +# 24| ValueCategory = lvalue +# 24| getControllingExpr().getFullyConverted(): [ParenthesisExpr] (...) +# 24| Type = [PointerType] float *** +# 24| ValueCategory = prvalue(load) +# 25| getStmt(8): [ReturnStmt] return ... +#-----| getExpr(): [Literal] 0 +#-----| Type = [IntType] int +#-----| Value = [Literal] 0 +#-----| ValueCategory = prvalue +generic.cpp: +# 4| [FormattingFunction,TopLevelFunction] int printf(char const*) +# 4| : +# 4| getParameter(0): [Parameter] format +# 4| Type = [PointerType] const char * +# 15| [TopLevelFunction] int main() +# 15| : +# 16| getEntryPoint(): [BlockStmt] { ... } +# 17| getStmt(0): [DeclStmt] declaration +# 17| getDeclarationEntry(0): [VariableDeclarationEntry] definition of i +# 17| Type = [IntType] int +# 18| getStmt(1): [DeclStmt] declaration +# 18| getDeclarationEntry(0): [VariableDeclarationEntry] definition of m +# 18| Type = [CTypedefType] MYINT +# 19| getStmt(2): [DeclStmt] declaration +# 19| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s +# 19| Type = [PointerType] const char * +# 20| getStmt(3): [DeclStmt] declaration +# 20| getDeclarationEntry(0): [VariableDeclarationEntry] definition of f +# 20| Type = [PointerType] float *** +# 22| getStmt(4): [ExprStmt] ExprStmt +# 22| getExpr(): [FormattingFunctionCall,FunctionCall] call to printf +# 22| Type = [IntType] int +# 22| ValueCategory = prvalue +# 22| getArgument(0): i is %s\n +# 22| Type = [ArrayType] const char[9] +# 22| Value = [StringLiteral] "i is %s\n" +# 22| ValueCategory = lvalue +# 22| getArgument(1): int +# 22| Type = [ArrayType] const char[4] +# 22| Value = [StringLiteral] "int" +# 22| ValueCategory = lvalue +# 22| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 22| Type = [PointerType] const char * +# 22| ValueCategory = prvalue +# 22| getArgument(1).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 22| Type = [PointerType] const char * +# 22| ValueCategory = prvalue +# 22| getExpr(): [C11GenericExpr] _Generic +# 22| Type = [ArrayType] const char[4] +# 22| Value = [C11GenericExpr] int +# 22| ValueCategory = lvalue +# 22| getControllingExpr(): [VariableAccess] i +# 22| Type = [IntType] int +# 22| ValueCategory = lvalue +# 22| getAssociationType(0): [TypeName] int +# 22| Type = [IntType] int +# 22| ValueCategory = prvalue +# 22| getAssociationExpr(0): [ReuseExpr] reuse of int +# 22| Type = [ArrayType] const char[4] +# 22| ValueCategory = lvalue +# 22| getAssociationType(1): [TypeName] const char * +# 22| Type = [PointerType] const char * +# 22| ValueCategory = prvalue +# 22| getAssociationExpr(1): string +# 22| Type = [ArrayType] const char[7] +# 22| Value = [StringLiteral] "string" +# 22| ValueCategory = lvalue +# 22| getAssociationType(2): [TypeName] void +# 22| Type = [VoidType] void +# 22| ValueCategory = prvalue +# 22| getAssociationExpr(2): unknown +# 22| Type = [ArrayType] const char[8] +# 22| Value = [StringLiteral] "unknown" +# 22| ValueCategory = lvalue +# 22| getControllingExpr().getFullyConverted(): [ParenthesisExpr] (...) +# 22| Type = [IntType] int +# 22| ValueCategory = lvalue +# 23| getStmt(5): [ExprStmt] ExprStmt +# 23| getExpr(): [FormattingFunctionCall,FunctionCall] call to printf +# 23| Type = [IntType] int +# 23| ValueCategory = prvalue +# 23| getArgument(0): c is %s\n +# 23| Type = [ArrayType] const char[9] +# 23| Value = [StringLiteral] "c is %s\n" +# 23| ValueCategory = lvalue +# 23| getArgument(1): int +# 23| Type = [ArrayType] const char[4] +# 23| Value = [StringLiteral] "int" +# 23| ValueCategory = lvalue +# 23| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 23| Type = [PointerType] const char * +# 23| ValueCategory = prvalue +# 23| getArgument(1).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 23| Type = [PointerType] const char * +# 23| ValueCategory = prvalue +# 23| getExpr(): [C11GenericExpr] _Generic +# 23| Type = [ArrayType] const char[4] +# 23| Value = [C11GenericExpr] int +# 23| ValueCategory = lvalue +# 23| getControllingExpr(): [VariableAccess] m +# 23| Type = [CTypedefType] MYINT +# 23| ValueCategory = lvalue +# 23| getAssociationType(0): [TypeName] int +# 23| Type = [IntType] int +# 23| ValueCategory = prvalue +# 23| getAssociationExpr(0): [ReuseExpr] reuse of int +# 23| Type = [ArrayType] const char[4] +# 23| ValueCategory = lvalue +# 23| getAssociationType(1): [TypeName] const char * +# 23| Type = [PointerType] const char * +# 23| ValueCategory = prvalue +# 23| getAssociationExpr(1): string +# 23| Type = [ArrayType] const char[7] +# 23| Value = [StringLiteral] "string" +# 23| ValueCategory = lvalue +# 23| getAssociationType(2): [TypeName] void +# 23| Type = [VoidType] void +# 23| ValueCategory = prvalue +# 23| getAssociationExpr(2): unknown +# 23| Type = [ArrayType] const char[8] +# 23| Value = [StringLiteral] "unknown" +# 23| ValueCategory = lvalue +# 23| getControllingExpr().getFullyConverted(): [ParenthesisExpr] (...) +# 23| Type = [CTypedefType] MYINT +# 23| ValueCategory = lvalue +# 24| getStmt(6): [ExprStmt] ExprStmt +# 24| getExpr(): [FormattingFunctionCall,FunctionCall] call to printf +# 24| Type = [IntType] int +# 24| ValueCategory = prvalue +# 24| getArgument(0): s is %s\n +# 24| Type = [ArrayType] const char[9] +# 24| Value = [StringLiteral] "s is %s\n" +# 24| ValueCategory = lvalue +# 24| getArgument(1): string +# 24| Type = [ArrayType] const char[7] +# 24| Value = [StringLiteral] "string" +# 24| ValueCategory = lvalue +# 24| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 24| Type = [PointerType] const char * +# 24| ValueCategory = prvalue +# 24| getArgument(1).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 24| Type = [PointerType] const char * +# 24| ValueCategory = prvalue +# 24| getExpr(): [C11GenericExpr] _Generic +# 24| Type = [ArrayType] const char[7] +# 24| Value = [C11GenericExpr] string +# 24| ValueCategory = lvalue +# 24| getControllingExpr(): [VariableAccess] s +# 24| Type = [PointerType] const char * +# 24| ValueCategory = lvalue +# 24| getAssociationType(0): [TypeName] int +# 24| Type = [IntType] int +# 24| ValueCategory = prvalue +# 24| getAssociationExpr(0): int +# 24| Type = [ArrayType] const char[4] +# 24| Value = [StringLiteral] "int" +# 24| ValueCategory = lvalue +# 24| getAssociationType(1): [TypeName] const char * +# 24| Type = [PointerType] const char * +# 24| ValueCategory = prvalue +# 24| getAssociationExpr(1): [ReuseExpr] reuse of string +# 24| Type = [ArrayType] const char[7] +# 24| ValueCategory = lvalue +# 24| getAssociationType(2): [TypeName] void +# 24| Type = [VoidType] void +# 24| ValueCategory = prvalue +# 24| getAssociationExpr(2): unknown +# 24| Type = [ArrayType] const char[8] +# 24| Value = [StringLiteral] "unknown" +# 24| ValueCategory = lvalue +# 24| getControllingExpr().getFullyConverted(): [ParenthesisExpr] (...) +# 24| Type = [PointerType] const char * +# 24| ValueCategory = lvalue +# 25| getStmt(7): [ExprStmt] ExprStmt +# 25| getExpr(): [FormattingFunctionCall,FunctionCall] call to printf +# 25| Type = [IntType] int +# 25| ValueCategory = prvalue +# 25| getArgument(0): f is %s\n +# 25| Type = [ArrayType] const char[9] +# 25| Value = [StringLiteral] "f is %s\n" +# 25| ValueCategory = lvalue +# 25| getArgument(1): unknown +# 25| Type = [ArrayType] const char[8] +# 25| Value = [StringLiteral] "unknown" +# 25| ValueCategory = lvalue +# 25| getArgument(0).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 25| Type = [PointerType] const char * +# 25| ValueCategory = prvalue +# 25| getArgument(1).getFullyConverted(): [ArrayToPointerConversion] array to pointer conversion +# 25| Type = [PointerType] const char * +# 25| ValueCategory = prvalue +# 25| getExpr(): [C11GenericExpr] _Generic +# 25| Type = [ArrayType] const char[8] +# 25| Value = [C11GenericExpr] unknown +# 25| ValueCategory = lvalue +# 25| getControllingExpr(): [VariableAccess] f +# 25| Type = [PointerType] float *** +# 25| ValueCategory = lvalue +# 25| getAssociationType(0): [TypeName] int +# 25| Type = [IntType] int +# 25| ValueCategory = prvalue +# 25| getAssociationExpr(0): int +# 25| Type = [ArrayType] const char[4] +# 25| Value = [StringLiteral] "int" +# 25| ValueCategory = lvalue +# 25| getAssociationType(1): [TypeName] const char * +# 25| Type = [PointerType] const char * +# 25| ValueCategory = prvalue +# 25| getAssociationExpr(1): string +# 25| Type = [ArrayType] const char[7] +# 25| Value = [StringLiteral] "string" +# 25| ValueCategory = lvalue +# 25| getAssociationType(2): [TypeName] void +# 25| Type = [VoidType] void +# 25| ValueCategory = prvalue +# 25| getAssociationExpr(2): [ReuseExpr] reuse of unknown +# 25| Type = [ArrayType] const char[8] +# 25| ValueCategory = lvalue +# 25| getControllingExpr().getFullyConverted(): [ParenthesisExpr] (...) +# 25| Type = [PointerType] float *** +# 25| ValueCategory = lvalue +# 26| getStmt(8): [ReturnStmt] return ... +#-----| getExpr(): [Literal] 0 +#-----| Type = [IntType] int +#-----| Value = [Literal] 0 +#-----| ValueCategory = prvalue diff --git a/cpp/ql/test/library-tests/c11_generic/PrintAST.qlref b/cpp/ql/test/library-tests/c11_generic/PrintAST.qlref new file mode 100644 index 00000000000..6f85a6dbe69 --- /dev/null +++ b/cpp/ql/test/library-tests/c11_generic/PrintAST.qlref @@ -0,0 +1 @@ +semmle/code/cpp/PrintAST.ql diff --git a/cpp/ql/test/library-tests/c11_generic/macro_invocation.expected b/cpp/ql/test/library-tests/c11_generic/macro_invocation.expected new file mode 100644 index 00000000000..a022878b4ea --- /dev/null +++ b/cpp/ql/test/library-tests/c11_generic/macro_invocation.expected @@ -0,0 +1,8 @@ +| generic.c:21:22:21:32 | _Generic | generic.c:21:22:21:32 | describe(val) | +| generic.c:22:22:22:32 | _Generic | generic.c:22:22:22:32 | describe(val) | +| generic.c:23:22:23:32 | _Generic | generic.c:23:22:23:32 | describe(val) | +| generic.c:24:22:24:32 | _Generic | generic.c:24:22:24:32 | describe(val) | +| generic.cpp:22:22:22:32 | _Generic | generic.cpp:22:22:22:32 | describe(val) | +| generic.cpp:23:22:23:32 | _Generic | generic.cpp:23:22:23:32 | describe(val) | +| generic.cpp:24:22:24:32 | _Generic | generic.cpp:24:22:24:32 | describe(val) | +| generic.cpp:25:22:25:32 | _Generic | generic.cpp:25:22:25:32 | describe(val) | diff --git a/cpp/ql/test/library-tests/c11_generic/macro_invocation.ql b/cpp/ql/test/library-tests/c11_generic/macro_invocation.ql new file mode 100644 index 00000000000..c63e4c8114e --- /dev/null +++ b/cpp/ql/test/library-tests/c11_generic/macro_invocation.ql @@ -0,0 +1,5 @@ +import cpp + +from C11GenericExpr g, MacroInvocation m +where m.getAnExpandedElement() = g +select g, m diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected index 109f5ffebd1..d97abde482e 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected @@ -33,7 +33,7 @@ argHasPostUpdate | test.cpp:67:29:67:35 | source1 | ArgumentNode is missing PostUpdateNode. | | test.cpp:813:19:813:35 | * ... | ArgumentNode is missing PostUpdateNode. | | test.cpp:848:23:848:25 | rpx | ArgumentNode is missing PostUpdateNode. | -| test.cpp:1057:19:1057:21 | * ... | ArgumentNode is missing PostUpdateNode. | +| test.cpp:1093:19:1093:21 | * ... | ArgumentNode is missing PostUpdateNode. | postWithInFlow | BarrierGuard.cpp:49:6:49:6 | x [post update] | PostUpdateNode should not be the target of local flow. | | BarrierGuard.cpp:60:7:60:7 | x [post update] | PostUpdateNode should not be the target of local flow. | @@ -167,15 +167,17 @@ postWithInFlow | test.cpp:932:5:932:19 | * ... [post update] | PostUpdateNode should not be the target of local flow. | | test.cpp:932:6:932:19 | global_pointer [inner post update] | PostUpdateNode should not be the target of local flow. | | test.cpp:1045:9:1045:11 | ref arg buf | PostUpdateNode should not be the target of local flow. | -| test.cpp:1051:5:1051:11 | content [post update] | PostUpdateNode should not be the target of local flow. | -| test.cpp:1052:9:1052:9 | a [inner post update] | PostUpdateNode should not be the target of local flow. | -| test.cpp:1056:5:1056:7 | * ... [post update] | PostUpdateNode should not be the target of local flow. | -| test.cpp:1056:6:1056:7 | pp [inner post update] | PostUpdateNode should not be the target of local flow. | -| test.cpp:1062:53:1062:53 | p [inner post update] | PostUpdateNode should not be the target of local flow. | -| test.cpp:1072:3:1072:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. | -| test.cpp:1072:4:1072:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. | -| test.cpp:1073:3:1073:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. | -| test.cpp:1073:4:1073:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. | +| test.cpp:1066:5:1066:5 | i [post update] | PostUpdateNode should not be the target of local flow. | +| test.cpp:1069:5:1069:5 | i [post update] | PostUpdateNode should not be the target of local flow. | +| test.cpp:1087:5:1087:11 | content [post update] | PostUpdateNode should not be the target of local flow. | +| test.cpp:1088:9:1088:9 | a [inner post update] | PostUpdateNode should not be the target of local flow. | +| test.cpp:1092:5:1092:7 | * ... [post update] | PostUpdateNode should not be the target of local flow. | +| test.cpp:1092:6:1092:7 | pp [inner post update] | PostUpdateNode should not be the target of local flow. | +| test.cpp:1098:53:1098:53 | p [inner post update] | PostUpdateNode should not be the target of local flow. | +| test.cpp:1108:3:1108:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. | +| test.cpp:1108:4:1108:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. | +| test.cpp:1109:3:1109:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. | +| test.cpp:1109:4:1109:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. | viableImplInCallContextTooLarge uniqueParameterNodeAtPosition uniqueParameterNodePosition diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected index cc0903c1efb..064a53e8d12 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected @@ -26,6 +26,10 @@ postWithInFlow | test.cpp:400:10:400:13 | memcpy output argument | PostUpdateNode should not be the target of local flow. | | test.cpp:407:10:407:13 | memcpy output argument | PostUpdateNode should not be the target of local flow. | | test.cpp:1045:9:1045:11 | memset output argument | PostUpdateNode should not be the target of local flow. | +| test.cpp:1076:2:1076:3 | swap output argument | PostUpdateNode should not be the target of local flow. | +| test.cpp:1076:10:1076:11 | swap output argument | PostUpdateNode should not be the target of local flow. | +| test.cpp:1077:2:1077:3 | swap output argument | PostUpdateNode should not be the target of local flow. | +| test.cpp:1077:10:1077:11 | swap output argument | PostUpdateNode should not be the target of local flow. | viableImplInCallContextTooLarge uniqueParameterNodeAtPosition uniqueParameterNodePosition diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow-ir.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow-ir.expected index f6c8375660c..c1dedd454b6 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow-ir.expected +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow-ir.expected @@ -202,12 +202,12 @@ | test.cpp:489:23:489:29 | *content | test.cpp:490:8:490:17 | * ... | | test.cpp:489:23:489:29 | content | test.cpp:489:23:489:29 | content | | test.cpp:489:23:489:29 | content | test.cpp:490:9:490:17 | p_content | -| test.cpp:1050:12:1050:12 | definition of a | test.cpp:1051:3:1051:3 | *a | -| test.cpp:1051:3:1051:3 | *a | test.cpp:1052:8:1052:9 | *& ... | -| test.cpp:1051:3:1051:3 | *a [post update] | test.cpp:1052:8:1052:9 | *& ... | -| test.cpp:1051:3:1051:3 | a | test.cpp:1052:8:1052:9 | & ... | -| test.cpp:1051:3:1051:3 | a [post update] | test.cpp:1052:8:1052:9 | & ... | -| test.cpp:1051:15:1051:21 | 0 | test.cpp:1051:3:1051:21 | ... = ... | -| test.cpp:1051:15:1051:21 | *0 | test.cpp:1051:3:1051:21 | *... = ... | -| test.cpp:1052:9:1052:9 | *a | test.cpp:1052:8:1052:9 | *& ... | -| test.cpp:1052:9:1052:9 | a | test.cpp:1052:8:1052:9 | & ... | +| test.cpp:1086:12:1086:12 | definition of a | test.cpp:1087:3:1087:3 | *a | +| test.cpp:1087:3:1087:3 | *a | test.cpp:1088:8:1088:9 | *& ... | +| test.cpp:1087:3:1087:3 | *a [post update] | test.cpp:1088:8:1088:9 | *& ... | +| test.cpp:1087:3:1087:3 | a | test.cpp:1088:8:1088:9 | & ... | +| test.cpp:1087:3:1087:3 | a [post update] | test.cpp:1088:8:1088:9 | & ... | +| test.cpp:1087:15:1087:21 | 0 | test.cpp:1087:3:1087:21 | ... = ... | +| test.cpp:1087:15:1087:21 | *0 | test.cpp:1087:3:1087:21 | *... = ... | +| test.cpp:1088:9:1088:9 | *a | test.cpp:1088:8:1088:9 | *& ... | +| test.cpp:1088:9:1088:9 | a | test.cpp:1088:8:1088:9 | & ... | diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow.expected index 2e0a1ce81ce..311b2d7f61c 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow.expected +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/localFlow.expected @@ -81,10 +81,10 @@ WARNING: module 'DataFlow' has been deprecated and may be removed in future (loc | test.cpp:488:21:488:21 | s [post update] | test.cpp:489:20:489:20 | s | | test.cpp:488:24:488:30 | ref arg content | test.cpp:489:23:489:29 | content | | test.cpp:489:23:489:29 | content | test.cpp:490:9:490:17 | p_content | -| test.cpp:1050:12:1050:12 | a | test.cpp:1051:3:1051:3 | a | -| test.cpp:1050:12:1050:12 | a | test.cpp:1052:9:1052:9 | a | -| test.cpp:1051:3:1051:3 | a [post update] | test.cpp:1052:9:1052:9 | a | -| test.cpp:1051:3:1051:21 | ... = ... | test.cpp:1051:5:1051:11 | content [post update] | -| test.cpp:1051:15:1051:21 | 0 | test.cpp:1051:3:1051:21 | ... = ... | -| test.cpp:1052:8:1052:9 | ref arg & ... | test.cpp:1052:9:1052:9 | a [inner post update] | -| test.cpp:1052:9:1052:9 | a | test.cpp:1052:8:1052:9 | & ... | +| test.cpp:1086:12:1086:12 | a | test.cpp:1087:3:1087:3 | a | +| test.cpp:1086:12:1086:12 | a | test.cpp:1088:9:1088:9 | a | +| test.cpp:1087:3:1087:3 | a [post update] | test.cpp:1088:9:1088:9 | a | +| test.cpp:1087:3:1087:21 | ... = ... | test.cpp:1087:5:1087:11 | content [post update] | +| test.cpp:1087:15:1087:21 | 0 | test.cpp:1087:3:1087:21 | ... = ... | +| test.cpp:1088:8:1088:9 | ref arg & ... | test.cpp:1088:9:1088:9 | a [inner post update] | +| test.cpp:1088:9:1088:9 | a | test.cpp:1088:8:1088:9 | & ... | diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected index ac26a0c76ec..90f797429c9 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test-source-sink.expected @@ -127,7 +127,11 @@ astFlow | test.cpp:842:11:842:16 | call to source | test.cpp:844:8:844:8 | y | | test.cpp:846:13:846:27 | call to indirect_source | test.cpp:848:23:848:25 | rpx | | test.cpp:860:54:860:59 | call to source | test.cpp:861:10:861:37 | static_local_pointer_dynamic | -| test.cpp:1050:12:1050:12 | a | test.cpp:1052:8:1052:9 | & ... | +| test.cpp:1066:9:1066:14 | call to source | test.cpp:1072:10:1072:10 | i | +| test.cpp:1066:9:1066:14 | call to source | test.cpp:1080:10:1080:10 | i | +| test.cpp:1069:9:1069:14 | call to source | test.cpp:1074:10:1074:10 | i | +| test.cpp:1069:9:1069:14 | call to source | test.cpp:1082:10:1082:10 | i | +| test.cpp:1086:12:1086:12 | a | test.cpp:1088:8:1088:9 | & ... | | true_upon_entry.cpp:17:11:17:16 | call to source | true_upon_entry.cpp:21:8:21:8 | x | | true_upon_entry.cpp:27:9:27:14 | call to source | true_upon_entry.cpp:29:8:29:8 | x | | true_upon_entry.cpp:33:11:33:16 | call to source | true_upon_entry.cpp:39:8:39:8 | x | @@ -313,7 +317,12 @@ irFlow | test.cpp:1021:18:1021:32 | *call to indirect_source | test.cpp:1027:19:1027:28 | *translated | | test.cpp:1021:18:1021:32 | *call to indirect_source | test.cpp:1031:19:1031:28 | *translated | | test.cpp:1045:14:1045:19 | call to source | test.cpp:1046:7:1046:10 | * ... | -| test.cpp:1081:27:1081:34 | call to source | test.cpp:1081:27:1081:34 | call to source | +| test.cpp:1052:13:1052:27 | *call to indirect_source | test.cpp:1054:7:1054:11 | * ... | +| test.cpp:1066:9:1066:14 | call to source | test.cpp:1072:10:1072:10 | i | +| test.cpp:1066:9:1066:14 | call to source | test.cpp:1079:10:1079:10 | i | +| test.cpp:1069:9:1069:14 | call to source | test.cpp:1074:10:1074:10 | i | +| test.cpp:1069:9:1069:14 | call to source | test.cpp:1081:10:1081:10 | i | +| test.cpp:1117:27:1117:34 | call to source | test.cpp:1117:27:1117:34 | call to source | | true_upon_entry.cpp:9:11:9:16 | call to source | true_upon_entry.cpp:13:8:13:8 | x | | true_upon_entry.cpp:17:11:17:16 | call to source | true_upon_entry.cpp:21:8:21:8 | x | | true_upon_entry.cpp:27:9:27:14 | call to source | true_upon_entry.cpp:29:8:29:8 | x | diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp index ae6b76b88ca..3a6ffe9b716 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp @@ -1046,6 +1046,42 @@ void memset_test(char* buf) { // $ ast-def=buf ir-def=*buf sink(*buf); // $ ir MISSING: ast } +void *realloc(void *, size_t); + +void test_realloc() { + int *src = indirect_source(); + int *dest = (int*)realloc(src, sizeof(int)); + sink(*dest); // $ ir, MISSING: ast +} + +struct MyInt { + int i; + MyInt(); + void swap(MyInt &j); +}; + +void test_member_swap() { + MyInt s1; + MyInt s2; + s2.i = source(); + MyInt s3; + MyInt s4; + s4.i = source(); + + sink(s1.i); + sink(s2.i); // $ ast,ir + sink(s3.i); + sink(s4.i); // $ ast,ir + + s1.swap(s2); + s4.swap(s3); + + sink(s1.i); // $ ir + sink(s2.i); // $ SPURIOUS: ast + sink(s3.i); // $ ir + sink(s4.i); // $ SPURIOUS: ast +} + void flow_out_of_address_with_local_flow() { MyStruct a; a.content = nullptr; diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/type-bugs.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/type-bugs.expected index b79e7cd4271..02f5544fe14 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/type-bugs.expected +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/type-bugs.expected @@ -51,5 +51,5 @@ incorrectBaseType | test.cpp:848:23:848:25 | rpx | Expected 'Node.getType()' to be int, but it was int * | | test.cpp:854:10:854:36 | * ... | Expected 'Node.getType()' to be const int, but it was int | | test.cpp:867:10:867:30 | * ... | Expected 'Node.getType()' to be const int, but it was int | -| test.cpp:1062:52:1062:53 | *& ... | Expected 'Node.getType()' to be char, but it was char * | +| test.cpp:1098:52:1098:53 | *& ... | Expected 'Node.getType()' to be char, but it was char * | failures diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/uninitialized.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/uninitialized.expected index fc230b0ed20..16f0b799d0a 100644 --- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/uninitialized.expected +++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/uninitialized.expected @@ -54,5 +54,5 @@ | test.cpp:796:12:796:12 | a | test.cpp:797:20:797:20 | a | | test.cpp:796:12:796:12 | a | test.cpp:797:31:797:31 | a | | test.cpp:796:12:796:12 | a | test.cpp:798:17:798:17 | a | -| test.cpp:1050:12:1050:12 | a | test.cpp:1051:3:1051:3 | a | -| test.cpp:1050:12:1050:12 | a | test.cpp:1052:9:1052:9 | a | +| test.cpp:1086:12:1086:12 | a | test.cpp:1087:3:1087:3 | a | +| test.cpp:1086:12:1086:12 | a | test.cpp:1088:9:1088:9 | a | diff --git a/cpp/ql/test/library-tests/dataflow/fields/Nodes.qll b/cpp/ql/test/library-tests/dataflow/fields/Nodes.qll index 8c4c547f4c8..f7d1065fd04 100644 --- a/cpp/ql/test/library-tests/dataflow/fields/Nodes.qll +++ b/cpp/ql/test/library-tests/dataflow/fields/Nodes.qll @@ -13,9 +13,6 @@ class Node extends TNode { AST::DataFlow::Node asAst() { none() } - /** DEPRECATED: Alias for asAst */ - deprecated AST::DataFlow::Node asAST() { result = this.asAst() } - Location getLocation() { none() } } @@ -28,9 +25,6 @@ class AstNode extends Node, TAstNode { override AST::DataFlow::Node asAst() { result = n } - /** DEPRECATED: Alias for asAst */ - deprecated override AST::DataFlow::Node asAST() { result = this.asAst() } - override Location getLocation() { result = n.getLocation() } } diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected b/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected index c6c5e86635d..80541c16115 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected @@ -554,19 +554,15 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | map.cpp:67:30:67:42 | call to pair | map.cpp:80:7:80:7 | l | | | map.cpp:67:30:67:42 | call to pair | map.cpp:81:7:81:7 | l | | | map.cpp:67:37:67:41 | 456 | map.cpp:67:30:67:42 | call to pair | TAINT | -| map.cpp:68:3:68:3 | i | map.cpp:68:10:68:10 | ref arg j | TAINT | | map.cpp:68:3:68:3 | ref arg i | map.cpp:70:7:70:7 | i | | | map.cpp:68:3:68:3 | ref arg i | map.cpp:71:7:71:7 | i | | | map.cpp:68:3:68:3 | ref arg i | map.cpp:72:7:72:7 | i | | -| map.cpp:68:10:68:10 | j | map.cpp:68:3:68:3 | ref arg i | TAINT | | map.cpp:68:10:68:10 | ref arg j | map.cpp:73:7:73:7 | j | | | map.cpp:68:10:68:10 | ref arg j | map.cpp:74:7:74:7 | j | | | map.cpp:68:10:68:10 | ref arg j | map.cpp:75:7:75:7 | j | | -| map.cpp:69:2:69:2 | k | map.cpp:69:9:69:9 | ref arg l | TAINT | | map.cpp:69:2:69:2 | ref arg k | map.cpp:76:7:76:7 | k | | | map.cpp:69:2:69:2 | ref arg k | map.cpp:77:7:77:7 | k | | | map.cpp:69:2:69:2 | ref arg k | map.cpp:78:7:78:7 | k | | -| map.cpp:69:9:69:9 | l | map.cpp:69:2:69:2 | ref arg k | TAINT | | map.cpp:69:9:69:9 | ref arg l | map.cpp:79:7:79:7 | l | | | map.cpp:69:9:69:9 | ref arg l | map.cpp:80:7:80:7 | l | | | map.cpp:69:9:69:9 | ref arg l | map.cpp:81:7:81:7 | l | | @@ -1065,16 +1061,12 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | map.cpp:194:7:194:9 | m16 | map.cpp:194:7:194:9 | call to map | | | map.cpp:195:7:195:9 | m17 | map.cpp:195:7:195:9 | call to map | | | map.cpp:196:7:196:9 | m18 | map.cpp:196:7:196:9 | call to map | | -| map.cpp:197:2:197:4 | m15 | map.cpp:197:11:197:13 | ref arg m16 | TAINT | | map.cpp:197:2:197:4 | ref arg m15 | map.cpp:199:7:199:9 | m15 | | | map.cpp:197:2:197:4 | ref arg m15 | map.cpp:252:1:252:1 | m15 | | -| map.cpp:197:11:197:13 | m16 | map.cpp:197:2:197:4 | ref arg m15 | TAINT | | map.cpp:197:11:197:13 | ref arg m16 | map.cpp:200:7:200:9 | m16 | | | map.cpp:197:11:197:13 | ref arg m16 | map.cpp:252:1:252:1 | m16 | | -| map.cpp:198:2:198:4 | m17 | map.cpp:198:11:198:13 | ref arg m18 | TAINT | | map.cpp:198:2:198:4 | ref arg m17 | map.cpp:201:7:201:9 | m17 | | | map.cpp:198:2:198:4 | ref arg m17 | map.cpp:252:1:252:1 | m17 | | -| map.cpp:198:11:198:13 | m18 | map.cpp:198:2:198:4 | ref arg m17 | TAINT | | map.cpp:198:11:198:13 | ref arg m18 | map.cpp:202:7:202:9 | m18 | | | map.cpp:198:11:198:13 | ref arg m18 | map.cpp:252:1:252:1 | m18 | | | map.cpp:199:7:199:9 | m15 | map.cpp:199:7:199:9 | call to map | | @@ -1747,16 +1739,12 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | map.cpp:343:7:343:9 | m16 | map.cpp:343:7:343:9 | call to unordered_map | | | map.cpp:344:7:344:9 | m17 | map.cpp:344:7:344:9 | call to unordered_map | | | map.cpp:345:7:345:9 | m18 | map.cpp:345:7:345:9 | call to unordered_map | | -| map.cpp:346:2:346:4 | m15 | map.cpp:346:11:346:13 | ref arg m16 | TAINT | | map.cpp:346:2:346:4 | ref arg m15 | map.cpp:348:7:348:9 | m15 | | | map.cpp:346:2:346:4 | ref arg m15 | map.cpp:438:1:438:1 | m15 | | -| map.cpp:346:11:346:13 | m16 | map.cpp:346:2:346:4 | ref arg m15 | TAINT | | map.cpp:346:11:346:13 | ref arg m16 | map.cpp:349:7:349:9 | m16 | | | map.cpp:346:11:346:13 | ref arg m16 | map.cpp:438:1:438:1 | m16 | | -| map.cpp:347:2:347:4 | m17 | map.cpp:347:11:347:13 | ref arg m18 | TAINT | | map.cpp:347:2:347:4 | ref arg m17 | map.cpp:350:7:350:9 | m17 | | | map.cpp:347:2:347:4 | ref arg m17 | map.cpp:438:1:438:1 | m17 | | -| map.cpp:347:11:347:13 | m18 | map.cpp:347:2:347:4 | ref arg m17 | TAINT | | map.cpp:347:11:347:13 | ref arg m18 | map.cpp:351:7:351:9 | m18 | | | map.cpp:347:11:347:13 | ref arg m18 | map.cpp:438:1:438:1 | m18 | | | map.cpp:348:7:348:9 | m15 | map.cpp:348:7:348:9 | call to unordered_map | | @@ -2579,16 +2567,12 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | set.cpp:81:7:81:9 | s15 | set.cpp:81:7:81:9 | call to set | | | set.cpp:82:2:82:4 | ref arg s12 | set.cpp:84:7:84:9 | s12 | | | set.cpp:82:2:82:4 | ref arg s12 | set.cpp:126:1:126:1 | s12 | | -| set.cpp:82:2:82:4 | s12 | set.cpp:82:11:82:13 | ref arg s13 | TAINT | | set.cpp:82:11:82:13 | ref arg s13 | set.cpp:85:7:85:9 | s13 | | | set.cpp:82:11:82:13 | ref arg s13 | set.cpp:126:1:126:1 | s13 | | -| set.cpp:82:11:82:13 | s13 | set.cpp:82:2:82:4 | ref arg s12 | TAINT | | set.cpp:83:2:83:4 | ref arg s14 | set.cpp:86:7:86:9 | s14 | | | set.cpp:83:2:83:4 | ref arg s14 | set.cpp:126:1:126:1 | s14 | | -| set.cpp:83:2:83:4 | s14 | set.cpp:83:11:83:13 | ref arg s15 | TAINT | | set.cpp:83:11:83:13 | ref arg s15 | set.cpp:87:7:87:9 | s15 | | | set.cpp:83:11:83:13 | ref arg s15 | set.cpp:126:1:126:1 | s15 | | -| set.cpp:83:11:83:13 | s15 | set.cpp:83:2:83:4 | ref arg s14 | TAINT | | set.cpp:84:7:84:9 | s12 | set.cpp:84:7:84:9 | call to set | | | set.cpp:85:7:85:9 | s13 | set.cpp:85:7:85:9 | call to set | | | set.cpp:86:7:86:9 | s14 | set.cpp:86:7:86:9 | call to set | | @@ -3066,16 +3050,12 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | set.cpp:193:7:193:9 | s15 | set.cpp:193:7:193:9 | call to unordered_set | | | set.cpp:194:2:194:4 | ref arg s12 | set.cpp:196:7:196:9 | s12 | | | set.cpp:194:2:194:4 | ref arg s12 | set.cpp:238:1:238:1 | s12 | | -| set.cpp:194:2:194:4 | s12 | set.cpp:194:11:194:13 | ref arg s13 | TAINT | | set.cpp:194:11:194:13 | ref arg s13 | set.cpp:197:7:197:9 | s13 | | | set.cpp:194:11:194:13 | ref arg s13 | set.cpp:238:1:238:1 | s13 | | -| set.cpp:194:11:194:13 | s13 | set.cpp:194:2:194:4 | ref arg s12 | TAINT | | set.cpp:195:2:195:4 | ref arg s14 | set.cpp:198:7:198:9 | s14 | | | set.cpp:195:2:195:4 | ref arg s14 | set.cpp:238:1:238:1 | s14 | | -| set.cpp:195:2:195:4 | s14 | set.cpp:195:11:195:13 | ref arg s15 | TAINT | | set.cpp:195:11:195:13 | ref arg s15 | set.cpp:199:7:199:9 | s15 | | | set.cpp:195:11:195:13 | ref arg s15 | set.cpp:238:1:238:1 | s15 | | -| set.cpp:195:11:195:13 | s15 | set.cpp:195:2:195:4 | ref arg s14 | TAINT | | set.cpp:196:7:196:9 | s12 | set.cpp:196:7:196:9 | call to unordered_set | | | set.cpp:197:7:197:9 | s13 | set.cpp:197:7:197:9 | call to unordered_set | | | set.cpp:198:7:198:9 | s14 | set.cpp:198:7:198:9 | call to unordered_set | | @@ -4047,13 +4027,9 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | string.cpp:272:17:272:25 | call to basic_string | string.cpp:280:2:280:3 | s4 | | | string.cpp:272:17:272:25 | call to basic_string | string.cpp:285:7:285:8 | s4 | | | string.cpp:279:2:279:3 | ref arg s1 | string.cpp:282:7:282:8 | s1 | | -| string.cpp:279:2:279:3 | s1 | string.cpp:279:10:279:11 | ref arg s2 | TAINT | | string.cpp:279:10:279:11 | ref arg s2 | string.cpp:283:7:283:8 | s2 | | -| string.cpp:279:10:279:11 | s2 | string.cpp:279:2:279:3 | ref arg s1 | TAINT | | string.cpp:280:2:280:3 | ref arg s4 | string.cpp:285:7:285:8 | s4 | | -| string.cpp:280:2:280:3 | s4 | string.cpp:280:10:280:11 | ref arg s3 | TAINT | | string.cpp:280:10:280:11 | ref arg s3 | string.cpp:284:7:284:8 | s3 | | -| string.cpp:280:10:280:11 | s3 | string.cpp:280:2:280:3 | ref arg s4 | TAINT | | string.cpp:289:17:289:22 | call to source | string.cpp:289:17:289:25 | call to basic_string | TAINT | | string.cpp:289:17:289:25 | call to basic_string | string.cpp:293:7:293:8 | s1 | | | string.cpp:289:17:289:25 | call to basic_string | string.cpp:297:2:297:3 | s1 | | @@ -4839,13 +4815,9 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | stringstream.cpp:115:24:115:32 | call to basic_stringstream | stringstream.cpp:118:2:118:4 | ss4 | | | stringstream.cpp:115:24:115:32 | call to basic_stringstream | stringstream.cpp:123:7:123:9 | ss4 | | | stringstream.cpp:117:2:117:4 | ref arg ss1 | stringstream.cpp:120:7:120:9 | ss1 | | -| stringstream.cpp:117:2:117:4 | ss1 | stringstream.cpp:117:11:117:13 | ref arg ss2 | TAINT | | stringstream.cpp:117:11:117:13 | ref arg ss2 | stringstream.cpp:121:7:121:9 | ss2 | | -| stringstream.cpp:117:11:117:13 | ss2 | stringstream.cpp:117:2:117:4 | ref arg ss1 | TAINT | | stringstream.cpp:118:2:118:4 | ref arg ss4 | stringstream.cpp:123:7:123:9 | ss4 | | -| stringstream.cpp:118:2:118:4 | ss4 | stringstream.cpp:118:11:118:13 | ref arg ss3 | TAINT | | stringstream.cpp:118:11:118:13 | ref arg ss3 | stringstream.cpp:122:7:122:9 | ss3 | | -| stringstream.cpp:118:11:118:13 | ss3 | stringstream.cpp:118:2:118:4 | ref arg ss4 | TAINT | | stringstream.cpp:128:20:128:22 | call to basic_stringstream | stringstream.cpp:142:7:142:9 | ss1 | | | stringstream.cpp:128:20:128:22 | call to basic_stringstream | stringstream.cpp:145:7:145:9 | ss1 | | | stringstream.cpp:128:20:128:22 | call to basic_stringstream | stringstream.cpp:153:7:153:9 | ss1 | | @@ -5413,9 +5385,7 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | swap1.cpp:24:9:24:13 | this | swap1.cpp:24:31:24:34 | this | | | swap1.cpp:24:23:24:26 | that | swap1.cpp:24:23:24:26 | that | | | swap1.cpp:24:23:24:26 | that | swap1.cpp:24:36:24:39 | that | | -| swap1.cpp:24:31:24:34 | this | swap1.cpp:24:36:24:39 | ref arg that | TAINT | | swap1.cpp:24:36:24:39 | ref arg that | swap1.cpp:24:23:24:26 | that | | -| swap1.cpp:24:36:24:39 | that | swap1.cpp:24:31:24:34 | ref arg this | TAINT | | swap1.cpp:25:9:25:13 | this | swap1.cpp:25:36:25:52 | constructor init of field data1 [pre-this] | | | swap1.cpp:25:28:25:31 | that | swap1.cpp:25:42:25:45 | that | | | swap1.cpp:25:47:25:51 | data1 | swap1.cpp:25:36:25:52 | constructor init of field data1 | TAINT | @@ -5425,36 +5395,28 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | swap1.cpp:29:23:29:27 | call to Class | swap1.cpp:30:18:30:20 | tmp | | | swap1.cpp:29:24:29:27 | that | swap1.cpp:29:23:29:27 | call to Class | | | swap1.cpp:30:13:30:16 | ref arg this | swap1.cpp:31:21:31:24 | this | | -| swap1.cpp:30:13:30:16 | this | swap1.cpp:30:18:30:20 | ref arg tmp | TAINT | | swap1.cpp:30:13:30:16 | this | swap1.cpp:31:21:31:24 | this | | -| swap1.cpp:30:18:30:20 | tmp | swap1.cpp:30:13:30:16 | ref arg this | TAINT | | swap1.cpp:31:21:31:24 | this | swap1.cpp:31:20:31:24 | * ... | TAINT | | swap1.cpp:34:16:34:24 | this | swap1.cpp:36:13:36:16 | this | | | swap1.cpp:34:34:34:37 | that | swap1.cpp:34:34:34:37 | that | | | swap1.cpp:34:34:34:37 | that | swap1.cpp:36:18:36:21 | that | | | swap1.cpp:36:13:36:16 | ref arg this | swap1.cpp:37:21:37:24 | this | | -| swap1.cpp:36:13:36:16 | this | swap1.cpp:36:18:36:21 | ref arg that | TAINT | | swap1.cpp:36:13:36:16 | this | swap1.cpp:37:21:37:24 | this | | | swap1.cpp:36:18:36:21 | ref arg that | swap1.cpp:34:34:34:37 | that | | -| swap1.cpp:36:18:36:21 | that | swap1.cpp:36:13:36:16 | ref arg this | TAINT | | swap1.cpp:37:21:37:24 | this | swap1.cpp:37:20:37:24 | * ... | TAINT | | swap1.cpp:40:16:40:26 | this | swap1.cpp:43:13:43:16 | this | | | swap1.cpp:40:41:40:44 | that | swap1.cpp:42:24:42:27 | that | | | swap1.cpp:42:23:42:27 | call to Class | swap1.cpp:43:18:43:20 | tmp | | | swap1.cpp:42:24:42:27 | that | swap1.cpp:42:23:42:27 | call to Class | | | swap1.cpp:43:13:43:16 | ref arg this | swap1.cpp:44:21:44:24 | this | | -| swap1.cpp:43:13:43:16 | this | swap1.cpp:43:18:43:20 | ref arg tmp | TAINT | | swap1.cpp:43:13:43:16 | this | swap1.cpp:44:21:44:24 | this | | -| swap1.cpp:43:18:43:20 | tmp | swap1.cpp:43:13:43:16 | ref arg this | TAINT | | swap1.cpp:44:21:44:24 | this | swap1.cpp:44:20:44:24 | * ... | TAINT | | swap1.cpp:47:16:47:26 | this | swap1.cpp:49:13:49:16 | this | | | swap1.cpp:47:36:47:39 | that | swap1.cpp:47:36:47:39 | that | | | swap1.cpp:47:36:47:39 | that | swap1.cpp:49:18:49:21 | that | | | swap1.cpp:49:13:49:16 | ref arg this | swap1.cpp:50:21:50:24 | this | | -| swap1.cpp:49:13:49:16 | this | swap1.cpp:49:18:49:21 | ref arg that | TAINT | | swap1.cpp:49:13:49:16 | this | swap1.cpp:50:21:50:24 | this | | | swap1.cpp:49:18:49:21 | ref arg that | swap1.cpp:47:36:47:39 | that | | -| swap1.cpp:49:18:49:21 | that | swap1.cpp:49:13:49:16 | ref arg this | TAINT | | swap1.cpp:50:21:50:24 | this | swap1.cpp:50:20:50:24 | * ... | TAINT | | swap1.cpp:53:14:53:17 | this | swap1.cpp:56:18:56:22 | this | | | swap1.cpp:53:26:53:29 | that | swap1.cpp:53:26:53:29 | that | | @@ -5468,9 +5430,7 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | swap1.cpp:61:32:61:32 | y | swap1.cpp:61:32:61:32 | y | | | swap1.cpp:61:32:61:32 | y | swap1.cpp:63:16:63:16 | y | | | swap1.cpp:63:9:63:9 | ref arg x | swap1.cpp:61:22:61:22 | x | | -| swap1.cpp:63:9:63:9 | x | swap1.cpp:63:16:63:16 | ref arg y | TAINT | | swap1.cpp:63:16:63:16 | ref arg y | swap1.cpp:61:32:61:32 | y | | -| swap1.cpp:63:16:63:16 | y | swap1.cpp:63:9:63:9 | ref arg x | TAINT | | swap1.cpp:69:23:69:23 | x | swap1.cpp:71:5:71:5 | x | | | swap1.cpp:69:23:69:23 | x | swap1.cpp:73:10:73:10 | x | | | swap1.cpp:69:23:69:23 | x | swap1.cpp:76:9:76:9 | x | | @@ -5579,9 +5539,7 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | swap2.cpp:24:9:24:13 | this | swap2.cpp:24:31:24:34 | this | | | swap2.cpp:24:23:24:26 | that | swap2.cpp:24:23:24:26 | that | | | swap2.cpp:24:23:24:26 | that | swap2.cpp:24:36:24:39 | that | | -| swap2.cpp:24:31:24:34 | this | swap2.cpp:24:36:24:39 | ref arg that | TAINT | | swap2.cpp:24:36:24:39 | ref arg that | swap2.cpp:24:23:24:26 | that | | -| swap2.cpp:24:36:24:39 | that | swap2.cpp:24:31:24:34 | ref arg this | TAINT | | swap2.cpp:25:9:25:13 | this | swap2.cpp:25:36:25:52 | constructor init of field data1 [pre-this] | | | swap2.cpp:25:28:25:31 | that | swap2.cpp:25:42:25:45 | that | | | swap2.cpp:25:28:25:31 | that | swap2.cpp:25:61:25:64 | that | | @@ -5596,36 +5554,28 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | swap2.cpp:29:23:29:27 | call to Class | swap2.cpp:30:18:30:20 | tmp | | | swap2.cpp:29:24:29:27 | that | swap2.cpp:29:23:29:27 | call to Class | | | swap2.cpp:30:13:30:16 | ref arg this | swap2.cpp:31:21:31:24 | this | | -| swap2.cpp:30:13:30:16 | this | swap2.cpp:30:18:30:20 | ref arg tmp | TAINT | | swap2.cpp:30:13:30:16 | this | swap2.cpp:31:21:31:24 | this | | -| swap2.cpp:30:18:30:20 | tmp | swap2.cpp:30:13:30:16 | ref arg this | TAINT | | swap2.cpp:31:21:31:24 | this | swap2.cpp:31:20:31:24 | * ... | TAINT | | swap2.cpp:34:16:34:24 | this | swap2.cpp:36:13:36:16 | this | | | swap2.cpp:34:34:34:37 | that | swap2.cpp:34:34:34:37 | that | | | swap2.cpp:34:34:34:37 | that | swap2.cpp:36:18:36:21 | that | | | swap2.cpp:36:13:36:16 | ref arg this | swap2.cpp:37:21:37:24 | this | | -| swap2.cpp:36:13:36:16 | this | swap2.cpp:36:18:36:21 | ref arg that | TAINT | | swap2.cpp:36:13:36:16 | this | swap2.cpp:37:21:37:24 | this | | | swap2.cpp:36:18:36:21 | ref arg that | swap2.cpp:34:34:34:37 | that | | -| swap2.cpp:36:18:36:21 | that | swap2.cpp:36:13:36:16 | ref arg this | TAINT | | swap2.cpp:37:21:37:24 | this | swap2.cpp:37:20:37:24 | * ... | TAINT | | swap2.cpp:40:16:40:26 | this | swap2.cpp:43:13:43:16 | this | | | swap2.cpp:40:41:40:44 | that | swap2.cpp:42:24:42:27 | that | | | swap2.cpp:42:23:42:27 | call to Class | swap2.cpp:43:18:43:20 | tmp | | | swap2.cpp:42:24:42:27 | that | swap2.cpp:42:23:42:27 | call to Class | | | swap2.cpp:43:13:43:16 | ref arg this | swap2.cpp:44:21:44:24 | this | | -| swap2.cpp:43:13:43:16 | this | swap2.cpp:43:18:43:20 | ref arg tmp | TAINT | | swap2.cpp:43:13:43:16 | this | swap2.cpp:44:21:44:24 | this | | -| swap2.cpp:43:18:43:20 | tmp | swap2.cpp:43:13:43:16 | ref arg this | TAINT | | swap2.cpp:44:21:44:24 | this | swap2.cpp:44:20:44:24 | * ... | TAINT | | swap2.cpp:47:16:47:26 | this | swap2.cpp:49:13:49:16 | this | | | swap2.cpp:47:36:47:39 | that | swap2.cpp:47:36:47:39 | that | | | swap2.cpp:47:36:47:39 | that | swap2.cpp:49:18:49:21 | that | | | swap2.cpp:49:13:49:16 | ref arg this | swap2.cpp:50:21:50:24 | this | | -| swap2.cpp:49:13:49:16 | this | swap2.cpp:49:18:49:21 | ref arg that | TAINT | | swap2.cpp:49:13:49:16 | this | swap2.cpp:50:21:50:24 | this | | | swap2.cpp:49:18:49:21 | ref arg that | swap2.cpp:47:36:47:39 | that | | -| swap2.cpp:49:18:49:21 | that | swap2.cpp:49:13:49:16 | ref arg this | TAINT | | swap2.cpp:50:21:50:24 | this | swap2.cpp:50:20:50:24 | * ... | TAINT | | swap2.cpp:53:14:53:17 | this | swap2.cpp:56:18:56:22 | this | | | swap2.cpp:53:26:53:29 | that | swap2.cpp:53:26:53:29 | that | | @@ -5647,9 +5597,7 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | swap2.cpp:61:32:61:32 | y | swap2.cpp:61:32:61:32 | y | | | swap2.cpp:61:32:61:32 | y | swap2.cpp:63:16:63:16 | y | | | swap2.cpp:63:9:63:9 | ref arg x | swap2.cpp:61:22:61:22 | x | | -| swap2.cpp:63:9:63:9 | x | swap2.cpp:63:16:63:16 | ref arg y | TAINT | | swap2.cpp:63:16:63:16 | ref arg y | swap2.cpp:61:32:61:32 | y | | -| swap2.cpp:63:16:63:16 | y | swap2.cpp:63:9:63:9 | ref arg x | TAINT | | swap2.cpp:69:23:69:23 | x | swap2.cpp:71:5:71:5 | x | | | swap2.cpp:69:23:69:23 | x | swap2.cpp:73:10:73:10 | x | | | swap2.cpp:69:23:69:23 | x | swap2.cpp:76:9:76:9 | x | | @@ -6597,38 +6545,45 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | taint.cpp:729:27:729:32 | endptr | taint.cpp:729:26:729:32 | & ... | | | taint.cpp:731:7:731:12 | ref arg endptr | taint.cpp:732:8:732:13 | endptr | | | taint.cpp:732:8:732:13 | endptr | taint.cpp:732:7:732:13 | * ... | TAINT | -| taint.cpp:738:17:738:31 | call to indirect_source | taint.cpp:739:30:739:35 | source | | -| taint.cpp:739:22:739:28 | call to realloc | taint.cpp:740:7:740:10 | dest | | -| taint.cpp:739:30:739:35 | source | taint.cpp:739:22:739:28 | call to realloc | TAINT | -| taint.cpp:743:40:743:45 | buffer | taint.cpp:744:5:744:10 | buffer | | -| taint.cpp:743:40:743:45 | buffer | taint.cpp:745:27:745:32 | buffer | | -| taint.cpp:744:4:744:10 | * ... | taint.cpp:744:3:744:10 | * ... | TAINT | -| taint.cpp:744:5:744:10 | buffer | taint.cpp:744:4:744:10 | * ... | TAINT | -| taint.cpp:744:14:744:19 | call to source | taint.cpp:744:3:744:21 | ... = ... | | -| taint.cpp:745:19:745:25 | call to realloc | taint.cpp:743:40:743:45 | buffer | | -| taint.cpp:745:19:745:25 | call to realloc | taint.cpp:745:3:745:37 | ... = ... | | -| taint.cpp:745:19:745:25 | call to realloc | taint.cpp:746:10:746:15 | buffer | | -| taint.cpp:745:27:745:32 | buffer | taint.cpp:745:19:745:25 | call to realloc | TAINT | -| taint.cpp:746:9:746:15 | * ... | taint.cpp:746:8:746:15 | * ... | TAINT | -| taint.cpp:746:10:746:15 | buffer | taint.cpp:746:9:746:15 | * ... | TAINT | -| taint.cpp:751:31:751:34 | path | taint.cpp:751:31:751:34 | path | | -| taint.cpp:751:31:751:34 | path | taint.cpp:752:10:752:13 | path | | -| taint.cpp:751:31:751:34 | path | taint.cpp:753:10:753:13 | path | | -| taint.cpp:751:43:751:46 | data | taint.cpp:751:43:751:46 | data | | -| taint.cpp:751:43:751:46 | data | taint.cpp:753:22:753:25 | data | | -| taint.cpp:752:10:752:13 | ref arg path | taint.cpp:751:31:751:34 | path | | -| taint.cpp:752:10:752:13 | ref arg path | taint.cpp:753:10:753:13 | path | | -| taint.cpp:752:16:752:19 | %s | taint.cpp:752:10:752:13 | ref arg path | TAINT | -| taint.cpp:752:22:752:26 | abc | taint.cpp:752:10:752:13 | ref arg path | TAINT | -| taint.cpp:753:10:753:13 | ref arg path | taint.cpp:751:31:751:34 | path | | -| taint.cpp:753:16:753:19 | %s | taint.cpp:753:10:753:13 | ref arg path | TAINT | -| taint.cpp:753:22:753:25 | data | taint.cpp:753:10:753:13 | ref arg path | TAINT | -| taint.cpp:753:22:753:25 | ref arg data | taint.cpp:751:43:751:46 | data | | -| taint.cpp:757:7:757:10 | path | taint.cpp:758:21:758:24 | path | | -| taint.cpp:757:7:757:10 | path | taint.cpp:759:8:759:11 | path | | -| taint.cpp:758:21:758:24 | ref arg path | taint.cpp:759:8:759:11 | path | | -| taint.cpp:759:8:759:11 | path | taint.cpp:759:7:759:11 | * ... | | -| taint.cpp:769:37:769:42 | call to source | taint.cpp:770:7:770:9 | obj | | +| taint.cpp:739:17:739:31 | call to indirect_source | taint.cpp:740:30:740:35 | source | | +| taint.cpp:740:22:740:28 | call to realloc | taint.cpp:741:7:741:10 | dest | | +| taint.cpp:740:30:740:35 | source | taint.cpp:740:22:740:28 | call to realloc | TAINT | +| taint.cpp:744:40:744:45 | buffer | taint.cpp:745:5:745:10 | buffer | | +| taint.cpp:744:40:744:45 | buffer | taint.cpp:746:27:746:32 | buffer | | +| taint.cpp:745:4:745:10 | * ... | taint.cpp:745:3:745:10 | * ... | TAINT | +| taint.cpp:745:5:745:10 | buffer | taint.cpp:745:4:745:10 | * ... | TAINT | +| taint.cpp:745:14:745:19 | call to source | taint.cpp:745:3:745:21 | ... = ... | | +| taint.cpp:746:19:746:25 | call to realloc | taint.cpp:744:40:744:45 | buffer | | +| taint.cpp:746:19:746:25 | call to realloc | taint.cpp:746:3:746:37 | ... = ... | | +| taint.cpp:746:19:746:25 | call to realloc | taint.cpp:747:10:747:15 | buffer | | +| taint.cpp:746:27:746:32 | buffer | taint.cpp:746:19:746:25 | call to realloc | TAINT | +| taint.cpp:747:9:747:15 | * ... | taint.cpp:747:8:747:15 | * ... | TAINT | +| taint.cpp:747:10:747:15 | buffer | taint.cpp:747:9:747:15 | * ... | TAINT | +| taint.cpp:752:13:752:18 | call to malloc | taint.cpp:753:2:753:2 | a | | +| taint.cpp:752:13:752:18 | call to malloc | taint.cpp:754:22:754:22 | a | | +| taint.cpp:753:2:753:2 | a [post update] | taint.cpp:754:22:754:22 | a | | +| taint.cpp:753:2:753:16 | ... = ... | taint.cpp:753:5:753:5 | x [post update] | | +| taint.cpp:753:9:753:14 | call to source | taint.cpp:753:2:753:16 | ... = ... | | +| taint.cpp:754:14:754:20 | call to realloc | taint.cpp:755:7:755:8 | a2 | | +| taint.cpp:754:22:754:22 | a | taint.cpp:754:14:754:20 | call to realloc | TAINT | +| taint.cpp:760:31:760:34 | path | taint.cpp:760:31:760:34 | path | | +| taint.cpp:760:31:760:34 | path | taint.cpp:761:10:761:13 | path | | +| taint.cpp:760:31:760:34 | path | taint.cpp:762:10:762:13 | path | | +| taint.cpp:760:43:760:46 | data | taint.cpp:760:43:760:46 | data | | +| taint.cpp:760:43:760:46 | data | taint.cpp:762:22:762:25 | data | | +| taint.cpp:761:10:761:13 | ref arg path | taint.cpp:760:31:760:34 | path | | +| taint.cpp:761:10:761:13 | ref arg path | taint.cpp:762:10:762:13 | path | | +| taint.cpp:761:16:761:19 | %s | taint.cpp:761:10:761:13 | ref arg path | TAINT | +| taint.cpp:761:22:761:26 | abc | taint.cpp:761:10:761:13 | ref arg path | TAINT | +| taint.cpp:762:10:762:13 | ref arg path | taint.cpp:760:31:760:34 | path | | +| taint.cpp:762:16:762:19 | %s | taint.cpp:762:10:762:13 | ref arg path | TAINT | +| taint.cpp:762:22:762:25 | data | taint.cpp:762:10:762:13 | ref arg path | TAINT | +| taint.cpp:762:22:762:25 | ref arg data | taint.cpp:760:43:760:46 | data | | +| taint.cpp:766:7:766:10 | path | taint.cpp:767:21:767:24 | path | | +| taint.cpp:766:7:766:10 | path | taint.cpp:768:8:768:11 | path | | +| taint.cpp:767:21:767:24 | ref arg path | taint.cpp:768:8:768:11 | path | | +| taint.cpp:768:8:768:11 | path | taint.cpp:768:7:768:11 | * ... | | +| taint.cpp:778:37:778:42 | call to source | taint.cpp:779:7:779:9 | obj | | | vector.cpp:16:43:16:49 | source1 | vector.cpp:17:26:17:32 | source1 | | | vector.cpp:16:43:16:49 | source1 | vector.cpp:31:38:31:44 | source1 | | | vector.cpp:17:21:17:33 | call to vector | vector.cpp:19:14:19:14 | v | | @@ -7005,16 +6960,12 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future | vector.cpp:112:7:112:8 | ref arg v4 | vector.cpp:121:1:121:1 | v4 | | | vector.cpp:114:2:114:3 | ref arg v1 | vector.cpp:117:7:117:8 | v1 | | | vector.cpp:114:2:114:3 | ref arg v1 | vector.cpp:121:1:121:1 | v1 | | -| vector.cpp:114:2:114:3 | v1 | vector.cpp:114:10:114:11 | ref arg v2 | TAINT | | vector.cpp:114:10:114:11 | ref arg v2 | vector.cpp:118:7:118:8 | v2 | | | vector.cpp:114:10:114:11 | ref arg v2 | vector.cpp:121:1:121:1 | v2 | | -| vector.cpp:114:10:114:11 | v2 | vector.cpp:114:2:114:3 | ref arg v1 | TAINT | | vector.cpp:115:2:115:3 | ref arg v3 | vector.cpp:119:7:119:8 | v3 | | | vector.cpp:115:2:115:3 | ref arg v3 | vector.cpp:121:1:121:1 | v3 | | -| vector.cpp:115:2:115:3 | v3 | vector.cpp:115:10:115:11 | ref arg v4 | TAINT | | vector.cpp:115:10:115:11 | ref arg v4 | vector.cpp:120:7:120:8 | v4 | | | vector.cpp:115:10:115:11 | ref arg v4 | vector.cpp:121:1:121:1 | v4 | | -| vector.cpp:115:10:115:11 | v4 | vector.cpp:115:2:115:3 | ref arg v3 | TAINT | | vector.cpp:117:7:117:8 | ref arg v1 | vector.cpp:121:1:121:1 | v1 | | | vector.cpp:118:7:118:8 | ref arg v2 | vector.cpp:121:1:121:1 | v2 | | | vector.cpp:119:7:119:8 | ref arg v3 | vector.cpp:121:1:121:1 | v3 | | diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/map.cpp b/cpp/ql/test/library-tests/dataflow/taint-tests/map.cpp index 555f39779bf..0c6bcedc88b 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/map.cpp +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/map.cpp @@ -68,8 +68,8 @@ void test_pair() i.swap(j); k.swap(l); sink(i.first); - sink(i.second); // $ MISSING: ast,ir - sink(i); // $ ast,ir + sink(i.second); // $ ir, MISSING: ast + sink(i); // $ ir sink(j.first); sink(j.second); // $ SPURIOUS: ast sink(j); // $ SPURIOUS: ast @@ -77,8 +77,8 @@ void test_pair() sink(k.second); // $ SPURIOUS: ast sink(k); // $ SPURIOUS: ast sink(l.first); - sink(l.second); // $ MISSING: ast,ir - sink(l); // $ ast,ir + sink(l.second); // $ ir, MISSING: ast + sink(l); // $ ir sink(make_pair("123", "456")); sink(make_pair("123", "456").first); @@ -197,8 +197,8 @@ void test_map() m15.swap(m16); m17.swap(m18); sink(m15); // $ SPURIOUS: ast - sink(m16); // $ ast,ir - sink(m17); // $ ast,ir + sink(m16); // $ ir + sink(m17); // $ ir sink(m18); // $ SPURIOUS: ast // merge @@ -346,8 +346,8 @@ void test_unordered_map() m15.swap(m16); m17.swap(m18); sink(m15); // $ SPURIOUS: ast - sink(m16); // $ ast,ir - sink(m17); // $ ast,ir + sink(m16); // $ ir + sink(m17); // $ ir sink(m18); // $ SPURIOUS: ast // merge diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/set.cpp b/cpp/ql/test/library-tests/dataflow/taint-tests/set.cpp index 7c906fb72d2..f2838ac6a82 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/set.cpp +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/set.cpp @@ -82,8 +82,8 @@ void test_set() s12.swap(s13); s14.swap(s15); sink(s12); // $ SPURIOUS: ast - sink(s13); // $ ast,ir - sink(s14); // $ ast,ir + sink(s13); // $ ir + sink(s14); // $ ir sink(s15); // $ SPURIOUS: ast // merge @@ -194,8 +194,8 @@ void test_unordered_set() s12.swap(s13); s14.swap(s15); sink(s12); // $ SPURIOUS: ast - sink(s13); // $ ast,ir - sink(s14); // $ ast,ir + sink(s13); // $ ir + sink(s14); // $ ir sink(s15); // $ SPURIOUS: ast // merge diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/string.cpp b/cpp/ql/test/library-tests/dataflow/taint-tests/string.cpp index dc92a0664be..4da4d3f3fe7 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/string.cpp +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/string.cpp @@ -279,9 +279,9 @@ void test_string_swap() { s1.swap(s2); s4.swap(s3); - sink(s1); // $ ast,ir + sink(s1); // $ ir sink(s2); // $ SPURIOUS: ast - sink(s3); // $ ast,ir + sink(s3); // $ ir sink(s4); // $ SPURIOUS: ast } diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/stringstream.cpp b/cpp/ql/test/library-tests/dataflow/taint-tests/stringstream.cpp index ca17fb4b3e7..7147e313544 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/stringstream.cpp +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/stringstream.cpp @@ -117,9 +117,9 @@ void test_stringstream_swap() ss1.swap(ss2); ss4.swap(ss3); - sink(ss1); // $ ast,ir + sink(ss1); // $ ir sink(ss2); // $ SPURIOUS: ast - sink(ss3); // $ ast,ir + sink(ss3); // $ ir sink(ss4); // $ SPURIOUS: ast } diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp index 8e6199d35bd..220265a3bb1 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp @@ -732,6 +732,7 @@ void test_strtol(char *source) { sink(*endptr); // $ ast,ir } +void *malloc(size_t); void *realloc(void *, size_t); void test_realloc() { @@ -746,6 +747,14 @@ void test_realloc_2_indirections(int **buffer) { sink(**buffer); // $ ir MISSING: ast } +void test_realloc_struct_field() { + struct A { int x; }; + A* a = (A*)malloc(sizeof(A)); + a->x = source(); + A* a2 = (A*)realloc(a, sizeof(A)); + sink(a2->x); // $ ir MISSING: ast +} + int sprintf(char *, const char *, ...); void call_sprintf_twice(char* path, char* data) { diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/vector.cpp b/cpp/ql/test/library-tests/dataflow/taint-tests/vector.cpp index 7f4d3f22d8e..31c84367d4b 100644 --- a/cpp/ql/test/library-tests/dataflow/taint-tests/vector.cpp +++ b/cpp/ql/test/library-tests/dataflow/taint-tests/vector.cpp @@ -115,8 +115,8 @@ void test_vector_swap() { v3.swap(v4); sink(v1); - sink(v2); // $ MISSING:ir ast - sink(v3); // $ MISSING:ir ast + sink(v2); // $ ir MISSING: ast + sink(v3); // $ ir MISSING: ast sink(v4); } diff --git a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected index 4c912a36756..f17680ebe2d 100644 --- a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected +++ b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected @@ -4180,7 +4180,7 @@ destructors_for_temps.cpp: # 103| ValueCategory = prvalue # 104| getStmt(1): [ReturnStmt] return ... generic.c: -# 1| [TopLevelFunction] void c11_generic_test(unsigned int, int) +# 1| [TopLevelFunction] void c11_generic_test_with_load(unsigned int, int) # 1| : # 1| getParameter(0): [Parameter] x # 1| Type = [IntType] unsigned int @@ -4207,12 +4207,150 @@ generic.c: # 3| Type = [IntType] int # 3| Value = [Literal] 1 # 3| ValueCategory = prvalue +# 3| getLeftOperand().getFullyConverted(): [C11GenericExpr] _Generic +# 3| Type = [IntType] unsigned int +# 3| ValueCategory = prvalue(load) +# 3| getControllingExpr(): [VariableAccess] r +# 3| Type = [IntType] unsigned int +# 3| ValueCategory = prvalue(load) +# 3| getAssociationType(0): [TypeName] unsigned int +# 3| Type = [IntType] unsigned int +# 3| ValueCategory = prvalue +# 3| getAssociationExpr(0): [ReuseExpr] reuse of x +# 3| Type = [IntType] unsigned int +# 3| ValueCategory = lvalue +# 3| getAssociationType(1): [TypeName] int +# 3| Type = [IntType] int +# 3| ValueCategory = prvalue +# 3| getAssociationExpr(1): [VariableAccess] y +# 3| Type = [IntType] int +# 3| ValueCategory = lvalue # 3| getRightOperand().getFullyConverted(): [CStyleCast] (unsigned int)... # 3| Conversion = [IntegralConversion] integral conversion # 3| Type = [IntType] unsigned int # 3| Value = [CStyleCast] 1 # 3| ValueCategory = prvalue # 4| getStmt(2): [ReturnStmt] return ... +# 12| [TopLevelFunction] char const* c11_generic_test_with_constant_and_macro() +# 12| : +# 13| getEntryPoint(): [BlockStmt] { ... } +# 14| getStmt(0): [DeclStmt] declaration +# 14| getDeclarationEntry(0): [VariableDeclarationEntry] definition of i +# 14| Type = [IntType] int +# 16| getStmt(1): [ReturnStmt] return ... +# 16| getExpr(): int +# 16| Type = [ArrayType] char[4] +# 16| Value = [StringLiteral] "int" +# 16| ValueCategory = lvalue +# 16| getExpr().getFullyConverted(): [CStyleCast] (const char *)... +# 16| Conversion = [PointerConversion] pointer conversion +# 16| Type = [PointerType] const char * +# 16| ValueCategory = prvalue +# 16| getExpr(): [ArrayToPointerConversion] array to pointer conversion +# 16| Type = [CharPointerType] char * +# 16| ValueCategory = prvalue +# 16| getExpr(): [C11GenericExpr] _Generic +# 16| Type = [ArrayType] char[4] +# 16| Value = [C11GenericExpr] int +# 16| ValueCategory = lvalue +# 16| getControllingExpr(): [VariableAccess] i +# 16| Type = [IntType] int +# 16| ValueCategory = prvalue(load) +# 16| getAssociationType(0): [TypeName] int +# 16| Type = [IntType] int +# 16| ValueCategory = prvalue +# 16| getAssociationExpr(0): [ReuseExpr] reuse of int +# 16| Type = [ArrayType] char[4] +# 16| ValueCategory = lvalue +# 16| getAssociationType(1): [TypeName] void +# 16| Type = [VoidType] void +# 16| ValueCategory = prvalue +# 16| getAssociationExpr(1): unknown +# 16| Type = [ArrayType] char[8] +# 16| Value = [StringLiteral] "unknown" +# 16| ValueCategory = lvalue +# 16| getControllingExpr().getFullyConverted(): [ParenthesisExpr] (...) +# 16| Type = [IntType] int +# 16| ValueCategory = prvalue(load) +# 19| [TopLevelFunction] char const* c11_generic_test_with_constant_and_no_macro() +# 19| : +# 20| getEntryPoint(): [BlockStmt] { ... } +# 21| getStmt(0): [DeclStmt] declaration +# 21| getDeclarationEntry(0): [VariableDeclarationEntry] definition of i +# 21| Type = [IntType] int +# 23| getStmt(1): [ReturnStmt] return ... +# 23| getExpr(): int +# 23| Type = [ArrayType] char[4] +# 23| Value = [StringLiteral] "int" +# 23| ValueCategory = lvalue +# 23| getExpr().getFullyConverted(): [CStyleCast] (const char *)... +# 23| Conversion = [PointerConversion] pointer conversion +# 23| Type = [PointerType] const char * +# 23| ValueCategory = prvalue +# 23| getExpr(): [ArrayToPointerConversion] array to pointer conversion +# 23| Type = [CharPointerType] char * +# 23| ValueCategory = prvalue +# 23| getExpr(): [C11GenericExpr] _Generic +# 23| Type = [ArrayType] char[4] +# 23| Value = [C11GenericExpr] int +# 23| ValueCategory = lvalue +# 23| getControllingExpr(): [VariableAccess] i +# 23| Type = [IntType] int +# 23| ValueCategory = prvalue(load) +# 23| getAssociationType(0): [TypeName] int +# 23| Type = [IntType] int +# 23| ValueCategory = prvalue +# 23| getAssociationExpr(0): [ReuseExpr] reuse of int +# 23| Type = [ArrayType] char[4] +# 23| ValueCategory = lvalue +# 23| getAssociationType(1): [TypeName] void +# 23| Type = [VoidType] void +# 23| ValueCategory = prvalue +# 23| getAssociationExpr(1): unknown +# 23| Type = [ArrayType] char[8] +# 23| Value = [StringLiteral] "unknown" +# 23| ValueCategory = lvalue +# 26| [TopLevelFunction] void c11_generic_test_test_with_cast(int) +# 26| : +# 26| getParameter(0): [Parameter] y +# 26| Type = [IntType] int +# 26| getEntryPoint(): [BlockStmt] { ... } +# 27| getStmt(0): [DeclStmt] declaration +# 27| getDeclarationEntry(0): [VariableDeclarationEntry] definition of r +# 27| Type = [IntType] unsigned int +# 28| getStmt(1): [ExprStmt] ExprStmt +# 28| getExpr(): [AssignExpr] ... = ... +# 28| Type = [IntType] unsigned int +# 28| ValueCategory = prvalue +# 28| getLValue(): [VariableAccess] r +# 28| Type = [IntType] unsigned int +# 28| ValueCategory = lvalue +# 28| getRValue(): [VariableAccess] y +# 28| Type = [IntType] int +# 28| ValueCategory = prvalue(load) +# 28| getRValue().getFullyConverted(): [C11GenericExpr] _Generic +# 28| Type = [IntType] unsigned int +# 28| ValueCategory = prvalue +# 28| getControllingExpr(): [VariableAccess] r +# 28| Type = [IntType] unsigned int +# 28| ValueCategory = prvalue(load) +# 28| getAssociationType(0): [TypeName] unsigned int +# 28| Type = [IntType] unsigned int +# 28| ValueCategory = prvalue +# 28| getAssociationExpr(0): [ReuseExpr] reuse of y +# 28| Type = [IntType] int +# 28| ValueCategory = prvalue +# 28| getAssociationType(1): [TypeName] int +# 28| Type = [IntType] int +# 28| ValueCategory = prvalue +# 28| getAssociationExpr(1): [VariableAccess] y +# 28| Type = [IntType] int +# 28| ValueCategory = lvalue +# 28| getExpr(): [CStyleCast] (unsigned int)... +# 28| Conversion = [IntegralConversion] integral conversion +# 28| Type = [IntType] unsigned int +# 28| ValueCategory = prvalue +# 29| getStmt(2): [ReturnStmt] return ... ir.c: # 5| [TopLevelFunction] int getX(MyCoords*) # 5| : diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected index 54ecfba3ffc..dedc58394f9 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected @@ -785,66 +785,65 @@ coroutines.cpp: #-----| Block 1 #-----| m0_4(unknown) = Phi : from 0:~m87_34, from 2:~m87_61 #-----| r0_5(bool) = Constant[1] : -#-----| r0_6(glval) = VariableAddress : -#-----| m0_7(bool) = Store[?] : &:r0_6, r0_5 -#-----| m0_8(unknown) = Chi : total:m0_4, partial:m0_7 +#-----| r0_6(glval) = VariableAddress[(unnamed local variable)] : +#-----| m0_7(bool) = Store[(unnamed local variable)] : &:r0_6, r0_5 # 87| r87_36(suspend_always *) = CopyValue : r87_27 # 87| r87_37(glval) = CopyValue : r87_36 -#-----| r0_9(glval) = Convert : r87_37 +#-----| r0_8(glval) = Convert : r87_37 # 87| r87_38(glval) = FunctionAddress[await_resume] : -# 87| v87_39(void) = Call[await_resume] : func:r87_38, this:r0_9 -# 87| m87_40(unknown) = ^CallSideEffect : ~m0_8 -# 87| m87_41(unknown) = Chi : total:m0_8, partial:m87_40 -#-----| v0_10(void) = ^IndirectReadSideEffect[-1] : &:r0_9, ~m87_41 -#-----| v0_11(void) = CopyValue : v87_39 -#-----| r0_12(glval) = VariableAddress[(unnamed local variable)] : -#-----| r0_13(glval) = FunctionAddress[return_void] : -#-----| v0_14(void) = Call[return_void] : func:r0_13, this:r0_12 -#-----| m0_15(unknown) = ^CallSideEffect : ~m87_41 -#-----| m0_16(unknown) = Chi : total:m87_41, partial:m0_15 -#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_12, ~m0_16 -#-----| m0_18(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_12 -#-----| m0_19(unknown) = Chi : total:m0_16, partial:m0_18 +# 87| v87_39(void) = Call[await_resume] : func:r87_38, this:r0_8 +# 87| m87_40(unknown) = ^CallSideEffect : ~m0_4 +# 87| m87_41(unknown) = Chi : total:m0_4, partial:m87_40 +#-----| v0_9(void) = ^IndirectReadSideEffect[-1] : &:r0_8, ~m87_41 +#-----| v0_10(void) = CopyValue : v87_39 +#-----| r0_11(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_12(glval) = FunctionAddress[return_void] : +#-----| v0_13(void) = Call[return_void] : func:r0_12, this:r0_11 +#-----| m0_14(unknown) = ^CallSideEffect : ~m87_41 +#-----| m0_15(unknown) = Chi : total:m87_41, partial:m0_14 +#-----| v0_16(void) = ^IndirectReadSideEffect[-1] : &:r0_11, ~m0_15 +#-----| m0_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_11 +#-----| m0_18(unknown) = Chi : total:m0_15, partial:m0_17 # 88| v88_1(void) = NoOp : -#-----| v0_20(void) = NoOp : +#-----| v0_19(void) = NoOp : #-----| Goto (back edge) -> Block 3 # 87| Block 2 -# 87| r87_42(suspend_always *) = CopyValue : r87_27 -# 87| r87_43(glval) = CopyValue : r87_42 -#-----| r0_21(glval) = Convert : r87_43 -# 87| r87_44(glval) = FunctionAddress[await_suspend] : -# 87| r87_45(glval>) = VariableAddress[#temp87:20] : -# 87| m87_46(coroutine_handle) = Uninitialized[#temp87:20] : &:r87_45 -# 87| m87_47(unknown) = Chi : total:m87_34, partial:m87_46 -# 87| r87_48(glval) = FunctionAddress[coroutine_handle] : -# 87| r87_49(glval>) = VariableAddress : -# 87| r87_50(glval>) = Convert : r87_49 -# 87| r87_51(coroutine_handle &) = CopyValue : r87_50 -# 87| v87_52(void) = Call[coroutine_handle] : func:r87_48, this:r87_45, 0:r87_51 -# 87| m87_53(unknown) = ^CallSideEffect : ~m87_47 -# 87| m87_54(unknown) = Chi : total:m87_47, partial:m87_53 -# 87| v87_55(void) = ^BufferReadSideEffect[0] : &:r87_51, ~m87_54 -# 87| m87_56(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r87_45 -# 87| m87_57(unknown) = Chi : total:m87_54, partial:m87_56 -# 87| r87_58(coroutine_handle) = Load[#temp87:20] : &:r87_45, ~m87_57 -# 87| v87_59(void) = Call[await_suspend] : func:r87_44, this:r0_21, 0:r87_58 -# 87| m87_60(unknown) = ^CallSideEffect : ~m87_57 -# 87| m87_61(unknown) = Chi : total:m87_57, partial:m87_60 -#-----| v0_22(void) = ^IndirectReadSideEffect[-1] : &:r0_21, ~m87_61 +# 87| r87_42(suspend_always *) = CopyValue : r87_27 +# 87| r87_43(glval) = CopyValue : r87_42 +#-----| r0_20(glval) = Convert : r87_43 +# 87| r87_44(glval) = FunctionAddress[await_suspend] : +# 87| r87_45(glval>) = VariableAddress[#temp87:20] : +# 87| m87_46(coroutine_handle) = Uninitialized[#temp87:20] : &:r87_45 +# 87| m87_47(unknown) = Chi : total:m87_34, partial:m87_46 +# 87| r87_48(glval) = FunctionAddress[coroutine_handle] : +# 87| r87_49(glval>) = VariableAddress[(unnamed local variable)] : +# 87| r87_50(glval>) = Convert : r87_49 +# 87| r87_51(coroutine_handle &) = CopyValue : r87_50 +# 87| v87_52(void) = Call[coroutine_handle] : func:r87_48, this:r87_45, 0:r87_51 +# 87| m87_53(unknown) = ^CallSideEffect : ~m87_47 +# 87| m87_54(unknown) = Chi : total:m87_47, partial:m87_53 +# 87| v87_55(void) = ^BufferReadSideEffect[0] : &:r87_51, ~m87_54 +# 87| m87_56(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r87_45 +# 87| m87_57(unknown) = Chi : total:m87_54, partial:m87_56 +# 87| r87_58(coroutine_handle) = Load[#temp87:20] : &:r87_45, ~m87_57 +# 87| v87_59(void) = Call[await_suspend] : func:r87_44, this:r0_20, 0:r87_58 +# 87| m87_60(unknown) = ^CallSideEffect : ~m87_57 +# 87| m87_61(unknown) = Chi : total:m87_57, partial:m87_60 +#-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m87_61 #-----| Goto -> Block 1 #-----| Block 3 -#-----| v0_23(void) = NoOp : +#-----| v0_22(void) = NoOp : # 87| r87_62(glval) = VariableAddress[(unnamed local variable)] : # 87| r87_63(glval) = FunctionAddress[final_suspend] : # 87| r87_64(suspend_always) = Call[final_suspend] : func:r87_63, this:r87_62 -# 87| m87_65(unknown) = ^CallSideEffect : ~m0_19 -# 87| m87_66(unknown) = Chi : total:m0_19, partial:m87_65 +# 87| m87_65(unknown) = ^CallSideEffect : ~m0_18 +# 87| m87_66(unknown) = Chi : total:m0_18, partial:m87_65 # 87| v87_67(void) = ^IndirectReadSideEffect[-1] : &:r87_62, ~m87_66 # 87| m87_68(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_62 # 87| m87_69(unknown) = Chi : total:m87_66, partial:m87_68 -#-----| r0_24(glval) = VariableAddress[#temp0:0] : +#-----| r0_23(glval) = VariableAddress[#temp0:0] : # 87| r87_70(glval) = VariableAddress[#temp87:20] : # 87| r87_71(glval) = VariableAddress[(unnamed local variable)] : # 87| r87_72(glval) = FunctionAddress[final_suspend] : @@ -857,16 +856,16 @@ coroutines.cpp: # 87| m87_79(suspend_always) = Store[#temp87:20] : &:r87_70, r87_73 # 87| m87_80(unknown) = Chi : total:m87_78, partial:m87_79 # 87| r87_81(suspend_always *) = CopyValue : r87_70 -# 87| m87_82(suspend_always *) = Store[#temp0:0] : &:r0_24, r87_81 -#-----| r0_25(suspend_always *) = Load[#temp0:0] : &:r0_24, m87_82 -# 87| r87_83(glval) = CopyValue : r0_25 +# 87| m87_82(suspend_always *) = Store[#temp0:0] : &:r0_23, r87_81 +#-----| r0_24(suspend_always *) = Load[#temp0:0] : &:r0_23, m87_82 +# 87| r87_83(glval) = CopyValue : r0_24 # 87| r87_84(glval) = Convert : r87_83 # 87| r87_85(glval) = FunctionAddress[await_ready] : # 87| r87_86(bool) = Call[await_ready] : func:r87_85, this:r87_84 # 87| m87_87(unknown) = ^CallSideEffect : ~m87_80 # 87| m87_88(unknown) = Chi : total:m87_80, partial:m87_87 # 87| v87_89(void) = ^IndirectReadSideEffect[-1] : &:r87_84, ~m87_88 -#-----| v0_26(void) = ConditionalBranch : r87_86 +#-----| v0_25(void) = ConditionalBranch : r87_86 #-----| False -> Block 5 #-----| True -> Block 4 @@ -874,40 +873,40 @@ coroutines.cpp: # 87| m87_90(unknown) = Phi : from 3:~m87_88, from 5:~m87_120 # 87| r87_91(suspend_always *) = CopyValue : r87_81 # 87| r87_92(glval) = CopyValue : r87_91 -#-----| r0_27(glval) = Convert : r87_92 +#-----| r0_26(glval) = Convert : r87_92 # 87| r87_93(glval) = FunctionAddress[await_resume] : -# 87| v87_94(void) = Call[await_resume] : func:r87_93, this:r0_27 +# 87| v87_94(void) = Call[await_resume] : func:r87_93, this:r0_26 # 87| m87_95(unknown) = ^CallSideEffect : ~m87_90 # 87| m87_96(unknown) = Chi : total:m87_90, partial:m87_95 -#-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m87_96 +#-----| v0_27(void) = ^IndirectReadSideEffect[-1] : &:r0_26, ~m87_96 # 87| r87_97(glval) = VariableAddress[#return] : # 87| v87_98(void) = ReturnValue : &:r87_97, ~m87_96 # 87| v87_99(void) = AliasedUse : ~m87_96 # 87| v87_100(void) = ExitFunction : # 87| Block 5 -# 87| r87_101(suspend_always *) = CopyValue : r87_81 -# 87| r87_102(glval) = CopyValue : r87_101 -#-----| r0_29(glval) = Convert : r87_102 -# 87| r87_103(glval) = FunctionAddress[await_suspend] : -# 87| r87_104(glval>) = VariableAddress[#temp87:20] : -# 87| m87_105(coroutine_handle) = Uninitialized[#temp87:20] : &:r87_104 -# 87| m87_106(unknown) = Chi : total:m87_88, partial:m87_105 -# 87| r87_107(glval) = FunctionAddress[coroutine_handle] : -# 87| r87_108(glval>) = VariableAddress : -# 87| r87_109(glval>) = Convert : r87_108 -# 87| r87_110(coroutine_handle &) = CopyValue : r87_109 -# 87| v87_111(void) = Call[coroutine_handle] : func:r87_107, this:r87_104, 0:r87_110 -# 87| m87_112(unknown) = ^CallSideEffect : ~m87_106 -# 87| m87_113(unknown) = Chi : total:m87_106, partial:m87_112 -# 87| v87_114(void) = ^BufferReadSideEffect[0] : &:r87_110, ~m87_113 -# 87| m87_115(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r87_104 -# 87| m87_116(unknown) = Chi : total:m87_113, partial:m87_115 -# 87| r87_117(coroutine_handle) = Load[#temp87:20] : &:r87_104, ~m87_116 -# 87| v87_118(void) = Call[await_suspend] : func:r87_103, this:r0_29, 0:r87_117 -# 87| m87_119(unknown) = ^CallSideEffect : ~m87_116 -# 87| m87_120(unknown) = Chi : total:m87_116, partial:m87_119 -#-----| v0_30(void) = ^IndirectReadSideEffect[-1] : &:r0_29, ~m87_120 +# 87| r87_101(suspend_always *) = CopyValue : r87_81 +# 87| r87_102(glval) = CopyValue : r87_101 +#-----| r0_28(glval) = Convert : r87_102 +# 87| r87_103(glval) = FunctionAddress[await_suspend] : +# 87| r87_104(glval>) = VariableAddress[#temp87:20] : +# 87| m87_105(coroutine_handle) = Uninitialized[#temp87:20] : &:r87_104 +# 87| m87_106(unknown) = Chi : total:m87_88, partial:m87_105 +# 87| r87_107(glval) = FunctionAddress[coroutine_handle] : +# 87| r87_108(glval>) = VariableAddress[(unnamed local variable)] : +# 87| r87_109(glval>) = Convert : r87_108 +# 87| r87_110(coroutine_handle &) = CopyValue : r87_109 +# 87| v87_111(void) = Call[coroutine_handle] : func:r87_107, this:r87_104, 0:r87_110 +# 87| m87_112(unknown) = ^CallSideEffect : ~m87_106 +# 87| m87_113(unknown) = Chi : total:m87_106, partial:m87_112 +# 87| v87_114(void) = ^BufferReadSideEffect[0] : &:r87_110, ~m87_113 +# 87| m87_115(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r87_104 +# 87| m87_116(unknown) = Chi : total:m87_113, partial:m87_115 +# 87| r87_117(coroutine_handle) = Load[#temp87:20] : &:r87_104, ~m87_116 +# 87| v87_118(void) = Call[await_suspend] : func:r87_103, this:r0_28, 0:r87_117 +# 87| m87_119(unknown) = ^CallSideEffect : ~m87_116 +# 87| m87_120(unknown) = Chi : total:m87_116, partial:m87_119 +#-----| v0_29(void) = ^IndirectReadSideEffect[-1] : &:r0_28, ~m87_120 #-----| Goto -> Block 4 # 91| co_returnable_value co_return_int(int) @@ -962,68 +961,67 @@ coroutines.cpp: #-----| Block 1 #-----| m0_8(unknown) = Phi : from 0:~m91_36, from 2:~m91_63 #-----| r0_9(bool) = Constant[1] : -#-----| r0_10(glval) = VariableAddress : -#-----| m0_11(bool) = Store[?] : &:r0_10, r0_9 -#-----| m0_12(unknown) = Chi : total:m0_8, partial:m0_11 +#-----| r0_10(glval) = VariableAddress[(unnamed local variable)] : +#-----| m0_11(bool) = Store[(unnamed local variable)] : &:r0_10, r0_9 # 91| r91_38(suspend_always *) = CopyValue : r91_29 # 91| r91_39(glval) = CopyValue : r91_38 -#-----| r0_13(glval) = Convert : r91_39 +#-----| r0_12(glval) = Convert : r91_39 # 91| r91_40(glval) = FunctionAddress[await_resume] : -# 91| v91_41(void) = Call[await_resume] : func:r91_40, this:r0_13 -# 91| m91_42(unknown) = ^CallSideEffect : ~m0_12 -# 91| m91_43(unknown) = Chi : total:m0_12, partial:m91_42 -#-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_13, ~m91_43 -#-----| v0_15(void) = CopyValue : v91_41 -#-----| r0_16(glval) = VariableAddress[(unnamed local variable)] : -#-----| r0_17(glval) = FunctionAddress[return_value] : +# 91| v91_41(void) = Call[await_resume] : func:r91_40, this:r0_12 +# 91| m91_42(unknown) = ^CallSideEffect : ~m0_8 +# 91| m91_43(unknown) = Chi : total:m0_8, partial:m91_42 +#-----| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_12, ~m91_43 +#-----| v0_14(void) = CopyValue : v91_41 +#-----| r0_15(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_16(glval) = FunctionAddress[return_value] : # 92| r92_1(glval) = VariableAddress[i] : # 92| r92_2(int) = Load[i] : &:r92_1, m0_4 -#-----| v0_18(void) = Call[return_value] : func:r0_17, this:r0_16, 0:r92_2 -#-----| m0_19(unknown) = ^CallSideEffect : ~m91_43 -#-----| m0_20(unknown) = Chi : total:m91_43, partial:m0_19 -#-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m0_20 -#-----| m0_22(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_16 -#-----| m0_23(unknown) = Chi : total:m0_20, partial:m0_22 +#-----| v0_17(void) = Call[return_value] : func:r0_16, this:r0_15, 0:r92_2 +#-----| m0_18(unknown) = ^CallSideEffect : ~m91_43 +#-----| m0_19(unknown) = Chi : total:m91_43, partial:m0_18 +#-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_15, ~m0_19 +#-----| m0_21(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_15 +#-----| m0_22(unknown) = Chi : total:m0_19, partial:m0_21 # 92| v92_3(void) = NoOp : -#-----| v0_24(void) = NoOp : +#-----| v0_23(void) = NoOp : #-----| Goto (back edge) -> Block 3 # 91| Block 2 -# 91| r91_44(suspend_always *) = CopyValue : r91_29 -# 91| r91_45(glval) = CopyValue : r91_44 -#-----| r0_25(glval) = Convert : r91_45 -# 91| r91_46(glval) = FunctionAddress[await_suspend] : -# 91| r91_47(glval>) = VariableAddress[#temp91:21] : -# 91| m91_48(coroutine_handle) = Uninitialized[#temp91:21] : &:r91_47 -# 91| m91_49(unknown) = Chi : total:m91_36, partial:m91_48 -# 91| r91_50(glval) = FunctionAddress[coroutine_handle] : -# 91| r91_51(glval>) = VariableAddress : -# 91| r91_52(glval>) = Convert : r91_51 -# 91| r91_53(coroutine_handle &) = CopyValue : r91_52 -# 91| v91_54(void) = Call[coroutine_handle] : func:r91_50, this:r91_47, 0:r91_53 -# 91| m91_55(unknown) = ^CallSideEffect : ~m91_49 -# 91| m91_56(unknown) = Chi : total:m91_49, partial:m91_55 -# 91| v91_57(void) = ^BufferReadSideEffect[0] : &:r91_53, ~m91_56 -# 91| m91_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r91_47 -# 91| m91_59(unknown) = Chi : total:m91_56, partial:m91_58 -# 91| r91_60(coroutine_handle) = Load[#temp91:21] : &:r91_47, ~m91_59 -# 91| v91_61(void) = Call[await_suspend] : func:r91_46, this:r0_25, 0:r91_60 -# 91| m91_62(unknown) = ^CallSideEffect : ~m91_59 -# 91| m91_63(unknown) = Chi : total:m91_59, partial:m91_62 -#-----| v0_26(void) = ^IndirectReadSideEffect[-1] : &:r0_25, ~m91_63 +# 91| r91_44(suspend_always *) = CopyValue : r91_29 +# 91| r91_45(glval) = CopyValue : r91_44 +#-----| r0_24(glval) = Convert : r91_45 +# 91| r91_46(glval) = FunctionAddress[await_suspend] : +# 91| r91_47(glval>) = VariableAddress[#temp91:21] : +# 91| m91_48(coroutine_handle) = Uninitialized[#temp91:21] : &:r91_47 +# 91| m91_49(unknown) = Chi : total:m91_36, partial:m91_48 +# 91| r91_50(glval) = FunctionAddress[coroutine_handle] : +# 91| r91_51(glval>) = VariableAddress[(unnamed local variable)] : +# 91| r91_52(glval>) = Convert : r91_51 +# 91| r91_53(coroutine_handle &) = CopyValue : r91_52 +# 91| v91_54(void) = Call[coroutine_handle] : func:r91_50, this:r91_47, 0:r91_53 +# 91| m91_55(unknown) = ^CallSideEffect : ~m91_49 +# 91| m91_56(unknown) = Chi : total:m91_49, partial:m91_55 +# 91| v91_57(void) = ^BufferReadSideEffect[0] : &:r91_53, ~m91_56 +# 91| m91_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r91_47 +# 91| m91_59(unknown) = Chi : total:m91_56, partial:m91_58 +# 91| r91_60(coroutine_handle) = Load[#temp91:21] : &:r91_47, ~m91_59 +# 91| v91_61(void) = Call[await_suspend] : func:r91_46, this:r0_24, 0:r91_60 +# 91| m91_62(unknown) = ^CallSideEffect : ~m91_59 +# 91| m91_63(unknown) = Chi : total:m91_59, partial:m91_62 +#-----| v0_25(void) = ^IndirectReadSideEffect[-1] : &:r0_24, ~m91_63 #-----| Goto -> Block 1 #-----| Block 3 -#-----| v0_27(void) = NoOp : +#-----| v0_26(void) = NoOp : # 91| r91_64(glval) = VariableAddress[(unnamed local variable)] : # 91| r91_65(glval) = FunctionAddress[final_suspend] : # 91| r91_66(suspend_always) = Call[final_suspend] : func:r91_65, this:r91_64 -# 91| m91_67(unknown) = ^CallSideEffect : ~m0_23 -# 91| m91_68(unknown) = Chi : total:m0_23, partial:m91_67 +# 91| m91_67(unknown) = ^CallSideEffect : ~m0_22 +# 91| m91_68(unknown) = Chi : total:m0_22, partial:m91_67 # 91| v91_69(void) = ^IndirectReadSideEffect[-1] : &:r91_64, ~m91_68 # 91| m91_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_64 # 91| m91_71(unknown) = Chi : total:m91_68, partial:m91_70 -#-----| r0_28(glval) = VariableAddress[#temp0:0] : +#-----| r0_27(glval) = VariableAddress[#temp0:0] : # 91| r91_72(glval) = VariableAddress[#temp91:21] : # 91| r91_73(glval) = VariableAddress[(unnamed local variable)] : # 91| r91_74(glval) = FunctionAddress[final_suspend] : @@ -1036,16 +1034,16 @@ coroutines.cpp: # 91| m91_81(suspend_always) = Store[#temp91:21] : &:r91_72, r91_75 # 91| m91_82(unknown) = Chi : total:m91_80, partial:m91_81 # 91| r91_83(suspend_always *) = CopyValue : r91_72 -# 91| m91_84(suspend_always *) = Store[#temp0:0] : &:r0_28, r91_83 -#-----| r0_29(suspend_always *) = Load[#temp0:0] : &:r0_28, m91_84 -# 91| r91_85(glval) = CopyValue : r0_29 +# 91| m91_84(suspend_always *) = Store[#temp0:0] : &:r0_27, r91_83 +#-----| r0_28(suspend_always *) = Load[#temp0:0] : &:r0_27, m91_84 +# 91| r91_85(glval) = CopyValue : r0_28 # 91| r91_86(glval) = Convert : r91_85 # 91| r91_87(glval) = FunctionAddress[await_ready] : # 91| r91_88(bool) = Call[await_ready] : func:r91_87, this:r91_86 # 91| m91_89(unknown) = ^CallSideEffect : ~m91_82 # 91| m91_90(unknown) = Chi : total:m91_82, partial:m91_89 # 91| v91_91(void) = ^IndirectReadSideEffect[-1] : &:r91_86, ~m91_90 -#-----| v0_30(void) = ConditionalBranch : r91_88 +#-----| v0_29(void) = ConditionalBranch : r91_88 #-----| False -> Block 5 #-----| True -> Block 4 @@ -1053,40 +1051,40 @@ coroutines.cpp: # 91| m91_92(unknown) = Phi : from 3:~m91_90, from 5:~m91_122 # 91| r91_93(suspend_always *) = CopyValue : r91_83 # 91| r91_94(glval) = CopyValue : r91_93 -#-----| r0_31(glval) = Convert : r91_94 +#-----| r0_30(glval) = Convert : r91_94 # 91| r91_95(glval) = FunctionAddress[await_resume] : -# 91| v91_96(void) = Call[await_resume] : func:r91_95, this:r0_31 +# 91| v91_96(void) = Call[await_resume] : func:r91_95, this:r0_30 # 91| m91_97(unknown) = ^CallSideEffect : ~m91_92 # 91| m91_98(unknown) = Chi : total:m91_92, partial:m91_97 -#-----| v0_32(void) = ^IndirectReadSideEffect[-1] : &:r0_31, ~m91_98 +#-----| v0_31(void) = ^IndirectReadSideEffect[-1] : &:r0_30, ~m91_98 # 91| r91_99(glval) = VariableAddress[#return] : # 91| v91_100(void) = ReturnValue : &:r91_99, ~m91_98 # 91| v91_101(void) = AliasedUse : ~m91_98 # 91| v91_102(void) = ExitFunction : # 91| Block 5 -# 91| r91_103(suspend_always *) = CopyValue : r91_83 -# 91| r91_104(glval) = CopyValue : r91_103 -#-----| r0_33(glval) = Convert : r91_104 -# 91| r91_105(glval) = FunctionAddress[await_suspend] : -# 91| r91_106(glval>) = VariableAddress[#temp91:21] : -# 91| m91_107(coroutine_handle) = Uninitialized[#temp91:21] : &:r91_106 -# 91| m91_108(unknown) = Chi : total:m91_90, partial:m91_107 -# 91| r91_109(glval) = FunctionAddress[coroutine_handle] : -# 91| r91_110(glval>) = VariableAddress : -# 91| r91_111(glval>) = Convert : r91_110 -# 91| r91_112(coroutine_handle &) = CopyValue : r91_111 -# 91| v91_113(void) = Call[coroutine_handle] : func:r91_109, this:r91_106, 0:r91_112 -# 91| m91_114(unknown) = ^CallSideEffect : ~m91_108 -# 91| m91_115(unknown) = Chi : total:m91_108, partial:m91_114 -# 91| v91_116(void) = ^BufferReadSideEffect[0] : &:r91_112, ~m91_115 -# 91| m91_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r91_106 -# 91| m91_118(unknown) = Chi : total:m91_115, partial:m91_117 -# 91| r91_119(coroutine_handle) = Load[#temp91:21] : &:r91_106, ~m91_118 -# 91| v91_120(void) = Call[await_suspend] : func:r91_105, this:r0_33, 0:r91_119 -# 91| m91_121(unknown) = ^CallSideEffect : ~m91_118 -# 91| m91_122(unknown) = Chi : total:m91_118, partial:m91_121 -#-----| v0_34(void) = ^IndirectReadSideEffect[-1] : &:r0_33, ~m91_122 +# 91| r91_103(suspend_always *) = CopyValue : r91_83 +# 91| r91_104(glval) = CopyValue : r91_103 +#-----| r0_32(glval) = Convert : r91_104 +# 91| r91_105(glval) = FunctionAddress[await_suspend] : +# 91| r91_106(glval>) = VariableAddress[#temp91:21] : +# 91| m91_107(coroutine_handle) = Uninitialized[#temp91:21] : &:r91_106 +# 91| m91_108(unknown) = Chi : total:m91_90, partial:m91_107 +# 91| r91_109(glval) = FunctionAddress[coroutine_handle] : +# 91| r91_110(glval>) = VariableAddress[(unnamed local variable)] : +# 91| r91_111(glval>) = Convert : r91_110 +# 91| r91_112(coroutine_handle &) = CopyValue : r91_111 +# 91| v91_113(void) = Call[coroutine_handle] : func:r91_109, this:r91_106, 0:r91_112 +# 91| m91_114(unknown) = ^CallSideEffect : ~m91_108 +# 91| m91_115(unknown) = Chi : total:m91_108, partial:m91_114 +# 91| v91_116(void) = ^BufferReadSideEffect[0] : &:r91_112, ~m91_115 +# 91| m91_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r91_106 +# 91| m91_118(unknown) = Chi : total:m91_115, partial:m91_117 +# 91| r91_119(coroutine_handle) = Load[#temp91:21] : &:r91_106, ~m91_118 +# 91| v91_120(void) = Call[await_suspend] : func:r91_105, this:r0_32, 0:r91_119 +# 91| m91_121(unknown) = ^CallSideEffect : ~m91_118 +# 91| m91_122(unknown) = Chi : total:m91_118, partial:m91_121 +#-----| v0_33(void) = ^IndirectReadSideEffect[-1] : &:r0_32, ~m91_122 #-----| Goto -> Block 4 # 95| co_returnable_void co_yield_value_void(int) @@ -1141,18 +1139,17 @@ coroutines.cpp: #-----| Block 1 #-----| m0_8(unknown) = Phi : from 0:~m95_36, from 2:~m95_63 #-----| r0_9(bool) = Constant[1] : -#-----| r0_10(glval) = VariableAddress : -#-----| m0_11(bool) = Store[?] : &:r0_10, r0_9 -#-----| m0_12(unknown) = Chi : total:m0_8, partial:m0_11 +#-----| r0_10(glval) = VariableAddress[(unnamed local variable)] : +#-----| m0_11(bool) = Store[(unnamed local variable)] : &:r0_10, r0_9 # 95| r95_38(suspend_always *) = CopyValue : r95_29 # 95| r95_39(glval) = CopyValue : r95_38 -#-----| r0_13(glval) = Convert : r95_39 +#-----| r0_12(glval) = Convert : r95_39 # 95| r95_40(glval) = FunctionAddress[await_resume] : -# 95| v95_41(void) = Call[await_resume] : func:r95_40, this:r0_13 -# 95| m95_42(unknown) = ^CallSideEffect : ~m0_12 -# 95| m95_43(unknown) = Chi : total:m0_12, partial:m95_42 -#-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_13, ~m95_43 -#-----| v0_15(void) = CopyValue : v95_41 +# 95| v95_41(void) = Call[await_resume] : func:r95_40, this:r0_12 +# 95| m95_42(unknown) = ^CallSideEffect : ~m0_8 +# 95| m95_43(unknown) = Chi : total:m0_8, partial:m95_42 +#-----| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_12, ~m95_43 +#-----| v0_14(void) = CopyValue : v95_41 # 96| r96_1(glval) = VariableAddress[(unnamed local variable)] : # 96| r96_2(glval) = FunctionAddress[yield_value] : # 96| r96_3(glval) = VariableAddress[i] : @@ -1163,7 +1160,7 @@ coroutines.cpp: # 96| v96_8(void) = ^IndirectReadSideEffect[-1] : &:r96_1, ~m96_7 # 96| m96_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_1 # 96| m96_10(unknown) = Chi : total:m96_7, partial:m96_9 -#-----| r0_16(glval) = VariableAddress[#temp0:0] : +#-----| r0_15(glval) = VariableAddress[#temp0:0] : # 96| r96_11(glval) = VariableAddress[#temp96:13] : # 96| r96_12(glval) = VariableAddress[(unnamed local variable)] : # 96| r96_13(glval) = FunctionAddress[yield_value] : @@ -1178,9 +1175,9 @@ coroutines.cpp: # 96| m96_22(suspend_always) = Store[#temp96:13] : &:r96_11, r96_16 # 96| m96_23(unknown) = Chi : total:m96_21, partial:m96_22 # 96| r96_24(suspend_always *) = CopyValue : r96_11 -# 96| m96_25(suspend_always *) = Store[#temp0:0] : &:r0_16, r96_24 -#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_16, m96_25 -# 96| r96_26(glval) = CopyValue : r0_17 +# 96| m96_25(suspend_always *) = Store[#temp0:0] : &:r0_15, r96_24 +#-----| r0_16(suspend_always *) = Load[#temp0:0] : &:r0_15, m96_25 +# 96| r96_26(glval) = CopyValue : r0_16 # 96| r96_27(glval) = Convert : r96_26 # 96| r96_28(glval) = FunctionAddress[await_ready] : # 96| r96_29(bool) = Call[await_ready] : func:r96_28, this:r96_27 @@ -1192,88 +1189,88 @@ coroutines.cpp: #-----| True -> Block 3 # 95| Block 2 -# 95| r95_44(suspend_always *) = CopyValue : r95_29 -# 95| r95_45(glval) = CopyValue : r95_44 -#-----| r0_18(glval) = Convert : r95_45 -# 95| r95_46(glval) = FunctionAddress[await_suspend] : -# 95| r95_47(glval>) = VariableAddress[#temp95:20] : -# 95| m95_48(coroutine_handle) = Uninitialized[#temp95:20] : &:r95_47 -# 95| m95_49(unknown) = Chi : total:m95_36, partial:m95_48 -# 95| r95_50(glval) = FunctionAddress[coroutine_handle] : -# 95| r95_51(glval>) = VariableAddress : -# 95| r95_52(glval>) = Convert : r95_51 -# 95| r95_53(coroutine_handle &) = CopyValue : r95_52 -# 95| v95_54(void) = Call[coroutine_handle] : func:r95_50, this:r95_47, 0:r95_53 -# 95| m95_55(unknown) = ^CallSideEffect : ~m95_49 -# 95| m95_56(unknown) = Chi : total:m95_49, partial:m95_55 -# 95| v95_57(void) = ^BufferReadSideEffect[0] : &:r95_53, ~m95_56 -# 95| m95_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r95_47 -# 95| m95_59(unknown) = Chi : total:m95_56, partial:m95_58 -# 95| r95_60(coroutine_handle) = Load[#temp95:20] : &:r95_47, ~m95_59 -# 95| v95_61(void) = Call[await_suspend] : func:r95_46, this:r0_18, 0:r95_60 -# 95| m95_62(unknown) = ^CallSideEffect : ~m95_59 -# 95| m95_63(unknown) = Chi : total:m95_59, partial:m95_62 -#-----| v0_19(void) = ^IndirectReadSideEffect[-1] : &:r0_18, ~m95_63 +# 95| r95_44(suspend_always *) = CopyValue : r95_29 +# 95| r95_45(glval) = CopyValue : r95_44 +#-----| r0_17(glval) = Convert : r95_45 +# 95| r95_46(glval) = FunctionAddress[await_suspend] : +# 95| r95_47(glval>) = VariableAddress[#temp95:20] : +# 95| m95_48(coroutine_handle) = Uninitialized[#temp95:20] : &:r95_47 +# 95| m95_49(unknown) = Chi : total:m95_36, partial:m95_48 +# 95| r95_50(glval) = FunctionAddress[coroutine_handle] : +# 95| r95_51(glval>) = VariableAddress[(unnamed local variable)] : +# 95| r95_52(glval>) = Convert : r95_51 +# 95| r95_53(coroutine_handle &) = CopyValue : r95_52 +# 95| v95_54(void) = Call[coroutine_handle] : func:r95_50, this:r95_47, 0:r95_53 +# 95| m95_55(unknown) = ^CallSideEffect : ~m95_49 +# 95| m95_56(unknown) = Chi : total:m95_49, partial:m95_55 +# 95| v95_57(void) = ^BufferReadSideEffect[0] : &:r95_53, ~m95_56 +# 95| m95_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r95_47 +# 95| m95_59(unknown) = Chi : total:m95_56, partial:m95_58 +# 95| r95_60(coroutine_handle) = Load[#temp95:20] : &:r95_47, ~m95_59 +# 95| v95_61(void) = Call[await_suspend] : func:r95_46, this:r0_17, 0:r95_60 +# 95| m95_62(unknown) = ^CallSideEffect : ~m95_59 +# 95| m95_63(unknown) = Chi : total:m95_59, partial:m95_62 +#-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m95_63 #-----| Goto -> Block 1 # 96| Block 3 # 96| m96_34(unknown) = Phi : from 1:~m96_31, from 4:~m96_60 # 96| r96_35(suspend_always *) = CopyValue : r96_24 # 96| r96_36(glval) = CopyValue : r96_35 -#-----| r0_20(glval) = Convert : r96_36 +#-----| r0_19(glval) = Convert : r96_36 # 96| r96_37(glval) = FunctionAddress[await_resume] : -# 96| v96_38(void) = Call[await_resume] : func:r96_37, this:r0_20 +# 96| v96_38(void) = Call[await_resume] : func:r96_37, this:r0_19 # 96| m96_39(unknown) = ^CallSideEffect : ~m96_34 # 96| m96_40(unknown) = Chi : total:m96_34, partial:m96_39 -#-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m96_40 -#-----| r0_22(glval) = VariableAddress[(unnamed local variable)] : -#-----| r0_23(glval) = FunctionAddress[return_void] : -#-----| v0_24(void) = Call[return_void] : func:r0_23, this:r0_22 -#-----| m0_25(unknown) = ^CallSideEffect : ~m96_40 -#-----| m0_26(unknown) = Chi : total:m96_40, partial:m0_25 -#-----| v0_27(void) = ^IndirectReadSideEffect[-1] : &:r0_22, ~m0_26 -#-----| m0_28(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_22 -#-----| m0_29(unknown) = Chi : total:m0_26, partial:m0_28 +#-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~m96_40 +#-----| r0_21(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_22(glval) = FunctionAddress[return_void] : +#-----| v0_23(void) = Call[return_void] : func:r0_22, this:r0_21 +#-----| m0_24(unknown) = ^CallSideEffect : ~m96_40 +#-----| m0_25(unknown) = Chi : total:m96_40, partial:m0_24 +#-----| v0_26(void) = ^IndirectReadSideEffect[-1] : &:r0_21, ~m0_25 +#-----| m0_27(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_21 +#-----| m0_28(unknown) = Chi : total:m0_25, partial:m0_27 # 97| v97_1(void) = NoOp : -#-----| v0_30(void) = NoOp : +#-----| v0_29(void) = NoOp : #-----| Goto (back edge) -> Block 5 # 96| Block 4 -# 96| r96_41(suspend_always *) = CopyValue : r96_24 -# 96| r96_42(glval) = CopyValue : r96_41 -#-----| r0_31(glval) = Convert : r96_42 -# 96| r96_43(glval) = FunctionAddress[await_suspend] : -# 96| r96_44(glval>) = VariableAddress[#temp96:3] : -# 96| m96_45(coroutine_handle) = Uninitialized[#temp96:3] : &:r96_44 -# 96| m96_46(unknown) = Chi : total:m96_31, partial:m96_45 -# 96| r96_47(glval) = FunctionAddress[coroutine_handle] : -# 96| r96_48(glval>) = VariableAddress : -# 96| r96_49(glval>) = Convert : r96_48 -# 96| r96_50(coroutine_handle &) = CopyValue : r96_49 -# 96| v96_51(void) = Call[coroutine_handle] : func:r96_47, this:r96_44, 0:r96_50 -# 96| m96_52(unknown) = ^CallSideEffect : ~m96_46 -# 96| m96_53(unknown) = Chi : total:m96_46, partial:m96_52 -# 96| v96_54(void) = ^BufferReadSideEffect[0] : &:r96_50, ~m96_53 -# 96| m96_55(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r96_44 -# 96| m96_56(unknown) = Chi : total:m96_53, partial:m96_55 -# 96| r96_57(coroutine_handle) = Load[#temp96:3] : &:r96_44, ~m96_56 -# 96| v96_58(void) = Call[await_suspend] : func:r96_43, this:r0_31, 0:r96_57 -# 96| m96_59(unknown) = ^CallSideEffect : ~m96_56 -# 96| m96_60(unknown) = Chi : total:m96_56, partial:m96_59 -#-----| v0_32(void) = ^IndirectReadSideEffect[-1] : &:r0_31, ~m96_60 +# 96| r96_41(suspend_always *) = CopyValue : r96_24 +# 96| r96_42(glval) = CopyValue : r96_41 +#-----| r0_30(glval) = Convert : r96_42 +# 96| r96_43(glval) = FunctionAddress[await_suspend] : +# 96| r96_44(glval>) = VariableAddress[#temp96:3] : +# 96| m96_45(coroutine_handle) = Uninitialized[#temp96:3] : &:r96_44 +# 96| m96_46(unknown) = Chi : total:m96_31, partial:m96_45 +# 96| r96_47(glval) = FunctionAddress[coroutine_handle] : +# 96| r96_48(glval>) = VariableAddress[(unnamed local variable)] : +# 96| r96_49(glval>) = Convert : r96_48 +# 96| r96_50(coroutine_handle &) = CopyValue : r96_49 +# 96| v96_51(void) = Call[coroutine_handle] : func:r96_47, this:r96_44, 0:r96_50 +# 96| m96_52(unknown) = ^CallSideEffect : ~m96_46 +# 96| m96_53(unknown) = Chi : total:m96_46, partial:m96_52 +# 96| v96_54(void) = ^BufferReadSideEffect[0] : &:r96_50, ~m96_53 +# 96| m96_55(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r96_44 +# 96| m96_56(unknown) = Chi : total:m96_53, partial:m96_55 +# 96| r96_57(coroutine_handle) = Load[#temp96:3] : &:r96_44, ~m96_56 +# 96| v96_58(void) = Call[await_suspend] : func:r96_43, this:r0_30, 0:r96_57 +# 96| m96_59(unknown) = ^CallSideEffect : ~m96_56 +# 96| m96_60(unknown) = Chi : total:m96_56, partial:m96_59 +#-----| v0_31(void) = ^IndirectReadSideEffect[-1] : &:r0_30, ~m96_60 #-----| Goto -> Block 3 #-----| Block 5 -#-----| v0_33(void) = NoOp : +#-----| v0_32(void) = NoOp : # 95| r95_64(glval) = VariableAddress[(unnamed local variable)] : # 95| r95_65(glval) = FunctionAddress[final_suspend] : # 95| r95_66(suspend_always) = Call[final_suspend] : func:r95_65, this:r95_64 -# 95| m95_67(unknown) = ^CallSideEffect : ~m0_29 -# 95| m95_68(unknown) = Chi : total:m0_29, partial:m95_67 +# 95| m95_67(unknown) = ^CallSideEffect : ~m0_28 +# 95| m95_68(unknown) = Chi : total:m0_28, partial:m95_67 # 95| v95_69(void) = ^IndirectReadSideEffect[-1] : &:r95_64, ~m95_68 # 95| m95_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_64 # 95| m95_71(unknown) = Chi : total:m95_68, partial:m95_70 -#-----| r0_34(glval) = VariableAddress[#temp0:0] : +#-----| r0_33(glval) = VariableAddress[#temp0:0] : # 95| r95_72(glval) = VariableAddress[#temp95:20] : # 95| r95_73(glval) = VariableAddress[(unnamed local variable)] : # 95| r95_74(glval) = FunctionAddress[final_suspend] : @@ -1286,16 +1283,16 @@ coroutines.cpp: # 95| m95_81(suspend_always) = Store[#temp95:20] : &:r95_72, r95_75 # 95| m95_82(unknown) = Chi : total:m95_80, partial:m95_81 # 95| r95_83(suspend_always *) = CopyValue : r95_72 -# 95| m95_84(suspend_always *) = Store[#temp0:0] : &:r0_34, r95_83 -#-----| r0_35(suspend_always *) = Load[#temp0:0] : &:r0_34, m95_84 -# 95| r95_85(glval) = CopyValue : r0_35 +# 95| m95_84(suspend_always *) = Store[#temp0:0] : &:r0_33, r95_83 +#-----| r0_34(suspend_always *) = Load[#temp0:0] : &:r0_33, m95_84 +# 95| r95_85(glval) = CopyValue : r0_34 # 95| r95_86(glval) = Convert : r95_85 # 95| r95_87(glval) = FunctionAddress[await_ready] : # 95| r95_88(bool) = Call[await_ready] : func:r95_87, this:r95_86 # 95| m95_89(unknown) = ^CallSideEffect : ~m95_82 # 95| m95_90(unknown) = Chi : total:m95_82, partial:m95_89 # 95| v95_91(void) = ^IndirectReadSideEffect[-1] : &:r95_86, ~m95_90 -#-----| v0_36(void) = ConditionalBranch : r95_88 +#-----| v0_35(void) = ConditionalBranch : r95_88 #-----| False -> Block 7 #-----| True -> Block 6 @@ -1303,40 +1300,40 @@ coroutines.cpp: # 95| m95_92(unknown) = Phi : from 5:~m95_90, from 7:~m95_122 # 95| r95_93(suspend_always *) = CopyValue : r95_83 # 95| r95_94(glval) = CopyValue : r95_93 -#-----| r0_37(glval) = Convert : r95_94 +#-----| r0_36(glval) = Convert : r95_94 # 95| r95_95(glval) = FunctionAddress[await_resume] : -# 95| v95_96(void) = Call[await_resume] : func:r95_95, this:r0_37 +# 95| v95_96(void) = Call[await_resume] : func:r95_95, this:r0_36 # 95| m95_97(unknown) = ^CallSideEffect : ~m95_92 # 95| m95_98(unknown) = Chi : total:m95_92, partial:m95_97 -#-----| v0_38(void) = ^IndirectReadSideEffect[-1] : &:r0_37, ~m95_98 +#-----| v0_37(void) = ^IndirectReadSideEffect[-1] : &:r0_36, ~m95_98 # 95| r95_99(glval) = VariableAddress[#return] : # 95| v95_100(void) = ReturnValue : &:r95_99, ~m95_98 # 95| v95_101(void) = AliasedUse : ~m95_98 # 95| v95_102(void) = ExitFunction : # 95| Block 7 -# 95| r95_103(suspend_always *) = CopyValue : r95_83 -# 95| r95_104(glval) = CopyValue : r95_103 -#-----| r0_39(glval) = Convert : r95_104 -# 95| r95_105(glval) = FunctionAddress[await_suspend] : -# 95| r95_106(glval>) = VariableAddress[#temp95:20] : -# 95| m95_107(coroutine_handle) = Uninitialized[#temp95:20] : &:r95_106 -# 95| m95_108(unknown) = Chi : total:m95_90, partial:m95_107 -# 95| r95_109(glval) = FunctionAddress[coroutine_handle] : -# 95| r95_110(glval>) = VariableAddress : -# 95| r95_111(glval>) = Convert : r95_110 -# 95| r95_112(coroutine_handle &) = CopyValue : r95_111 -# 95| v95_113(void) = Call[coroutine_handle] : func:r95_109, this:r95_106, 0:r95_112 -# 95| m95_114(unknown) = ^CallSideEffect : ~m95_108 -# 95| m95_115(unknown) = Chi : total:m95_108, partial:m95_114 -# 95| v95_116(void) = ^BufferReadSideEffect[0] : &:r95_112, ~m95_115 -# 95| m95_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r95_106 -# 95| m95_118(unknown) = Chi : total:m95_115, partial:m95_117 -# 95| r95_119(coroutine_handle) = Load[#temp95:20] : &:r95_106, ~m95_118 -# 95| v95_120(void) = Call[await_suspend] : func:r95_105, this:r0_39, 0:r95_119 -# 95| m95_121(unknown) = ^CallSideEffect : ~m95_118 -# 95| m95_122(unknown) = Chi : total:m95_118, partial:m95_121 -#-----| v0_40(void) = ^IndirectReadSideEffect[-1] : &:r0_39, ~m95_122 +# 95| r95_103(suspend_always *) = CopyValue : r95_83 +# 95| r95_104(glval) = CopyValue : r95_103 +#-----| r0_38(glval) = Convert : r95_104 +# 95| r95_105(glval) = FunctionAddress[await_suspend] : +# 95| r95_106(glval>) = VariableAddress[#temp95:20] : +# 95| m95_107(coroutine_handle) = Uninitialized[#temp95:20] : &:r95_106 +# 95| m95_108(unknown) = Chi : total:m95_90, partial:m95_107 +# 95| r95_109(glval) = FunctionAddress[coroutine_handle] : +# 95| r95_110(glval>) = VariableAddress[(unnamed local variable)] : +# 95| r95_111(glval>) = Convert : r95_110 +# 95| r95_112(coroutine_handle &) = CopyValue : r95_111 +# 95| v95_113(void) = Call[coroutine_handle] : func:r95_109, this:r95_106, 0:r95_112 +# 95| m95_114(unknown) = ^CallSideEffect : ~m95_108 +# 95| m95_115(unknown) = Chi : total:m95_108, partial:m95_114 +# 95| v95_116(void) = ^BufferReadSideEffect[0] : &:r95_112, ~m95_115 +# 95| m95_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r95_106 +# 95| m95_118(unknown) = Chi : total:m95_115, partial:m95_117 +# 95| r95_119(coroutine_handle) = Load[#temp95:20] : &:r95_106, ~m95_118 +# 95| v95_120(void) = Call[await_suspend] : func:r95_105, this:r0_38, 0:r95_119 +# 95| m95_121(unknown) = ^CallSideEffect : ~m95_118 +# 95| m95_122(unknown) = Chi : total:m95_118, partial:m95_121 +#-----| v0_39(void) = ^IndirectReadSideEffect[-1] : &:r0_38, ~m95_122 #-----| Goto -> Block 6 # 99| co_returnable_value co_yield_value_value(int) @@ -1391,18 +1388,17 @@ coroutines.cpp: #-----| Block 1 #-----| m0_8(unknown) = Phi : from 0:~m99_36, from 2:~m99_63 #-----| r0_9(bool) = Constant[1] : -#-----| r0_10(glval) = VariableAddress : -#-----| m0_11(bool) = Store[?] : &:r0_10, r0_9 -#-----| m0_12(unknown) = Chi : total:m0_8, partial:m0_11 +#-----| r0_10(glval) = VariableAddress[(unnamed local variable)] : +#-----| m0_11(bool) = Store[(unnamed local variable)] : &:r0_10, r0_9 # 99| r99_38(suspend_always *) = CopyValue : r99_29 # 99| r99_39(glval) = CopyValue : r99_38 -#-----| r0_13(glval) = Convert : r99_39 +#-----| r0_12(glval) = Convert : r99_39 # 99| r99_40(glval) = FunctionAddress[await_resume] : -# 99| v99_41(void) = Call[await_resume] : func:r99_40, this:r0_13 -# 99| m99_42(unknown) = ^CallSideEffect : ~m0_12 -# 99| m99_43(unknown) = Chi : total:m0_12, partial:m99_42 -#-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_13, ~m99_43 -#-----| v0_15(void) = CopyValue : v99_41 +# 99| v99_41(void) = Call[await_resume] : func:r99_40, this:r0_12 +# 99| m99_42(unknown) = ^CallSideEffect : ~m0_8 +# 99| m99_43(unknown) = Chi : total:m0_8, partial:m99_42 +#-----| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_12, ~m99_43 +#-----| v0_14(void) = CopyValue : v99_41 # 100| r100_1(glval) = VariableAddress[(unnamed local variable)] : # 100| r100_2(glval) = FunctionAddress[yield_value] : # 100| r100_3(glval) = VariableAddress[i] : @@ -1413,7 +1409,7 @@ coroutines.cpp: # 100| v100_8(void) = ^IndirectReadSideEffect[-1] : &:r100_1, ~m100_7 # 100| m100_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_1 # 100| m100_10(unknown) = Chi : total:m100_7, partial:m100_9 -#-----| r0_16(glval) = VariableAddress[#temp0:0] : +#-----| r0_15(glval) = VariableAddress[#temp0:0] : # 100| r100_11(glval) = VariableAddress[#temp100:13] : # 100| r100_12(glval) = VariableAddress[(unnamed local variable)] : # 100| r100_13(glval) = FunctionAddress[yield_value] : @@ -1428,9 +1424,9 @@ coroutines.cpp: # 100| m100_22(suspend_always) = Store[#temp100:13] : &:r100_11, r100_16 # 100| m100_23(unknown) = Chi : total:m100_21, partial:m100_22 # 100| r100_24(suspend_always *) = CopyValue : r100_11 -# 100| m100_25(suspend_always *) = Store[#temp0:0] : &:r0_16, r100_24 -#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_16, m100_25 -# 100| r100_26(glval) = CopyValue : r0_17 +# 100| m100_25(suspend_always *) = Store[#temp0:0] : &:r0_15, r100_24 +#-----| r0_16(suspend_always *) = Load[#temp0:0] : &:r0_15, m100_25 +# 100| r100_26(glval) = CopyValue : r0_16 # 100| r100_27(glval) = Convert : r100_26 # 100| r100_28(glval) = FunctionAddress[await_ready] : # 100| r100_29(bool) = Call[await_ready] : func:r100_28, this:r100_27 @@ -1442,41 +1438,41 @@ coroutines.cpp: #-----| True -> Block 3 # 99| Block 2 -# 99| r99_44(suspend_always *) = CopyValue : r99_29 -# 99| r99_45(glval) = CopyValue : r99_44 -#-----| r0_18(glval) = Convert : r99_45 -# 99| r99_46(glval) = FunctionAddress[await_suspend] : -# 99| r99_47(glval>) = VariableAddress[#temp99:21] : -# 99| m99_48(coroutine_handle) = Uninitialized[#temp99:21] : &:r99_47 -# 99| m99_49(unknown) = Chi : total:m99_36, partial:m99_48 -# 99| r99_50(glval) = FunctionAddress[coroutine_handle] : -# 99| r99_51(glval>) = VariableAddress : -# 99| r99_52(glval>) = Convert : r99_51 -# 99| r99_53(coroutine_handle &) = CopyValue : r99_52 -# 99| v99_54(void) = Call[coroutine_handle] : func:r99_50, this:r99_47, 0:r99_53 -# 99| m99_55(unknown) = ^CallSideEffect : ~m99_49 -# 99| m99_56(unknown) = Chi : total:m99_49, partial:m99_55 -# 99| v99_57(void) = ^BufferReadSideEffect[0] : &:r99_53, ~m99_56 -# 99| m99_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r99_47 -# 99| m99_59(unknown) = Chi : total:m99_56, partial:m99_58 -# 99| r99_60(coroutine_handle) = Load[#temp99:21] : &:r99_47, ~m99_59 -# 99| v99_61(void) = Call[await_suspend] : func:r99_46, this:r0_18, 0:r99_60 -# 99| m99_62(unknown) = ^CallSideEffect : ~m99_59 -# 99| m99_63(unknown) = Chi : total:m99_59, partial:m99_62 -#-----| v0_19(void) = ^IndirectReadSideEffect[-1] : &:r0_18, ~m99_63 +# 99| r99_44(suspend_always *) = CopyValue : r99_29 +# 99| r99_45(glval) = CopyValue : r99_44 +#-----| r0_17(glval) = Convert : r99_45 +# 99| r99_46(glval) = FunctionAddress[await_suspend] : +# 99| r99_47(glval>) = VariableAddress[#temp99:21] : +# 99| m99_48(coroutine_handle) = Uninitialized[#temp99:21] : &:r99_47 +# 99| m99_49(unknown) = Chi : total:m99_36, partial:m99_48 +# 99| r99_50(glval) = FunctionAddress[coroutine_handle] : +# 99| r99_51(glval>) = VariableAddress[(unnamed local variable)] : +# 99| r99_52(glval>) = Convert : r99_51 +# 99| r99_53(coroutine_handle &) = CopyValue : r99_52 +# 99| v99_54(void) = Call[coroutine_handle] : func:r99_50, this:r99_47, 0:r99_53 +# 99| m99_55(unknown) = ^CallSideEffect : ~m99_49 +# 99| m99_56(unknown) = Chi : total:m99_49, partial:m99_55 +# 99| v99_57(void) = ^BufferReadSideEffect[0] : &:r99_53, ~m99_56 +# 99| m99_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r99_47 +# 99| m99_59(unknown) = Chi : total:m99_56, partial:m99_58 +# 99| r99_60(coroutine_handle) = Load[#temp99:21] : &:r99_47, ~m99_59 +# 99| v99_61(void) = Call[await_suspend] : func:r99_46, this:r0_17, 0:r99_60 +# 99| m99_62(unknown) = ^CallSideEffect : ~m99_59 +# 99| m99_63(unknown) = Chi : total:m99_59, partial:m99_62 +#-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m99_63 #-----| Goto -> Block 1 # 100| Block 3 # 100| m100_34(unknown) = Phi : from 1:~m100_31, from 4:~m100_60 # 100| r100_35(suspend_always *) = CopyValue : r100_24 # 100| r100_36(glval) = CopyValue : r100_35 -#-----| r0_20(glval) = Convert : r100_36 +#-----| r0_19(glval) = Convert : r100_36 # 100| r100_37(glval) = FunctionAddress[await_resume] : -# 100| v100_38(void) = Call[await_resume] : func:r100_37, this:r0_20 +# 100| v100_38(void) = Call[await_resume] : func:r100_37, this:r0_19 # 100| m100_39(unknown) = ^CallSideEffect : ~m100_34 # 100| m100_40(unknown) = Chi : total:m100_34, partial:m100_39 -#-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m100_40 -#-----| v0_22(void) = NoOp : +#-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~m100_40 +#-----| v0_21(void) = NoOp : # 99| r99_64(glval) = VariableAddress[(unnamed local variable)] : # 99| r99_65(glval) = FunctionAddress[final_suspend] : # 99| r99_66(suspend_always) = Call[final_suspend] : func:r99_65, this:r99_64 @@ -1485,7 +1481,7 @@ coroutines.cpp: # 99| v99_69(void) = ^IndirectReadSideEffect[-1] : &:r99_64, ~m99_68 # 99| m99_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_64 # 99| m99_71(unknown) = Chi : total:m99_68, partial:m99_70 -#-----| r0_23(glval) = VariableAddress[#temp0:0] : +#-----| r0_22(glval) = VariableAddress[#temp0:0] : # 99| r99_72(glval) = VariableAddress[#temp99:21] : # 99| r99_73(glval) = VariableAddress[(unnamed local variable)] : # 99| r99_74(glval) = FunctionAddress[final_suspend] : @@ -1498,82 +1494,82 @@ coroutines.cpp: # 99| m99_81(suspend_always) = Store[#temp99:21] : &:r99_72, r99_75 # 99| m99_82(unknown) = Chi : total:m99_80, partial:m99_81 # 99| r99_83(suspend_always *) = CopyValue : r99_72 -# 99| m99_84(suspend_always *) = Store[#temp0:0] : &:r0_23, r99_83 -#-----| r0_24(suspend_always *) = Load[#temp0:0] : &:r0_23, m99_84 -# 99| r99_85(glval) = CopyValue : r0_24 +# 99| m99_84(suspend_always *) = Store[#temp0:0] : &:r0_22, r99_83 +#-----| r0_23(suspend_always *) = Load[#temp0:0] : &:r0_22, m99_84 +# 99| r99_85(glval) = CopyValue : r0_23 # 99| r99_86(glval) = Convert : r99_85 # 99| r99_87(glval) = FunctionAddress[await_ready] : # 99| r99_88(bool) = Call[await_ready] : func:r99_87, this:r99_86 # 99| m99_89(unknown) = ^CallSideEffect : ~m99_82 # 99| m99_90(unknown) = Chi : total:m99_82, partial:m99_89 # 99| v99_91(void) = ^IndirectReadSideEffect[-1] : &:r99_86, ~m99_90 -#-----| v0_25(void) = ConditionalBranch : r99_88 +#-----| v0_24(void) = ConditionalBranch : r99_88 #-----| False -> Block 6 #-----| True -> Block 5 # 100| Block 4 -# 100| r100_41(suspend_always *) = CopyValue : r100_24 -# 100| r100_42(glval) = CopyValue : r100_41 -#-----| r0_26(glval) = Convert : r100_42 -# 100| r100_43(glval) = FunctionAddress[await_suspend] : -# 100| r100_44(glval>) = VariableAddress[#temp100:3] : -# 100| m100_45(coroutine_handle) = Uninitialized[#temp100:3] : &:r100_44 -# 100| m100_46(unknown) = Chi : total:m100_31, partial:m100_45 -# 100| r100_47(glval) = FunctionAddress[coroutine_handle] : -# 100| r100_48(glval>) = VariableAddress : -# 100| r100_49(glval>) = Convert : r100_48 -# 100| r100_50(coroutine_handle &) = CopyValue : r100_49 -# 100| v100_51(void) = Call[coroutine_handle] : func:r100_47, this:r100_44, 0:r100_50 -# 100| m100_52(unknown) = ^CallSideEffect : ~m100_46 -# 100| m100_53(unknown) = Chi : total:m100_46, partial:m100_52 -# 100| v100_54(void) = ^BufferReadSideEffect[0] : &:r100_50, ~m100_53 -# 100| m100_55(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r100_44 -# 100| m100_56(unknown) = Chi : total:m100_53, partial:m100_55 -# 100| r100_57(coroutine_handle) = Load[#temp100:3] : &:r100_44, ~m100_56 -# 100| v100_58(void) = Call[await_suspend] : func:r100_43, this:r0_26, 0:r100_57 -# 100| m100_59(unknown) = ^CallSideEffect : ~m100_56 -# 100| m100_60(unknown) = Chi : total:m100_56, partial:m100_59 -#-----| v0_27(void) = ^IndirectReadSideEffect[-1] : &:r0_26, ~m100_60 +# 100| r100_41(suspend_always *) = CopyValue : r100_24 +# 100| r100_42(glval) = CopyValue : r100_41 +#-----| r0_25(glval) = Convert : r100_42 +# 100| r100_43(glval) = FunctionAddress[await_suspend] : +# 100| r100_44(glval>) = VariableAddress[#temp100:3] : +# 100| m100_45(coroutine_handle) = Uninitialized[#temp100:3] : &:r100_44 +# 100| m100_46(unknown) = Chi : total:m100_31, partial:m100_45 +# 100| r100_47(glval) = FunctionAddress[coroutine_handle] : +# 100| r100_48(glval>) = VariableAddress[(unnamed local variable)] : +# 100| r100_49(glval>) = Convert : r100_48 +# 100| r100_50(coroutine_handle &) = CopyValue : r100_49 +# 100| v100_51(void) = Call[coroutine_handle] : func:r100_47, this:r100_44, 0:r100_50 +# 100| m100_52(unknown) = ^CallSideEffect : ~m100_46 +# 100| m100_53(unknown) = Chi : total:m100_46, partial:m100_52 +# 100| v100_54(void) = ^BufferReadSideEffect[0] : &:r100_50, ~m100_53 +# 100| m100_55(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r100_44 +# 100| m100_56(unknown) = Chi : total:m100_53, partial:m100_55 +# 100| r100_57(coroutine_handle) = Load[#temp100:3] : &:r100_44, ~m100_56 +# 100| v100_58(void) = Call[await_suspend] : func:r100_43, this:r0_25, 0:r100_57 +# 100| m100_59(unknown) = ^CallSideEffect : ~m100_56 +# 100| m100_60(unknown) = Chi : total:m100_56, partial:m100_59 +#-----| v0_26(void) = ^IndirectReadSideEffect[-1] : &:r0_25, ~m100_60 #-----| Goto -> Block 3 # 99| Block 5 # 99| m99_92(unknown) = Phi : from 3:~m99_90, from 6:~m99_122 # 99| r99_93(suspend_always *) = CopyValue : r99_83 # 99| r99_94(glval) = CopyValue : r99_93 -#-----| r0_28(glval) = Convert : r99_94 +#-----| r0_27(glval) = Convert : r99_94 # 99| r99_95(glval) = FunctionAddress[await_resume] : -# 99| v99_96(void) = Call[await_resume] : func:r99_95, this:r0_28 +# 99| v99_96(void) = Call[await_resume] : func:r99_95, this:r0_27 # 99| m99_97(unknown) = ^CallSideEffect : ~m99_92 # 99| m99_98(unknown) = Chi : total:m99_92, partial:m99_97 -#-----| v0_29(void) = ^IndirectReadSideEffect[-1] : &:r0_28, ~m99_98 +#-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m99_98 # 99| r99_99(glval) = VariableAddress[#return] : # 99| v99_100(void) = ReturnValue : &:r99_99, ~m99_98 # 99| v99_101(void) = AliasedUse : ~m99_98 # 99| v99_102(void) = ExitFunction : # 99| Block 6 -# 99| r99_103(suspend_always *) = CopyValue : r99_83 -# 99| r99_104(glval) = CopyValue : r99_103 -#-----| r0_30(glval) = Convert : r99_104 -# 99| r99_105(glval) = FunctionAddress[await_suspend] : -# 99| r99_106(glval>) = VariableAddress[#temp99:21] : -# 99| m99_107(coroutine_handle) = Uninitialized[#temp99:21] : &:r99_106 -# 99| m99_108(unknown) = Chi : total:m99_90, partial:m99_107 -# 99| r99_109(glval) = FunctionAddress[coroutine_handle] : -# 99| r99_110(glval>) = VariableAddress : -# 99| r99_111(glval>) = Convert : r99_110 -# 99| r99_112(coroutine_handle &) = CopyValue : r99_111 -# 99| v99_113(void) = Call[coroutine_handle] : func:r99_109, this:r99_106, 0:r99_112 -# 99| m99_114(unknown) = ^CallSideEffect : ~m99_108 -# 99| m99_115(unknown) = Chi : total:m99_108, partial:m99_114 -# 99| v99_116(void) = ^BufferReadSideEffect[0] : &:r99_112, ~m99_115 -# 99| m99_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r99_106 -# 99| m99_118(unknown) = Chi : total:m99_115, partial:m99_117 -# 99| r99_119(coroutine_handle) = Load[#temp99:21] : &:r99_106, ~m99_118 -# 99| v99_120(void) = Call[await_suspend] : func:r99_105, this:r0_30, 0:r99_119 -# 99| m99_121(unknown) = ^CallSideEffect : ~m99_118 -# 99| m99_122(unknown) = Chi : total:m99_118, partial:m99_121 -#-----| v0_31(void) = ^IndirectReadSideEffect[-1] : &:r0_30, ~m99_122 +# 99| r99_103(suspend_always *) = CopyValue : r99_83 +# 99| r99_104(glval) = CopyValue : r99_103 +#-----| r0_29(glval) = Convert : r99_104 +# 99| r99_105(glval) = FunctionAddress[await_suspend] : +# 99| r99_106(glval>) = VariableAddress[#temp99:21] : +# 99| m99_107(coroutine_handle) = Uninitialized[#temp99:21] : &:r99_106 +# 99| m99_108(unknown) = Chi : total:m99_90, partial:m99_107 +# 99| r99_109(glval) = FunctionAddress[coroutine_handle] : +# 99| r99_110(glval>) = VariableAddress[(unnamed local variable)] : +# 99| r99_111(glval>) = Convert : r99_110 +# 99| r99_112(coroutine_handle &) = CopyValue : r99_111 +# 99| v99_113(void) = Call[coroutine_handle] : func:r99_109, this:r99_106, 0:r99_112 +# 99| m99_114(unknown) = ^CallSideEffect : ~m99_108 +# 99| m99_115(unknown) = Chi : total:m99_108, partial:m99_114 +# 99| v99_116(void) = ^BufferReadSideEffect[0] : &:r99_112, ~m99_115 +# 99| m99_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r99_106 +# 99| m99_118(unknown) = Chi : total:m99_115, partial:m99_117 +# 99| r99_119(coroutine_handle) = Load[#temp99:21] : &:r99_106, ~m99_118 +# 99| v99_120(void) = Call[await_suspend] : func:r99_105, this:r0_29, 0:r99_119 +# 99| m99_121(unknown) = ^CallSideEffect : ~m99_118 +# 99| m99_122(unknown) = Chi : total:m99_118, partial:m99_121 +#-----| v0_30(void) = ^IndirectReadSideEffect[-1] : &:r0_29, ~m99_122 #-----| Goto -> Block 5 # 103| co_returnable_void co_yield_and_return_void(int) @@ -1628,18 +1624,17 @@ coroutines.cpp: #-----| Block 1 #-----| m0_8(unknown) = Phi : from 0:~m103_36, from 2:~m103_63 #-----| r0_9(bool) = Constant[1] : -#-----| r0_10(glval) = VariableAddress : -#-----| m0_11(bool) = Store[?] : &:r0_10, r0_9 -#-----| m0_12(unknown) = Chi : total:m0_8, partial:m0_11 +#-----| r0_10(glval) = VariableAddress[(unnamed local variable)] : +#-----| m0_11(bool) = Store[(unnamed local variable)] : &:r0_10, r0_9 # 103| r103_38(suspend_always *) = CopyValue : r103_29 # 103| r103_39(glval) = CopyValue : r103_38 -#-----| r0_13(glval) = Convert : r103_39 +#-----| r0_12(glval) = Convert : r103_39 # 103| r103_40(glval) = FunctionAddress[await_resume] : -# 103| v103_41(void) = Call[await_resume] : func:r103_40, this:r0_13 -# 103| m103_42(unknown) = ^CallSideEffect : ~m0_12 -# 103| m103_43(unknown) = Chi : total:m0_12, partial:m103_42 -#-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_13, ~m103_43 -#-----| v0_15(void) = CopyValue : v103_41 +# 103| v103_41(void) = Call[await_resume] : func:r103_40, this:r0_12 +# 103| m103_42(unknown) = ^CallSideEffect : ~m0_8 +# 103| m103_43(unknown) = Chi : total:m0_8, partial:m103_42 +#-----| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_12, ~m103_43 +#-----| v0_14(void) = CopyValue : v103_41 # 104| r104_1(glval) = VariableAddress[(unnamed local variable)] : # 104| r104_2(glval) = FunctionAddress[yield_value] : # 104| r104_3(glval) = VariableAddress[i] : @@ -1650,7 +1645,7 @@ coroutines.cpp: # 104| v104_8(void) = ^IndirectReadSideEffect[-1] : &:r104_1, ~m104_7 # 104| m104_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r104_1 # 104| m104_10(unknown) = Chi : total:m104_7, partial:m104_9 -#-----| r0_16(glval) = VariableAddress[#temp0:0] : +#-----| r0_15(glval) = VariableAddress[#temp0:0] : # 104| r104_11(glval) = VariableAddress[#temp104:13] : # 104| r104_12(glval) = VariableAddress[(unnamed local variable)] : # 104| r104_13(glval) = FunctionAddress[yield_value] : @@ -1665,9 +1660,9 @@ coroutines.cpp: # 104| m104_22(suspend_always) = Store[#temp104:13] : &:r104_11, r104_16 # 104| m104_23(unknown) = Chi : total:m104_21, partial:m104_22 # 104| r104_24(suspend_always *) = CopyValue : r104_11 -# 104| m104_25(suspend_always *) = Store[#temp0:0] : &:r0_16, r104_24 -#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_16, m104_25 -# 104| r104_26(glval) = CopyValue : r0_17 +# 104| m104_25(suspend_always *) = Store[#temp0:0] : &:r0_15, r104_24 +#-----| r0_16(suspend_always *) = Load[#temp0:0] : &:r0_15, m104_25 +# 104| r104_26(glval) = CopyValue : r0_16 # 104| r104_27(glval) = Convert : r104_26 # 104| r104_28(glval) = FunctionAddress[await_ready] : # 104| r104_29(bool) = Call[await_ready] : func:r104_28, this:r104_27 @@ -1679,88 +1674,88 @@ coroutines.cpp: #-----| True -> Block 3 # 103| Block 2 -# 103| r103_44(suspend_always *) = CopyValue : r103_29 -# 103| r103_45(glval) = CopyValue : r103_44 -#-----| r0_18(glval) = Convert : r103_45 -# 103| r103_46(glval) = FunctionAddress[await_suspend] : -# 103| r103_47(glval>) = VariableAddress[#temp103:20] : -# 103| m103_48(coroutine_handle) = Uninitialized[#temp103:20] : &:r103_47 -# 103| m103_49(unknown) = Chi : total:m103_36, partial:m103_48 -# 103| r103_50(glval) = FunctionAddress[coroutine_handle] : -# 103| r103_51(glval>) = VariableAddress : -# 103| r103_52(glval>) = Convert : r103_51 -# 103| r103_53(coroutine_handle &) = CopyValue : r103_52 -# 103| v103_54(void) = Call[coroutine_handle] : func:r103_50, this:r103_47, 0:r103_53 -# 103| m103_55(unknown) = ^CallSideEffect : ~m103_49 -# 103| m103_56(unknown) = Chi : total:m103_49, partial:m103_55 -# 103| v103_57(void) = ^BufferReadSideEffect[0] : &:r103_53, ~m103_56 -# 103| m103_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r103_47 -# 103| m103_59(unknown) = Chi : total:m103_56, partial:m103_58 -# 103| r103_60(coroutine_handle) = Load[#temp103:20] : &:r103_47, ~m103_59 -# 103| v103_61(void) = Call[await_suspend] : func:r103_46, this:r0_18, 0:r103_60 -# 103| m103_62(unknown) = ^CallSideEffect : ~m103_59 -# 103| m103_63(unknown) = Chi : total:m103_59, partial:m103_62 -#-----| v0_19(void) = ^IndirectReadSideEffect[-1] : &:r0_18, ~m103_63 +# 103| r103_44(suspend_always *) = CopyValue : r103_29 +# 103| r103_45(glval) = CopyValue : r103_44 +#-----| r0_17(glval) = Convert : r103_45 +# 103| r103_46(glval) = FunctionAddress[await_suspend] : +# 103| r103_47(glval>) = VariableAddress[#temp103:20] : +# 103| m103_48(coroutine_handle) = Uninitialized[#temp103:20] : &:r103_47 +# 103| m103_49(unknown) = Chi : total:m103_36, partial:m103_48 +# 103| r103_50(glval) = FunctionAddress[coroutine_handle] : +# 103| r103_51(glval>) = VariableAddress[(unnamed local variable)] : +# 103| r103_52(glval>) = Convert : r103_51 +# 103| r103_53(coroutine_handle &) = CopyValue : r103_52 +# 103| v103_54(void) = Call[coroutine_handle] : func:r103_50, this:r103_47, 0:r103_53 +# 103| m103_55(unknown) = ^CallSideEffect : ~m103_49 +# 103| m103_56(unknown) = Chi : total:m103_49, partial:m103_55 +# 103| v103_57(void) = ^BufferReadSideEffect[0] : &:r103_53, ~m103_56 +# 103| m103_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r103_47 +# 103| m103_59(unknown) = Chi : total:m103_56, partial:m103_58 +# 103| r103_60(coroutine_handle) = Load[#temp103:20] : &:r103_47, ~m103_59 +# 103| v103_61(void) = Call[await_suspend] : func:r103_46, this:r0_17, 0:r103_60 +# 103| m103_62(unknown) = ^CallSideEffect : ~m103_59 +# 103| m103_63(unknown) = Chi : total:m103_59, partial:m103_62 +#-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m103_63 #-----| Goto -> Block 1 # 104| Block 3 # 104| m104_34(unknown) = Phi : from 1:~m104_31, from 4:~m104_60 # 104| r104_35(suspend_always *) = CopyValue : r104_24 # 104| r104_36(glval) = CopyValue : r104_35 -#-----| r0_20(glval) = Convert : r104_36 +#-----| r0_19(glval) = Convert : r104_36 # 104| r104_37(glval) = FunctionAddress[await_resume] : -# 104| v104_38(void) = Call[await_resume] : func:r104_37, this:r0_20 +# 104| v104_38(void) = Call[await_resume] : func:r104_37, this:r0_19 # 104| m104_39(unknown) = ^CallSideEffect : ~m104_34 # 104| m104_40(unknown) = Chi : total:m104_34, partial:m104_39 -#-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m104_40 -#-----| r0_22(glval) = VariableAddress[(unnamed local variable)] : -#-----| r0_23(glval) = FunctionAddress[return_void] : -#-----| v0_24(void) = Call[return_void] : func:r0_23, this:r0_22 -#-----| m0_25(unknown) = ^CallSideEffect : ~m104_40 -#-----| m0_26(unknown) = Chi : total:m104_40, partial:m0_25 -#-----| v0_27(void) = ^IndirectReadSideEffect[-1] : &:r0_22, ~m0_26 -#-----| m0_28(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_22 -#-----| m0_29(unknown) = Chi : total:m0_26, partial:m0_28 +#-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~m104_40 +#-----| r0_21(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_22(glval) = FunctionAddress[return_void] : +#-----| v0_23(void) = Call[return_void] : func:r0_22, this:r0_21 +#-----| m0_24(unknown) = ^CallSideEffect : ~m104_40 +#-----| m0_25(unknown) = Chi : total:m104_40, partial:m0_24 +#-----| v0_26(void) = ^IndirectReadSideEffect[-1] : &:r0_21, ~m0_25 +#-----| m0_27(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_21 +#-----| m0_28(unknown) = Chi : total:m0_25, partial:m0_27 # 105| v105_1(void) = NoOp : -#-----| v0_30(void) = NoOp : +#-----| v0_29(void) = NoOp : #-----| Goto (back edge) -> Block 5 # 104| Block 4 -# 104| r104_41(suspend_always *) = CopyValue : r104_24 -# 104| r104_42(glval) = CopyValue : r104_41 -#-----| r0_31(glval) = Convert : r104_42 -# 104| r104_43(glval) = FunctionAddress[await_suspend] : -# 104| r104_44(glval>) = VariableAddress[#temp104:3] : -# 104| m104_45(coroutine_handle) = Uninitialized[#temp104:3] : &:r104_44 -# 104| m104_46(unknown) = Chi : total:m104_31, partial:m104_45 -# 104| r104_47(glval) = FunctionAddress[coroutine_handle] : -# 104| r104_48(glval>) = VariableAddress : -# 104| r104_49(glval>) = Convert : r104_48 -# 104| r104_50(coroutine_handle &) = CopyValue : r104_49 -# 104| v104_51(void) = Call[coroutine_handle] : func:r104_47, this:r104_44, 0:r104_50 -# 104| m104_52(unknown) = ^CallSideEffect : ~m104_46 -# 104| m104_53(unknown) = Chi : total:m104_46, partial:m104_52 -# 104| v104_54(void) = ^BufferReadSideEffect[0] : &:r104_50, ~m104_53 -# 104| m104_55(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r104_44 -# 104| m104_56(unknown) = Chi : total:m104_53, partial:m104_55 -# 104| r104_57(coroutine_handle) = Load[#temp104:3] : &:r104_44, ~m104_56 -# 104| v104_58(void) = Call[await_suspend] : func:r104_43, this:r0_31, 0:r104_57 -# 104| m104_59(unknown) = ^CallSideEffect : ~m104_56 -# 104| m104_60(unknown) = Chi : total:m104_56, partial:m104_59 -#-----| v0_32(void) = ^IndirectReadSideEffect[-1] : &:r0_31, ~m104_60 +# 104| r104_41(suspend_always *) = CopyValue : r104_24 +# 104| r104_42(glval) = CopyValue : r104_41 +#-----| r0_30(glval) = Convert : r104_42 +# 104| r104_43(glval) = FunctionAddress[await_suspend] : +# 104| r104_44(glval>) = VariableAddress[#temp104:3] : +# 104| m104_45(coroutine_handle) = Uninitialized[#temp104:3] : &:r104_44 +# 104| m104_46(unknown) = Chi : total:m104_31, partial:m104_45 +# 104| r104_47(glval) = FunctionAddress[coroutine_handle] : +# 104| r104_48(glval>) = VariableAddress[(unnamed local variable)] : +# 104| r104_49(glval>) = Convert : r104_48 +# 104| r104_50(coroutine_handle &) = CopyValue : r104_49 +# 104| v104_51(void) = Call[coroutine_handle] : func:r104_47, this:r104_44, 0:r104_50 +# 104| m104_52(unknown) = ^CallSideEffect : ~m104_46 +# 104| m104_53(unknown) = Chi : total:m104_46, partial:m104_52 +# 104| v104_54(void) = ^BufferReadSideEffect[0] : &:r104_50, ~m104_53 +# 104| m104_55(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r104_44 +# 104| m104_56(unknown) = Chi : total:m104_53, partial:m104_55 +# 104| r104_57(coroutine_handle) = Load[#temp104:3] : &:r104_44, ~m104_56 +# 104| v104_58(void) = Call[await_suspend] : func:r104_43, this:r0_30, 0:r104_57 +# 104| m104_59(unknown) = ^CallSideEffect : ~m104_56 +# 104| m104_60(unknown) = Chi : total:m104_56, partial:m104_59 +#-----| v0_31(void) = ^IndirectReadSideEffect[-1] : &:r0_30, ~m104_60 #-----| Goto -> Block 3 #-----| Block 5 -#-----| v0_33(void) = NoOp : +#-----| v0_32(void) = NoOp : # 103| r103_64(glval) = VariableAddress[(unnamed local variable)] : # 103| r103_65(glval) = FunctionAddress[final_suspend] : # 103| r103_66(suspend_always) = Call[final_suspend] : func:r103_65, this:r103_64 -# 103| m103_67(unknown) = ^CallSideEffect : ~m0_29 -# 103| m103_68(unknown) = Chi : total:m0_29, partial:m103_67 +# 103| m103_67(unknown) = ^CallSideEffect : ~m0_28 +# 103| m103_68(unknown) = Chi : total:m0_28, partial:m103_67 # 103| v103_69(void) = ^IndirectReadSideEffect[-1] : &:r103_64, ~m103_68 # 103| m103_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_64 # 103| m103_71(unknown) = Chi : total:m103_68, partial:m103_70 -#-----| r0_34(glval) = VariableAddress[#temp0:0] : +#-----| r0_33(glval) = VariableAddress[#temp0:0] : # 103| r103_72(glval) = VariableAddress[#temp103:20] : # 103| r103_73(glval) = VariableAddress[(unnamed local variable)] : # 103| r103_74(glval) = FunctionAddress[final_suspend] : @@ -1773,16 +1768,16 @@ coroutines.cpp: # 103| m103_81(suspend_always) = Store[#temp103:20] : &:r103_72, r103_75 # 103| m103_82(unknown) = Chi : total:m103_80, partial:m103_81 # 103| r103_83(suspend_always *) = CopyValue : r103_72 -# 103| m103_84(suspend_always *) = Store[#temp0:0] : &:r0_34, r103_83 -#-----| r0_35(suspend_always *) = Load[#temp0:0] : &:r0_34, m103_84 -# 103| r103_85(glval) = CopyValue : r0_35 +# 103| m103_84(suspend_always *) = Store[#temp0:0] : &:r0_33, r103_83 +#-----| r0_34(suspend_always *) = Load[#temp0:0] : &:r0_33, m103_84 +# 103| r103_85(glval) = CopyValue : r0_34 # 103| r103_86(glval) = Convert : r103_85 # 103| r103_87(glval) = FunctionAddress[await_ready] : # 103| r103_88(bool) = Call[await_ready] : func:r103_87, this:r103_86 # 103| m103_89(unknown) = ^CallSideEffect : ~m103_82 # 103| m103_90(unknown) = Chi : total:m103_82, partial:m103_89 # 103| v103_91(void) = ^IndirectReadSideEffect[-1] : &:r103_86, ~m103_90 -#-----| v0_36(void) = ConditionalBranch : r103_88 +#-----| v0_35(void) = ConditionalBranch : r103_88 #-----| False -> Block 7 #-----| True -> Block 6 @@ -1790,40 +1785,40 @@ coroutines.cpp: # 103| m103_92(unknown) = Phi : from 5:~m103_90, from 7:~m103_122 # 103| r103_93(suspend_always *) = CopyValue : r103_83 # 103| r103_94(glval) = CopyValue : r103_93 -#-----| r0_37(glval) = Convert : r103_94 +#-----| r0_36(glval) = Convert : r103_94 # 103| r103_95(glval) = FunctionAddress[await_resume] : -# 103| v103_96(void) = Call[await_resume] : func:r103_95, this:r0_37 +# 103| v103_96(void) = Call[await_resume] : func:r103_95, this:r0_36 # 103| m103_97(unknown) = ^CallSideEffect : ~m103_92 # 103| m103_98(unknown) = Chi : total:m103_92, partial:m103_97 -#-----| v0_38(void) = ^IndirectReadSideEffect[-1] : &:r0_37, ~m103_98 +#-----| v0_37(void) = ^IndirectReadSideEffect[-1] : &:r0_36, ~m103_98 # 103| r103_99(glval) = VariableAddress[#return] : # 103| v103_100(void) = ReturnValue : &:r103_99, ~m103_98 # 103| v103_101(void) = AliasedUse : ~m103_98 # 103| v103_102(void) = ExitFunction : # 103| Block 7 -# 103| r103_103(suspend_always *) = CopyValue : r103_83 -# 103| r103_104(glval) = CopyValue : r103_103 -#-----| r0_39(glval) = Convert : r103_104 -# 103| r103_105(glval) = FunctionAddress[await_suspend] : -# 103| r103_106(glval>) = VariableAddress[#temp103:20] : -# 103| m103_107(coroutine_handle) = Uninitialized[#temp103:20] : &:r103_106 -# 103| m103_108(unknown) = Chi : total:m103_90, partial:m103_107 -# 103| r103_109(glval) = FunctionAddress[coroutine_handle] : -# 103| r103_110(glval>) = VariableAddress : -# 103| r103_111(glval>) = Convert : r103_110 -# 103| r103_112(coroutine_handle &) = CopyValue : r103_111 -# 103| v103_113(void) = Call[coroutine_handle] : func:r103_109, this:r103_106, 0:r103_112 -# 103| m103_114(unknown) = ^CallSideEffect : ~m103_108 -# 103| m103_115(unknown) = Chi : total:m103_108, partial:m103_114 -# 103| v103_116(void) = ^BufferReadSideEffect[0] : &:r103_112, ~m103_115 -# 103| m103_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r103_106 -# 103| m103_118(unknown) = Chi : total:m103_115, partial:m103_117 -# 103| r103_119(coroutine_handle) = Load[#temp103:20] : &:r103_106, ~m103_118 -# 103| v103_120(void) = Call[await_suspend] : func:r103_105, this:r0_39, 0:r103_119 -# 103| m103_121(unknown) = ^CallSideEffect : ~m103_118 -# 103| m103_122(unknown) = Chi : total:m103_118, partial:m103_121 -#-----| v0_40(void) = ^IndirectReadSideEffect[-1] : &:r0_39, ~m103_122 +# 103| r103_103(suspend_always *) = CopyValue : r103_83 +# 103| r103_104(glval) = CopyValue : r103_103 +#-----| r0_38(glval) = Convert : r103_104 +# 103| r103_105(glval) = FunctionAddress[await_suspend] : +# 103| r103_106(glval>) = VariableAddress[#temp103:20] : +# 103| m103_107(coroutine_handle) = Uninitialized[#temp103:20] : &:r103_106 +# 103| m103_108(unknown) = Chi : total:m103_90, partial:m103_107 +# 103| r103_109(glval) = FunctionAddress[coroutine_handle] : +# 103| r103_110(glval>) = VariableAddress[(unnamed local variable)] : +# 103| r103_111(glval>) = Convert : r103_110 +# 103| r103_112(coroutine_handle &) = CopyValue : r103_111 +# 103| v103_113(void) = Call[coroutine_handle] : func:r103_109, this:r103_106, 0:r103_112 +# 103| m103_114(unknown) = ^CallSideEffect : ~m103_108 +# 103| m103_115(unknown) = Chi : total:m103_108, partial:m103_114 +# 103| v103_116(void) = ^BufferReadSideEffect[0] : &:r103_112, ~m103_115 +# 103| m103_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r103_106 +# 103| m103_118(unknown) = Chi : total:m103_115, partial:m103_117 +# 103| r103_119(coroutine_handle) = Load[#temp103:20] : &:r103_106, ~m103_118 +# 103| v103_120(void) = Call[await_suspend] : func:r103_105, this:r0_38, 0:r103_119 +# 103| m103_121(unknown) = ^CallSideEffect : ~m103_118 +# 103| m103_122(unknown) = Chi : total:m103_118, partial:m103_121 +#-----| v0_39(void) = ^IndirectReadSideEffect[-1] : &:r0_38, ~m103_122 #-----| Goto -> Block 6 # 108| co_returnable_value co_yield_and_return_value(int) @@ -1878,18 +1873,17 @@ coroutines.cpp: #-----| Block 1 #-----| m0_8(unknown) = Phi : from 0:~m108_36, from 2:~m108_63 #-----| r0_9(bool) = Constant[1] : -#-----| r0_10(glval) = VariableAddress : -#-----| m0_11(bool) = Store[?] : &:r0_10, r0_9 -#-----| m0_12(unknown) = Chi : total:m0_8, partial:m0_11 +#-----| r0_10(glval) = VariableAddress[(unnamed local variable)] : +#-----| m0_11(bool) = Store[(unnamed local variable)] : &:r0_10, r0_9 # 108| r108_38(suspend_always *) = CopyValue : r108_29 # 108| r108_39(glval) = CopyValue : r108_38 -#-----| r0_13(glval) = Convert : r108_39 +#-----| r0_12(glval) = Convert : r108_39 # 108| r108_40(glval) = FunctionAddress[await_resume] : -# 108| v108_41(void) = Call[await_resume] : func:r108_40, this:r0_13 -# 108| m108_42(unknown) = ^CallSideEffect : ~m0_12 -# 108| m108_43(unknown) = Chi : total:m0_12, partial:m108_42 -#-----| v0_14(void) = ^IndirectReadSideEffect[-1] : &:r0_13, ~m108_43 -#-----| v0_15(void) = CopyValue : v108_41 +# 108| v108_41(void) = Call[await_resume] : func:r108_40, this:r0_12 +# 108| m108_42(unknown) = ^CallSideEffect : ~m0_8 +# 108| m108_43(unknown) = Chi : total:m0_8, partial:m108_42 +#-----| v0_13(void) = ^IndirectReadSideEffect[-1] : &:r0_12, ~m108_43 +#-----| v0_14(void) = CopyValue : v108_41 # 109| r109_1(glval) = VariableAddress[(unnamed local variable)] : # 109| r109_2(glval) = FunctionAddress[yield_value] : # 109| r109_3(glval) = VariableAddress[i] : @@ -1900,7 +1894,7 @@ coroutines.cpp: # 109| v109_8(void) = ^IndirectReadSideEffect[-1] : &:r109_1, ~m109_7 # 109| m109_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r109_1 # 109| m109_10(unknown) = Chi : total:m109_7, partial:m109_9 -#-----| r0_16(glval) = VariableAddress[#temp0:0] : +#-----| r0_15(glval) = VariableAddress[#temp0:0] : # 109| r109_11(glval) = VariableAddress[#temp109:13] : # 109| r109_12(glval) = VariableAddress[(unnamed local variable)] : # 109| r109_13(glval) = FunctionAddress[yield_value] : @@ -1915,9 +1909,9 @@ coroutines.cpp: # 109| m109_22(suspend_always) = Store[#temp109:13] : &:r109_11, r109_16 # 109| m109_23(unknown) = Chi : total:m109_21, partial:m109_22 # 109| r109_24(suspend_always *) = CopyValue : r109_11 -# 109| m109_25(suspend_always *) = Store[#temp0:0] : &:r0_16, r109_24 -#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_16, m109_25 -# 109| r109_26(glval) = CopyValue : r0_17 +# 109| m109_25(suspend_always *) = Store[#temp0:0] : &:r0_15, r109_24 +#-----| r0_16(suspend_always *) = Load[#temp0:0] : &:r0_15, m109_25 +# 109| r109_26(glval) = CopyValue : r0_16 # 109| r109_27(glval) = Convert : r109_26 # 109| r109_28(glval) = FunctionAddress[await_ready] : # 109| r109_29(bool) = Call[await_ready] : func:r109_28, this:r109_27 @@ -1929,92 +1923,92 @@ coroutines.cpp: #-----| True -> Block 3 # 108| Block 2 -# 108| r108_44(suspend_always *) = CopyValue : r108_29 -# 108| r108_45(glval) = CopyValue : r108_44 -#-----| r0_18(glval) = Convert : r108_45 -# 108| r108_46(glval) = FunctionAddress[await_suspend] : -# 108| r108_47(glval>) = VariableAddress[#temp108:21] : -# 108| m108_48(coroutine_handle) = Uninitialized[#temp108:21] : &:r108_47 -# 108| m108_49(unknown) = Chi : total:m108_36, partial:m108_48 -# 108| r108_50(glval) = FunctionAddress[coroutine_handle] : -# 108| r108_51(glval>) = VariableAddress : -# 108| r108_52(glval>) = Convert : r108_51 -# 108| r108_53(coroutine_handle &) = CopyValue : r108_52 -# 108| v108_54(void) = Call[coroutine_handle] : func:r108_50, this:r108_47, 0:r108_53 -# 108| m108_55(unknown) = ^CallSideEffect : ~m108_49 -# 108| m108_56(unknown) = Chi : total:m108_49, partial:m108_55 -# 108| v108_57(void) = ^BufferReadSideEffect[0] : &:r108_53, ~m108_56 -# 108| m108_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r108_47 -# 108| m108_59(unknown) = Chi : total:m108_56, partial:m108_58 -# 108| r108_60(coroutine_handle) = Load[#temp108:21] : &:r108_47, ~m108_59 -# 108| v108_61(void) = Call[await_suspend] : func:r108_46, this:r0_18, 0:r108_60 -# 108| m108_62(unknown) = ^CallSideEffect : ~m108_59 -# 108| m108_63(unknown) = Chi : total:m108_59, partial:m108_62 -#-----| v0_19(void) = ^IndirectReadSideEffect[-1] : &:r0_18, ~m108_63 +# 108| r108_44(suspend_always *) = CopyValue : r108_29 +# 108| r108_45(glval) = CopyValue : r108_44 +#-----| r0_17(glval) = Convert : r108_45 +# 108| r108_46(glval) = FunctionAddress[await_suspend] : +# 108| r108_47(glval>) = VariableAddress[#temp108:21] : +# 108| m108_48(coroutine_handle) = Uninitialized[#temp108:21] : &:r108_47 +# 108| m108_49(unknown) = Chi : total:m108_36, partial:m108_48 +# 108| r108_50(glval) = FunctionAddress[coroutine_handle] : +# 108| r108_51(glval>) = VariableAddress[(unnamed local variable)] : +# 108| r108_52(glval>) = Convert : r108_51 +# 108| r108_53(coroutine_handle &) = CopyValue : r108_52 +# 108| v108_54(void) = Call[coroutine_handle] : func:r108_50, this:r108_47, 0:r108_53 +# 108| m108_55(unknown) = ^CallSideEffect : ~m108_49 +# 108| m108_56(unknown) = Chi : total:m108_49, partial:m108_55 +# 108| v108_57(void) = ^BufferReadSideEffect[0] : &:r108_53, ~m108_56 +# 108| m108_58(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r108_47 +# 108| m108_59(unknown) = Chi : total:m108_56, partial:m108_58 +# 108| r108_60(coroutine_handle) = Load[#temp108:21] : &:r108_47, ~m108_59 +# 108| v108_61(void) = Call[await_suspend] : func:r108_46, this:r0_17, 0:r108_60 +# 108| m108_62(unknown) = ^CallSideEffect : ~m108_59 +# 108| m108_63(unknown) = Chi : total:m108_59, partial:m108_62 +#-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m108_63 #-----| Goto -> Block 1 # 109| Block 3 # 109| m109_34(unknown) = Phi : from 1:~m109_31, from 4:~m109_60 # 109| r109_35(suspend_always *) = CopyValue : r109_24 # 109| r109_36(glval) = CopyValue : r109_35 -#-----| r0_20(glval) = Convert : r109_36 +#-----| r0_19(glval) = Convert : r109_36 # 109| r109_37(glval) = FunctionAddress[await_resume] : -# 109| v109_38(void) = Call[await_resume] : func:r109_37, this:r0_20 +# 109| v109_38(void) = Call[await_resume] : func:r109_37, this:r0_19 # 109| m109_39(unknown) = ^CallSideEffect : ~m109_34 # 109| m109_40(unknown) = Chi : total:m109_34, partial:m109_39 -#-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m109_40 -#-----| r0_22(glval) = VariableAddress[(unnamed local variable)] : -#-----| r0_23(glval) = FunctionAddress[return_value] : +#-----| v0_20(void) = ^IndirectReadSideEffect[-1] : &:r0_19, ~m109_40 +#-----| r0_21(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_22(glval) = FunctionAddress[return_value] : # 110| r110_1(glval) = VariableAddress[i] : # 110| r110_2(int) = Load[i] : &:r110_1, m0_4 # 110| r110_3(int) = Constant[1] : # 110| r110_4(int) = Add : r110_2, r110_3 -#-----| v0_24(void) = Call[return_value] : func:r0_23, this:r0_22, 0:r110_4 -#-----| m0_25(unknown) = ^CallSideEffect : ~m109_40 -#-----| m0_26(unknown) = Chi : total:m109_40, partial:m0_25 -#-----| v0_27(void) = ^IndirectReadSideEffect[-1] : &:r0_22, ~m0_26 -#-----| m0_28(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_22 -#-----| m0_29(unknown) = Chi : total:m0_26, partial:m0_28 +#-----| v0_23(void) = Call[return_value] : func:r0_22, this:r0_21, 0:r110_4 +#-----| m0_24(unknown) = ^CallSideEffect : ~m109_40 +#-----| m0_25(unknown) = Chi : total:m109_40, partial:m0_24 +#-----| v0_26(void) = ^IndirectReadSideEffect[-1] : &:r0_21, ~m0_25 +#-----| m0_27(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_21 +#-----| m0_28(unknown) = Chi : total:m0_25, partial:m0_27 # 110| v110_5(void) = NoOp : -#-----| v0_30(void) = NoOp : +#-----| v0_29(void) = NoOp : #-----| Goto (back edge) -> Block 5 # 109| Block 4 -# 109| r109_41(suspend_always *) = CopyValue : r109_24 -# 109| r109_42(glval) = CopyValue : r109_41 -#-----| r0_31(glval) = Convert : r109_42 -# 109| r109_43(glval) = FunctionAddress[await_suspend] : -# 109| r109_44(glval>) = VariableAddress[#temp109:3] : -# 109| m109_45(coroutine_handle) = Uninitialized[#temp109:3] : &:r109_44 -# 109| m109_46(unknown) = Chi : total:m109_31, partial:m109_45 -# 109| r109_47(glval) = FunctionAddress[coroutine_handle] : -# 109| r109_48(glval>) = VariableAddress : -# 109| r109_49(glval>) = Convert : r109_48 -# 109| r109_50(coroutine_handle &) = CopyValue : r109_49 -# 109| v109_51(void) = Call[coroutine_handle] : func:r109_47, this:r109_44, 0:r109_50 -# 109| m109_52(unknown) = ^CallSideEffect : ~m109_46 -# 109| m109_53(unknown) = Chi : total:m109_46, partial:m109_52 -# 109| v109_54(void) = ^BufferReadSideEffect[0] : &:r109_50, ~m109_53 -# 109| m109_55(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r109_44 -# 109| m109_56(unknown) = Chi : total:m109_53, partial:m109_55 -# 109| r109_57(coroutine_handle) = Load[#temp109:3] : &:r109_44, ~m109_56 -# 109| v109_58(void) = Call[await_suspend] : func:r109_43, this:r0_31, 0:r109_57 -# 109| m109_59(unknown) = ^CallSideEffect : ~m109_56 -# 109| m109_60(unknown) = Chi : total:m109_56, partial:m109_59 -#-----| v0_32(void) = ^IndirectReadSideEffect[-1] : &:r0_31, ~m109_60 +# 109| r109_41(suspend_always *) = CopyValue : r109_24 +# 109| r109_42(glval) = CopyValue : r109_41 +#-----| r0_30(glval) = Convert : r109_42 +# 109| r109_43(glval) = FunctionAddress[await_suspend] : +# 109| r109_44(glval>) = VariableAddress[#temp109:3] : +# 109| m109_45(coroutine_handle) = Uninitialized[#temp109:3] : &:r109_44 +# 109| m109_46(unknown) = Chi : total:m109_31, partial:m109_45 +# 109| r109_47(glval) = FunctionAddress[coroutine_handle] : +# 109| r109_48(glval>) = VariableAddress[(unnamed local variable)] : +# 109| r109_49(glval>) = Convert : r109_48 +# 109| r109_50(coroutine_handle &) = CopyValue : r109_49 +# 109| v109_51(void) = Call[coroutine_handle] : func:r109_47, this:r109_44, 0:r109_50 +# 109| m109_52(unknown) = ^CallSideEffect : ~m109_46 +# 109| m109_53(unknown) = Chi : total:m109_46, partial:m109_52 +# 109| v109_54(void) = ^BufferReadSideEffect[0] : &:r109_50, ~m109_53 +# 109| m109_55(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r109_44 +# 109| m109_56(unknown) = Chi : total:m109_53, partial:m109_55 +# 109| r109_57(coroutine_handle) = Load[#temp109:3] : &:r109_44, ~m109_56 +# 109| v109_58(void) = Call[await_suspend] : func:r109_43, this:r0_30, 0:r109_57 +# 109| m109_59(unknown) = ^CallSideEffect : ~m109_56 +# 109| m109_60(unknown) = Chi : total:m109_56, partial:m109_59 +#-----| v0_31(void) = ^IndirectReadSideEffect[-1] : &:r0_30, ~m109_60 #-----| Goto -> Block 3 #-----| Block 5 -#-----| v0_33(void) = NoOp : +#-----| v0_32(void) = NoOp : # 108| r108_64(glval) = VariableAddress[(unnamed local variable)] : # 108| r108_65(glval) = FunctionAddress[final_suspend] : # 108| r108_66(suspend_always) = Call[final_suspend] : func:r108_65, this:r108_64 -# 108| m108_67(unknown) = ^CallSideEffect : ~m0_29 -# 108| m108_68(unknown) = Chi : total:m0_29, partial:m108_67 +# 108| m108_67(unknown) = ^CallSideEffect : ~m0_28 +# 108| m108_68(unknown) = Chi : total:m0_28, partial:m108_67 # 108| v108_69(void) = ^IndirectReadSideEffect[-1] : &:r108_64, ~m108_68 # 108| m108_70(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_64 # 108| m108_71(unknown) = Chi : total:m108_68, partial:m108_70 -#-----| r0_34(glval) = VariableAddress[#temp0:0] : +#-----| r0_33(glval) = VariableAddress[#temp0:0] : # 108| r108_72(glval) = VariableAddress[#temp108:21] : # 108| r108_73(glval) = VariableAddress[(unnamed local variable)] : # 108| r108_74(glval) = FunctionAddress[final_suspend] : @@ -2027,16 +2021,16 @@ coroutines.cpp: # 108| m108_81(suspend_always) = Store[#temp108:21] : &:r108_72, r108_75 # 108| m108_82(unknown) = Chi : total:m108_80, partial:m108_81 # 108| r108_83(suspend_always *) = CopyValue : r108_72 -# 108| m108_84(suspend_always *) = Store[#temp0:0] : &:r0_34, r108_83 -#-----| r0_35(suspend_always *) = Load[#temp0:0] : &:r0_34, m108_84 -# 108| r108_85(glval) = CopyValue : r0_35 +# 108| m108_84(suspend_always *) = Store[#temp0:0] : &:r0_33, r108_83 +#-----| r0_34(suspend_always *) = Load[#temp0:0] : &:r0_33, m108_84 +# 108| r108_85(glval) = CopyValue : r0_34 # 108| r108_86(glval) = Convert : r108_85 # 108| r108_87(glval) = FunctionAddress[await_ready] : # 108| r108_88(bool) = Call[await_ready] : func:r108_87, this:r108_86 # 108| m108_89(unknown) = ^CallSideEffect : ~m108_82 # 108| m108_90(unknown) = Chi : total:m108_82, partial:m108_89 # 108| v108_91(void) = ^IndirectReadSideEffect[-1] : &:r108_86, ~m108_90 -#-----| v0_36(void) = ConditionalBranch : r108_88 +#-----| v0_35(void) = ConditionalBranch : r108_88 #-----| False -> Block 7 #-----| True -> Block 6 @@ -2044,40 +2038,40 @@ coroutines.cpp: # 108| m108_92(unknown) = Phi : from 5:~m108_90, from 7:~m108_122 # 108| r108_93(suspend_always *) = CopyValue : r108_83 # 108| r108_94(glval) = CopyValue : r108_93 -#-----| r0_37(glval) = Convert : r108_94 +#-----| r0_36(glval) = Convert : r108_94 # 108| r108_95(glval) = FunctionAddress[await_resume] : -# 108| v108_96(void) = Call[await_resume] : func:r108_95, this:r0_37 +# 108| v108_96(void) = Call[await_resume] : func:r108_95, this:r0_36 # 108| m108_97(unknown) = ^CallSideEffect : ~m108_92 # 108| m108_98(unknown) = Chi : total:m108_92, partial:m108_97 -#-----| v0_38(void) = ^IndirectReadSideEffect[-1] : &:r0_37, ~m108_98 +#-----| v0_37(void) = ^IndirectReadSideEffect[-1] : &:r0_36, ~m108_98 # 108| r108_99(glval) = VariableAddress[#return] : # 108| v108_100(void) = ReturnValue : &:r108_99, ~m108_98 # 108| v108_101(void) = AliasedUse : ~m108_98 # 108| v108_102(void) = ExitFunction : # 108| Block 7 -# 108| r108_103(suspend_always *) = CopyValue : r108_83 -# 108| r108_104(glval) = CopyValue : r108_103 -#-----| r0_39(glval) = Convert : r108_104 -# 108| r108_105(glval) = FunctionAddress[await_suspend] : -# 108| r108_106(glval>) = VariableAddress[#temp108:21] : -# 108| m108_107(coroutine_handle) = Uninitialized[#temp108:21] : &:r108_106 -# 108| m108_108(unknown) = Chi : total:m108_90, partial:m108_107 -# 108| r108_109(glval) = FunctionAddress[coroutine_handle] : -# 108| r108_110(glval>) = VariableAddress : -# 108| r108_111(glval>) = Convert : r108_110 -# 108| r108_112(coroutine_handle &) = CopyValue : r108_111 -# 108| v108_113(void) = Call[coroutine_handle] : func:r108_109, this:r108_106, 0:r108_112 -# 108| m108_114(unknown) = ^CallSideEffect : ~m108_108 -# 108| m108_115(unknown) = Chi : total:m108_108, partial:m108_114 -# 108| v108_116(void) = ^BufferReadSideEffect[0] : &:r108_112, ~m108_115 -# 108| m108_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r108_106 -# 108| m108_118(unknown) = Chi : total:m108_115, partial:m108_117 -# 108| r108_119(coroutine_handle) = Load[#temp108:21] : &:r108_106, ~m108_118 -# 108| v108_120(void) = Call[await_suspend] : func:r108_105, this:r0_39, 0:r108_119 -# 108| m108_121(unknown) = ^CallSideEffect : ~m108_118 -# 108| m108_122(unknown) = Chi : total:m108_118, partial:m108_121 -#-----| v0_40(void) = ^IndirectReadSideEffect[-1] : &:r0_39, ~m108_122 +# 108| r108_103(suspend_always *) = CopyValue : r108_83 +# 108| r108_104(glval) = CopyValue : r108_103 +#-----| r0_38(glval) = Convert : r108_104 +# 108| r108_105(glval) = FunctionAddress[await_suspend] : +# 108| r108_106(glval>) = VariableAddress[#temp108:21] : +# 108| m108_107(coroutine_handle) = Uninitialized[#temp108:21] : &:r108_106 +# 108| m108_108(unknown) = Chi : total:m108_90, partial:m108_107 +# 108| r108_109(glval) = FunctionAddress[coroutine_handle] : +# 108| r108_110(glval>) = VariableAddress[(unnamed local variable)] : +# 108| r108_111(glval>) = Convert : r108_110 +# 108| r108_112(coroutine_handle &) = CopyValue : r108_111 +# 108| v108_113(void) = Call[coroutine_handle] : func:r108_109, this:r108_106, 0:r108_112 +# 108| m108_114(unknown) = ^CallSideEffect : ~m108_108 +# 108| m108_115(unknown) = Chi : total:m108_108, partial:m108_114 +# 108| v108_116(void) = ^BufferReadSideEffect[0] : &:r108_112, ~m108_115 +# 108| m108_117(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r108_106 +# 108| m108_118(unknown) = Chi : total:m108_115, partial:m108_117 +# 108| r108_119(coroutine_handle) = Load[#temp108:21] : &:r108_106, ~m108_118 +# 108| v108_120(void) = Call[await_suspend] : func:r108_105, this:r0_38, 0:r108_119 +# 108| m108_121(unknown) = ^CallSideEffect : ~m108_118 +# 108| m108_122(unknown) = Chi : total:m108_118, partial:m108_121 +#-----| v0_39(void) = ^IndirectReadSideEffect[-1] : &:r0_38, ~m108_122 #-----| Goto -> Block 6 destructors_for_temps.cpp: @@ -2959,7 +2953,7 @@ destructors_for_temps.cpp: # 102| v102_10(void) = ExitFunction : generic.c: -# 1| void c11_generic_test(unsigned int, int) +# 1| void c11_generic_test_with_load(unsigned int, int) # 1| Block 0 # 1| v1_1(void) = EnterFunction : # 1| m1_2(unknown) = AliasedDefinition : @@ -2982,6 +2976,62 @@ generic.c: # 1| v1_10(void) = AliasedUse : m1_3 # 1| v1_11(void) = ExitFunction : +# 12| char const* c11_generic_test_with_constant_and_macro() +# 12| Block 0 +# 12| v12_1(void) = EnterFunction : +# 12| m12_2(unknown) = AliasedDefinition : +# 12| m12_3(unknown) = InitializeNonLocal : +# 12| m12_4(unknown) = Chi : total:m12_2, partial:m12_3 +# 14| r14_1(glval) = VariableAddress[i] : +# 14| m14_2(int) = Uninitialized[i] : &:r14_1 +# 16| r16_1(glval) = VariableAddress[#return] : +# 16| r16_2(glval) = Constant[int] : +# 16| r16_3(char *) = Convert : r16_2 +# 16| r16_4(char *) = Convert : r16_3 +# 16| m16_5(char *) = Store[#return] : &:r16_1, r16_4 +# 12| r12_5(glval) = VariableAddress[#return] : +# 12| v12_6(void) = ReturnValue : &:r12_5, m16_5 +# 12| v12_7(void) = AliasedUse : m12_3 +# 12| v12_8(void) = ExitFunction : + +# 19| char const* c11_generic_test_with_constant_and_no_macro() +# 19| Block 0 +# 19| v19_1(void) = EnterFunction : +# 19| m19_2(unknown) = AliasedDefinition : +# 19| m19_3(unknown) = InitializeNonLocal : +# 19| m19_4(unknown) = Chi : total:m19_2, partial:m19_3 +# 21| r21_1(glval) = VariableAddress[i] : +# 21| m21_2(int) = Uninitialized[i] : &:r21_1 +# 23| r23_1(glval) = VariableAddress[#return] : +# 23| r23_2(glval) = Constant[int] : +# 23| r23_3(char *) = Convert : r23_2 +# 23| r23_4(char *) = Convert : r23_3 +# 23| m23_5(char *) = Store[#return] : &:r23_1, r23_4 +# 19| r19_5(glval) = VariableAddress[#return] : +# 19| v19_6(void) = ReturnValue : &:r19_5, m23_5 +# 19| v19_7(void) = AliasedUse : m19_3 +# 19| v19_8(void) = ExitFunction : + +# 26| void c11_generic_test_test_with_cast(int) +# 26| Block 0 +# 26| v26_1(void) = EnterFunction : +# 26| m26_2(unknown) = AliasedDefinition : +# 26| m26_3(unknown) = InitializeNonLocal : +# 26| m26_4(unknown) = Chi : total:m26_2, partial:m26_3 +# 26| r26_5(glval) = VariableAddress[y] : +# 26| m26_6(int) = InitializeParameter[y] : &:r26_5 +# 27| r27_1(glval) = VariableAddress[r] : +# 27| m27_2(unsigned int) = Uninitialized[r] : &:r27_1 +# 28| r28_1(glval) = VariableAddress[y] : +# 28| r28_2(int) = Load[y] : &:r28_1, m26_6 +# 28| r28_3(unsigned int) = Convert : r28_2 +# 28| r28_4(glval) = VariableAddress[r] : +# 28| m28_5(unsigned int) = Store[r] : &:r28_4, r28_3 +# 29| v29_1(void) = NoOp : +# 26| v26_7(void) = ReturnVoid : +# 26| v26_8(void) = AliasedUse : m26_3 +# 26| v26_9(void) = ExitFunction : + ir.c: # 7| void MyCoordsTest(int) # 7| Block 0 diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected index 5a0234a4cc4..199d61f015d 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected @@ -29,26 +29,4 @@ fieldAddressOnNonPointer thisArgumentIsNonPointer | ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable -| coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:91:21:91:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:91:21:91:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:95:20:95:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:95:20:95:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:96:3:96:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:99:21:99:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:99:21:99:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:100:3:100:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:103:20:103:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:103:20:103:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:104:3:104:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:108:21:108:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:108:21:108:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:109:3:109:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | missingCppType diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected index 5a0234a4cc4..199d61f015d 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected @@ -29,26 +29,4 @@ fieldAddressOnNonPointer thisArgumentIsNonPointer | ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable -| coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:91:21:91:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:91:21:91:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:95:20:95:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:95:20:95:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:96:3:96:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:99:21:99:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:99:21:99:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:100:3:100:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:103:20:103:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:103:20:103:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:104:3:104:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:108:21:108:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:108:21:108:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:109:3:109:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | missingCppType diff --git a/cpp/ql/test/library-tests/ir/ir/generic.c b/cpp/ql/test/library-tests/ir/ir/generic.c index 3d669ba29fb..22c9fb3cd16 100644 --- a/cpp/ql/test/library-tests/ir/ir/generic.c +++ b/cpp/ql/test/library-tests/ir/ir/generic.c @@ -1,6 +1,31 @@ -void c11_generic_test(unsigned int x, int y) { +void c11_generic_test_with_load(unsigned int x, int y) { unsigned int r; r = _Generic(r, unsigned int: x, int: y) + 1; } -// // semmle-extractor-options: -std=c11 +#define describe(val) \ + _Generic((val), \ + int: "int", \ + default: "unknown" \ + ) + +const char *c11_generic_test_with_constant_and_macro() +{ + int i; + + return describe(i); +} + +const char *c11_generic_test_with_constant_and_no_macro() +{ + int i; + + return _Generic(i, int: "int", default: "unknown"); +} + +void c11_generic_test_test_with_cast(int y) { + unsigned int r; + r = _Generic(r, unsigned int: (unsigned int)y, int: y); +} + +// semmle-extractor-options: -std=c11 diff --git a/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected b/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected index ac1034bfc6c..26760a15730 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected @@ -38,32 +38,4 @@ fieldAddressOnNonPointer thisArgumentIsNonPointer | ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable -| coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:91:21:91:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:91:21:91:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:95:20:95:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:95:20:95:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:96:3:96:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:99:21:99:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:99:21:99:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:100:3:100:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:103:20:103:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:103:20:103:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:104:3:104:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:108:21:108:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:108:21:108:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:109:3:109:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | missingCppType diff --git a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected index 18f0d99ac67..5e095f3b108 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected @@ -770,8 +770,8 @@ coroutines.cpp: #-----| Block 3 #-----| r0_4(bool) = Constant[1] : -#-----| r0_5(glval) = VariableAddress : -#-----| mu0_6(bool) = Store[?] : &:r0_5, r0_4 +#-----| r0_5(glval) = VariableAddress[(unnamed local variable)] : +#-----| mu0_6(bool) = Store[(unnamed local variable)] : &:r0_5, r0_4 # 87| r87_31(suspend_always *) = CopyValue : r87_20 # 87| r87_32(glval) = CopyValue : r87_31 #-----| r0_7(glval) = Convert : r87_32 @@ -791,32 +791,32 @@ coroutines.cpp: #-----| Goto (back edge) -> Block 8 # 87| Block 4 -# 87| r87_36(suspend_always *) = CopyValue : r87_20 -# 87| r87_37(glval) = CopyValue : r87_36 -#-----| r0_17(glval) = Convert : r87_37 -# 87| r87_38(glval) = FunctionAddress[await_suspend] : -# 87| r87_39(glval>) = VariableAddress[#temp87:20] : -# 87| mu87_40(coroutine_handle) = Uninitialized[#temp87:20] : &:r87_39 -# 87| r87_41(glval) = FunctionAddress[coroutine_handle] : -# 87| r87_42(glval>) = VariableAddress : -# 87| r87_43(glval>) = Convert : r87_42 -# 87| r87_44(coroutine_handle &) = CopyValue : r87_43 -# 87| v87_45(void) = Call[coroutine_handle] : func:r87_41, this:r87_39, 0:r87_44 -# 87| mu87_46(unknown) = ^CallSideEffect : ~m? -# 87| v87_47(void) = ^BufferReadSideEffect[0] : &:r87_44, ~m? -# 87| mu87_48(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r87_39 -# 87| r87_49(coroutine_handle) = Load[#temp87:20] : &:r87_39, ~m? -# 87| v87_50(void) = Call[await_suspend] : func:r87_38, this:r0_17, 0:r87_49 -# 87| mu87_51(unknown) = ^CallSideEffect : ~m? -#-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m? +# 87| r87_36(suspend_always *) = CopyValue : r87_20 +# 87| r87_37(glval) = CopyValue : r87_36 +#-----| r0_17(glval) = Convert : r87_37 +# 87| r87_38(glval) = FunctionAddress[await_suspend] : +# 87| r87_39(glval>) = VariableAddress[#temp87:20] : +# 87| mu87_40(coroutine_handle) = Uninitialized[#temp87:20] : &:r87_39 +# 87| r87_41(glval) = FunctionAddress[coroutine_handle] : +# 87| r87_42(glval>) = VariableAddress[(unnamed local variable)] : +# 87| r87_43(glval>) = Convert : r87_42 +# 87| r87_44(coroutine_handle &) = CopyValue : r87_43 +# 87| v87_45(void) = Call[coroutine_handle] : func:r87_41, this:r87_39, 0:r87_44 +# 87| mu87_46(unknown) = ^CallSideEffect : ~m? +# 87| v87_47(void) = ^BufferReadSideEffect[0] : &:r87_44, ~m? +# 87| mu87_48(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r87_39 +# 87| r87_49(coroutine_handle) = Load[#temp87:20] : &:r87_39, ~m? +# 87| v87_50(void) = Call[await_suspend] : func:r87_38, this:r0_17, 0:r87_49 +# 87| mu87_51(unknown) = ^CallSideEffect : ~m? +#-----| v0_18(void) = ^IndirectReadSideEffect[-1] : &:r0_17, ~m? #-----| Goto -> Block 3 #-----| Block 5 -#-----| v0_19(void) = CatchAny : -#-----| r0_20(glval) = VariableAddress : -#-----| r0_21(bool) = Load[?] : &:r0_20, ~m? -#-----| r0_22(bool) = LogicalNot : r0_21 -#-----| v0_23(void) = ConditionalBranch : r0_22 +#-----| v0_19(void) = CatchAny : +#-----| r0_20(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_21(bool) = Load[(unnamed local variable)] : &:r0_20, ~m? +#-----| r0_22(bool) = LogicalNot : r0_21 +#-----| v0_23(void) = ConditionalBranch : r0_22 #-----| False -> Block 7 #-----| True -> Block 6 @@ -876,24 +876,24 @@ coroutines.cpp: #-----| Goto -> Block 1 # 87| Block 10 -# 87| r87_87(suspend_always *) = CopyValue : r87_72 -# 87| r87_88(glval) = CopyValue : r87_87 -#-----| r0_31(glval) = Convert : r87_88 -# 87| r87_89(glval) = FunctionAddress[await_suspend] : -# 87| r87_90(glval>) = VariableAddress[#temp87:20] : -# 87| mu87_91(coroutine_handle) = Uninitialized[#temp87:20] : &:r87_90 -# 87| r87_92(glval) = FunctionAddress[coroutine_handle] : -# 87| r87_93(glval>) = VariableAddress : -# 87| r87_94(glval>) = Convert : r87_93 -# 87| r87_95(coroutine_handle &) = CopyValue : r87_94 -# 87| v87_96(void) = Call[coroutine_handle] : func:r87_92, this:r87_90, 0:r87_95 -# 87| mu87_97(unknown) = ^CallSideEffect : ~m? -# 87| v87_98(void) = ^BufferReadSideEffect[0] : &:r87_95, ~m? -# 87| mu87_99(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r87_90 -# 87| r87_100(coroutine_handle) = Load[#temp87:20] : &:r87_90, ~m? -# 87| v87_101(void) = Call[await_suspend] : func:r87_89, this:r0_31, 0:r87_100 -# 87| mu87_102(unknown) = ^CallSideEffect : ~m? -#-----| v0_32(void) = ^IndirectReadSideEffect[-1] : &:r0_31, ~m? +# 87| r87_87(suspend_always *) = CopyValue : r87_72 +# 87| r87_88(glval) = CopyValue : r87_87 +#-----| r0_31(glval) = Convert : r87_88 +# 87| r87_89(glval) = FunctionAddress[await_suspend] : +# 87| r87_90(glval>) = VariableAddress[#temp87:20] : +# 87| mu87_91(coroutine_handle) = Uninitialized[#temp87:20] : &:r87_90 +# 87| r87_92(glval) = FunctionAddress[coroutine_handle] : +# 87| r87_93(glval>) = VariableAddress[(unnamed local variable)] : +# 87| r87_94(glval>) = Convert : r87_93 +# 87| r87_95(coroutine_handle &) = CopyValue : r87_94 +# 87| v87_96(void) = Call[coroutine_handle] : func:r87_92, this:r87_90, 0:r87_95 +# 87| mu87_97(unknown) = ^CallSideEffect : ~m? +# 87| v87_98(void) = ^BufferReadSideEffect[0] : &:r87_95, ~m? +# 87| mu87_99(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r87_90 +# 87| r87_100(coroutine_handle) = Load[#temp87:20] : &:r87_90, ~m? +# 87| v87_101(void) = Call[await_suspend] : func:r87_89, this:r0_31, 0:r87_100 +# 87| mu87_102(unknown) = ^CallSideEffect : ~m? +#-----| v0_32(void) = ^IndirectReadSideEffect[-1] : &:r0_31, ~m? #-----| Goto -> Block 9 # 91| co_returnable_value co_return_int(int) @@ -947,8 +947,8 @@ coroutines.cpp: #-----| Block 3 #-----| r0_8(bool) = Constant[1] : -#-----| r0_9(glval) = VariableAddress : -#-----| mu0_10(bool) = Store[?] : &:r0_9, r0_8 +#-----| r0_9(glval) = VariableAddress[(unnamed local variable)] : +#-----| mu0_10(bool) = Store[(unnamed local variable)] : &:r0_9, r0_8 # 91| r91_33(suspend_always *) = CopyValue : r91_22 # 91| r91_34(glval) = CopyValue : r91_33 #-----| r0_11(glval) = Convert : r91_34 @@ -970,32 +970,32 @@ coroutines.cpp: #-----| Goto (back edge) -> Block 8 # 91| Block 4 -# 91| r91_38(suspend_always *) = CopyValue : r91_22 -# 91| r91_39(glval) = CopyValue : r91_38 -#-----| r0_21(glval) = Convert : r91_39 -# 91| r91_40(glval) = FunctionAddress[await_suspend] : -# 91| r91_41(glval>) = VariableAddress[#temp91:21] : -# 91| mu91_42(coroutine_handle) = Uninitialized[#temp91:21] : &:r91_41 -# 91| r91_43(glval) = FunctionAddress[coroutine_handle] : -# 91| r91_44(glval>) = VariableAddress : -# 91| r91_45(glval>) = Convert : r91_44 -# 91| r91_46(coroutine_handle &) = CopyValue : r91_45 -# 91| v91_47(void) = Call[coroutine_handle] : func:r91_43, this:r91_41, 0:r91_46 -# 91| mu91_48(unknown) = ^CallSideEffect : ~m? -# 91| v91_49(void) = ^BufferReadSideEffect[0] : &:r91_46, ~m? -# 91| mu91_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r91_41 -# 91| r91_51(coroutine_handle) = Load[#temp91:21] : &:r91_41, ~m? -# 91| v91_52(void) = Call[await_suspend] : func:r91_40, this:r0_21, 0:r91_51 -# 91| mu91_53(unknown) = ^CallSideEffect : ~m? -#-----| v0_22(void) = ^IndirectReadSideEffect[-1] : &:r0_21, ~m? +# 91| r91_38(suspend_always *) = CopyValue : r91_22 +# 91| r91_39(glval) = CopyValue : r91_38 +#-----| r0_21(glval) = Convert : r91_39 +# 91| r91_40(glval) = FunctionAddress[await_suspend] : +# 91| r91_41(glval>) = VariableAddress[#temp91:21] : +# 91| mu91_42(coroutine_handle) = Uninitialized[#temp91:21] : &:r91_41 +# 91| r91_43(glval) = FunctionAddress[coroutine_handle] : +# 91| r91_44(glval>) = VariableAddress[(unnamed local variable)] : +# 91| r91_45(glval>) = Convert : r91_44 +# 91| r91_46(coroutine_handle &) = CopyValue : r91_45 +# 91| v91_47(void) = Call[coroutine_handle] : func:r91_43, this:r91_41, 0:r91_46 +# 91| mu91_48(unknown) = ^CallSideEffect : ~m? +# 91| v91_49(void) = ^BufferReadSideEffect[0] : &:r91_46, ~m? +# 91| mu91_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r91_41 +# 91| r91_51(coroutine_handle) = Load[#temp91:21] : &:r91_41, ~m? +# 91| v91_52(void) = Call[await_suspend] : func:r91_40, this:r0_21, 0:r91_51 +# 91| mu91_53(unknown) = ^CallSideEffect : ~m? +#-----| v0_22(void) = ^IndirectReadSideEffect[-1] : &:r0_21, ~m? #-----| Goto -> Block 3 #-----| Block 5 -#-----| v0_23(void) = CatchAny : -#-----| r0_24(glval) = VariableAddress : -#-----| r0_25(bool) = Load[?] : &:r0_24, ~m? -#-----| r0_26(bool) = LogicalNot : r0_25 -#-----| v0_27(void) = ConditionalBranch : r0_26 +#-----| v0_23(void) = CatchAny : +#-----| r0_24(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_25(bool) = Load[(unnamed local variable)] : &:r0_24, ~m? +#-----| r0_26(bool) = LogicalNot : r0_25 +#-----| v0_27(void) = ConditionalBranch : r0_26 #-----| False -> Block 7 #-----| True -> Block 6 @@ -1055,24 +1055,24 @@ coroutines.cpp: #-----| Goto -> Block 1 # 91| Block 10 -# 91| r91_89(suspend_always *) = CopyValue : r91_74 -# 91| r91_90(glval) = CopyValue : r91_89 -#-----| r0_35(glval) = Convert : r91_90 -# 91| r91_91(glval) = FunctionAddress[await_suspend] : -# 91| r91_92(glval>) = VariableAddress[#temp91:21] : -# 91| mu91_93(coroutine_handle) = Uninitialized[#temp91:21] : &:r91_92 -# 91| r91_94(glval) = FunctionAddress[coroutine_handle] : -# 91| r91_95(glval>) = VariableAddress : -# 91| r91_96(glval>) = Convert : r91_95 -# 91| r91_97(coroutine_handle &) = CopyValue : r91_96 -# 91| v91_98(void) = Call[coroutine_handle] : func:r91_94, this:r91_92, 0:r91_97 -# 91| mu91_99(unknown) = ^CallSideEffect : ~m? -# 91| v91_100(void) = ^BufferReadSideEffect[0] : &:r91_97, ~m? -# 91| mu91_101(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r91_92 -# 91| r91_102(coroutine_handle) = Load[#temp91:21] : &:r91_92, ~m? -# 91| v91_103(void) = Call[await_suspend] : func:r91_91, this:r0_35, 0:r91_102 -# 91| mu91_104(unknown) = ^CallSideEffect : ~m? -#-----| v0_36(void) = ^IndirectReadSideEffect[-1] : &:r0_35, ~m? +# 91| r91_89(suspend_always *) = CopyValue : r91_74 +# 91| r91_90(glval) = CopyValue : r91_89 +#-----| r0_35(glval) = Convert : r91_90 +# 91| r91_91(glval) = FunctionAddress[await_suspend] : +# 91| r91_92(glval>) = VariableAddress[#temp91:21] : +# 91| mu91_93(coroutine_handle) = Uninitialized[#temp91:21] : &:r91_92 +# 91| r91_94(glval) = FunctionAddress[coroutine_handle] : +# 91| r91_95(glval>) = VariableAddress[(unnamed local variable)] : +# 91| r91_96(glval>) = Convert : r91_95 +# 91| r91_97(coroutine_handle &) = CopyValue : r91_96 +# 91| v91_98(void) = Call[coroutine_handle] : func:r91_94, this:r91_92, 0:r91_97 +# 91| mu91_99(unknown) = ^CallSideEffect : ~m? +# 91| v91_100(void) = ^BufferReadSideEffect[0] : &:r91_97, ~m? +# 91| mu91_101(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r91_92 +# 91| r91_102(coroutine_handle) = Load[#temp91:21] : &:r91_92, ~m? +# 91| v91_103(void) = Call[await_suspend] : func:r91_91, this:r0_35, 0:r91_102 +# 91| mu91_104(unknown) = ^CallSideEffect : ~m? +#-----| v0_36(void) = ^IndirectReadSideEffect[-1] : &:r0_35, ~m? #-----| Goto -> Block 9 # 95| co_returnable_void co_yield_value_void(int) @@ -1126,8 +1126,8 @@ coroutines.cpp: #-----| Block 3 #-----| r0_8(bool) = Constant[1] : -#-----| r0_9(glval) = VariableAddress : -#-----| mu0_10(bool) = Store[?] : &:r0_9, r0_8 +#-----| r0_9(glval) = VariableAddress[(unnamed local variable)] : +#-----| mu0_10(bool) = Store[(unnamed local variable)] : &:r0_9, r0_8 # 95| r95_33(suspend_always *) = CopyValue : r95_22 # 95| r95_34(glval) = CopyValue : r95_33 #-----| r0_11(glval) = Convert : r95_34 @@ -1169,24 +1169,24 @@ coroutines.cpp: #-----| True -> Block 5 # 95| Block 4 -# 95| r95_38(suspend_always *) = CopyValue : r95_22 -# 95| r95_39(glval) = CopyValue : r95_38 -#-----| r0_16(glval) = Convert : r95_39 -# 95| r95_40(glval) = FunctionAddress[await_suspend] : -# 95| r95_41(glval>) = VariableAddress[#temp95:20] : -# 95| mu95_42(coroutine_handle) = Uninitialized[#temp95:20] : &:r95_41 -# 95| r95_43(glval) = FunctionAddress[coroutine_handle] : -# 95| r95_44(glval>) = VariableAddress : -# 95| r95_45(glval>) = Convert : r95_44 -# 95| r95_46(coroutine_handle &) = CopyValue : r95_45 -# 95| v95_47(void) = Call[coroutine_handle] : func:r95_43, this:r95_41, 0:r95_46 -# 95| mu95_48(unknown) = ^CallSideEffect : ~m? -# 95| v95_49(void) = ^BufferReadSideEffect[0] : &:r95_46, ~m? -# 95| mu95_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r95_41 -# 95| r95_51(coroutine_handle) = Load[#temp95:20] : &:r95_41, ~m? -# 95| v95_52(void) = Call[await_suspend] : func:r95_40, this:r0_16, 0:r95_51 -# 95| mu95_53(unknown) = ^CallSideEffect : ~m? -#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? +# 95| r95_38(suspend_always *) = CopyValue : r95_22 +# 95| r95_39(glval) = CopyValue : r95_38 +#-----| r0_16(glval) = Convert : r95_39 +# 95| r95_40(glval) = FunctionAddress[await_suspend] : +# 95| r95_41(glval>) = VariableAddress[#temp95:20] : +# 95| mu95_42(coroutine_handle) = Uninitialized[#temp95:20] : &:r95_41 +# 95| r95_43(glval) = FunctionAddress[coroutine_handle] : +# 95| r95_44(glval>) = VariableAddress[(unnamed local variable)] : +# 95| r95_45(glval>) = Convert : r95_44 +# 95| r95_46(coroutine_handle &) = CopyValue : r95_45 +# 95| v95_47(void) = Call[coroutine_handle] : func:r95_43, this:r95_41, 0:r95_46 +# 95| mu95_48(unknown) = ^CallSideEffect : ~m? +# 95| v95_49(void) = ^BufferReadSideEffect[0] : &:r95_46, ~m? +# 95| mu95_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r95_41 +# 95| r95_51(coroutine_handle) = Load[#temp95:20] : &:r95_41, ~m? +# 95| v95_52(void) = Call[await_suspend] : func:r95_40, this:r0_16, 0:r95_51 +# 95| mu95_53(unknown) = ^CallSideEffect : ~m? +#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? #-----| Goto -> Block 3 # 96| Block 5 @@ -1208,32 +1208,32 @@ coroutines.cpp: #-----| Goto (back edge) -> Block 10 # 96| Block 6 -# 96| r96_33(suspend_always *) = CopyValue : r96_19 -# 96| r96_34(glval) = CopyValue : r96_33 -#-----| r0_27(glval) = Convert : r96_34 -# 96| r96_35(glval) = FunctionAddress[await_suspend] : -# 96| r96_36(glval>) = VariableAddress[#temp96:3] : -# 96| mu96_37(coroutine_handle) = Uninitialized[#temp96:3] : &:r96_36 -# 96| r96_38(glval) = FunctionAddress[coroutine_handle] : -# 96| r96_39(glval>) = VariableAddress : -# 96| r96_40(glval>) = Convert : r96_39 -# 96| r96_41(coroutine_handle &) = CopyValue : r96_40 -# 96| v96_42(void) = Call[coroutine_handle] : func:r96_38, this:r96_36, 0:r96_41 -# 96| mu96_43(unknown) = ^CallSideEffect : ~m? -# 96| v96_44(void) = ^BufferReadSideEffect[0] : &:r96_41, ~m? -# 96| mu96_45(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r96_36 -# 96| r96_46(coroutine_handle) = Load[#temp96:3] : &:r96_36, ~m? -# 96| v96_47(void) = Call[await_suspend] : func:r96_35, this:r0_27, 0:r96_46 -# 96| mu96_48(unknown) = ^CallSideEffect : ~m? -#-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m? +# 96| r96_33(suspend_always *) = CopyValue : r96_19 +# 96| r96_34(glval) = CopyValue : r96_33 +#-----| r0_27(glval) = Convert : r96_34 +# 96| r96_35(glval) = FunctionAddress[await_suspend] : +# 96| r96_36(glval>) = VariableAddress[#temp96:3] : +# 96| mu96_37(coroutine_handle) = Uninitialized[#temp96:3] : &:r96_36 +# 96| r96_38(glval) = FunctionAddress[coroutine_handle] : +# 96| r96_39(glval>) = VariableAddress[(unnamed local variable)] : +# 96| r96_40(glval>) = Convert : r96_39 +# 96| r96_41(coroutine_handle &) = CopyValue : r96_40 +# 96| v96_42(void) = Call[coroutine_handle] : func:r96_38, this:r96_36, 0:r96_41 +# 96| mu96_43(unknown) = ^CallSideEffect : ~m? +# 96| v96_44(void) = ^BufferReadSideEffect[0] : &:r96_41, ~m? +# 96| mu96_45(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r96_36 +# 96| r96_46(coroutine_handle) = Load[#temp96:3] : &:r96_36, ~m? +# 96| v96_47(void) = Call[await_suspend] : func:r96_35, this:r0_27, 0:r96_46 +# 96| mu96_48(unknown) = ^CallSideEffect : ~m? +#-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m? #-----| Goto -> Block 5 #-----| Block 7 -#-----| v0_29(void) = CatchAny : -#-----| r0_30(glval) = VariableAddress : -#-----| r0_31(bool) = Load[?] : &:r0_30, ~m? -#-----| r0_32(bool) = LogicalNot : r0_31 -#-----| v0_33(void) = ConditionalBranch : r0_32 +#-----| v0_29(void) = CatchAny : +#-----| r0_30(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_31(bool) = Load[(unnamed local variable)] : &:r0_30, ~m? +#-----| r0_32(bool) = LogicalNot : r0_31 +#-----| v0_33(void) = ConditionalBranch : r0_32 #-----| False -> Block 9 #-----| True -> Block 8 @@ -1293,24 +1293,24 @@ coroutines.cpp: #-----| Goto -> Block 1 # 95| Block 12 -# 95| r95_89(suspend_always *) = CopyValue : r95_74 -# 95| r95_90(glval) = CopyValue : r95_89 -#-----| r0_41(glval) = Convert : r95_90 -# 95| r95_91(glval) = FunctionAddress[await_suspend] : -# 95| r95_92(glval>) = VariableAddress[#temp95:20] : -# 95| mu95_93(coroutine_handle) = Uninitialized[#temp95:20] : &:r95_92 -# 95| r95_94(glval) = FunctionAddress[coroutine_handle] : -# 95| r95_95(glval>) = VariableAddress : -# 95| r95_96(glval>) = Convert : r95_95 -# 95| r95_97(coroutine_handle &) = CopyValue : r95_96 -# 95| v95_98(void) = Call[coroutine_handle] : func:r95_94, this:r95_92, 0:r95_97 -# 95| mu95_99(unknown) = ^CallSideEffect : ~m? -# 95| v95_100(void) = ^BufferReadSideEffect[0] : &:r95_97, ~m? -# 95| mu95_101(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r95_92 -# 95| r95_102(coroutine_handle) = Load[#temp95:20] : &:r95_92, ~m? -# 95| v95_103(void) = Call[await_suspend] : func:r95_91, this:r0_41, 0:r95_102 -# 95| mu95_104(unknown) = ^CallSideEffect : ~m? -#-----| v0_42(void) = ^IndirectReadSideEffect[-1] : &:r0_41, ~m? +# 95| r95_89(suspend_always *) = CopyValue : r95_74 +# 95| r95_90(glval) = CopyValue : r95_89 +#-----| r0_41(glval) = Convert : r95_90 +# 95| r95_91(glval) = FunctionAddress[await_suspend] : +# 95| r95_92(glval>) = VariableAddress[#temp95:20] : +# 95| mu95_93(coroutine_handle) = Uninitialized[#temp95:20] : &:r95_92 +# 95| r95_94(glval) = FunctionAddress[coroutine_handle] : +# 95| r95_95(glval>) = VariableAddress[(unnamed local variable)] : +# 95| r95_96(glval>) = Convert : r95_95 +# 95| r95_97(coroutine_handle &) = CopyValue : r95_96 +# 95| v95_98(void) = Call[coroutine_handle] : func:r95_94, this:r95_92, 0:r95_97 +# 95| mu95_99(unknown) = ^CallSideEffect : ~m? +# 95| v95_100(void) = ^BufferReadSideEffect[0] : &:r95_97, ~m? +# 95| mu95_101(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r95_92 +# 95| r95_102(coroutine_handle) = Load[#temp95:20] : &:r95_92, ~m? +# 95| v95_103(void) = Call[await_suspend] : func:r95_91, this:r0_41, 0:r95_102 +# 95| mu95_104(unknown) = ^CallSideEffect : ~m? +#-----| v0_42(void) = ^IndirectReadSideEffect[-1] : &:r0_41, ~m? #-----| Goto -> Block 11 # 99| co_returnable_value co_yield_value_value(int) @@ -1364,8 +1364,8 @@ coroutines.cpp: #-----| Block 3 #-----| r0_8(bool) = Constant[1] : -#-----| r0_9(glval) = VariableAddress : -#-----| mu0_10(bool) = Store[?] : &:r0_9, r0_8 +#-----| r0_9(glval) = VariableAddress[(unnamed local variable)] : +#-----| mu0_10(bool) = Store[(unnamed local variable)] : &:r0_9, r0_8 # 99| r99_33(suspend_always *) = CopyValue : r99_22 # 99| r99_34(glval) = CopyValue : r99_33 #-----| r0_11(glval) = Convert : r99_34 @@ -1407,24 +1407,24 @@ coroutines.cpp: #-----| True -> Block 5 # 99| Block 4 -# 99| r99_38(suspend_always *) = CopyValue : r99_22 -# 99| r99_39(glval) = CopyValue : r99_38 -#-----| r0_16(glval) = Convert : r99_39 -# 99| r99_40(glval) = FunctionAddress[await_suspend] : -# 99| r99_41(glval>) = VariableAddress[#temp99:21] : -# 99| mu99_42(coroutine_handle) = Uninitialized[#temp99:21] : &:r99_41 -# 99| r99_43(glval) = FunctionAddress[coroutine_handle] : -# 99| r99_44(glval>) = VariableAddress : -# 99| r99_45(glval>) = Convert : r99_44 -# 99| r99_46(coroutine_handle &) = CopyValue : r99_45 -# 99| v99_47(void) = Call[coroutine_handle] : func:r99_43, this:r99_41, 0:r99_46 -# 99| mu99_48(unknown) = ^CallSideEffect : ~m? -# 99| v99_49(void) = ^BufferReadSideEffect[0] : &:r99_46, ~m? -# 99| mu99_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r99_41 -# 99| r99_51(coroutine_handle) = Load[#temp99:21] : &:r99_41, ~m? -# 99| v99_52(void) = Call[await_suspend] : func:r99_40, this:r0_16, 0:r99_51 -# 99| mu99_53(unknown) = ^CallSideEffect : ~m? -#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? +# 99| r99_38(suspend_always *) = CopyValue : r99_22 +# 99| r99_39(glval) = CopyValue : r99_38 +#-----| r0_16(glval) = Convert : r99_39 +# 99| r99_40(glval) = FunctionAddress[await_suspend] : +# 99| r99_41(glval>) = VariableAddress[#temp99:21] : +# 99| mu99_42(coroutine_handle) = Uninitialized[#temp99:21] : &:r99_41 +# 99| r99_43(glval) = FunctionAddress[coroutine_handle] : +# 99| r99_44(glval>) = VariableAddress[(unnamed local variable)] : +# 99| r99_45(glval>) = Convert : r99_44 +# 99| r99_46(coroutine_handle &) = CopyValue : r99_45 +# 99| v99_47(void) = Call[coroutine_handle] : func:r99_43, this:r99_41, 0:r99_46 +# 99| mu99_48(unknown) = ^CallSideEffect : ~m? +# 99| v99_49(void) = ^BufferReadSideEffect[0] : &:r99_46, ~m? +# 99| mu99_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r99_41 +# 99| r99_51(coroutine_handle) = Load[#temp99:21] : &:r99_41, ~m? +# 99| v99_52(void) = Call[await_suspend] : func:r99_40, this:r0_16, 0:r99_51 +# 99| mu99_53(unknown) = ^CallSideEffect : ~m? +#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? #-----| Goto -> Block 3 # 100| Block 5 @@ -1438,32 +1438,32 @@ coroutines.cpp: #-----| Goto -> Block 10 # 100| Block 6 -# 100| r100_33(suspend_always *) = CopyValue : r100_19 -# 100| r100_34(glval) = CopyValue : r100_33 -#-----| r0_20(glval) = Convert : r100_34 -# 100| r100_35(glval) = FunctionAddress[await_suspend] : -# 100| r100_36(glval>) = VariableAddress[#temp100:3] : -# 100| mu100_37(coroutine_handle) = Uninitialized[#temp100:3] : &:r100_36 -# 100| r100_38(glval) = FunctionAddress[coroutine_handle] : -# 100| r100_39(glval>) = VariableAddress : -# 100| r100_40(glval>) = Convert : r100_39 -# 100| r100_41(coroutine_handle &) = CopyValue : r100_40 -# 100| v100_42(void) = Call[coroutine_handle] : func:r100_38, this:r100_36, 0:r100_41 -# 100| mu100_43(unknown) = ^CallSideEffect : ~m? -# 100| v100_44(void) = ^BufferReadSideEffect[0] : &:r100_41, ~m? -# 100| mu100_45(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r100_36 -# 100| r100_46(coroutine_handle) = Load[#temp100:3] : &:r100_36, ~m? -# 100| v100_47(void) = Call[await_suspend] : func:r100_35, this:r0_20, 0:r100_46 -# 100| mu100_48(unknown) = ^CallSideEffect : ~m? -#-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m? +# 100| r100_33(suspend_always *) = CopyValue : r100_19 +# 100| r100_34(glval) = CopyValue : r100_33 +#-----| r0_20(glval) = Convert : r100_34 +# 100| r100_35(glval) = FunctionAddress[await_suspend] : +# 100| r100_36(glval>) = VariableAddress[#temp100:3] : +# 100| mu100_37(coroutine_handle) = Uninitialized[#temp100:3] : &:r100_36 +# 100| r100_38(glval) = FunctionAddress[coroutine_handle] : +# 100| r100_39(glval>) = VariableAddress[(unnamed local variable)] : +# 100| r100_40(glval>) = Convert : r100_39 +# 100| r100_41(coroutine_handle &) = CopyValue : r100_40 +# 100| v100_42(void) = Call[coroutine_handle] : func:r100_38, this:r100_36, 0:r100_41 +# 100| mu100_43(unknown) = ^CallSideEffect : ~m? +# 100| v100_44(void) = ^BufferReadSideEffect[0] : &:r100_41, ~m? +# 100| mu100_45(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r100_36 +# 100| r100_46(coroutine_handle) = Load[#temp100:3] : &:r100_36, ~m? +# 100| v100_47(void) = Call[await_suspend] : func:r100_35, this:r0_20, 0:r100_46 +# 100| mu100_48(unknown) = ^CallSideEffect : ~m? +#-----| v0_21(void) = ^IndirectReadSideEffect[-1] : &:r0_20, ~m? #-----| Goto -> Block 5 #-----| Block 7 -#-----| v0_22(void) = CatchAny : -#-----| r0_23(glval) = VariableAddress : -#-----| r0_24(bool) = Load[?] : &:r0_23, ~m? -#-----| r0_25(bool) = LogicalNot : r0_24 -#-----| v0_26(void) = ConditionalBranch : r0_25 +#-----| v0_22(void) = CatchAny : +#-----| r0_23(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_24(bool) = Load[(unnamed local variable)] : &:r0_23, ~m? +#-----| r0_25(bool) = LogicalNot : r0_24 +#-----| v0_26(void) = ConditionalBranch : r0_25 #-----| False -> Block 9 #-----| True -> Block 8 @@ -1523,24 +1523,24 @@ coroutines.cpp: #-----| Goto -> Block 1 # 99| Block 12 -# 99| r99_89(suspend_always *) = CopyValue : r99_74 -# 99| r99_90(glval) = CopyValue : r99_89 -#-----| r0_34(glval) = Convert : r99_90 -# 99| r99_91(glval) = FunctionAddress[await_suspend] : -# 99| r99_92(glval>) = VariableAddress[#temp99:21] : -# 99| mu99_93(coroutine_handle) = Uninitialized[#temp99:21] : &:r99_92 -# 99| r99_94(glval) = FunctionAddress[coroutine_handle] : -# 99| r99_95(glval>) = VariableAddress : -# 99| r99_96(glval>) = Convert : r99_95 -# 99| r99_97(coroutine_handle &) = CopyValue : r99_96 -# 99| v99_98(void) = Call[coroutine_handle] : func:r99_94, this:r99_92, 0:r99_97 -# 99| mu99_99(unknown) = ^CallSideEffect : ~m? -# 99| v99_100(void) = ^BufferReadSideEffect[0] : &:r99_97, ~m? -# 99| mu99_101(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r99_92 -# 99| r99_102(coroutine_handle) = Load[#temp99:21] : &:r99_92, ~m? -# 99| v99_103(void) = Call[await_suspend] : func:r99_91, this:r0_34, 0:r99_102 -# 99| mu99_104(unknown) = ^CallSideEffect : ~m? -#-----| v0_35(void) = ^IndirectReadSideEffect[-1] : &:r0_34, ~m? +# 99| r99_89(suspend_always *) = CopyValue : r99_74 +# 99| r99_90(glval) = CopyValue : r99_89 +#-----| r0_34(glval) = Convert : r99_90 +# 99| r99_91(glval) = FunctionAddress[await_suspend] : +# 99| r99_92(glval>) = VariableAddress[#temp99:21] : +# 99| mu99_93(coroutine_handle) = Uninitialized[#temp99:21] : &:r99_92 +# 99| r99_94(glval) = FunctionAddress[coroutine_handle] : +# 99| r99_95(glval>) = VariableAddress[(unnamed local variable)] : +# 99| r99_96(glval>) = Convert : r99_95 +# 99| r99_97(coroutine_handle &) = CopyValue : r99_96 +# 99| v99_98(void) = Call[coroutine_handle] : func:r99_94, this:r99_92, 0:r99_97 +# 99| mu99_99(unknown) = ^CallSideEffect : ~m? +# 99| v99_100(void) = ^BufferReadSideEffect[0] : &:r99_97, ~m? +# 99| mu99_101(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r99_92 +# 99| r99_102(coroutine_handle) = Load[#temp99:21] : &:r99_92, ~m? +# 99| v99_103(void) = Call[await_suspend] : func:r99_91, this:r0_34, 0:r99_102 +# 99| mu99_104(unknown) = ^CallSideEffect : ~m? +#-----| v0_35(void) = ^IndirectReadSideEffect[-1] : &:r0_34, ~m? #-----| Goto -> Block 11 # 103| co_returnable_void co_yield_and_return_void(int) @@ -1594,8 +1594,8 @@ coroutines.cpp: #-----| Block 3 #-----| r0_8(bool) = Constant[1] : -#-----| r0_9(glval) = VariableAddress : -#-----| mu0_10(bool) = Store[?] : &:r0_9, r0_8 +#-----| r0_9(glval) = VariableAddress[(unnamed local variable)] : +#-----| mu0_10(bool) = Store[(unnamed local variable)] : &:r0_9, r0_8 # 103| r103_33(suspend_always *) = CopyValue : r103_22 # 103| r103_34(glval) = CopyValue : r103_33 #-----| r0_11(glval) = Convert : r103_34 @@ -1637,24 +1637,24 @@ coroutines.cpp: #-----| True -> Block 5 # 103| Block 4 -# 103| r103_38(suspend_always *) = CopyValue : r103_22 -# 103| r103_39(glval) = CopyValue : r103_38 -#-----| r0_16(glval) = Convert : r103_39 -# 103| r103_40(glval) = FunctionAddress[await_suspend] : -# 103| r103_41(glval>) = VariableAddress[#temp103:20] : -# 103| mu103_42(coroutine_handle) = Uninitialized[#temp103:20] : &:r103_41 -# 103| r103_43(glval) = FunctionAddress[coroutine_handle] : -# 103| r103_44(glval>) = VariableAddress : -# 103| r103_45(glval>) = Convert : r103_44 -# 103| r103_46(coroutine_handle &) = CopyValue : r103_45 -# 103| v103_47(void) = Call[coroutine_handle] : func:r103_43, this:r103_41, 0:r103_46 -# 103| mu103_48(unknown) = ^CallSideEffect : ~m? -# 103| v103_49(void) = ^BufferReadSideEffect[0] : &:r103_46, ~m? -# 103| mu103_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r103_41 -# 103| r103_51(coroutine_handle) = Load[#temp103:20] : &:r103_41, ~m? -# 103| v103_52(void) = Call[await_suspend] : func:r103_40, this:r0_16, 0:r103_51 -# 103| mu103_53(unknown) = ^CallSideEffect : ~m? -#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? +# 103| r103_38(suspend_always *) = CopyValue : r103_22 +# 103| r103_39(glval) = CopyValue : r103_38 +#-----| r0_16(glval) = Convert : r103_39 +# 103| r103_40(glval) = FunctionAddress[await_suspend] : +# 103| r103_41(glval>) = VariableAddress[#temp103:20] : +# 103| mu103_42(coroutine_handle) = Uninitialized[#temp103:20] : &:r103_41 +# 103| r103_43(glval) = FunctionAddress[coroutine_handle] : +# 103| r103_44(glval>) = VariableAddress[(unnamed local variable)] : +# 103| r103_45(glval>) = Convert : r103_44 +# 103| r103_46(coroutine_handle &) = CopyValue : r103_45 +# 103| v103_47(void) = Call[coroutine_handle] : func:r103_43, this:r103_41, 0:r103_46 +# 103| mu103_48(unknown) = ^CallSideEffect : ~m? +# 103| v103_49(void) = ^BufferReadSideEffect[0] : &:r103_46, ~m? +# 103| mu103_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r103_41 +# 103| r103_51(coroutine_handle) = Load[#temp103:20] : &:r103_41, ~m? +# 103| v103_52(void) = Call[await_suspend] : func:r103_40, this:r0_16, 0:r103_51 +# 103| mu103_53(unknown) = ^CallSideEffect : ~m? +#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? #-----| Goto -> Block 3 # 104| Block 5 @@ -1676,32 +1676,32 @@ coroutines.cpp: #-----| Goto (back edge) -> Block 10 # 104| Block 6 -# 104| r104_33(suspend_always *) = CopyValue : r104_19 -# 104| r104_34(glval) = CopyValue : r104_33 -#-----| r0_27(glval) = Convert : r104_34 -# 104| r104_35(glval) = FunctionAddress[await_suspend] : -# 104| r104_36(glval>) = VariableAddress[#temp104:3] : -# 104| mu104_37(coroutine_handle) = Uninitialized[#temp104:3] : &:r104_36 -# 104| r104_38(glval) = FunctionAddress[coroutine_handle] : -# 104| r104_39(glval>) = VariableAddress : -# 104| r104_40(glval>) = Convert : r104_39 -# 104| r104_41(coroutine_handle &) = CopyValue : r104_40 -# 104| v104_42(void) = Call[coroutine_handle] : func:r104_38, this:r104_36, 0:r104_41 -# 104| mu104_43(unknown) = ^CallSideEffect : ~m? -# 104| v104_44(void) = ^BufferReadSideEffect[0] : &:r104_41, ~m? -# 104| mu104_45(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r104_36 -# 104| r104_46(coroutine_handle) = Load[#temp104:3] : &:r104_36, ~m? -# 104| v104_47(void) = Call[await_suspend] : func:r104_35, this:r0_27, 0:r104_46 -# 104| mu104_48(unknown) = ^CallSideEffect : ~m? -#-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m? +# 104| r104_33(suspend_always *) = CopyValue : r104_19 +# 104| r104_34(glval) = CopyValue : r104_33 +#-----| r0_27(glval) = Convert : r104_34 +# 104| r104_35(glval) = FunctionAddress[await_suspend] : +# 104| r104_36(glval>) = VariableAddress[#temp104:3] : +# 104| mu104_37(coroutine_handle) = Uninitialized[#temp104:3] : &:r104_36 +# 104| r104_38(glval) = FunctionAddress[coroutine_handle] : +# 104| r104_39(glval>) = VariableAddress[(unnamed local variable)] : +# 104| r104_40(glval>) = Convert : r104_39 +# 104| r104_41(coroutine_handle &) = CopyValue : r104_40 +# 104| v104_42(void) = Call[coroutine_handle] : func:r104_38, this:r104_36, 0:r104_41 +# 104| mu104_43(unknown) = ^CallSideEffect : ~m? +# 104| v104_44(void) = ^BufferReadSideEffect[0] : &:r104_41, ~m? +# 104| mu104_45(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r104_36 +# 104| r104_46(coroutine_handle) = Load[#temp104:3] : &:r104_36, ~m? +# 104| v104_47(void) = Call[await_suspend] : func:r104_35, this:r0_27, 0:r104_46 +# 104| mu104_48(unknown) = ^CallSideEffect : ~m? +#-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m? #-----| Goto -> Block 5 #-----| Block 7 -#-----| v0_29(void) = CatchAny : -#-----| r0_30(glval) = VariableAddress : -#-----| r0_31(bool) = Load[?] : &:r0_30, ~m? -#-----| r0_32(bool) = LogicalNot : r0_31 -#-----| v0_33(void) = ConditionalBranch : r0_32 +#-----| v0_29(void) = CatchAny : +#-----| r0_30(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_31(bool) = Load[(unnamed local variable)] : &:r0_30, ~m? +#-----| r0_32(bool) = LogicalNot : r0_31 +#-----| v0_33(void) = ConditionalBranch : r0_32 #-----| False -> Block 9 #-----| True -> Block 8 @@ -1761,24 +1761,24 @@ coroutines.cpp: #-----| Goto -> Block 1 # 103| Block 12 -# 103| r103_89(suspend_always *) = CopyValue : r103_74 -# 103| r103_90(glval) = CopyValue : r103_89 -#-----| r0_41(glval) = Convert : r103_90 -# 103| r103_91(glval) = FunctionAddress[await_suspend] : -# 103| r103_92(glval>) = VariableAddress[#temp103:20] : -# 103| mu103_93(coroutine_handle) = Uninitialized[#temp103:20] : &:r103_92 -# 103| r103_94(glval) = FunctionAddress[coroutine_handle] : -# 103| r103_95(glval>) = VariableAddress : -# 103| r103_96(glval>) = Convert : r103_95 -# 103| r103_97(coroutine_handle &) = CopyValue : r103_96 -# 103| v103_98(void) = Call[coroutine_handle] : func:r103_94, this:r103_92, 0:r103_97 -# 103| mu103_99(unknown) = ^CallSideEffect : ~m? -# 103| v103_100(void) = ^BufferReadSideEffect[0] : &:r103_97, ~m? -# 103| mu103_101(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r103_92 -# 103| r103_102(coroutine_handle) = Load[#temp103:20] : &:r103_92, ~m? -# 103| v103_103(void) = Call[await_suspend] : func:r103_91, this:r0_41, 0:r103_102 -# 103| mu103_104(unknown) = ^CallSideEffect : ~m? -#-----| v0_42(void) = ^IndirectReadSideEffect[-1] : &:r0_41, ~m? +# 103| r103_89(suspend_always *) = CopyValue : r103_74 +# 103| r103_90(glval) = CopyValue : r103_89 +#-----| r0_41(glval) = Convert : r103_90 +# 103| r103_91(glval) = FunctionAddress[await_suspend] : +# 103| r103_92(glval>) = VariableAddress[#temp103:20] : +# 103| mu103_93(coroutine_handle) = Uninitialized[#temp103:20] : &:r103_92 +# 103| r103_94(glval) = FunctionAddress[coroutine_handle] : +# 103| r103_95(glval>) = VariableAddress[(unnamed local variable)] : +# 103| r103_96(glval>) = Convert : r103_95 +# 103| r103_97(coroutine_handle &) = CopyValue : r103_96 +# 103| v103_98(void) = Call[coroutine_handle] : func:r103_94, this:r103_92, 0:r103_97 +# 103| mu103_99(unknown) = ^CallSideEffect : ~m? +# 103| v103_100(void) = ^BufferReadSideEffect[0] : &:r103_97, ~m? +# 103| mu103_101(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r103_92 +# 103| r103_102(coroutine_handle) = Load[#temp103:20] : &:r103_92, ~m? +# 103| v103_103(void) = Call[await_suspend] : func:r103_91, this:r0_41, 0:r103_102 +# 103| mu103_104(unknown) = ^CallSideEffect : ~m? +#-----| v0_42(void) = ^IndirectReadSideEffect[-1] : &:r0_41, ~m? #-----| Goto -> Block 11 # 108| co_returnable_value co_yield_and_return_value(int) @@ -1832,8 +1832,8 @@ coroutines.cpp: #-----| Block 3 #-----| r0_8(bool) = Constant[1] : -#-----| r0_9(glval) = VariableAddress : -#-----| mu0_10(bool) = Store[?] : &:r0_9, r0_8 +#-----| r0_9(glval) = VariableAddress[(unnamed local variable)] : +#-----| mu0_10(bool) = Store[(unnamed local variable)] : &:r0_9, r0_8 # 108| r108_33(suspend_always *) = CopyValue : r108_22 # 108| r108_34(glval) = CopyValue : r108_33 #-----| r0_11(glval) = Convert : r108_34 @@ -1875,24 +1875,24 @@ coroutines.cpp: #-----| True -> Block 5 # 108| Block 4 -# 108| r108_38(suspend_always *) = CopyValue : r108_22 -# 108| r108_39(glval) = CopyValue : r108_38 -#-----| r0_16(glval) = Convert : r108_39 -# 108| r108_40(glval) = FunctionAddress[await_suspend] : -# 108| r108_41(glval>) = VariableAddress[#temp108:21] : -# 108| mu108_42(coroutine_handle) = Uninitialized[#temp108:21] : &:r108_41 -# 108| r108_43(glval) = FunctionAddress[coroutine_handle] : -# 108| r108_44(glval>) = VariableAddress : -# 108| r108_45(glval>) = Convert : r108_44 -# 108| r108_46(coroutine_handle &) = CopyValue : r108_45 -# 108| v108_47(void) = Call[coroutine_handle] : func:r108_43, this:r108_41, 0:r108_46 -# 108| mu108_48(unknown) = ^CallSideEffect : ~m? -# 108| v108_49(void) = ^BufferReadSideEffect[0] : &:r108_46, ~m? -# 108| mu108_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r108_41 -# 108| r108_51(coroutine_handle) = Load[#temp108:21] : &:r108_41, ~m? -# 108| v108_52(void) = Call[await_suspend] : func:r108_40, this:r0_16, 0:r108_51 -# 108| mu108_53(unknown) = ^CallSideEffect : ~m? -#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? +# 108| r108_38(suspend_always *) = CopyValue : r108_22 +# 108| r108_39(glval) = CopyValue : r108_38 +#-----| r0_16(glval) = Convert : r108_39 +# 108| r108_40(glval) = FunctionAddress[await_suspend] : +# 108| r108_41(glval>) = VariableAddress[#temp108:21] : +# 108| mu108_42(coroutine_handle) = Uninitialized[#temp108:21] : &:r108_41 +# 108| r108_43(glval) = FunctionAddress[coroutine_handle] : +# 108| r108_44(glval>) = VariableAddress[(unnamed local variable)] : +# 108| r108_45(glval>) = Convert : r108_44 +# 108| r108_46(coroutine_handle &) = CopyValue : r108_45 +# 108| v108_47(void) = Call[coroutine_handle] : func:r108_43, this:r108_41, 0:r108_46 +# 108| mu108_48(unknown) = ^CallSideEffect : ~m? +# 108| v108_49(void) = ^BufferReadSideEffect[0] : &:r108_46, ~m? +# 108| mu108_50(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r108_41 +# 108| r108_51(coroutine_handle) = Load[#temp108:21] : &:r108_41, ~m? +# 108| v108_52(void) = Call[await_suspend] : func:r108_40, this:r0_16, 0:r108_51 +# 108| mu108_53(unknown) = ^CallSideEffect : ~m? +#-----| v0_17(void) = ^IndirectReadSideEffect[-1] : &:r0_16, ~m? #-----| Goto -> Block 3 # 109| Block 5 @@ -1918,32 +1918,32 @@ coroutines.cpp: #-----| Goto (back edge) -> Block 10 # 109| Block 6 -# 109| r109_33(suspend_always *) = CopyValue : r109_19 -# 109| r109_34(glval) = CopyValue : r109_33 -#-----| r0_27(glval) = Convert : r109_34 -# 109| r109_35(glval) = FunctionAddress[await_suspend] : -# 109| r109_36(glval>) = VariableAddress[#temp109:3] : -# 109| mu109_37(coroutine_handle) = Uninitialized[#temp109:3] : &:r109_36 -# 109| r109_38(glval) = FunctionAddress[coroutine_handle] : -# 109| r109_39(glval>) = VariableAddress : -# 109| r109_40(glval>) = Convert : r109_39 -# 109| r109_41(coroutine_handle &) = CopyValue : r109_40 -# 109| v109_42(void) = Call[coroutine_handle] : func:r109_38, this:r109_36, 0:r109_41 -# 109| mu109_43(unknown) = ^CallSideEffect : ~m? -# 109| v109_44(void) = ^BufferReadSideEffect[0] : &:r109_41, ~m? -# 109| mu109_45(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r109_36 -# 109| r109_46(coroutine_handle) = Load[#temp109:3] : &:r109_36, ~m? -# 109| v109_47(void) = Call[await_suspend] : func:r109_35, this:r0_27, 0:r109_46 -# 109| mu109_48(unknown) = ^CallSideEffect : ~m? -#-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m? +# 109| r109_33(suspend_always *) = CopyValue : r109_19 +# 109| r109_34(glval) = CopyValue : r109_33 +#-----| r0_27(glval) = Convert : r109_34 +# 109| r109_35(glval) = FunctionAddress[await_suspend] : +# 109| r109_36(glval>) = VariableAddress[#temp109:3] : +# 109| mu109_37(coroutine_handle) = Uninitialized[#temp109:3] : &:r109_36 +# 109| r109_38(glval) = FunctionAddress[coroutine_handle] : +# 109| r109_39(glval>) = VariableAddress[(unnamed local variable)] : +# 109| r109_40(glval>) = Convert : r109_39 +# 109| r109_41(coroutine_handle &) = CopyValue : r109_40 +# 109| v109_42(void) = Call[coroutine_handle] : func:r109_38, this:r109_36, 0:r109_41 +# 109| mu109_43(unknown) = ^CallSideEffect : ~m? +# 109| v109_44(void) = ^BufferReadSideEffect[0] : &:r109_41, ~m? +# 109| mu109_45(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r109_36 +# 109| r109_46(coroutine_handle) = Load[#temp109:3] : &:r109_36, ~m? +# 109| v109_47(void) = Call[await_suspend] : func:r109_35, this:r0_27, 0:r109_46 +# 109| mu109_48(unknown) = ^CallSideEffect : ~m? +#-----| v0_28(void) = ^IndirectReadSideEffect[-1] : &:r0_27, ~m? #-----| Goto -> Block 5 #-----| Block 7 -#-----| v0_29(void) = CatchAny : -#-----| r0_30(glval) = VariableAddress : -#-----| r0_31(bool) = Load[?] : &:r0_30, ~m? -#-----| r0_32(bool) = LogicalNot : r0_31 -#-----| v0_33(void) = ConditionalBranch : r0_32 +#-----| v0_29(void) = CatchAny : +#-----| r0_30(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_31(bool) = Load[(unnamed local variable)] : &:r0_30, ~m? +#-----| r0_32(bool) = LogicalNot : r0_31 +#-----| v0_33(void) = ConditionalBranch : r0_32 #-----| False -> Block 9 #-----| True -> Block 8 @@ -2003,24 +2003,24 @@ coroutines.cpp: #-----| Goto -> Block 1 # 108| Block 12 -# 108| r108_89(suspend_always *) = CopyValue : r108_74 -# 108| r108_90(glval) = CopyValue : r108_89 -#-----| r0_41(glval) = Convert : r108_90 -# 108| r108_91(glval) = FunctionAddress[await_suspend] : -# 108| r108_92(glval>) = VariableAddress[#temp108:21] : -# 108| mu108_93(coroutine_handle) = Uninitialized[#temp108:21] : &:r108_92 -# 108| r108_94(glval) = FunctionAddress[coroutine_handle] : -# 108| r108_95(glval>) = VariableAddress : -# 108| r108_96(glval>) = Convert : r108_95 -# 108| r108_97(coroutine_handle &) = CopyValue : r108_96 -# 108| v108_98(void) = Call[coroutine_handle] : func:r108_94, this:r108_92, 0:r108_97 -# 108| mu108_99(unknown) = ^CallSideEffect : ~m? -# 108| v108_100(void) = ^BufferReadSideEffect[0] : &:r108_97, ~m? -# 108| mu108_101(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r108_92 -# 108| r108_102(coroutine_handle) = Load[#temp108:21] : &:r108_92, ~m? -# 108| v108_103(void) = Call[await_suspend] : func:r108_91, this:r0_41, 0:r108_102 -# 108| mu108_104(unknown) = ^CallSideEffect : ~m? -#-----| v0_42(void) = ^IndirectReadSideEffect[-1] : &:r0_41, ~m? +# 108| r108_89(suspend_always *) = CopyValue : r108_74 +# 108| r108_90(glval) = CopyValue : r108_89 +#-----| r0_41(glval) = Convert : r108_90 +# 108| r108_91(glval) = FunctionAddress[await_suspend] : +# 108| r108_92(glval>) = VariableAddress[#temp108:21] : +# 108| mu108_93(coroutine_handle) = Uninitialized[#temp108:21] : &:r108_92 +# 108| r108_94(glval) = FunctionAddress[coroutine_handle] : +# 108| r108_95(glval>) = VariableAddress[(unnamed local variable)] : +# 108| r108_96(glval>) = Convert : r108_95 +# 108| r108_97(coroutine_handle &) = CopyValue : r108_96 +# 108| v108_98(void) = Call[coroutine_handle] : func:r108_94, this:r108_92, 0:r108_97 +# 108| mu108_99(unknown) = ^CallSideEffect : ~m? +# 108| v108_100(void) = ^BufferReadSideEffect[0] : &:r108_97, ~m? +# 108| mu108_101(coroutine_handle) = ^IndirectMayWriteSideEffect[-1] : &:r108_92 +# 108| r108_102(coroutine_handle) = Load[#temp108:21] : &:r108_92, ~m? +# 108| v108_103(void) = Call[await_suspend] : func:r108_91, this:r0_41, 0:r108_102 +# 108| mu108_104(unknown) = ^CallSideEffect : ~m? +#-----| v0_42(void) = ^IndirectReadSideEffect[-1] : &:r0_41, ~m? #-----| Goto -> Block 11 destructors_for_temps.cpp: @@ -2733,7 +2733,7 @@ destructors_for_temps.cpp: # 102| v102_8(void) = ExitFunction : generic.c: -# 1| void c11_generic_test(unsigned int, int) +# 1| void c11_generic_test_with_load(unsigned int, int) # 1| Block 0 # 1| v1_1(void) = EnterFunction : # 1| mu1_2(unknown) = AliasedDefinition : @@ -2755,6 +2755,59 @@ generic.c: # 1| v1_9(void) = AliasedUse : ~m? # 1| v1_10(void) = ExitFunction : +# 12| char const* c11_generic_test_with_constant_and_macro() +# 12| Block 0 +# 12| v12_1(void) = EnterFunction : +# 12| mu12_2(unknown) = AliasedDefinition : +# 12| mu12_3(unknown) = InitializeNonLocal : +# 14| r14_1(glval) = VariableAddress[i] : +# 14| mu14_2(int) = Uninitialized[i] : &:r14_1 +# 16| r16_1(glval) = VariableAddress[#return] : +# 16| r16_2(glval) = Constant[int] : +# 16| r16_3(char *) = Convert : r16_2 +# 16| r16_4(char *) = Convert : r16_3 +# 16| mu16_5(char *) = Store[#return] : &:r16_1, r16_4 +# 12| r12_4(glval) = VariableAddress[#return] : +# 12| v12_5(void) = ReturnValue : &:r12_4, ~m? +# 12| v12_6(void) = AliasedUse : ~m? +# 12| v12_7(void) = ExitFunction : + +# 19| char const* c11_generic_test_with_constant_and_no_macro() +# 19| Block 0 +# 19| v19_1(void) = EnterFunction : +# 19| mu19_2(unknown) = AliasedDefinition : +# 19| mu19_3(unknown) = InitializeNonLocal : +# 21| r21_1(glval) = VariableAddress[i] : +# 21| mu21_2(int) = Uninitialized[i] : &:r21_1 +# 23| r23_1(glval) = VariableAddress[#return] : +# 23| r23_2(glval) = Constant[int] : +# 23| r23_3(char *) = Convert : r23_2 +# 23| r23_4(char *) = Convert : r23_3 +# 23| mu23_5(char *) = Store[#return] : &:r23_1, r23_4 +# 19| r19_4(glval) = VariableAddress[#return] : +# 19| v19_5(void) = ReturnValue : &:r19_4, ~m? +# 19| v19_6(void) = AliasedUse : ~m? +# 19| v19_7(void) = ExitFunction : + +# 26| void c11_generic_test_test_with_cast(int) +# 26| Block 0 +# 26| v26_1(void) = EnterFunction : +# 26| mu26_2(unknown) = AliasedDefinition : +# 26| mu26_3(unknown) = InitializeNonLocal : +# 26| r26_4(glval) = VariableAddress[y] : +# 26| mu26_5(int) = InitializeParameter[y] : &:r26_4 +# 27| r27_1(glval) = VariableAddress[r] : +# 27| mu27_2(unsigned int) = Uninitialized[r] : &:r27_1 +# 28| r28_1(glval) = VariableAddress[y] : +# 28| r28_2(int) = Load[y] : &:r28_1, ~m? +# 28| r28_3(unsigned int) = Convert : r28_2 +# 28| r28_4(glval) = VariableAddress[r] : +# 28| mu28_5(unsigned int) = Store[r] : &:r28_4, r28_3 +# 29| v29_1(void) = NoOp : +# 26| v26_6(void) = ReturnVoid : +# 26| v26_7(void) = AliasedUse : ~m? +# 26| v26_8(void) = ExitFunction : + ir.c: # 7| void MyCoordsTest(int) # 7| Block 0 diff --git a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected index 5a0234a4cc4..199d61f015d 100644 --- a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected @@ -29,26 +29,4 @@ fieldAddressOnNonPointer thisArgumentIsNonPointer | ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable -| coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:91:21:91:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:91:21:91:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:95:20:95:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:95:20:95:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:96:3:96:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:99:21:99:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:99:21:99:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:100:3:100:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:103:20:103:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:103:20:103:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:104:3:104:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:108:21:108:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:108:21:108:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:109:3:109:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | missingCppType diff --git a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected index 5a0234a4cc4..199d61f015d 100644 --- a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected +++ b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected @@ -29,26 +29,4 @@ fieldAddressOnNonPointer thisArgumentIsNonPointer | ir.cpp:2546:34:2546:34 | Call: call to operator bool | Call instruction 'Call: call to operator bool' has a `this` argument operand that is not an address, in function '$@'. | ir.cpp:2545:6:2545:23 | void this_inconsistency(bool) | void this_inconsistency(bool) | nonUniqueIRVariable -| coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:87:20:87:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:91:21:91:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:91:21:91:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:95:20:95:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:95:20:95:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:96:3:96:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:99:21:99:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:99:21:99:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:100:3:100:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:103:20:103:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:103:20:103:20 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:104:3:104:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:108:21:108:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:108:21:108:21 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:109:3:109:3 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| file://:0:0:0:0 | VariableAddress: (unnamed local variable) | Variable address instruction 'VariableAddress: (unnamed local variable)' has no associated variable, in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | missingCppType diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/ArithmeticUncontrolled/ArithmeticUncontrolled.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/ArithmeticUncontrolled/ArithmeticUncontrolled.expected index c21f9c38855..97bd3603cd3 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/ArithmeticUncontrolled/ArithmeticUncontrolled.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/ArithmeticUncontrolled/ArithmeticUncontrolled.expected @@ -32,6 +32,8 @@ edges | test.cpp:24:11:24:18 | call to get_rand | test.cpp:25:7:25:7 | r | provenance | | | test.cpp:30:13:30:14 | get_rand2 output argument | test.cpp:31:7:31:7 | r | provenance | | | test.cpp:36:13:36:13 | get_rand3 output argument | test.cpp:37:7:37:7 | r | provenance | | +| test.cpp:62:19:62:24 | call to rand | test.cpp:62:19:62:24 | call to rand | provenance | | +| test.cpp:62:19:62:24 | call to rand | test.cpp:65:9:65:9 | x | provenance | | | test.cpp:86:10:86:13 | call to rand | test.cpp:86:10:86:13 | call to rand | provenance | | | test.cpp:86:10:86:13 | call to rand | test.cpp:90:10:90:10 | x | provenance | | | test.cpp:98:10:98:13 | call to rand | test.cpp:98:10:98:13 | call to rand | provenance | | @@ -105,6 +107,9 @@ nodes | test.cpp:31:7:31:7 | r | semmle.label | r | | test.cpp:36:13:36:13 | get_rand3 output argument | semmle.label | get_rand3 output argument | | test.cpp:37:7:37:7 | r | semmle.label | r | +| test.cpp:62:19:62:24 | call to rand | semmle.label | call to rand | +| test.cpp:62:19:62:24 | call to rand | semmle.label | call to rand | +| test.cpp:65:9:65:9 | x | semmle.label | x | | test.cpp:86:10:86:13 | call to rand | semmle.label | call to rand | | test.cpp:86:10:86:13 | call to rand | semmle.label | call to rand | | test.cpp:90:10:90:10 | x | semmle.label | x | @@ -156,6 +161,7 @@ subpaths | test.cpp:25:7:25:7 | r | test.cpp:8:9:8:12 | call to rand | test.cpp:25:7:25:7 | r | This arithmetic expression depends on an $@, potentially causing an overflow. | test.cpp:8:9:8:12 | call to rand | uncontrolled value | | test.cpp:31:7:31:7 | r | test.cpp:13:10:13:13 | call to rand | test.cpp:31:7:31:7 | r | This arithmetic expression depends on an $@, potentially causing an overflow. | test.cpp:13:10:13:13 | call to rand | uncontrolled value | | test.cpp:37:7:37:7 | r | test.cpp:18:9:18:12 | call to rand | test.cpp:37:7:37:7 | r | This arithmetic expression depends on an $@, potentially causing an overflow. | test.cpp:18:9:18:12 | call to rand | uncontrolled value | +| test.cpp:65:9:65:9 | x | test.cpp:62:19:62:24 | call to rand | test.cpp:65:9:65:9 | x | This arithmetic expression depends on an $@, potentially causing an underflow. | test.cpp:62:19:62:22 | call to rand | uncontrolled value | | test.cpp:90:10:90:10 | x | test.cpp:86:10:86:13 | call to rand | test.cpp:90:10:90:10 | x | This arithmetic expression depends on an $@, potentially causing an overflow. | test.cpp:86:10:86:13 | call to rand | uncontrolled value | | test.cpp:102:10:102:10 | x | test.cpp:98:10:98:13 | call to rand | test.cpp:102:10:102:10 | x | This arithmetic expression depends on an $@, potentially causing an overflow. | test.cpp:98:10:98:13 | call to rand | uncontrolled value | | test.cpp:146:9:146:9 | y | test.cpp:137:10:137:13 | call to rand | test.cpp:146:9:146:9 | y | This arithmetic expression depends on an $@, potentially causing an overflow. | test.cpp:137:10:137:13 | call to rand | uncontrolled value | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/ArithmeticUncontrolled/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/ArithmeticUncontrolled/test.cpp index 6df97ef5452..f5e401c60cd 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/ArithmeticUncontrolled/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/ArithmeticUncontrolled/test.cpp @@ -62,7 +62,7 @@ unsigned int test_remainder_subtract_unsigned() unsigned int x = rand(); unsigned int y = x % 100; // y <= x - return x - y; // GOOD (as y <= x) + return x - y; // GOOD (as y <= x) [FALSE POSITIVE] } typedef unsigned long size_t; diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/TaintedAllocationSize.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/TaintedAllocationSize.expected index 9e5f61c7c88..4235033abcc 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/TaintedAllocationSize.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/TaintedAllocationSize.expected @@ -13,26 +13,30 @@ edges | test.cpp:133:19:133:32 | *call to getenv | test.cpp:133:14:133:17 | call to atoi | provenance | TaintFunction | | test.cpp:148:15:148:18 | call to atol | test.cpp:152:11:152:28 | ... * ... | provenance | | | test.cpp:148:20:148:33 | *call to getenv | test.cpp:148:15:148:18 | call to atol | provenance | TaintFunction | -| test.cpp:224:8:224:23 | *get_tainted_size | test.cpp:256:9:256:24 | call to get_tainted_size | provenance | | -| test.cpp:226:9:226:42 | ... * ... | test.cpp:224:8:224:23 | *get_tainted_size | provenance | | -| test.cpp:226:14:226:27 | *call to getenv | test.cpp:226:9:226:42 | ... * ... | provenance | TaintFunction | -| test.cpp:245:21:245:21 | s | test.cpp:246:21:246:21 | s | provenance | | -| test.cpp:252:19:252:52 | ... * ... | test.cpp:254:9:254:18 | local_size | provenance | | -| test.cpp:252:19:252:52 | ... * ... | test.cpp:260:11:260:20 | local_size | provenance | | -| test.cpp:252:19:252:52 | ... * ... | test.cpp:262:10:262:19 | local_size | provenance | | -| test.cpp:252:24:252:37 | *call to getenv | test.cpp:252:19:252:52 | ... * ... | provenance | TaintFunction | -| test.cpp:262:10:262:19 | local_size | test.cpp:245:21:245:21 | s | provenance | | -| test.cpp:265:20:265:27 | *out_size | test.cpp:304:17:304:20 | get_size output argument | provenance | | -| test.cpp:265:20:265:27 | *out_size | test.cpp:320:18:320:21 | get_size output argument | provenance | | -| test.cpp:266:2:266:32 | ... = ... | test.cpp:265:20:265:27 | *out_size | provenance | | -| test.cpp:266:18:266:31 | *call to getenv | test.cpp:266:2:266:32 | ... = ... | provenance | TaintFunction | -| test.cpp:274:15:274:18 | call to atoi | test.cpp:278:11:278:29 | ... * ... | provenance | | -| test.cpp:274:20:274:33 | *call to getenv | test.cpp:274:15:274:18 | call to atoi | provenance | TaintFunction | -| test.cpp:304:17:304:20 | get_size output argument | test.cpp:306:11:306:28 | ... * ... | provenance | | -| test.cpp:320:18:320:21 | get_size output argument | test.cpp:323:10:323:27 | ... * ... | provenance | | -| test.cpp:368:13:368:16 | call to atoi | test.cpp:370:35:370:38 | size | provenance | | -| test.cpp:368:13:368:16 | call to atoi | test.cpp:371:35:371:38 | size | provenance | | -| test.cpp:368:18:368:31 | *call to getenv | test.cpp:368:13:368:16 | call to atoi | provenance | TaintFunction | +| test.cpp:190:14:190:17 | call to atoi | test.cpp:194:11:194:28 | ... * ... | provenance | | +| test.cpp:190:19:190:32 | *call to getenv | test.cpp:190:14:190:17 | call to atoi | provenance | TaintFunction | +| test.cpp:205:14:205:17 | call to atoi | test.cpp:209:11:209:28 | ... * ... | provenance | | +| test.cpp:205:19:205:32 | *call to getenv | test.cpp:205:14:205:17 | call to atoi | provenance | TaintFunction | +| test.cpp:239:8:239:23 | *get_tainted_size | test.cpp:271:9:271:24 | call to get_tainted_size | provenance | | +| test.cpp:241:9:241:42 | ... * ... | test.cpp:239:8:239:23 | *get_tainted_size | provenance | | +| test.cpp:241:14:241:27 | *call to getenv | test.cpp:241:9:241:42 | ... * ... | provenance | TaintFunction | +| test.cpp:260:21:260:21 | s | test.cpp:261:21:261:21 | s | provenance | | +| test.cpp:267:19:267:52 | ... * ... | test.cpp:269:9:269:18 | local_size | provenance | | +| test.cpp:267:19:267:52 | ... * ... | test.cpp:275:11:275:20 | local_size | provenance | | +| test.cpp:267:19:267:52 | ... * ... | test.cpp:277:10:277:19 | local_size | provenance | | +| test.cpp:267:24:267:37 | *call to getenv | test.cpp:267:19:267:52 | ... * ... | provenance | TaintFunction | +| test.cpp:277:10:277:19 | local_size | test.cpp:260:21:260:21 | s | provenance | | +| test.cpp:280:20:280:27 | *out_size | test.cpp:319:17:319:20 | get_size output argument | provenance | | +| test.cpp:280:20:280:27 | *out_size | test.cpp:335:18:335:21 | get_size output argument | provenance | | +| test.cpp:281:2:281:32 | ... = ... | test.cpp:280:20:280:27 | *out_size | provenance | | +| test.cpp:281:18:281:31 | *call to getenv | test.cpp:281:2:281:32 | ... = ... | provenance | TaintFunction | +| test.cpp:289:15:289:18 | call to atoi | test.cpp:293:11:293:29 | ... * ... | provenance | | +| test.cpp:289:20:289:33 | *call to getenv | test.cpp:289:15:289:18 | call to atoi | provenance | TaintFunction | +| test.cpp:319:17:319:20 | get_size output argument | test.cpp:321:11:321:28 | ... * ... | provenance | | +| test.cpp:335:18:335:21 | get_size output argument | test.cpp:338:10:338:27 | ... * ... | provenance | | +| test.cpp:383:13:383:16 | call to atoi | test.cpp:385:35:385:38 | size | provenance | | +| test.cpp:383:13:383:16 | call to atoi | test.cpp:386:35:386:38 | size | provenance | | +| test.cpp:383:18:383:31 | *call to getenv | test.cpp:383:13:383:16 | call to atoi | provenance | TaintFunction | nodes | test.cpp:39:27:39:30 | **argv | semmle.label | **argv | | test.cpp:40:16:40:19 | call to atoi | semmle.label | call to atoi | @@ -52,31 +56,37 @@ nodes | test.cpp:148:15:148:18 | call to atol | semmle.label | call to atol | | test.cpp:148:20:148:33 | *call to getenv | semmle.label | *call to getenv | | test.cpp:152:11:152:28 | ... * ... | semmle.label | ... * ... | -| test.cpp:224:8:224:23 | *get_tainted_size | semmle.label | *get_tainted_size | -| test.cpp:226:9:226:42 | ... * ... | semmle.label | ... * ... | -| test.cpp:226:14:226:27 | *call to getenv | semmle.label | *call to getenv | -| test.cpp:245:21:245:21 | s | semmle.label | s | -| test.cpp:246:21:246:21 | s | semmle.label | s | -| test.cpp:252:19:252:52 | ... * ... | semmle.label | ... * ... | -| test.cpp:252:24:252:37 | *call to getenv | semmle.label | *call to getenv | -| test.cpp:254:9:254:18 | local_size | semmle.label | local_size | -| test.cpp:256:9:256:24 | call to get_tainted_size | semmle.label | call to get_tainted_size | -| test.cpp:260:11:260:20 | local_size | semmle.label | local_size | -| test.cpp:262:10:262:19 | local_size | semmle.label | local_size | -| test.cpp:265:20:265:27 | *out_size | semmle.label | *out_size | -| test.cpp:266:2:266:32 | ... = ... | semmle.label | ... = ... | -| test.cpp:266:18:266:31 | *call to getenv | semmle.label | *call to getenv | -| test.cpp:274:15:274:18 | call to atoi | semmle.label | call to atoi | -| test.cpp:274:20:274:33 | *call to getenv | semmle.label | *call to getenv | -| test.cpp:278:11:278:29 | ... * ... | semmle.label | ... * ... | -| test.cpp:304:17:304:20 | get_size output argument | semmle.label | get_size output argument | -| test.cpp:306:11:306:28 | ... * ... | semmle.label | ... * ... | -| test.cpp:320:18:320:21 | get_size output argument | semmle.label | get_size output argument | -| test.cpp:323:10:323:27 | ... * ... | semmle.label | ... * ... | -| test.cpp:368:13:368:16 | call to atoi | semmle.label | call to atoi | -| test.cpp:368:18:368:31 | *call to getenv | semmle.label | *call to getenv | -| test.cpp:370:35:370:38 | size | semmle.label | size | -| test.cpp:371:35:371:38 | size | semmle.label | size | +| test.cpp:190:14:190:17 | call to atoi | semmle.label | call to atoi | +| test.cpp:190:19:190:32 | *call to getenv | semmle.label | *call to getenv | +| test.cpp:194:11:194:28 | ... * ... | semmle.label | ... * ... | +| test.cpp:205:14:205:17 | call to atoi | semmle.label | call to atoi | +| test.cpp:205:19:205:32 | *call to getenv | semmle.label | *call to getenv | +| test.cpp:209:11:209:28 | ... * ... | semmle.label | ... * ... | +| test.cpp:239:8:239:23 | *get_tainted_size | semmle.label | *get_tainted_size | +| test.cpp:241:9:241:42 | ... * ... | semmle.label | ... * ... | +| test.cpp:241:14:241:27 | *call to getenv | semmle.label | *call to getenv | +| test.cpp:260:21:260:21 | s | semmle.label | s | +| test.cpp:261:21:261:21 | s | semmle.label | s | +| test.cpp:267:19:267:52 | ... * ... | semmle.label | ... * ... | +| test.cpp:267:24:267:37 | *call to getenv | semmle.label | *call to getenv | +| test.cpp:269:9:269:18 | local_size | semmle.label | local_size | +| test.cpp:271:9:271:24 | call to get_tainted_size | semmle.label | call to get_tainted_size | +| test.cpp:275:11:275:20 | local_size | semmle.label | local_size | +| test.cpp:277:10:277:19 | local_size | semmle.label | local_size | +| test.cpp:280:20:280:27 | *out_size | semmle.label | *out_size | +| test.cpp:281:2:281:32 | ... = ... | semmle.label | ... = ... | +| test.cpp:281:18:281:31 | *call to getenv | semmle.label | *call to getenv | +| test.cpp:289:15:289:18 | call to atoi | semmle.label | call to atoi | +| test.cpp:289:20:289:33 | *call to getenv | semmle.label | *call to getenv | +| test.cpp:293:11:293:29 | ... * ... | semmle.label | ... * ... | +| test.cpp:319:17:319:20 | get_size output argument | semmle.label | get_size output argument | +| test.cpp:321:11:321:28 | ... * ... | semmle.label | ... * ... | +| test.cpp:335:18:335:21 | get_size output argument | semmle.label | get_size output argument | +| test.cpp:338:10:338:27 | ... * ... | semmle.label | ... * ... | +| test.cpp:383:13:383:16 | call to atoi | semmle.label | call to atoi | +| test.cpp:383:18:383:31 | *call to getenv | semmle.label | *call to getenv | +| test.cpp:385:35:385:38 | size | semmle.label | size | +| test.cpp:386:35:386:38 | size | semmle.label | size | subpaths #select | test.cpp:43:31:43:36 | call to malloc | test.cpp:39:27:39:30 | **argv | test.cpp:43:38:43:44 | tainted | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:39:27:39:30 | **argv | user input (a command-line argument) | @@ -88,12 +98,14 @@ subpaths | test.cpp:128:17:128:22 | call to malloc | test.cpp:124:18:124:31 | *call to getenv | test.cpp:128:24:128:41 | ... * ... | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:124:18:124:31 | *call to getenv | user input (an environment variable) | | test.cpp:135:3:135:8 | call to malloc | test.cpp:133:19:133:32 | *call to getenv | test.cpp:135:10:135:27 | ... * ... | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:133:19:133:32 | *call to getenv | user input (an environment variable) | | test.cpp:152:4:152:9 | call to malloc | test.cpp:148:20:148:33 | *call to getenv | test.cpp:152:11:152:28 | ... * ... | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:148:20:148:33 | *call to getenv | user input (an environment variable) | -| test.cpp:246:14:246:19 | call to malloc | test.cpp:252:24:252:37 | *call to getenv | test.cpp:246:21:246:21 | s | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:252:24:252:37 | *call to getenv | user input (an environment variable) | -| test.cpp:254:2:254:7 | call to malloc | test.cpp:252:24:252:37 | *call to getenv | test.cpp:254:9:254:18 | local_size | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:252:24:252:37 | *call to getenv | user input (an environment variable) | -| test.cpp:256:2:256:7 | call to malloc | test.cpp:226:14:226:27 | *call to getenv | test.cpp:256:9:256:24 | call to get_tainted_size | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:226:14:226:27 | *call to getenv | user input (an environment variable) | -| test.cpp:260:2:260:9 | call to my_alloc | test.cpp:252:24:252:37 | *call to getenv | test.cpp:260:11:260:20 | local_size | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:252:24:252:37 | *call to getenv | user input (an environment variable) | -| test.cpp:278:4:278:9 | call to malloc | test.cpp:274:20:274:33 | *call to getenv | test.cpp:278:11:278:29 | ... * ... | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:274:20:274:33 | *call to getenv | user input (an environment variable) | -| test.cpp:306:4:306:9 | call to malloc | test.cpp:266:18:266:31 | *call to getenv | test.cpp:306:11:306:28 | ... * ... | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:266:18:266:31 | *call to getenv | user input (an environment variable) | -| test.cpp:323:3:323:8 | call to malloc | test.cpp:266:18:266:31 | *call to getenv | test.cpp:323:10:323:27 | ... * ... | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:266:18:266:31 | *call to getenv | user input (an environment variable) | -| test.cpp:370:25:370:33 | call to MyMalloc1 | test.cpp:368:18:368:31 | *call to getenv | test.cpp:370:35:370:38 | size | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:368:18:368:31 | *call to getenv | user input (an environment variable) | -| test.cpp:371:25:371:33 | call to MyMalloc2 | test.cpp:368:18:368:31 | *call to getenv | test.cpp:371:35:371:38 | size | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:368:18:368:31 | *call to getenv | user input (an environment variable) | +| test.cpp:194:4:194:9 | call to malloc | test.cpp:190:19:190:32 | *call to getenv | test.cpp:194:11:194:28 | ... * ... | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:190:19:190:32 | *call to getenv | user input (an environment variable) | +| test.cpp:209:4:209:9 | call to malloc | test.cpp:205:19:205:32 | *call to getenv | test.cpp:209:11:209:28 | ... * ... | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:205:19:205:32 | *call to getenv | user input (an environment variable) | +| test.cpp:261:14:261:19 | call to malloc | test.cpp:267:24:267:37 | *call to getenv | test.cpp:261:21:261:21 | s | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:267:24:267:37 | *call to getenv | user input (an environment variable) | +| test.cpp:269:2:269:7 | call to malloc | test.cpp:267:24:267:37 | *call to getenv | test.cpp:269:9:269:18 | local_size | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:267:24:267:37 | *call to getenv | user input (an environment variable) | +| test.cpp:271:2:271:7 | call to malloc | test.cpp:241:14:241:27 | *call to getenv | test.cpp:271:9:271:24 | call to get_tainted_size | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:241:14:241:27 | *call to getenv | user input (an environment variable) | +| test.cpp:275:2:275:9 | call to my_alloc | test.cpp:267:24:267:37 | *call to getenv | test.cpp:275:11:275:20 | local_size | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:267:24:267:37 | *call to getenv | user input (an environment variable) | +| test.cpp:293:4:293:9 | call to malloc | test.cpp:289:20:289:33 | *call to getenv | test.cpp:293:11:293:29 | ... * ... | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:289:20:289:33 | *call to getenv | user input (an environment variable) | +| test.cpp:321:4:321:9 | call to malloc | test.cpp:281:18:281:31 | *call to getenv | test.cpp:321:11:321:28 | ... * ... | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:281:18:281:31 | *call to getenv | user input (an environment variable) | +| test.cpp:338:3:338:8 | call to malloc | test.cpp:281:18:281:31 | *call to getenv | test.cpp:338:10:338:27 | ... * ... | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:281:18:281:31 | *call to getenv | user input (an environment variable) | +| test.cpp:385:25:385:33 | call to MyMalloc1 | test.cpp:383:18:383:31 | *call to getenv | test.cpp:385:35:385:38 | size | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:383:18:383:31 | *call to getenv | user input (an environment variable) | +| test.cpp:386:25:386:33 | call to MyMalloc2 | test.cpp:383:18:383:31 | *call to getenv | test.cpp:386:35:386:38 | size | This allocation size is derived from $@ and could allocate arbitrary amounts of memory. | test.cpp:383:18:383:31 | *call to getenv | user input (an environment variable) | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/test.cpp index f262d1943d0..e13c50a960b 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/test.cpp @@ -191,7 +191,22 @@ void more_bounded_tests() { if (size % 100) { - malloc(size * sizeof(int)); // BAD [NOT DETECTED] + malloc(size * sizeof(int)); // BAD + } + } + + { + int size = atoi(getenv("USER")); + int size2 = size & 7; // Pick the first three bits of size + malloc(size2 * sizeof(int)); // GOOD + } + + { + int size = atoi(getenv("USER")); + + if (size & 7) + { + malloc(size * sizeof(int)); // BAD } } diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/LoopConditionsConst.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/LoopConditionsConst.expected index f0ada1ce16a..b3a0f5f2388 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/LoopConditionsConst.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/LoopConditionsConst.expected @@ -2,25 +2,25 @@ | test.cpp:43:2:45:2 | for(...;...;...) ... | test.cpp:43:18:43:26 | ... < ... | | i | { ... } | i | ExprStmt | | test.cpp:74:2:77:2 | while (...) ... | test.cpp:74:9:74:17 | ... > ... | 1 | count | { ... } | count | ExprStmt | | test.cpp:84:2:88:2 | while (...) ... | test.cpp:84:9:84:17 | ... > ... | | count | { ... } | count | if (...) ... | -| test.cpp:171:3:173:3 | while (...) ... | test.cpp:171:10:171:43 | ... != ... | 0 | | { ... } | 0 | return ... | -| test.cpp:251:2:255:2 | while (...) ... | test.cpp:251:9:251:12 | loop | 1 | loop | { ... } | loop | return ... | -| test.cpp:263:2:267:2 | while (...) ... | test.cpp:263:9:263:20 | ... && ... | 1 | 1 | { ... } | ... && ... | return ... | -| test.cpp:275:2:279:2 | while (...) ... | test.cpp:275:9:275:13 | ! ... | 1 | stop | { ... } | stop | return ... | -| test.cpp:287:2:291:2 | while (...) ... | test.cpp:287:9:287:20 | ... && ... | 1 | loop | { ... } | loop | return ... | -| test.cpp:299:2:303:2 | while (...) ... | test.cpp:299:9:299:20 | ... && ... | 1 | loop | { ... } | ... && ..., loop | return ... | -| test.cpp:311:2:315:2 | while (...) ... | test.cpp:311:9:311:21 | ... \|\| ... | 1 | ... \|\| ... | { ... } | 0 | return ... | -| test.cpp:323:2:328:2 | while (...) ... | test.cpp:323:9:323:17 | ... ? ... : ... | | b, c | { ... } | c | return ... | -| test.cpp:336:2:341:2 | while (...) ... | test.cpp:336:9:336:21 | ... \|\| ... | 1 | b, c | { ... } | c | return ... | -| test.cpp:348:2:351:17 | do (...) ... | test.cpp:351:11:351:15 | 0 | | { ... } | { ... } | { ... } | return ... | -| test.cpp:361:2:364:2 | while (...) ... | test.cpp:361:9:361:21 | ... \|\| ... | 1 | ... \|\| ... | { ... } | 0 | while (...) ... | -| test.cpp:365:2:368:2 | while (...) ... | test.cpp:365:9:365:13 | ! ... | 1 | stop | { ... } | stop | while (...) ... | -| test.cpp:369:2:373:2 | while (...) ... | test.cpp:369:9:369:21 | ... \|\| ... | 1 | b, c | { ... } | c | do (...) ... | -| test.cpp:374:2:376:17 | do (...) ... | test.cpp:376:11:376:15 | 0 | | do (...) ... | { ... } | { ... } | return ... | -| test.cpp:384:2:386:2 | while (...) ... | test.cpp:384:9:384:12 | 1 | 1 | 1 | { ... } | | return ... | -| test.cpp:394:2:396:2 | while (...) ... | test.cpp:394:9:394:21 | ... , ... | | { ... } | { ... } | | | -| test.cpp:404:3:408:3 | while (...) ... | test.cpp:404:10:404:13 | loop | 1 | loop | { ... } | | | -| test.cpp:416:2:418:2 | for(...;...;...) ... | test.cpp:416:18:416:23 | ... < ... | 1 | i | { ... } | i | return ... | -| test.cpp:424:2:425:2 | for(...;...;...) ... | test.cpp:424:18:424:23 | ... < ... | 1 | i | { ... } | i | return ... | -| test.cpp:433:2:434:2 | for(...;...;...) ... | test.cpp:433:18:433:22 | 0 | 0 | | { ... } | 0 | return ... | -| test.cpp:559:3:564:3 | while (...) ... | test.cpp:559:9:559:15 | call to getBool | | call to getBool | { ... } | call to getBool | ExprStmt | -| test.cpp:574:3:579:3 | while (...) ... | test.cpp:574:10:574:16 | call to getBool | | call to getBool | { ... } | call to getBool | ExprStmt | +| test.cpp:172:3:174:3 | while (...) ... | test.cpp:172:10:172:43 | ... != ... | | args | { ... } | args | return ... | +| test.cpp:259:2:263:2 | while (...) ... | test.cpp:259:9:259:12 | loop | 1 | loop | { ... } | loop | return ... | +| test.cpp:271:2:275:2 | while (...) ... | test.cpp:271:9:271:20 | ... && ... | 1 | 1 | { ... } | ... && ... | return ... | +| test.cpp:283:2:287:2 | while (...) ... | test.cpp:283:9:283:13 | ! ... | 1 | stop | { ... } | stop | return ... | +| test.cpp:295:2:299:2 | while (...) ... | test.cpp:295:9:295:20 | ... && ... | 1 | loop | { ... } | loop | return ... | +| test.cpp:307:2:311:2 | while (...) ... | test.cpp:307:9:307:20 | ... && ... | 1 | loop | { ... } | ... && ..., loop | return ... | +| test.cpp:319:2:323:2 | while (...) ... | test.cpp:319:9:319:21 | ... \|\| ... | 1 | ... \|\| ... | { ... } | 0 | return ... | +| test.cpp:331:2:336:2 | while (...) ... | test.cpp:331:9:331:17 | ... ? ... : ... | | b, c | { ... } | c | return ... | +| test.cpp:344:2:349:2 | while (...) ... | test.cpp:344:9:344:21 | ... \|\| ... | 1 | b, c | { ... } | c | return ... | +| test.cpp:356:2:359:17 | do (...) ... | test.cpp:359:11:359:15 | 0 | | { ... } | { ... } | { ... } | return ... | +| test.cpp:369:2:372:2 | while (...) ... | test.cpp:369:9:369:21 | ... \|\| ... | 1 | ... \|\| ... | { ... } | 0 | while (...) ... | +| test.cpp:373:2:376:2 | while (...) ... | test.cpp:373:9:373:13 | ! ... | 1 | stop | { ... } | stop | while (...) ... | +| test.cpp:377:2:381:2 | while (...) ... | test.cpp:377:9:377:21 | ... \|\| ... | 1 | b, c | { ... } | c | do (...) ... | +| test.cpp:382:2:384:17 | do (...) ... | test.cpp:384:11:384:15 | 0 | | do (...) ... | { ... } | { ... } | return ... | +| test.cpp:392:2:394:2 | while (...) ... | test.cpp:392:9:392:12 | 1 | 1 | 1 | { ... } | | return ... | +| test.cpp:402:2:404:2 | while (...) ... | test.cpp:402:9:402:21 | ... , ... | | { ... } | { ... } | | | +| test.cpp:412:3:416:3 | while (...) ... | test.cpp:412:10:412:13 | loop | 1 | loop | { ... } | | | +| test.cpp:424:2:426:2 | for(...;...;...) ... | test.cpp:424:18:424:23 | ... < ... | 1 | i | { ... } | i | return ... | +| test.cpp:432:2:433:2 | for(...;...;...) ... | test.cpp:432:18:432:23 | ... < ... | 1 | i | { ... } | i | return ... | +| test.cpp:441:2:442:2 | for(...;...;...) ... | test.cpp:441:18:441:22 | 0 | 0 | | { ... } | 0 | return ... | +| test.cpp:567:3:572:3 | while (...) ... | test.cpp:567:9:567:15 | call to getBool | | call to getBool | { ... } | call to getBool | ExprStmt | +| test.cpp:582:3:587:3 | while (...) ... | test.cpp:582:10:582:16 | call to getBool | | call to getBool | { ... } | call to getBool | ExprStmt | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/UninitializedLocal.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/UninitializedLocal.expected index d27b2c996b3..a8b3c7782e7 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/UninitializedLocal.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/UninitializedLocal.expected @@ -2,28 +2,28 @@ edges nodes | test.cpp:11:6:11:8 | definition of foo | semmle.label | definition of foo | | test.cpp:111:6:111:8 | definition of foo | semmle.label | definition of foo | -| test.cpp:218:7:218:7 | definition of x | semmle.label | definition of x | -| test.cpp:241:6:241:6 | definition of i | semmle.label | definition of i | -| test.cpp:333:7:333:7 | definition of a | semmle.label | definition of a | -| test.cpp:358:7:358:7 | definition of a | semmle.label | definition of a | -| test.cpp:359:6:359:8 | definition of val | semmle.label | definition of val | -| test.cpp:414:9:414:9 | definition of j | semmle.label | definition of j | -| test.cpp:431:9:431:9 | definition of j | semmle.label | definition of j | -| test.cpp:452:6:452:6 | definition of x | semmle.label | definition of x | -| test.cpp:458:6:458:6 | definition of x | semmle.label | definition of x | -| test.cpp:464:6:464:6 | definition of x | semmle.label | definition of x | -| test.cpp:471:6:471:6 | definition of x | semmle.label | definition of x | +| test.cpp:226:7:226:7 | definition of x | semmle.label | definition of x | +| test.cpp:249:6:249:6 | definition of i | semmle.label | definition of i | +| test.cpp:341:7:341:7 | definition of a | semmle.label | definition of a | +| test.cpp:366:7:366:7 | definition of a | semmle.label | definition of a | +| test.cpp:367:6:367:8 | definition of val | semmle.label | definition of val | +| test.cpp:422:9:422:9 | definition of j | semmle.label | definition of j | +| test.cpp:439:9:439:9 | definition of j | semmle.label | definition of j | +| test.cpp:460:6:460:6 | definition of x | semmle.label | definition of x | +| test.cpp:466:6:466:6 | definition of x | semmle.label | definition of x | +| test.cpp:472:6:472:6 | definition of x | semmle.label | definition of x | +| test.cpp:479:6:479:6 | definition of x | semmle.label | definition of x | #select | test.cpp:12:6:12:8 | foo | test.cpp:11:6:11:8 | definition of foo | test.cpp:11:6:11:8 | definition of foo | The variable $@ may not be initialized at this access. | test.cpp:11:6:11:8 | foo | foo | | test.cpp:113:6:113:8 | foo | test.cpp:111:6:111:8 | definition of foo | test.cpp:111:6:111:8 | definition of foo | The variable $@ may not be initialized at this access. | test.cpp:111:6:111:8 | foo | foo | -| test.cpp:219:3:219:3 | x | test.cpp:218:7:218:7 | definition of x | test.cpp:218:7:218:7 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:218:7:218:7 | x | x | -| test.cpp:243:13:243:13 | i | test.cpp:241:6:241:6 | definition of i | test.cpp:241:6:241:6 | definition of i | The variable $@ may not be initialized at this access. | test.cpp:241:6:241:6 | i | i | -| test.cpp:336:10:336:10 | a | test.cpp:333:7:333:7 | definition of a | test.cpp:333:7:333:7 | definition of a | The variable $@ may not be initialized at this access. | test.cpp:333:7:333:7 | a | a | -| test.cpp:369:10:369:10 | a | test.cpp:358:7:358:7 | definition of a | test.cpp:358:7:358:7 | definition of a | The variable $@ may not be initialized at this access. | test.cpp:358:7:358:7 | a | a | -| test.cpp:378:9:378:11 | val | test.cpp:359:6:359:8 | definition of val | test.cpp:359:6:359:8 | definition of val | The variable $@ may not be initialized at this access. | test.cpp:359:6:359:8 | val | val | -| test.cpp:417:10:417:10 | j | test.cpp:414:9:414:9 | definition of j | test.cpp:414:9:414:9 | definition of j | The variable $@ may not be initialized at this access. | test.cpp:414:9:414:9 | j | j | -| test.cpp:436:9:436:9 | j | test.cpp:431:9:431:9 | definition of j | test.cpp:431:9:431:9 | definition of j | The variable $@ may not be initialized at this access. | test.cpp:431:9:431:9 | j | j | -| test.cpp:454:2:454:2 | x | test.cpp:452:6:452:6 | definition of x | test.cpp:452:6:452:6 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:452:6:452:6 | x | x | -| test.cpp:460:7:460:7 | x | test.cpp:458:6:458:6 | definition of x | test.cpp:458:6:458:6 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:458:6:458:6 | x | x | -| test.cpp:467:2:467:2 | x | test.cpp:464:6:464:6 | definition of x | test.cpp:464:6:464:6 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:464:6:464:6 | x | x | -| test.cpp:474:7:474:7 | x | test.cpp:471:6:471:6 | definition of x | test.cpp:471:6:471:6 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:471:6:471:6 | x | x | +| test.cpp:227:3:227:3 | x | test.cpp:226:7:226:7 | definition of x | test.cpp:226:7:226:7 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:226:7:226:7 | x | x | +| test.cpp:251:13:251:13 | i | test.cpp:249:6:249:6 | definition of i | test.cpp:249:6:249:6 | definition of i | The variable $@ may not be initialized at this access. | test.cpp:249:6:249:6 | i | i | +| test.cpp:344:10:344:10 | a | test.cpp:341:7:341:7 | definition of a | test.cpp:341:7:341:7 | definition of a | The variable $@ may not be initialized at this access. | test.cpp:341:7:341:7 | a | a | +| test.cpp:377:10:377:10 | a | test.cpp:366:7:366:7 | definition of a | test.cpp:366:7:366:7 | definition of a | The variable $@ may not be initialized at this access. | test.cpp:366:7:366:7 | a | a | +| test.cpp:386:9:386:11 | val | test.cpp:367:6:367:8 | definition of val | test.cpp:367:6:367:8 | definition of val | The variable $@ may not be initialized at this access. | test.cpp:367:6:367:8 | val | val | +| test.cpp:425:10:425:10 | j | test.cpp:422:9:422:9 | definition of j | test.cpp:422:9:422:9 | definition of j | The variable $@ may not be initialized at this access. | test.cpp:422:9:422:9 | j | j | +| test.cpp:444:9:444:9 | j | test.cpp:439:9:439:9 | definition of j | test.cpp:439:9:439:9 | definition of j | The variable $@ may not be initialized at this access. | test.cpp:439:9:439:9 | j | j | +| test.cpp:462:2:462:2 | x | test.cpp:460:6:460:6 | definition of x | test.cpp:460:6:460:6 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:460:6:460:6 | x | x | +| test.cpp:468:7:468:7 | x | test.cpp:466:6:466:6 | definition of x | test.cpp:466:6:466:6 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:466:6:466:6 | x | x | +| test.cpp:475:2:475:2 | x | test.cpp:472:6:472:6 | definition of x | test.cpp:472:6:472:6 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:472:6:472:6 | x | x | +| test.cpp:482:7:482:7 | x | test.cpp:479:6:479:6 | definition of x | test.cpp:479:6:479:6 | definition of x | The variable $@ may not be initialized at this access. | test.cpp:479:6:479:6 | x | x | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/test.cpp index eab71b1aec5..14c00675545 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-457/semmle/tests/test.cpp @@ -156,11 +156,12 @@ int absCorrect2(int i) { return j; // correct: j always initialized before use } +typedef __builtin_va_list va_list; +#define va_start(v, l) __builtin_va_start(v,l) +#define va_end(v) __builtin_va_end(v) +#define va_arg(v, l) __builtin_va_arg(v,l) +#define va_copy(d, s) __builtin_va_copy(d,s) -typedef void *va_list; -#define va_start(ap, parmN) -#define va_end(ap) -#define va_arg(ap, type) ((type)0) #define NULL 0 // Variadic initialisation @@ -176,7 +177,7 @@ void init(int val, ...) { void test15() { int foo; init(42, &foo, NULL); - use(foo); //GOOD -- initialised by `init` + use(foo); // GOOD -- initialised by `init` } // Variadic non-initialisation @@ -192,6 +193,13 @@ void test16() { use(foo); // BAD (NOT REPORTED) } +void test_va_copy(va_list va) { + va_list va2; + va_copy(va2, va); // GOOD -- this is an initialization + use(va2); + va_end(va2); +} + bool test17(bool b) { int foo; int *p = nullptr; diff --git a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md index eb7af5234e3..18779106c78 100644 --- a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.23 + +No user-facing changes. + ## 1.7.22 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.23.md b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.23.md new file mode 100644 index 00000000000..97c0d95c5c3 --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.23.md @@ -0,0 +1,3 @@ +## 1.7.23 + +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 6a79a0ec163..55921f9b14a 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.22 +lastReleaseVersion: 1.7.23 diff --git a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml index 07db663f549..407855e6868 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.23-dev +version: 1.7.24-dev groups: - csharp - solorigate diff --git a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md index eb7af5234e3..18779106c78 100644 --- a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.23 + +No user-facing changes. + ## 1.7.22 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.23.md b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.23.md new file mode 100644 index 00000000000..97c0d95c5c3 --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.23.md @@ -0,0 +1,3 @@ +## 1.7.23 + +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 6a79a0ec163..55921f9b14a 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.22 +lastReleaseVersion: 1.7.23 diff --git a/csharp/ql/campaigns/Solorigate/src/qlpack.yml b/csharp/ql/campaigns/Solorigate/src/qlpack.yml index 880aae8371f..9236640dbe5 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.23-dev +version: 1.7.24-dev groups: - csharp - solorigate diff --git a/csharp/ql/integration-tests/linux-only/compiler_args/CompilerArgs.expected b/csharp/ql/integration-tests/linux/compiler_args/CompilerArgs.expected similarity index 100% rename from csharp/ql/integration-tests/linux-only/compiler_args/CompilerArgs.expected rename to csharp/ql/integration-tests/linux/compiler_args/CompilerArgs.expected diff --git a/csharp/ql/integration-tests/linux-only/compiler_args/CompilerArgs.ql b/csharp/ql/integration-tests/linux/compiler_args/CompilerArgs.ql similarity index 100% rename from csharp/ql/integration-tests/linux-only/compiler_args/CompilerArgs.ql rename to csharp/ql/integration-tests/linux/compiler_args/CompilerArgs.ql diff --git a/csharp/ql/integration-tests/linux-only/compiler_args/Program.cs b/csharp/ql/integration-tests/linux/compiler_args/Program.cs similarity index 100% rename from csharp/ql/integration-tests/linux-only/compiler_args/Program.cs rename to csharp/ql/integration-tests/linux/compiler_args/Program.cs diff --git a/csharp/ql/integration-tests/linux-only/compiler_args/global.json b/csharp/ql/integration-tests/linux/compiler_args/global.json similarity index 100% rename from csharp/ql/integration-tests/linux-only/compiler_args/global.json rename to csharp/ql/integration-tests/linux/compiler_args/global.json diff --git a/csharp/ql/integration-tests/linux-only/compiler_args/test.csproj b/csharp/ql/integration-tests/linux/compiler_args/test.csproj similarity index 100% rename from csharp/ql/integration-tests/linux-only/compiler_args/test.csproj rename to csharp/ql/integration-tests/linux/compiler_args/test.csproj diff --git a/csharp/ql/integration-tests/linux-only/compiler_args/test.py b/csharp/ql/integration-tests/linux/compiler_args/test.py similarity index 100% rename from csharp/ql/integration-tests/linux-only/compiler_args/test.py rename to csharp/ql/integration-tests/linux/compiler_args/test.py diff --git a/csharp/ql/integration-tests/linux-only/standalone_dependencies_non_utf8_filename/Program.cs b/csharp/ql/integration-tests/linux/standalone_dependencies_non_utf8_filename/Program.cs similarity index 100% rename from csharp/ql/integration-tests/linux-only/standalone_dependencies_non_utf8_filename/Program.cs rename to csharp/ql/integration-tests/linux/standalone_dependencies_non_utf8_filename/Program.cs diff --git a/csharp/ql/integration-tests/linux-only/standalone_dependencies_non_utf8_filename/global.json b/csharp/ql/integration-tests/linux/standalone_dependencies_non_utf8_filename/global.json similarity index 100% rename from csharp/ql/integration-tests/linux-only/standalone_dependencies_non_utf8_filename/global.json rename to csharp/ql/integration-tests/linux/standalone_dependencies_non_utf8_filename/global.json diff --git a/csharp/ql/integration-tests/linux-only/standalone_dependencies_non_utf8_filename/test.csproj b/csharp/ql/integration-tests/linux/standalone_dependencies_non_utf8_filename/test.csproj similarity index 100% rename from csharp/ql/integration-tests/linux-only/standalone_dependencies_non_utf8_filename/test.csproj rename to csharp/ql/integration-tests/linux/standalone_dependencies_non_utf8_filename/test.csproj diff --git a/csharp/ql/integration-tests/linux-only/standalone_dependencies_non_utf8_filename/test.py b/csharp/ql/integration-tests/linux/standalone_dependencies_non_utf8_filename/test.py similarity index 100% rename from csharp/ql/integration-tests/linux-only/standalone_dependencies_non_utf8_filename/test.py rename to csharp/ql/integration-tests/linux/standalone_dependencies_non_utf8_filename/test.py diff --git a/csharp/ql/integration-tests/posix-only/diag_autobuild_script/build.sh b/csharp/ql/integration-tests/posix/diag_autobuild_script/build.sh similarity index 100% rename from csharp/ql/integration-tests/posix-only/diag_autobuild_script/build.sh rename to csharp/ql/integration-tests/posix/diag_autobuild_script/build.sh diff --git a/csharp/ql/integration-tests/posix-only/diag_autobuild_script/diagnostics.expected b/csharp/ql/integration-tests/posix/diag_autobuild_script/diagnostics.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/diag_autobuild_script/diagnostics.expected rename to csharp/ql/integration-tests/posix/diag_autobuild_script/diagnostics.expected diff --git a/csharp/ql/integration-tests/posix-only/diag_autobuild_script/test.py b/csharp/ql/integration-tests/posix/diag_autobuild_script/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/diag_autobuild_script/test.py rename to csharp/ql/integration-tests/posix/diag_autobuild_script/test.py diff --git a/csharp/ql/integration-tests/posix-only/diag_multiple_scripts/build.sh b/csharp/ql/integration-tests/posix/diag_multiple_scripts/build.sh similarity index 100% rename from csharp/ql/integration-tests/posix-only/diag_multiple_scripts/build.sh rename to csharp/ql/integration-tests/posix/diag_multiple_scripts/build.sh diff --git a/csharp/ql/integration-tests/posix-only/diag_multiple_scripts/diagnostics.expected b/csharp/ql/integration-tests/posix/diag_multiple_scripts/diagnostics.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/diag_multiple_scripts/diagnostics.expected rename to csharp/ql/integration-tests/posix/diag_multiple_scripts/diagnostics.expected diff --git a/csharp/ql/integration-tests/posix-only/diag_multiple_scripts/scripts/build.sh b/csharp/ql/integration-tests/posix/diag_multiple_scripts/scripts/build.sh similarity index 100% rename from csharp/ql/integration-tests/posix-only/diag_multiple_scripts/scripts/build.sh rename to csharp/ql/integration-tests/posix/diag_multiple_scripts/scripts/build.sh diff --git a/csharp/ql/integration-tests/posix-only/diag_multiple_scripts/test.py b/csharp/ql/integration-tests/posix/diag_multiple_scripts/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/diag_multiple_scripts/test.py rename to csharp/ql/integration-tests/posix/diag_multiple_scripts/test.py diff --git a/csharp/ql/integration-tests/posix-only/dotnet_test/UnitTest1.cs b/csharp/ql/integration-tests/posix/dotnet_test/UnitTest1.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/dotnet_test/UnitTest1.cs rename to csharp/ql/integration-tests/posix/dotnet_test/UnitTest1.cs diff --git a/csharp/ql/integration-tests/posix-only/dotnet_test/diagnostics.expected b/csharp/ql/integration-tests/posix/dotnet_test/diagnostics.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/dotnet_test/diagnostics.expected rename to csharp/ql/integration-tests/posix/dotnet_test/diagnostics.expected diff --git a/csharp/ql/integration-tests/posix-only/dotnet_test/dotnet_test.csproj b/csharp/ql/integration-tests/posix/dotnet_test/dotnet_test.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/dotnet_test/dotnet_test.csproj rename to csharp/ql/integration-tests/posix/dotnet_test/dotnet_test.csproj diff --git a/csharp/ql/integration-tests/posix-only/dotnet_test/global.json b/csharp/ql/integration-tests/posix/dotnet_test/global.json similarity index 100% rename from csharp/ql/integration-tests/posix-only/dotnet_test/global.json rename to csharp/ql/integration-tests/posix/dotnet_test/global.json diff --git a/csharp/ql/integration-tests/posix-only/dotnet_test/test.py b/csharp/ql/integration-tests/posix/dotnet_test/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/dotnet_test/test.py rename to csharp/ql/integration-tests/posix/dotnet_test/test.py diff --git a/csharp/ql/integration-tests/posix-only/dotnet_test_mstest/UnitTest1.cs b/csharp/ql/integration-tests/posix/dotnet_test_mstest/UnitTest1.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/dotnet_test_mstest/UnitTest1.cs rename to csharp/ql/integration-tests/posix/dotnet_test_mstest/UnitTest1.cs diff --git a/csharp/ql/integration-tests/posix-only/dotnet_test_mstest/Usings.cs b/csharp/ql/integration-tests/posix/dotnet_test_mstest/Usings.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/dotnet_test_mstest/Usings.cs rename to csharp/ql/integration-tests/posix/dotnet_test_mstest/Usings.cs diff --git a/csharp/ql/integration-tests/posix-only/dotnet_test_mstest/diagnostics.expected b/csharp/ql/integration-tests/posix/dotnet_test_mstest/diagnostics.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/dotnet_test_mstest/diagnostics.expected rename to csharp/ql/integration-tests/posix/dotnet_test_mstest/diagnostics.expected diff --git a/csharp/ql/integration-tests/posix-only/dotnet_test_mstest/dotnet_test_mstest.csproj b/csharp/ql/integration-tests/posix/dotnet_test_mstest/dotnet_test_mstest.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/dotnet_test_mstest/dotnet_test_mstest.csproj rename to csharp/ql/integration-tests/posix/dotnet_test_mstest/dotnet_test_mstest.csproj diff --git a/csharp/ql/integration-tests/posix-only/dotnet_test_mstest/global.json b/csharp/ql/integration-tests/posix/dotnet_test_mstest/global.json similarity index 100% rename from csharp/ql/integration-tests/posix-only/dotnet_test_mstest/global.json rename to csharp/ql/integration-tests/posix/dotnet_test_mstest/global.json diff --git a/csharp/ql/integration-tests/posix-only/dotnet_test_mstest/test.py b/csharp/ql/integration-tests/posix/dotnet_test_mstest/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/dotnet_test_mstest/test.py rename to csharp/ql/integration-tests/posix/dotnet_test_mstest/test.py diff --git a/csharp/ql/integration-tests/posix-only/inherit-env-vars/Program.cs b/csharp/ql/integration-tests/posix/inherit-env-vars/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/inherit-env-vars/Program.cs rename to csharp/ql/integration-tests/posix/inherit-env-vars/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/inherit-env-vars/build.sh b/csharp/ql/integration-tests/posix/inherit-env-vars/build.sh similarity index 100% rename from csharp/ql/integration-tests/posix-only/inherit-env-vars/build.sh rename to csharp/ql/integration-tests/posix/inherit-env-vars/build.sh diff --git a/csharp/ql/integration-tests/posix-only/inherit-env-vars/diagnostics.expected b/csharp/ql/integration-tests/posix/inherit-env-vars/diagnostics.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/inherit-env-vars/diagnostics.expected rename to csharp/ql/integration-tests/posix/inherit-env-vars/diagnostics.expected diff --git a/csharp/ql/integration-tests/posix-only/inherit-env-vars/global.json b/csharp/ql/integration-tests/posix/inherit-env-vars/global.json similarity index 100% rename from csharp/ql/integration-tests/posix-only/inherit-env-vars/global.json rename to csharp/ql/integration-tests/posix/inherit-env-vars/global.json diff --git a/csharp/ql/integration-tests/posix-only/inherit-env-vars/proj.csproj.no_auto b/csharp/ql/integration-tests/posix/inherit-env-vars/proj.csproj.no_auto similarity index 100% rename from csharp/ql/integration-tests/posix-only/inherit-env-vars/proj.csproj.no_auto rename to csharp/ql/integration-tests/posix/inherit-env-vars/proj.csproj.no_auto diff --git a/csharp/ql/integration-tests/posix-only/inherit-env-vars/test.py b/csharp/ql/integration-tests/posix/inherit-env-vars/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/inherit-env-vars/test.py rename to csharp/ql/integration-tests/posix/inherit-env-vars/test.py diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies/Assemblies.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies/Assemblies.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies/Assemblies.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies/Assemblies.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies/Program.cs rename to csharp/ql/integration-tests/posix/standalone_dependencies/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies/global.json b/csharp/ql/integration-tests/posix/standalone_dependencies/global.json similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies/global.json rename to csharp/ql/integration-tests/posix/standalone_dependencies/global.json diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies/standalone.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies/standalone.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies/standalone.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies/standalone.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies/test.py rename to csharp/ql/integration-tests/posix/standalone_dependencies/test.py diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_executing_runtime/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_executing_runtime/Assemblies.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_executing_runtime/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_executing_runtime/Assemblies.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Assemblies.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_executing_runtime/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_executing_runtime/Program.cs rename to csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_executing_runtime/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_executing_runtime/test.py rename to csharp/ql/integration-tests/posix/standalone_dependencies_executing_runtime/test.py diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/Assemblies.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/Assemblies.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/Assemblies.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/Assemblies.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/Program.cs rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/global.json b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/global.json similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/global.json rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/global.json diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/standalone1.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/standalone1.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/standalone1.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/standalone1.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/standalone2.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/standalone2.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/standalone2.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/standalone2.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_project/test.py rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_project/test.py diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/Assemblies.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/Assemblies.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/Assemblies.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/Assemblies.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/Program.cs rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/global.json b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/global.json similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/global.json rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/global.json diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/net48.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/net48.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/net48.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/net48.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/net70.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/net70.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/net70.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/net70.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_multi_target/test.py rename to csharp/ql/integration-tests/posix/standalone_dependencies_multi_target/test.py diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/Assemblies.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/Assemblies.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/Assemblies.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/Assemblies.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/Program.cs rename to csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/global.json b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/global.json similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/global.json rename to csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/global.json diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/packages.config b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/packages.config similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/packages.config rename to csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/packages.config diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/test.py rename to csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test.py diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/test_old.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test_old.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/test_old.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test_old.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/test_sdk.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test_sdk.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_no_framework/test_sdk.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_no_framework/test_sdk.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/Assemblies.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/Assemblies.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/Assemblies.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/Assemblies.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/Program.cs rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/global.json b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/global.json similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/global.json rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/global.json diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/packages.config b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/packages.config similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/packages.config rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/packages.config diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/test.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/test.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/test.py rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget with_space/test.py diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/Assemblies.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget/Assemblies.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/Assemblies.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget/Assemblies.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/Program.cs rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/global.json b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/global.json similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/global.json rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget/global.json diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/packages.config b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/packages.config similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/packages.config rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget/packages.config diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/test.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/test.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget/test.py rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget/test.py diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/Assemblies.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/Assemblies.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/Assemblies.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/Assemblies.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/CompilationInfo.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/CompilationInfo.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/CompilationInfo.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/CompilationInfo.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/CompilationInfo.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/CompilationInfo.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/CompilationInfo.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/CompilationInfo.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/proj/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/proj/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/proj/Program.cs rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/proj/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/proj/nuget.config b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/proj/nuget.config similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/proj/nuget.config rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/proj/nuget.config diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/proj/proj.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/proj/proj.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/proj/proj.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/proj/proj.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/standalone.sln b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/standalone.sln similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/standalone.sln rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/standalone.sln diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error/test.py rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error/test.py diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/Assemblies.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/Assemblies.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/Assemblies.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/Assemblies.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/CompilationInfo.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/CompilationInfo.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/CompilationInfo.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/CompilationInfo.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/CompilationInfo.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/CompilationInfo.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/CompilationInfo.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/CompilationInfo.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/diagnostics.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/diagnostics.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/diagnostics.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/diagnostics.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/proj/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/proj/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/proj/Program.cs rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/proj/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/proj/nuget.config b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/proj/nuget.config similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/proj/nuget.config rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/proj/nuget.config diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/proj/proj.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/proj/proj.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/proj/proj.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/proj/proj.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/standalone.sln b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/standalone.sln similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/standalone.sln rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/standalone.sln diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/test.py rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/test.py diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/Assemblies.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/Assemblies.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/Assemblies.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/Assemblies.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/CompilationInfo.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/CompilationInfo.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/CompilationInfo.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/CompilationInfo.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/CompilationInfo.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/CompilationInfo.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/CompilationInfo.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/CompilationInfo.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/diagnostics.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/diagnostics.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/diagnostics.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/diagnostics.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/proj/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/proj/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/proj/Program.cs rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/proj/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/proj/nuget.config b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/proj/nuget.config similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/proj/nuget.config rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/proj/nuget.config diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/proj/proj.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/proj/proj.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/proj/proj.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/proj/proj.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/standalone.sln b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/standalone.sln similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/standalone.sln rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/standalone.sln diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_fallback/test.py rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/test.py diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/Assemblies.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/Assemblies.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/Assemblies.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/Assemblies.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/nuget.config b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/nuget.config similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/nuget.config rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/nuget.config diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/proj/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/proj/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/proj/Program.cs rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/proj/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/proj/global.json b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/proj/global.json similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/proj/global.json rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/proj/global.json diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/proj/packages.config b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/proj/packages.config similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/proj/packages.config rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/proj/packages.config diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/proj/test.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/proj/test.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/proj/test.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/proj/test.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_no_sources/test.py rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_no_sources/test.py diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/Assemblies.expected b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/Assemblies.expected rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/Assemblies.expected diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/Assemblies.ql rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/Assemblies.ql diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/Program.cs rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/d1/test1.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/d1/test1.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/d1/test1.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/d1/test1.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/d2/test2.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/d2/test2.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/d2/test2.csproj rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/d2/test2.csproj diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/global.json b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/global.json similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/global.json rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/global.json diff --git a/csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/test.py rename to csharp/ql/integration-tests/posix/standalone_dependencies_nuget_versions/test.py diff --git a/csharp/ql/integration-tests/posix-only/warn_as_error/Errors.expected b/csharp/ql/integration-tests/posix/warn_as_error/Errors.expected similarity index 100% rename from csharp/ql/integration-tests/posix-only/warn_as_error/Errors.expected rename to csharp/ql/integration-tests/posix/warn_as_error/Errors.expected diff --git a/csharp/ql/integration-tests/posix-only/warn_as_error/Errors.ql b/csharp/ql/integration-tests/posix/warn_as_error/Errors.ql similarity index 100% rename from csharp/ql/integration-tests/posix-only/warn_as_error/Errors.ql rename to csharp/ql/integration-tests/posix/warn_as_error/Errors.ql diff --git a/csharp/ql/integration-tests/posix-only/warn_as_error/Program.cs b/csharp/ql/integration-tests/posix/warn_as_error/Program.cs similarity index 100% rename from csharp/ql/integration-tests/posix-only/warn_as_error/Program.cs rename to csharp/ql/integration-tests/posix/warn_as_error/Program.cs diff --git a/csharp/ql/integration-tests/posix-only/warn_as_error/WarnAsError.csproj b/csharp/ql/integration-tests/posix/warn_as_error/WarnAsError.csproj similarity index 100% rename from csharp/ql/integration-tests/posix-only/warn_as_error/WarnAsError.csproj rename to csharp/ql/integration-tests/posix/warn_as_error/WarnAsError.csproj diff --git a/csharp/ql/integration-tests/posix-only/warn_as_error/build.sh b/csharp/ql/integration-tests/posix/warn_as_error/build.sh similarity index 100% rename from csharp/ql/integration-tests/posix-only/warn_as_error/build.sh rename to csharp/ql/integration-tests/posix/warn_as_error/build.sh diff --git a/csharp/ql/integration-tests/posix-only/warn_as_error/global.json b/csharp/ql/integration-tests/posix/warn_as_error/global.json similarity index 100% rename from csharp/ql/integration-tests/posix-only/warn_as_error/global.json rename to csharp/ql/integration-tests/posix/warn_as_error/global.json diff --git a/csharp/ql/integration-tests/posix-only/warn_as_error/test.py b/csharp/ql/integration-tests/posix/warn_as_error/test.py similarity index 100% rename from csharp/ql/integration-tests/posix-only/warn_as_error/test.py rename to csharp/ql/integration-tests/posix/warn_as_error/test.py diff --git a/csharp/ql/integration-tests/windows-only/diag_autobuild_script/build.bat b/csharp/ql/integration-tests/windows/diag_autobuild_script/build.bat similarity index 100% rename from csharp/ql/integration-tests/windows-only/diag_autobuild_script/build.bat rename to csharp/ql/integration-tests/windows/diag_autobuild_script/build.bat diff --git a/csharp/ql/integration-tests/windows-only/diag_autobuild_script/diagnostics.expected b/csharp/ql/integration-tests/windows/diag_autobuild_script/diagnostics.expected similarity index 100% rename from csharp/ql/integration-tests/windows-only/diag_autobuild_script/diagnostics.expected rename to csharp/ql/integration-tests/windows/diag_autobuild_script/diagnostics.expected diff --git a/csharp/ql/integration-tests/windows-only/diag_autobuild_script/test.py b/csharp/ql/integration-tests/windows/diag_autobuild_script/test.py similarity index 100% rename from csharp/ql/integration-tests/windows-only/diag_autobuild_script/test.py rename to csharp/ql/integration-tests/windows/diag_autobuild_script/test.py diff --git a/csharp/ql/integration-tests/windows-only/diag_multiple_scripts/build.bat b/csharp/ql/integration-tests/windows/diag_multiple_scripts/build.bat similarity index 100% rename from csharp/ql/integration-tests/windows-only/diag_multiple_scripts/build.bat rename to csharp/ql/integration-tests/windows/diag_multiple_scripts/build.bat diff --git a/csharp/ql/integration-tests/windows-only/diag_multiple_scripts/diagnostics.expected b/csharp/ql/integration-tests/windows/diag_multiple_scripts/diagnostics.expected similarity index 100% rename from csharp/ql/integration-tests/windows-only/diag_multiple_scripts/diagnostics.expected rename to csharp/ql/integration-tests/windows/diag_multiple_scripts/diagnostics.expected diff --git a/csharp/ql/integration-tests/windows-only/diag_multiple_scripts/scripts/build.bat b/csharp/ql/integration-tests/windows/diag_multiple_scripts/scripts/build.bat similarity index 100% rename from csharp/ql/integration-tests/windows-only/diag_multiple_scripts/scripts/build.bat rename to csharp/ql/integration-tests/windows/diag_multiple_scripts/scripts/build.bat diff --git a/csharp/ql/integration-tests/windows-only/diag_multiple_scripts/test.py b/csharp/ql/integration-tests/windows/diag_multiple_scripts/test.py similarity index 100% rename from csharp/ql/integration-tests/windows-only/diag_multiple_scripts/test.py rename to csharp/ql/integration-tests/windows/diag_multiple_scripts/test.py diff --git a/csharp/ql/integration-tests/windows-only/standalone_dependencies/Assemblies.expected b/csharp/ql/integration-tests/windows/standalone_dependencies/Assemblies.expected similarity index 100% rename from csharp/ql/integration-tests/windows-only/standalone_dependencies/Assemblies.expected rename to csharp/ql/integration-tests/windows/standalone_dependencies/Assemblies.expected diff --git a/csharp/ql/integration-tests/windows-only/standalone_dependencies/Assemblies.ql b/csharp/ql/integration-tests/windows/standalone_dependencies/Assemblies.ql similarity index 100% rename from csharp/ql/integration-tests/windows-only/standalone_dependencies/Assemblies.ql rename to csharp/ql/integration-tests/windows/standalone_dependencies/Assemblies.ql diff --git a/csharp/ql/integration-tests/windows-only/standalone_dependencies/Program.cs b/csharp/ql/integration-tests/windows/standalone_dependencies/Program.cs similarity index 100% rename from csharp/ql/integration-tests/windows-only/standalone_dependencies/Program.cs rename to csharp/ql/integration-tests/windows/standalone_dependencies/Program.cs diff --git a/csharp/ql/integration-tests/windows-only/standalone_dependencies/global.json b/csharp/ql/integration-tests/windows/standalone_dependencies/global.json similarity index 100% rename from csharp/ql/integration-tests/windows-only/standalone_dependencies/global.json rename to csharp/ql/integration-tests/windows/standalone_dependencies/global.json diff --git a/csharp/ql/integration-tests/windows-only/standalone_dependencies/standalone.csproj b/csharp/ql/integration-tests/windows/standalone_dependencies/standalone.csproj similarity index 100% rename from csharp/ql/integration-tests/windows-only/standalone_dependencies/standalone.csproj rename to csharp/ql/integration-tests/windows/standalone_dependencies/standalone.csproj diff --git a/csharp/ql/integration-tests/windows-only/standalone_dependencies/test.py b/csharp/ql/integration-tests/windows/standalone_dependencies/test.py similarity index 100% rename from csharp/ql/integration-tests/windows-only/standalone_dependencies/test.py rename to csharp/ql/integration-tests/windows/standalone_dependencies/test.py diff --git a/csharp/ql/lib/CHANGELOG.md b/csharp/ql/lib/CHANGELOG.md index 50a19e99d36..a2aaab7a542 100644 --- a/csharp/ql/lib/CHANGELOG.md +++ b/csharp/ql/lib/CHANGELOG.md @@ -1,3 +1,14 @@ +## 1.1.0 + +### Major Analysis Improvements + +* Added support for data flow through side-effects on static fields. For example, when a static field containing an array is updated. + +### Minor Analysis Improvements + +* Added some new `local` source models. Most prominently `System.IO.Path.GetTempPath` and `System.Environment.GetFolderPath`. This might produce more alerts, if the `local` threat model is enabled. +* The extractor has been changed to not skip source files that have already been seen. This has an impact on source files that are compiled multiple times in the build process. Source files with conditional compilation preprocessor directives (such as `#if`) are now extracted for each set of preprocessor symbols that are used during the build process. + ## 1.0.5 No user-facing changes. diff --git a/csharp/ql/lib/change-notes/2024-05-23-static-field-side-effect.md b/csharp/ql/lib/change-notes/2024-05-23-static-field-side-effect.md deleted file mode 100644 index f41dfab76d4..00000000000 --- a/csharp/ql/lib/change-notes/2024-05-23-static-field-side-effect.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: majorAnalysis ---- -* Added support for data flow through side-effects on static fields. For example, when a static field containing an array is updated. \ No newline at end of file diff --git a/csharp/ql/lib/change-notes/2024-07-10-conditional-compilation.md b/csharp/ql/lib/change-notes/2024-07-10-conditional-compilation.md deleted file mode 100644 index a4a59b2abea..00000000000 --- a/csharp/ql/lib/change-notes/2024-07-10-conditional-compilation.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* The extractor has been changed to not skip source files that have already been seen. This has an impact on source files that are compiled multiple times in the build process. Source files with conditional compilation preprocessor directives (such as `#if`) are now extracted for each set of preprocessor symbols that are used during the build process. diff --git a/csharp/ql/lib/change-notes/2024-07-19-added-sources.md b/csharp/ql/lib/change-notes/2024-07-19-added-sources.md deleted file mode 100644 index 43e7b947a98..00000000000 --- a/csharp/ql/lib/change-notes/2024-07-19-added-sources.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Added some new `local` source models. Most prominently `System.IO.Path.GetTempPath` and `System.Environment.GetFolderPath`. This might produce more alerts, if the `local` threat model is enabled. diff --git a/csharp/ql/lib/change-notes/2024-09-03-outdated-deprecations.md b/csharp/ql/lib/change-notes/2024-09-03-outdated-deprecations.md new file mode 100644 index 00000000000..40571b3273e --- /dev/null +++ b/csharp/ql/lib/change-notes/2024-09-03-outdated-deprecations.md @@ -0,0 +1,6 @@ +--- +category: breaking +--- +* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`. +* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`. +* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration` instead. diff --git a/csharp/ql/lib/change-notes/released/1.1.0.md b/csharp/ql/lib/change-notes/released/1.1.0.md new file mode 100644 index 00000000000..a02581a221b --- /dev/null +++ b/csharp/ql/lib/change-notes/released/1.1.0.md @@ -0,0 +1,10 @@ +## 1.1.0 + +### Major Analysis Improvements + +* Added support for data flow through side-effects on static fields. For example, when a static field containing an array is updated. + +### Minor Analysis Improvements + +* Added some new `local` source models. Most prominently `System.IO.Path.GetTempPath` and `System.Environment.GetFolderPath`. This might produce more alerts, if the `local` threat model is enabled. +* The extractor has been changed to not skip source files that have already been seen. This has an impact on source files that are compiled multiple times in the build process. Source files with conditional compilation preprocessor directives (such as `#if`) are now extracted for each set of preprocessor symbols that are used during the build process. diff --git a/csharp/ql/lib/codeql-pack.release.yml b/csharp/ql/lib/codeql-pack.release.yml index 42da17b3841..2ac15439f56 100644 --- a/csharp/ql/lib/codeql-pack.release.yml +++ b/csharp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.1.0 diff --git a/csharp/ql/lib/qlpack.yml b/csharp/ql/lib/qlpack.yml index 2bba2984c8f..84426015538 100644 --- a/csharp/ql/lib/qlpack.yml +++ b/csharp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-all -version: 1.0.6-dev +version: 1.1.1-dev groups: csharp dbscheme: semmlecode.csharp.dbscheme extractor: csharp diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll index 3b1439511d1..359fa71744b 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl1.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll index 3b1439511d1..359fa71744b 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll index 3b1439511d1..359fa71744b 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll index 3b1439511d1..359fa71744b 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll index 3b1439511d1..359fa71744b 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * 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 7253d0581a5..1394f238de7 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll @@ -3075,6 +3075,7 @@ ContentApprox getContentApprox(Content c) { * ensuring that they are visible to the taint tracking / data flow library. */ private module SyntheticFields { + private import semmle.code.csharp.dataflow.internal.ExternalFlow private import semmle.code.csharp.frameworks.system.threading.Tasks private import semmle.code.csharp.frameworks.system.runtime.CompilerServices } 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 f1c299c2f25..c2d3da0607a 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/ExternalFlow.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/ExternalFlow.qll @@ -431,6 +431,17 @@ Declaration interpretElement( ) } +private predicate parseSynthField(AccessPathToken c, string name) { + c.getName() = "SyntheticField" and name = c.getAnArgument() +} + +/** + * An adapter class for adding synthetic fields from MaD. + */ +private class SyntheticFieldAdapter extends SyntheticField { + SyntheticFieldAdapter() { parseSynthField(_, this) } +} + cached private module Cached { /** diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll index 8fd12d90ae7..d4f0625be88 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll @@ -108,7 +108,11 @@ private module SourceVariableImpl { */ predicate isPlainFieldOrPropAccess(FieldOrPropAccess fpa, FieldOrProp fp, Callable c) { fieldOrPropAccessInCallable(fpa, fp, c) and - (ownFieldOrPropAccess(fpa) or fp.isStatic()) + ( + ownFieldOrPropAccess(fpa) + or + fp.isStatic() and not fp instanceof EnumConstant + ) } /** diff --git a/csharp/ql/lib/semmle/code/csharp/security/cryptography/EncryptionKeyDataFlowQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/cryptography/EncryptionKeyDataFlowQuery.qll index 31670bce305..82bd0d30cab 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/cryptography/EncryptionKeyDataFlowQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/cryptography/EncryptionKeyDataFlowQuery.qll @@ -58,24 +58,6 @@ class SymmetricEncryptionCreateDecryptorSink extends SymmetricEncryptionKeySink override string getDescription() { result = "Decryptor(rgbKey, IV)" } } -/** - * DEPRECATED: Use `SymmetricKey` instead. - * - * Symmetric Key Data Flow configuration. - */ -deprecated class SymmetricKeyTaintTrackingConfiguration extends TaintTracking::Configuration { - SymmetricKeyTaintTrackingConfiguration() { this = "SymmetricKeyTaintTracking" } - - /** Holds if the node is a key source. */ - override predicate isSource(DataFlow::Node src) { src instanceof KeySource } - - /** Holds if the node is a symmetric encryption key sink. */ - override predicate isSink(DataFlow::Node sink) { sink instanceof SymmetricEncryptionKeySink } - - /** Holds if the node is a key sanitizer. */ - override predicate isSanitizer(DataFlow::Node sanitizer) { sanitizer instanceof KeySanitizer } -} - /** * Symmetric Key Data Flow configuration. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/cryptography/HardcodedSymmetricEncryptionKey.qll b/csharp/ql/lib/semmle/code/csharp/security/cryptography/HardcodedSymmetricEncryptionKey.qll index 741635bb47f..2e387cc2da6 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/cryptography/HardcodedSymmetricEncryptionKey.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/cryptography/HardcodedSymmetricEncryptionKey.qll @@ -61,33 +61,6 @@ module HardcodedSymmetricEncryptionKey { } } - /** - * DEPRECATED: Use `HardCodedSymmetricEncryption` instead. - * - * A taint-tracking configuration for uncontrolled data in path expression vulnerabilities. - */ - deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "HardcodedSymmetricEncryptionKey" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } - - /** - * Since `CryptographicBuffer` uses native code inside, taint tracking doesn't pass through it. - * Need to create an additional custom step. - */ - override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { - exists(MethodCall mc, CryptographicBuffer c | - pred.asExpr() = mc.getAnArgument() and - mc.getTarget() = c.getAMethod() and - succ.asExpr() = mc - ) - } - } - /** * A taint-tracking configuration for uncontrolled data in path expression vulnerabilities. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CleartextStorageQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CleartextStorageQuery.qll index d0c46ba6448..cbb10146a6a 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CleartextStorageQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CleartextStorageQuery.qll @@ -23,21 +23,6 @@ abstract class Sink extends DataFlow::ExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `ClearTextStorage` instead. - * - * A taint-tracking configuration for cleartext storage of sensitive information. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "ClearTextStorage" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for cleartext storage of sensitive information. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll index e33c4e37d28..2b55697ebda 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll @@ -24,21 +24,6 @@ abstract class Sink extends ApiSinkExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `CodeInjection` instead. - * - * A taint-tracking configuration for user input treated as code vulnerabilities. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "CodeInjection" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for user input treated as code vulnerabilities. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll index d0b24125ba9..24c80c07f89 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll @@ -23,21 +23,6 @@ abstract class Sink extends DataFlow::ExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `CommandInjection` instead. - * - * A taint-tracking configuration for command injection vulnerabilities. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "CommandInjection" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for command injection vulnerabilities. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll index cd7119a36af..2bc10dead22 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll @@ -30,21 +30,6 @@ abstract class Sink extends ApiSinkExprNode { */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `ConditionalBypass` instead. - * - * A taint-tracking configuration for user-controlled bypass of sensitive method. - */ -deprecated class Configuration extends TaintTracking::Configuration { - Configuration() { this = "UserControlledBypassOfSensitiveMethodConfiguration" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for user-controlled bypass of sensitive method. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll index 1e5f5ae8256..0726acb05ed 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExposureOfPrivateInformationQuery.qll @@ -23,21 +23,6 @@ abstract class Sink extends ApiSinkExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `ExposureOfPrivateInformation` instead. - * - * A taint-tracking configuration for private information flowing unencrypted to an external location. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "ExposureOfPrivateInformation" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for private information flowing unencrypted to an external location. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll index 41888fc2557..69a1823a455 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll @@ -73,19 +73,6 @@ class ExternalApiDataNode extends DataFlow::Node { } } -/** - * DEPRECATED: Use `RemoteSourceToExternalApi` instead. - * - * A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. - */ -deprecated class UntrustedDataToExternalApiConfig extends TaintTracking::Configuration { - UntrustedDataToExternalApiConfig() { this = "UntrustedDataToExternalAPIConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } -} - /** A configuration for tracking flow from `ThreatModelFlowSource`s to `ExternalApiDataNode`s. */ private module RemoteSourceToExternalApiConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/HardcodedCredentialsQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/HardcodedCredentialsQuery.qll index 63a0bb50732..72951df2f97 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/HardcodedCredentialsQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/HardcodedCredentialsQuery.qll @@ -38,46 +38,6 @@ abstract class Sink extends ApiSinkExprNode { */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `HardcodedCredentials` instead. - * - * A taint-tracking configuration for hard coded credentials. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "HardcodedCredentials" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { - sink instanceof Sink and - // Ignore values that are ultimately returned by mocks, as they don't represent "real" - // credentials. - not any(ReturnedByMockObject mock).getAMemberInitializationValue() = sink.asExpr() and - not any(ReturnedByMockObject mock).getAnArgument() = sink.asExpr() - } - - override predicate hasFlowPath(DataFlow::PathNode source, DataFlow::PathNode sink) { - super.hasFlowPath(source, sink) and - // Exclude hard-coded credentials in tests if they only flow to calls to methods with a name - // like "Add*" "Create*" or "Update*". The rationale is that hard-coded credentials within - // tests that are only used for creating or setting values within tests are unlikely to - // represent credentials to some accessible system. - not ( - source.getNode().asExpr().getFile() instanceof TestFile and - exists(MethodCall createOrAddCall, string createOrAddMethodName | - createOrAddMethodName.matches("Update%") or - createOrAddMethodName.matches("Create%") or - createOrAddMethodName.matches("Add%") - | - createOrAddCall.getTarget().hasName(createOrAddMethodName) and - createOrAddCall.getAnArgument() = sink.getNode().asExpr() - ) - ) - } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for hard coded credentials. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll index 78800f39209..bdba76bfb5c 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll @@ -26,21 +26,6 @@ abstract class Sink extends ApiSinkExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `LdapInjection` instead. - * - * A taint-tracking configuration for unvalidated user input that is used to construct LDAP queries. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "LDAPInjection" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for unvalidated user input that is used to construct LDAP queries. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll index f0153fea2d4..7c4429bcbf8 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll @@ -26,21 +26,6 @@ abstract class Sink extends ApiSinkExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `LogForging` instead. - * - * A taint-tracking configuration for untrusted user input used in log entries. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "LogForging" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for untrusted user input used in log entries. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll index 9333b5b37f2..4e14bed2c33 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll @@ -29,22 +29,6 @@ abstract class Sink extends ApiSinkExprNode { */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `MissingXxmlValidation` instead. - * - * A taint-tracking configuration for untrusted user input processed as XML without validation against a - * known schema. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "MissingXMLValidation" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for untrusted user input processed as XML without validation against a * known schema. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll index bf4fbd99323..f6225ce36bd 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll @@ -25,21 +25,6 @@ abstract class Sink extends ApiSinkExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `ReDoS` instead. - * - * A taint-tracking configuration for untrusted user input used in dangerous regular expression operations. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "ReDoS" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for untrusted user input used in dangerous regular expression operations. */ @@ -85,20 +70,6 @@ predicate isExponentialRegex(StringLiteral s) { s.getValue().regexpMatch(".*\\(\\([^()*+\\]]+\\]?\\)(\\*|\\+)\\.?\\)(\\*|\\+).*") } -/** - * DEPRECATED: Use `ExponentialRegexDataflow` instead. - * - * A data flow configuration for tracking exponential worst case time regular expression string - * literals to the pattern argument of a regex. - */ -deprecated class ExponentialRegexDataflow extends DataFlow2::Configuration { - ExponentialRegexDataflow() { this = "ExponentialRegex" } - - override predicate isSource(DataFlow::Node s) { isExponentialRegex(s.asExpr()) } - - override predicate isSink(DataFlow::Node s) { s.asExpr() = any(RegexOperation c).getPattern() } -} - /** * A data flow configuration for tracking exponential worst case time regular expression string * literals to the pattern argument of a regex. diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll index 1a053c29f24..8affdb1e9dd 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll @@ -24,21 +24,6 @@ abstract class Sink extends ApiSinkExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `RegexInjection` instead. - * - * A taint-tracking configuration for untrusted user input used to construct regular expressions. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "RegexInjection" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for untrusted user input used to construct regular expressions. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll index fb016dcddae..dd1c088042d 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll @@ -23,21 +23,6 @@ abstract class Sink extends ApiSinkExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `ResourceInjection` instead. - * - * A taint-tracking configuration for untrusted user input used in resource descriptors. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "ResourceInjection" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for untrusted user input used in resource descriptors. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll index 6473aa58e1c..5a900461af7 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll @@ -24,21 +24,6 @@ abstract class Sink extends ApiSinkExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `SqlInjection` instead. - * - * A taint-tracking configuration for SQL injection vulnerabilities. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "SqlInjection" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for SQL injection vulnerabilities. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll index ca2b13439ce..21c3cbdf942 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll @@ -26,21 +26,6 @@ abstract class Sink extends ApiSinkExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `TaintedPath` instead. - * - * A taint-tracking configuration for uncontrolled data in path expression vulnerabilities. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "TaintedPath" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for uncontrolled data in path expression vulnerabilities. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll index a5341aca42f..51aef35272f 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UnsafeDeserializationQuery.qll @@ -51,21 +51,6 @@ abstract class Sanitizer extends DataFlow::Node { } private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } -/** - * DEPRECATED: Use `TaintToObjectMethodTracking` instead. - * - * User input to object method call deserialization flow tracking. - */ -deprecated class TaintToObjectMethodTrackingConfig extends TaintTracking::Configuration { - TaintToObjectMethodTrackingConfig() { this = "TaintToObjectMethodTrackingConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof InstanceMethodSink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * User input to object method call deserialization flow tracking configuration. */ @@ -82,23 +67,6 @@ private module TaintToObjectMethodTrackingConfig implements DataFlow::ConfigSig */ module TaintToObjectMethodTracking = TaintTracking::Global; -/** - * DEPRECATED: Use `JsonConvertTracking` instead. - * - * User input to `JsonConvert` call deserialization flow tracking. - */ -deprecated class JsonConvertTrackingConfig extends TaintTracking::Configuration { - JsonConvertTrackingConfig() { this = "JsonConvertTrackingConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { - sink instanceof NewtonsoftJsonConvertDeserializeObjectMethodSink - } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * User input to `JsonConvert` call deserialization flow tracking configuration. */ @@ -117,61 +85,6 @@ private module JsonConvertTrackingConfig implements DataFlow::ConfigSig { */ module JsonConvertTracking = TaintTracking::Global; -/** - * DEPRECATED: Use `TypeNameTracking` instead. - * - * Tracks unsafe `TypeNameHandling` setting to `JsonConvert` call - */ -deprecated class TypeNameTrackingConfig extends DataFlow::Configuration { - TypeNameTrackingConfig() { this = "TypeNameTrackingConfig" } - - override predicate isSource(DataFlow::Node source) { - ( - source.asExpr() instanceof MemberConstantAccess and - source.getType() instanceof TypeNameHandlingEnum - or - source.asExpr() instanceof IntegerLiteral - ) and - source.asExpr().hasValue() and - not source.asExpr().getValue() = "0" - } - - override predicate isSink(DataFlow::Node sink) { - exists(MethodCall mc, Method m, Expr expr | - m = mc.getTarget() and - ( - not mc.getArgument(0).hasValue() and - m instanceof NewtonsoftJsonConvertClassDeserializeObjectMethod - ) and - expr = mc.getAnArgument() and - sink.asExpr() = expr and - expr.getType() instanceof JsonSerializerSettingsClass - ) - } - - override predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { - node1.asExpr() instanceof IntegerLiteral and - node2.asExpr().(CastExpr).getExpr() = node1.asExpr() - or - node1.getType() instanceof TypeNameHandlingEnum and - exists(PropertyWrite pw, Property p, Assignment a | - a.getLValue() = pw and - pw.getProperty() = p and - p.getDeclaringType() instanceof JsonSerializerSettingsClass and - p.hasName("TypeNameHandling") and - ( - node1.asExpr() = a.getRValue() and - node2.asExpr() = pw.getQualifier() - or - exists(ObjectInitializer oi | - node1.asExpr() = oi.getAMemberInitializer().getRValue() and - node2.asExpr() = oi - ) - ) - ) - } -} - /** * Configuration module for tracking unsafe `TypeNameHandling` setting to `JsonConvert` calls. */ @@ -228,24 +141,6 @@ private module TypeNameTrackingConfig implements DataFlow::ConfigSig { */ module TypeNameTracking = DataFlow::Global; -/** - * DEPRECATED: Use `TaintToConstructorOrStaticMethodTracking` instead. - * - * User input to static method or constructor call deserialization flow tracking. - */ -deprecated class TaintToConstructorOrStaticMethodTrackingConfig extends TaintTracking::Configuration -{ - TaintToConstructorOrStaticMethodTrackingConfig() { - this = "TaintToConstructorOrStaticMethodTrackingConfig" - } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof ConstructorOrStaticMethodSink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * User input to static method or constructor call deserialization flow tracking configuration. */ @@ -263,41 +158,6 @@ private module TaintToConstructorOrStaticMethodTrackingConfig implements DataFlo module TaintToConstructorOrStaticMethodTracking = TaintTracking::Global; -/** - * DEPRECATED: Use `TaintToObjectTypeTracking` instead. - * - * User input to instance type flow tracking. - */ -deprecated class TaintToObjectTypeTrackingConfig extends TaintTracking2::Configuration { - TaintToObjectTypeTrackingConfig() { this = "TaintToObjectTypeTrackingConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { - exists(MethodCall mc | - mc.getTarget() instanceof UnsafeDeserializer and - sink.asExpr() = mc.getQualifier() - ) - } - - override predicate isAdditionalTaintStep(DataFlow::Node n1, DataFlow::Node n2) { - exists(MethodCall mc, Method m | - m = mc.getTarget() and - m.getDeclaringType().hasFullyQualifiedName("System", "Type") and - m.hasName("GetType") and - m.isStatic() and - n1.asExpr() = mc.getArgument(0) and - n2.asExpr() = mc - ) - or - exists(ObjectCreation oc | - n1.asExpr() = oc.getAnArgument() and - n2.asExpr() = oc and - oc.getObjectType() instanceof StrongTypeDeserializer - ) - } -} - /** * User input to instance type flow tracking config. */ @@ -334,29 +194,6 @@ private module TaintToObjectTypeTrackingConfig implements DataFlow::ConfigSig { */ module TaintToObjectTypeTracking = TaintTracking::Global; -/** - * DEPRECATED: Use `WeakTypeCreationToUsageTracking` instead. - * - * Unsafe deserializer creation to usage tracking config. - */ -deprecated class WeakTypeCreationToUsageTrackingConfig extends TaintTracking2::Configuration { - WeakTypeCreationToUsageTrackingConfig() { this = "DeserializerCreationToUsageTrackingConfig" } - - override predicate isSource(DataFlow::Node source) { - exists(ObjectCreation oc | - oc.getObjectType() instanceof WeakTypeDeserializer and - source.asExpr() = oc - ) - } - - override predicate isSink(DataFlow::Node sink) { - exists(MethodCall mc | - mc.getTarget() instanceof UnsafeDeserializer and - sink.asExpr() = mc.getQualifier() - ) - } -} - /** * Unsafe deserializer creation to usage tracking config. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll index b21d5846bf5..09f6130985f 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll @@ -28,21 +28,6 @@ abstract class Sink extends ApiSinkExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `UrlRedirect` instead. - * - * A taint-tracking configuration for reasoning about unvalidated URL redirect vulnerabilities. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "UrlRedirect" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for reasoning about unvalidated URL redirect vulnerabilities. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll index 0bb842adf79..4efeadb3c7e 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XMLEntityInjectionQuery.qll @@ -44,26 +44,6 @@ private class InsecureXmlSink extends Sink { */ abstract class Sanitizer extends DataFlow::Node { } -/** - * DEPRECATED: Use `XmlEntityInjection` instead. - * - * A taint-tracking configuration for untrusted user input used in XML processing. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "XMLInjection" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } - - override predicate hasFlowPath(DataFlow::PathNode source, DataFlow::PathNode sink) { - super.hasFlowPath(source, sink) and - exists(sink.getNode().(Sink).getReason()) - } -} - /** * A taint-tracking configuration for untrusted user input used in XML processing. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll index c471a432425..0e8e41c9773 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll @@ -24,21 +24,6 @@ abstract class Sink extends ApiSinkExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `XpathInjection` instead. - * - * A taint-tracking configuration for untrusted user input used in XPath expression. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "XPathInjection" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for untrusted user input used in XPath expression. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XSSQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XSSQuery.qll index b9fd47689f9..4ea9e562bb5 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XSSQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XSSQuery.qll @@ -141,21 +141,6 @@ abstract class Source extends DataFlow::Node { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `XssTracking` instead. - * - * A taint-tracking configuration for cross-site scripting (XSS) vulnerabilities. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking2::Configuration { - TaintTrackingConfiguration() { this = "XSSDataFlowConfiguration" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for cross-site scripting (XSS) vulnerabilities. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll index 93e7b601585..fad3917553d 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll @@ -21,21 +21,6 @@ abstract class Sink extends ApiSinkExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `ZipSlip` instead. - * - * A taint tracking configuration for Zip Slip. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "ZipSlipTaintTracking" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint tracking configuration for Zip Slip. */ diff --git a/csharp/ql/src/CHANGELOG.md b/csharp/ql/src/CHANGELOG.md index bd25f8118dd..1b1d04129e2 100644 --- a/csharp/ql/src/CHANGELOG.md +++ b/csharp/ql/src/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.0.6 + +### Minor Analysis Improvements + +* Attributes in the `System.Runtime.CompilerServices` namespace are ignored when checking if a declaration requires documentation comments. +* C# build-mode `none` analyses now report a warning on the CodeQL status page when there are significant analysis problems -- defined as 5% of expressions lacking a type, or 5% of call targets being unknown. Other messages reported on the status page are downgraded from warnings to notes and so are less prominent, but are still available for review. + ## 1.0.5 No user-facing changes. diff --git a/csharp/ql/src/change-notes/2024-08-07-db-quality-diagnostic.md b/csharp/ql/src/change-notes/2024-08-07-db-quality-diagnostic.md deleted file mode 100644 index a22d136ce8b..00000000000 --- a/csharp/ql/src/change-notes/2024-08-07-db-quality-diagnostic.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* C# build-mode `none` analyses now report a warning on the CodeQL status page when there are significant analysis problems-- defined as 5% of expressions lacking a type, or 5% of call targets being unknown. Other messages reported on the status page are downgraded from warnings to notes and so are less prominent, but are still available for review. \ No newline at end of file diff --git a/csharp/ql/src/change-notes/2024-08-12-doc-comments.md b/csharp/ql/src/change-notes/2024-08-12-doc-comments.md deleted file mode 100644 index e4c49351f3a..00000000000 --- a/csharp/ql/src/change-notes/2024-08-12-doc-comments.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Attributes in the `System.Runtime.CompilerServices` namespace are ignored when checking if a declaration requires documentation comments. \ No newline at end of file diff --git a/csharp/ql/src/change-notes/released/1.0.6.md b/csharp/ql/src/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..c1454642823 --- /dev/null +++ b/csharp/ql/src/change-notes/released/1.0.6.md @@ -0,0 +1,6 @@ +## 1.0.6 + +### Minor Analysis Improvements + +* Attributes in the `System.Runtime.CompilerServices` namespace are ignored when checking if a declaration requires documentation comments. +* C# build-mode `none` analyses now report a warning on the CodeQL status page when there are significant analysis problems -- defined as 5% of expressions lacking a type, or 5% of call targets being unknown. Other messages reported on the status page are downgraded from warnings to notes and so are less prominent, but are still available for review. diff --git a/csharp/ql/src/codeql-pack.release.yml b/csharp/ql/src/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/csharp/ql/src/codeql-pack.release.yml +++ b/csharp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll b/csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll index e3459dfb1ac..eea18ae3b6e 100644 --- a/csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll +++ b/csharp/ql/src/experimental/CWE-099/TaintedWebClientLib.qll @@ -37,21 +37,6 @@ abstract class Sink extends DataFlow::ExprNode { } */ abstract class Sanitizer extends DataFlow::ExprNode { } -/** - * DEPRECATED: Use `TaintedWebClient` instead. - * - * A taint-tracking configuration for uncontrolled data in path expression vulnerabilities. - */ -deprecated class TaintTrackingConfiguration extends TaintTracking::Configuration { - TaintTrackingConfiguration() { this = "TaintedWebClientLib" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer } -} - /** * A taint-tracking configuration for uncontrolled data in path expression vulnerabilities. */ diff --git a/csharp/ql/src/experimental/CWE-918/RequestForgery.qll b/csharp/ql/src/experimental/CWE-918/RequestForgery.qll index e1c6875d952..dac68adfcc1 100644 --- a/csharp/ql/src/experimental/CWE-918/RequestForgery.qll +++ b/csharp/ql/src/experimental/CWE-918/RequestForgery.qll @@ -23,39 +23,6 @@ module RequestForgery { */ abstract private class Barrier extends DataFlow::Node { } - /** - * DEPRECATED: Use `RequestForgeryFlow` instead. - * - * A data flow configuration for detecting server side request forgery vulnerabilities. - */ - deprecated class RequestForgeryConfiguration extends DataFlow::Configuration { - RequestForgeryConfiguration() { this = "Server Side Request forgery" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isAdditionalFlowStep(DataFlow::Node prev, DataFlow::Node succ) { - interpolatedStringFlowStep(prev, succ) - or - stringReplaceStep(prev, succ) - or - uriCreationStep(prev, succ) - or - formatConvertStep(prev, succ) - or - toStringStep(prev, succ) - or - stringConcatStep(prev, succ) - or - stringFormatStep(prev, succ) - or - pathCombineStep(prev, succ) - } - - override predicate isBarrier(DataFlow::Node node) { node instanceof Barrier } - } - /** * A data flow configuration for detecting server side request forgery vulnerabilities. */ diff --git a/csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll b/csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll index 6f86497b41e..476b17e4c69 100644 --- a/csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll +++ b/csharp/ql/src/experimental/Security Features/JsonWebTokenHandler/JsonWebTokenHandlerLib.qll @@ -18,27 +18,6 @@ class TokenValidationParametersPropertySensitiveValidation extends Property { } } -/** - * DEPRECATED: Use `FalseValueFlowsToTokenValidationParametersPropertyWriteToBypassValidation` instead. - * - * A dataflow from a `false` value to a write sensitive property for `TokenValidationParameters`. - */ -deprecated class FalseValueFlowsToTokenValidationParametersPropertyWriteToBypassValidation extends DataFlow::Configuration -{ - FalseValueFlowsToTokenValidationParametersPropertyWriteToBypassValidation() { - this = "FalseValueFlowsToTokenValidationParametersPropertyWriteToBypassValidation" - } - - override predicate isSource(DataFlow::Node source) { - source.asExpr().getValue() = "false" and - source.asExpr().getType() instanceof BoolType - } - - override predicate isSink(DataFlow::Node sink) { - sink.asExpr() = any(TokenValidationParametersPropertySensitiveValidation p).getAnAssignedValue() - } -} - /** * A dataflow configuration from a `false` value to a write sensitive property for `TokenValidationParameters`. */ diff --git a/csharp/ql/src/experimental/dataflow/flowsources/AuthCookie.qll b/csharp/ql/src/experimental/dataflow/flowsources/AuthCookie.qll index b61bd86ec4e..928cf3bdc4f 100644 --- a/csharp/ql/src/experimental/dataflow/flowsources/AuthCookie.qll +++ b/csharp/ql/src/experimental/dataflow/flowsources/AuthCookie.qll @@ -40,26 +40,6 @@ private module AuthCookieNameConfig implements DataFlow::ConfigSig { */ private module AuthCookieName = DataFlow::Global; -/** - * DEPRECATED: Use `CookieOptionsTracking` instead. - * - * Tracks creation of `CookieOptions` to `IResponseCookies.Append(String, String, CookieOptions)` call as a third parameter. - */ -deprecated class CookieOptionsTrackingConfiguration extends DataFlow::Configuration { - CookieOptionsTrackingConfiguration() { this = "CookieOptionsTrackingConfiguration" } - - override predicate isSource(DataFlow::Node source) { - source.asExpr().(ObjectCreation).getType() instanceof MicrosoftAspNetCoreHttpCookieOptions - } - - override predicate isSink(DataFlow::Node sink) { - exists(MicrosoftAspNetCoreHttpResponseCookies iResponse, MethodCall mc | - iResponse.getAppendMethod() = mc.getTarget() and - mc.getArgument(2) = sink.asExpr() - ) - } -} - /** * Configuration module tracking creation of `CookieOptions` to `IResponseCookies.Append(String, String, CookieOptions)` * calls as a third parameter. @@ -134,28 +114,6 @@ Expr getAValueForProp(ObjectCreation create, Assignment a, string prop) { */ predicate isPropertySet(ObjectCreation oc, string prop) { exists(getAValueForProp(oc, _, prop)) } -/** - * DEPRECATED: Use `OnAppendCookieSecureTracking` instead. - * - * Tracks if a callback used in `OnAppendCookie` sets `Secure` to `true`. - */ -deprecated class OnAppendCookieSecureTrackingConfig extends OnAppendCookieTrackingConfig { - OnAppendCookieSecureTrackingConfig() { this = "OnAppendCookieSecureTrackingConfig" } - - override string propertyName() { result = "Secure" } -} - -/** - * DEPRECATED: Use `OnAppendCookieHttpOnlyTracking` instead. - * - * Tracks if a callback used in `OnAppendCookie` sets `HttpOnly` to `true`. - */ -deprecated class OnAppendCookieHttpOnlyTrackingConfig extends OnAppendCookieTrackingConfig { - OnAppendCookieHttpOnlyTrackingConfig() { this = "OnAppendCookieHttpOnlyTrackingConfig" } - - override string propertyName() { result = "HttpOnly" } -} - /** * Tracks if a callback used in `OnAppendCookie` sets a cookie property to `true`. */ diff --git a/csharp/ql/src/qlpack.yml b/csharp/ql/src/qlpack.yml index 51699111e25..4f1c93fc25b 100644 --- a/csharp/ql/src/qlpack.yml +++ b/csharp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-queries -version: 1.0.6-dev +version: 1.0.7-dev groups: - csharp - queries 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 1090b61a884..aa26a5d4305 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs @@ -291,4 +291,42 @@ namespace My.Qltest static void Sink(object o) { } } + + // Test synthetic fields + public class K { + + public object MyField; + + public void SetMySyntheticField(object o) => throw null; + + public object GetMySyntheticField() => throw null; + + public void SetMyNestedSyntheticField(object o) => throw null; + + public object GetMyNestedSyntheticField() => throw null; + + public void SetMyFieldOnSyntheticField(object o) => throw null; + + public object GetMyFieldOnSyntheticField() => throw null; + + public void M1() { + var o = new object(); + SetMySyntheticField(o); + Sink(GetMySyntheticField()); + } + + public void M2() { + var o = new object(); + SetMyNestedSyntheticField(o); + Sink(GetMyNestedSyntheticField()); + } + + public void M3() { + var o = new object(); + SetMyFieldOnSyntheticField(o); + Sink(GetMyFieldOnSyntheticField()); + } + + 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 cad976516b3..0b80a70fbad 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected @@ -24,6 +24,12 @@ models | 23 | Summary: My.Qltest; I; false; GetFirst; (My.Qltest.MyInlineArray); ; Argument[0].Element; ReturnValue; value; manual | | 24 | Summary: My.Qltest; J; false; get_Prop1; (); ; Argument[this]; ReturnValue; value; manual | | 25 | Summary: My.Qltest; J; false; SetProp1; (System.Object); ; Argument[0]; Argument[this]; value; manual | +| 26 | Summary: My.Qltest; K; false; SetMySyntheticField; (System.Object); ; Argument[0]; Argument[this].SyntheticField[My.Qltest.K.MySyntheticField]; value; manual | +| 27 | Summary: My.Qltest; K; false; GetMySyntheticField; (); ; Argument[this].SyntheticField[My.Qltest.K.MySyntheticField]; ReturnValue; value; manual | +| 28 | Summary: My.Qltest; K; false; SetMyNestedSyntheticField; (System.Object); ; Argument[0]; Argument[this].SyntheticField[My.Qltest.K.MySyntheticField1].SyntheticField[MySyntheticField1.MyNestedSyntheticField]; value; manual | +| 29 | Summary: My.Qltest; K; false; GetMyNestedSyntheticField; (); ; Argument[this].SyntheticField[My.Qltest.K.MySyntheticField1].SyntheticField[MySyntheticField1.MyNestedSyntheticField]; ReturnValue; value; manual | +| 30 | Summary: My.Qltest; K; false; SetMyFieldOnSyntheticField; (System.Object); ; Argument[0]; Argument[this].SyntheticField[My.Qltest.K.MySyntheticField2].Field[My.Qltest.K.MyField]; value; manual | +| 31 | Summary: My.Qltest; K; false; GetMyFieldOnSyntheticField; (); ; Argument[this].SyntheticField[My.Qltest.K.MySyntheticField2].Field[My.Qltest.K.MyField]; ReturnValue; 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 | | @@ -121,6 +127,21 @@ edges | ExternalFlow.cs:279:13:279:23 | [post] this access : J | ExternalFlow.cs:281:18:281:21 | this access : J | provenance | | | ExternalFlow.cs:279:22:279:22 | access to local variable j : Object | ExternalFlow.cs:279:13:279:23 | [post] this access : J | provenance | MaD:25 | | ExternalFlow.cs:281:18:281:21 | this access : J | ExternalFlow.cs:281:18:281:27 | access to property Prop1 | provenance | MaD:24 | +| ExternalFlow.cs:313:17:313:17 | access to local variable o : Object | ExternalFlow.cs:314:33:314:33 | access to local variable o : Object | provenance | | +| ExternalFlow.cs:313:21:313:32 | object creation of type Object : Object | ExternalFlow.cs:313:17:313:17 | access to local variable o : Object | provenance | | +| ExternalFlow.cs:314:13:314:34 | [post] this access : K [synthetic My.Qltest.K.MySyntheticField] : Object | ExternalFlow.cs:315:18:315:38 | this access : K [synthetic My.Qltest.K.MySyntheticField] : Object | provenance | | +| ExternalFlow.cs:314:33:314:33 | access to local variable o : Object | ExternalFlow.cs:314:13:314:34 | [post] this access : K [synthetic My.Qltest.K.MySyntheticField] : Object | provenance | MaD:26 | +| ExternalFlow.cs:315:18:315:38 | this access : K [synthetic My.Qltest.K.MySyntheticField] : Object | ExternalFlow.cs:315:18:315:38 | call to method GetMySyntheticField | provenance | MaD:27 | +| ExternalFlow.cs:319:17:319:17 | access to local variable o : Object | ExternalFlow.cs:320:39:320:39 | access to local variable o : Object | provenance | | +| ExternalFlow.cs:319:21:319:32 | object creation of type Object : Object | ExternalFlow.cs:319:17:319:17 | access to local variable o : Object | provenance | | +| ExternalFlow.cs:320:13:320:40 | [post] this access : K [synthetic My.Qltest.K.MySyntheticField1, synthetic MySyntheticField1.MyNestedSyntheticField] : Object | ExternalFlow.cs:321:18:321:44 | this access : K [synthetic My.Qltest.K.MySyntheticField1, synthetic MySyntheticField1.MyNestedSyntheticField] : Object | provenance | | +| ExternalFlow.cs:320:39:320:39 | access to local variable o : Object | ExternalFlow.cs:320:13:320:40 | [post] this access : K [synthetic My.Qltest.K.MySyntheticField1, synthetic MySyntheticField1.MyNestedSyntheticField] : Object | provenance | MaD:28 | +| ExternalFlow.cs:321:18:321:44 | this access : K [synthetic My.Qltest.K.MySyntheticField1, synthetic MySyntheticField1.MyNestedSyntheticField] : Object | ExternalFlow.cs:321:18:321:44 | call to method GetMyNestedSyntheticField | provenance | MaD:29 | +| ExternalFlow.cs:325:17:325:17 | access to local variable o : Object | ExternalFlow.cs:326:40:326:40 | access to local variable o : Object | provenance | | +| ExternalFlow.cs:325:21:325:32 | object creation of type Object : Object | ExternalFlow.cs:325:17:325:17 | access to local variable o : Object | provenance | | +| ExternalFlow.cs:326:13:326:41 | [post] this access : K [synthetic My.Qltest.K.MySyntheticField2, field MyField] : Object | ExternalFlow.cs:327:18:327:45 | this access : K [synthetic My.Qltest.K.MySyntheticField2, field MyField] : Object | provenance | | +| ExternalFlow.cs:326:40:326:40 | access to local variable o : Object | ExternalFlow.cs:326:13:326:41 | [post] this access : K [synthetic My.Qltest.K.MySyntheticField2, field MyField] : Object | provenance | MaD:30 | +| ExternalFlow.cs:327:18:327:45 | this access : K [synthetic My.Qltest.K.MySyntheticField2, field MyField] : Object | ExternalFlow.cs:327:18:327:45 | call to method GetMyFieldOnSyntheticField | provenance | MaD:31 | 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 | @@ -240,6 +261,24 @@ nodes | ExternalFlow.cs:279:22:279:22 | access to local variable j : Object | semmle.label | access to local variable j : Object | | ExternalFlow.cs:281:18:281:21 | this access : J | semmle.label | this access : J | | ExternalFlow.cs:281:18:281:27 | access to property Prop1 | semmle.label | access to property Prop1 | +| ExternalFlow.cs:313:17:313:17 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| ExternalFlow.cs:313:21:313:32 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:314:13:314:34 | [post] this access : K [synthetic My.Qltest.K.MySyntheticField] : Object | semmle.label | [post] this access : K [synthetic My.Qltest.K.MySyntheticField] : Object | +| ExternalFlow.cs:314:33:314:33 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| ExternalFlow.cs:315:18:315:38 | call to method GetMySyntheticField | semmle.label | call to method GetMySyntheticField | +| ExternalFlow.cs:315:18:315:38 | this access : K [synthetic My.Qltest.K.MySyntheticField] : Object | semmle.label | this access : K [synthetic My.Qltest.K.MySyntheticField] : Object | +| ExternalFlow.cs:319:17:319:17 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| ExternalFlow.cs:319:21:319:32 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:320:13:320:40 | [post] this access : K [synthetic My.Qltest.K.MySyntheticField1, synthetic MySyntheticField1.MyNestedSyntheticField] : Object | semmle.label | [post] this access : K [synthetic My.Qltest.K.MySyntheticField1, synthetic MySyntheticField1.MyNestedSyntheticField] : Object | +| ExternalFlow.cs:320:39:320:39 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| ExternalFlow.cs:321:18:321:44 | call to method GetMyNestedSyntheticField | semmle.label | call to method GetMyNestedSyntheticField | +| ExternalFlow.cs:321:18:321:44 | this access : K [synthetic My.Qltest.K.MySyntheticField1, synthetic MySyntheticField1.MyNestedSyntheticField] : Object | semmle.label | this access : K [synthetic My.Qltest.K.MySyntheticField1, synthetic MySyntheticField1.MyNestedSyntheticField] : Object | +| ExternalFlow.cs:325:17:325:17 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| ExternalFlow.cs:325:21:325:32 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:326:13:326:41 | [post] this access : K [synthetic My.Qltest.K.MySyntheticField2, field MyField] : Object | semmle.label | [post] this access : K [synthetic My.Qltest.K.MySyntheticField2, field MyField] : Object | +| ExternalFlow.cs:326:40:326:40 | access to local variable o : Object | semmle.label | access to local variable o : Object | +| ExternalFlow.cs:327:18:327:45 | call to method GetMyFieldOnSyntheticField | semmle.label | call to method GetMyFieldOnSyntheticField | +| ExternalFlow.cs:327:18:327:45 | this access : K [synthetic My.Qltest.K.MySyntheticField2, field MyField] : Object | semmle.label | this access : K [synthetic My.Qltest.K.MySyntheticField2, field MyField] : Object | 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 @@ -269,3 +308,6 @@ invalidModelRow | ExternalFlow.cs:240:18:240:18 | access to local variable o | ExternalFlow.cs:238:21:238:28 | object creation of type HC : HC | ExternalFlow.cs:240:18:240:18 | access to local variable o | $@ | ExternalFlow.cs:238:21:238:28 | object creation of type HC : HC | object creation of type HC : HC | | ExternalFlow.cs:258:18:258:18 | access to local variable b | ExternalFlow.cs:256:20:256:31 | object creation of type Object : Object | ExternalFlow.cs:258:18:258:18 | access to local variable b | $@ | ExternalFlow.cs:256:20:256:31 | object creation of type Object : Object | object creation of type Object : Object | | ExternalFlow.cs:281:18:281:27 | access to property Prop1 | ExternalFlow.cs:278:21:278:32 | object creation of type Object : Object | ExternalFlow.cs:281:18:281:27 | access to property Prop1 | $@ | ExternalFlow.cs:278:21:278:32 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:315:18:315:38 | call to method GetMySyntheticField | ExternalFlow.cs:313:21:313:32 | object creation of type Object : Object | ExternalFlow.cs:315:18:315:38 | call to method GetMySyntheticField | $@ | ExternalFlow.cs:313:21:313:32 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:321:18:321:44 | call to method GetMyNestedSyntheticField | ExternalFlow.cs:319:21:319:32 | object creation of type Object : Object | ExternalFlow.cs:321:18:321:44 | call to method GetMyNestedSyntheticField | $@ | ExternalFlow.cs:319:21:319:32 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:327:18:327:45 | call to method GetMyFieldOnSyntheticField | ExternalFlow.cs:325:21:325:32 | object creation of type Object : Object | ExternalFlow.cs:327:18:327:45 | call to method GetMyFieldOnSyntheticField | $@ | ExternalFlow.cs:325:21:325:32 | 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 6c877d06161..f2cf9972a73 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 @@ -37,6 +37,13 @@ extensions: - ["My.Qltest", "J", false, "SetProp1", "(System.Object)", "", "Argument[0]", "Argument[this]", "value", "manual"] - ["My.Qltest", "J", false, "get_Prop2", "()", "", "Argument[this]", "ReturnValue", "value", "df-generated"] - ["My.Qltest", "J", false, "SetProp2", "(System.Object)", "", "Argument[0]", "Argument[this]", "value", "manual"] + - ["My.Qltest", "K", false, "SetMySyntheticField", "(System.Object)", "", "Argument[0]", "Argument[this].SyntheticField[My.Qltest.K.MySyntheticField]", "value", "manual"] + - ["My.Qltest", "K", false, "GetMySyntheticField", "()", "", "Argument[this].SyntheticField[My.Qltest.K.MySyntheticField]", "ReturnValue", "value", "manual"] + - ["My.Qltest", "K", false, "SetMyNestedSyntheticField", "(System.Object)", "", "Argument[0]", "Argument[this].SyntheticField[My.Qltest.K.MySyntheticField1].SyntheticField[MySyntheticField1.MyNestedSyntheticField]", "value", "manual"] + - ["My.Qltest", "K", false, "GetMyNestedSyntheticField", "()", "", "Argument[this].SyntheticField[My.Qltest.K.MySyntheticField1].SyntheticField[MySyntheticField1.MyNestedSyntheticField]", "ReturnValue", "value", "manual"] + - ["My.Qltest", "K", false, "SetMyFieldOnSyntheticField", "(System.Object)", "", "Argument[0]", "Argument[this].SyntheticField[My.Qltest.K.MySyntheticField2].Field[My.Qltest.K.MyField]", "value", "manual"] + - ["My.Qltest", "K", false, "GetMyFieldOnSyntheticField", "()", "", "Argument[this].SyntheticField[My.Qltest.K.MySyntheticField2].Field[My.Qltest.K.MyField]", "ReturnValue", "value", "manual"] + - addsTo: pack: codeql/csharp-all extensible: neutralModel diff --git a/csharp/ql/test/library-tests/dataflow/ssa/Enum.cs b/csharp/ql/test/library-tests/dataflow/ssa/Enum.cs new file mode 100644 index 00000000000..283b2800098 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/ssa/Enum.cs @@ -0,0 +1,14 @@ +enum E +{ + A +} + +class EnumTest +{ + void M() + { + // enums are modelled as fields; this test checks that we do not compute SSA for them + var e1 = E.A; + var e2 = E.A; + } +} diff --git a/docs/codeql/codeql-language-guides/analyzing-data-flow-in-cpp-new.rst b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-cpp-new.rst new file mode 100644 index 00000000000..a20f5bcdd05 --- /dev/null +++ b/docs/codeql/codeql-language-guides/analyzing-data-flow-in-cpp-new.rst @@ -0,0 +1,9 @@ +.. _analyzing-data-flow-in-cpp-new: + +:orphan: +:nosearch: + +Analyzing data flow in C and C++ +================================ + +This article has moved to a new location: https://codeql.github.com/docs/codeql-language-guides/analyzing-data-flow-in-cpp/. diff --git a/docs/codeql/conf.py b/docs/codeql/conf.py index 5bc008b7a10..15ea776fb07 100644 --- a/docs/codeql/conf.py +++ b/docs/codeql/conf.py @@ -67,7 +67,7 @@ def setup(sphinx): # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -language = None +language = 'en' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False diff --git a/go/documentation/library-coverage/coverage.csv b/go/documentation/library-coverage/coverage.csv index 093aa1ec57e..364e17aa94b 100644 --- a/go/documentation/library-coverage/coverage.csv +++ b/go/documentation/library-coverage/coverage.csv @@ -1,166 +1,121 @@ -package,sink,source,summary,sink:command-injection,sink:credentials-key,sink:jwt,sink:log-injection,sink:path-injection,sink:regex-use[0],sink:regex-use[1],sink:regex-use[c],sink:request-forgery,sink:request-forgery[TCP Addr + Port],sink:url-redirection,sink:url-redirection[0],sink:url-redirection[receiver],sink:xpath-injection,source:remote,summary:taint,summary:value -,,,8,,,,,,,,,,,,,,,,3,5 -archive/tar,,,5,,,,,,,,,,,,,,,,5, -archive/zip,,,6,,,,,,,,,,,,,,,,6, -bufio,,,17,,,,,,,,,,,,,,,,17, -bytes,,,43,,,,,,,,,,,,,,,,43, -clevergo.tech/clevergo,1,,,,,,,,,,,,,,,1,,,, -compress/bzip2,,,1,,,,,,,,,,,,,,,,1, -compress/flate,,,4,,,,,,,,,,,,,,,,4, -compress/gzip,,,3,,,,,,,,,,,,,,,,3, -compress/lzw,,,1,,,,,,,,,,,,,,,,1, -compress/zlib,,,4,,,,,,,,,,,,,,,,4, -container/heap,,,5,,,,,,,,,,,,,,,,5, -container/list,,,20,,,,,,,,,,,,,,,,20, -container/ring,,,5,,,,,,,,,,,,,,,,5, -context,,,5,,,,,,,,,,,,,,,,5, -crypto,,,1,,,,,,,,,,,,,,,,1, -crypto/cipher,,,3,,,,,,,,,,,,,,,,3, -crypto/rsa,,,2,,,,,,,,,,,,,,,,2, -crypto/tls,,,3,,,,,,,,,,,,,,,,3, -crypto/x509,,,1,,,,,,,,,,,,,,,,1, -database/sql,,,7,,,,,,,,,,,,,,,,7, -database/sql/driver,,,4,,,,,,,,,,,,,,,,4, -encoding,,,4,,,,,,,,,,,,,,,,4, -encoding/ascii85,,,2,,,,,,,,,,,,,,,,2, -encoding/asn1,,,8,,,,,,,,,,,,,,,,8, -encoding/base32,,,3,,,,,,,,,,,,,,,,3, -encoding/base64,,,3,,,,,,,,,,,,,,,,3, -encoding/binary,,,2,,,,,,,,,,,,,,,,2, -encoding/csv,,,5,,,,,,,,,,,,,,,,5, -encoding/gob,,,7,,,,,,,,,,,,,,,,7, -encoding/hex,,,3,,,,,,,,,,,,,,,,3, -encoding/json,,,14,,,,,,,,,,,,,,,,14, -encoding/pem,,,3,,,,,,,,,,,,,,,,3, -encoding/xml,,,23,,,,,,,,,,,,,,,,23, -errors,,,3,,,,,,,,,,,,,,,,3, -expvar,,,6,,,,,,,,,,,,,,,,6, -fmt,3,,16,,,,3,,,,,,,,,,,,16, -github.com/ChrisTrenkamp/goxpath,3,,,,,,,,,,,,,,,,3,,, -github.com/Sirupsen/logrus,118,,,,,,118,,,,,,,,,,,,, -github.com/antchfx/htmlquery,4,,,,,,,,,,,,,,,,4,,, -github.com/antchfx/jsonquery,4,,,,,,,,,,,,,,,,4,,, -github.com/antchfx/xmlquery,8,,,,,,,,,,,,,,,,8,,, -github.com/antchfx/xpath,4,,,,,,,,,,,,,,,,4,,, -github.com/appleboy/gin-jwt,1,,,,1,,,,,,,,,,,,,,, -github.com/astaxie/beego,16,6,7,,,,11,4,,,,,,1,,,,6,7, -github.com/astaxie/beego/context,2,15,1,,,,,1,,,,,,1,,,,15,1, -github.com/astaxie/beego/logs,22,,,,,,22,,,,,,,,,,,,, -github.com/astaxie/beego/utils,1,,13,,,,1,,,,,,,,,,,,13, -github.com/beego/beego,16,6,7,,,,11,4,,,,,,1,,,,6,7, -github.com/beego/beego/context,2,15,1,,,,,1,,,,,,1,,,,15,1, -github.com/beego/beego/core/logs,22,,,,,,22,,,,,,,,,,,,, -github.com/beego/beego/core/utils,1,,13,,,,1,,,,,,,,,,,,13, -github.com/beego/beego/logs,22,,,,,,22,,,,,,,,,,,,, -github.com/beego/beego/server/web,16,6,7,,,,11,4,,,,,,1,,,,6,7, -github.com/beego/beego/server/web/context,2,15,1,,,,,1,,,,,,1,,,,15,1, -github.com/beego/beego/utils,1,,13,,,,1,,,,,,,,,,,,13, -github.com/clevergo/clevergo,1,,,,,,,,,,,,,,,1,,,, -github.com/codeskyblue/go-sh,4,,,4,,,,,,,,,,,,,,,, -github.com/couchbase/gocb,,,18,,,,,,,,,,,,,,,,18, -github.com/couchbaselabs/gocb,,,18,,,,,,,,,,,,,,,,18, -github.com/crankycoder/xmlpath,2,,,,,,,,,,,,,,,,2,,, -github.com/cristalhq/jwt,1,,,,1,,,,,,,,,,,,,,, -github.com/davecgh/go-spew/spew,9,,,,,,9,,,,,,,,,,,,, -github.com/dgrijalva/jwt-go,3,,9,,2,1,,,,,,,,,,,,,9, -github.com/elazarl/goproxy,2,2,2,,,,2,,,,,,,,,,,2,2, -github.com/emicklei/go-restful,,7,,,,,,,,,,,,,,,,7,, -github.com/evanphx/json-patch,,,12,,,,,,,,,,,,,,,,12, -github.com/form3tech-oss/jwt-go,2,,,,2,,,,,,,,,,,,,,, -github.com/gin-gonic/gin,3,46,2,,,,,3,,,,,,,,,,46,2, -github.com/go-chi/chi,,3,,,,,,,,,,,,,,,,3,, -github.com/go-chi/jwtauth,1,,,,1,,,,,,,,,,,,,,, -github.com/go-jose/go-jose,2,,,,2,,,,,,,,,,,,,,, -github.com/go-jose/go-jose/jwt,1,,4,,,1,,,,,,,,,,,,,4, -github.com/go-kit/kit/auth/jwt,1,,,,1,,,,,,,,,,,,,,, -github.com/go-pg/pg/orm,,,6,,,,,,,,,,,,,,,,6, -github.com/go-xmlpath/xmlpath,2,,,,,,,,,,,,,,,,2,,, -github.com/gobwas/ws,,2,,,,,,,,,,,,,,,,2,, -github.com/gofiber/fiber,5,,,,,,,4,,,,,,,,1,,,, -github.com/gogf/gf-jwt,1,,,,1,,,,,,,,,,,,,,, -github.com/going/toolkit/xmlpath,2,,,,,,,,,,,,,,,,2,,, -github.com/golang-jwt/jwt,3,,11,,2,1,,,,,,,,,,,,,11, -github.com/golang/glog,90,,,,,,90,,,,,,,,,,,,, -github.com/golang/protobuf/proto,,,4,,,,,,,,,,,,,,,,4, -github.com/gorilla/mux,,1,,,,,,,,,,,,,,,,1,, -github.com/gorilla/websocket,,3,,,,,,,,,,,,,,,,3,, -github.com/jbowtie/gokogiri/xml,4,,,,,,,,,,,,,,,,4,,, -github.com/jbowtie/gokogiri/xpath,1,,,,,,,,,,,,,,,,1,,, -github.com/json-iterator/go,,,4,,,,,,,,,,,,,,,,4, -github.com/kataras/iris/context,6,,,,,,,6,,,,,,,,,,,, -github.com/kataras/iris/middleware/jwt,2,,,,2,,,,,,,,,,,,,,, -github.com/kataras/iris/server/web/context,6,,,,,,,6,,,,,,,,,,,, -github.com/kataras/jwt,5,,,,5,,,,,,,,,,,,,,, -github.com/labstack/echo,3,12,2,,,,,2,,,,,,1,,,,12,2, -github.com/lestrrat-go/jwx,1,,,,1,,,,,,,,,,,,,,, -github.com/lestrrat-go/jwx/jwk,1,,,,1,,,,,,,,,,,,,,, -github.com/lestrrat-go/libxml2/parser,3,,,,,,,,,,,,,,,,3,,, -github.com/lestrrat/go-jwx/jwk,1,,,,1,,,,,,,,,,,,,,, -github.com/masterzen/xmlpath,2,,,,,,,,,,,,,,,,2,,, -github.com/moovweb/gokogiri/xml,4,,,,,,,,,,,,,,,,4,,, -github.com/moovweb/gokogiri/xpath,1,,,,,,,,,,,,,,,,1,,, -github.com/ory/fosite/token/jwt,2,,,,2,,,,,,,,,,,,,,, -github.com/revel/revel,2,23,10,,,,,1,,,,,,1,,,,23,10, -github.com/robfig/revel,2,23,10,,,,,1,,,,,,1,,,,23,10, -github.com/santhosh-tekuri/xpathparser,2,,,,,,,,,,,,,,,,2,,, -github.com/sendgrid/sendgrid-go/helpers/mail,,,1,,,,,,,,,,,,,,,,1, -github.com/sirupsen/logrus,118,,,,,,118,,,,,,,,,,,,, -github.com/spf13/afero,34,,,,,,,34,,,,,,,,,,,, -github.com/square/go-jose,2,,,,2,,,,,,,,,,,,,,, -github.com/square/go-jose/jwt,1,,4,,,1,,,,,,,,,,,,,4, -github.com/valyala/fasthttp,35,50,5,,,,,8,,,,17,8,2,,,,50,5, -go.uber.org/zap,33,,11,,,,33,,,,,,,,,,,,11, -golang.org/x/crypto/ssh,4,,,4,,,,,,,,,,,,,,,, -golang.org/x/net/context,,,5,,,,,,,,,,,,,,,,5, -golang.org/x/net/html,,,16,,,,,,,,,,,,,,,,16, -golang.org/x/net/websocket,,2,,,,,,,,,,,,,,,,2,, -google.golang.org/protobuf/internal/encoding/text,,,1,,,,,,,,,,,,,,,,1, -google.golang.org/protobuf/internal/impl,,,2,,,,,,,,,,,,,,,,2, -google.golang.org/protobuf/proto,,,8,,,,,,,,,,,,,,,,8, -google.golang.org/protobuf/reflect/protoreflect,,,1,,,,,,,,,,,,,,,,1, -gopkg.in/couchbase/gocb,,,18,,,,,,,,,,,,,,,,18, -gopkg.in/glog,90,,,,,,90,,,,,,,,,,,,, -gopkg.in/go-jose/go-jose,2,,,,2,,,,,,,,,,,,,,, -gopkg.in/go-jose/go-jose/jwt,1,,4,,,1,,,,,,,,,,,,,4, -gopkg.in/go-xmlpath/xmlpath,2,,,,,,,,,,,,,,,,2,,, -gopkg.in/macaron,1,12,1,,,,,,,,,,,,,1,,12,1, -gopkg.in/square/go-jose,2,,,,2,,,,,,,,,,,,,,, -gopkg.in/square/go-jose/jwt,1,,4,,,1,,,,,,,,,,,,,4, -gopkg.in/xmlpath,2,,,,,,,,,,,,,,,,2,,, -gopkg.in/yaml,,,9,,,,,,,,,,,,,,,,9, -html,,,2,,,,,,,,,,,,,,,,2, -html/template,,,6,,,,,,,,,,,,,,,,6, -io,,,19,,,,,,,,,,,,,,,,19, -io/fs,,,12,,,,,,,,,,,,,,,,12, -io/ioutil,5,,2,,,,,5,,,,,,,,,,,2, -k8s.io/api/core,,,10,,,,,,,,,,,,,,,,10, -k8s.io/apimachinery/pkg/runtime,,,47,,,,,,,,,,,,,,,,47, -k8s.io/klog,90,,,,,,90,,,,,,,,,,,,, -launchpad.net/xmlpath,2,,,,,,,,,,,,,,,,2,,, -log,20,,3,,,,20,,,,,,,,,,,,3, -math/big,,,1,,,,,,,,,,,,,,,,1, -mime,,,5,,,,,,,,,,,,,,,,5, -mime/multipart,,,8,,,,,,,,,,,,,,,,8, -mime/quotedprintable,,,1,,,,,,,,,,,,,,,,1, -net,,,20,,,,,,,,,,,,,,,,20, -net/http,2,16,22,,,,,1,,,,,,,1,,,16,22, -net/http/httputil,,,10,,,,,,,,,,,,,,,,10, -net/mail,,,6,,,,,,,,,,,,,,,,6, -net/textproto,,,19,,,,,,,,,,,,,,,,19, -net/url,,,23,,,,,,,,,,,,,,,,23, -nhooyr.io/websocket,,2,,,,,,,,,,,,,,,,2,, -os,27,,4,1,,,,26,,,,,,,,,,,4, -os/exec,2,,,2,,,,,,,,,,,,,,,, -path,,,5,,,,,,,,,,,,,,,,5, -path/filepath,,,13,,,,,,,,,,,,,,,,13, -reflect,,,37,,,,,,,,,,,,,,,,37, -regexp,10,,20,,,,,,3,3,4,,,,,,,,20, -sort,,,1,,,,,,,,,,,,,,,,1, -strconv,,,9,,,,,,,,,,,,,,,,9, -strings,,,34,,,,,,,,,,,,,,,,34, -sync,,,10,,,,,,,,,,,,,,,,10, -sync/atomic,,,24,,,,,,,,,,,,,,,,24, -syscall,5,,8,5,,,,,,,,,,,,,,,8, -text/scanner,,,3,,,,,,,,,,,,,,,,3, -text/tabwriter,,,1,,,,,,,,,,,,,,,,1, -text/template,,,6,,,,,,,,,,,,,,,,6, +package,sink,source,summary,sink:command-injection,sink:credentials-key,sink:jwt,sink:path-injection,sink:regex-use[0],sink:regex-use[1],sink:regex-use[c],sink:request-forgery,sink:request-forgery[TCP Addr + Port],sink:url-redirection,sink:url-redirection[0],sink:url-redirection[receiver],sink:xpath-injection,source:environment,source:file,source:remote,summary:taint,summary:value +,,,8,,,,,,,,,,,,,,,,,3,5 +archive/tar,,,5,,,,,,,,,,,,,,,,,5, +archive/zip,,,6,,,,,,,,,,,,,,,,,6, +bufio,,,17,,,,,,,,,,,,,,,,,17, +bytes,,,43,,,,,,,,,,,,,,,,,43, +clevergo.tech/clevergo,1,,,,,,,,,,,,,,1,,,,,, +compress/bzip2,,,1,,,,,,,,,,,,,,,,,1, +compress/flate,,,4,,,,,,,,,,,,,,,,,4, +compress/gzip,,,3,,,,,,,,,,,,,,,,,3, +compress/lzw,,,1,,,,,,,,,,,,,,,,,1, +compress/zlib,,,4,,,,,,,,,,,,,,,,,4, +container/heap,,,5,,,,,,,,,,,,,,,,,5, +container/list,,,20,,,,,,,,,,,,,,,,,20, +container/ring,,,5,,,,,,,,,,,,,,,,,5, +context,,,5,,,,,,,,,,,,,,,,,5, +crypto,,,10,,,,,,,,,,,,,,,,,10, +database/sql,,,11,,,,,,,,,,,,,,,,,11, +encoding,,,77,,,,,,,,,,,,,,,,,77, +errors,,,3,,,,,,,,,,,,,,,,,3, +expvar,,,6,,,,,,,,,,,,,,,,,6, +fmt,,,16,,,,,,,,,,,,,,,,,16, +github.com/ChrisTrenkamp/goxpath,3,,,,,,,,,,,,,,,3,,,,, +github.com/antchfx/htmlquery,4,,,,,,,,,,,,,,,4,,,,, +github.com/antchfx/jsonquery,4,,,,,,,,,,,,,,,4,,,,, +github.com/antchfx/xmlquery,8,,,,,,,,,,,,,,,8,,,,, +github.com/antchfx/xpath,4,,,,,,,,,,,,,,,4,,,,, +github.com/appleboy/gin-jwt,1,,,,1,,,,,,,,,,,,,,,, +github.com/astaxie/beego,7,21,21,,,,5,,,,,,2,,,,,,21,21, +github.com/beego/beego,14,42,42,,,,10,,,,,,4,,,,,,42,42, +github.com/caarlos0/env,,5,2,,,,,,,,,,,,,,5,,,1,1 +github.com/clevergo/clevergo,1,,,,,,,,,,,,,,1,,,,,, +github.com/codeskyblue/go-sh,4,,,4,,,,,,,,,,,,,,,,, +github.com/couchbase/gocb,,,18,,,,,,,,,,,,,,,,,18, +github.com/couchbaselabs/gocb,,,18,,,,,,,,,,,,,,,,,18, +github.com/crankycoder/xmlpath,2,,,,,,,,,,,,,,,2,,,,, +github.com/cristalhq/jwt,1,,,,1,,,,,,,,,,,,,,,, +github.com/dgrijalva/jwt-go,3,,9,,2,1,,,,,,,,,,,,,,9, +github.com/elazarl/goproxy,,2,2,,,,,,,,,,,,,,,,2,2, +github.com/emicklei/go-restful,,7,,,,,,,,,,,,,,,,,7,, +github.com/evanphx/json-patch,,,12,,,,,,,,,,,,,,,,,12, +github.com/form3tech-oss/jwt-go,2,,,,2,,,,,,,,,,,,,,,, +github.com/gin-gonic/gin,3,46,2,,,,3,,,,,,,,,,,,46,2, +github.com/go-chi/chi,,3,,,,,,,,,,,,,,,,,3,, +github.com/go-chi/jwtauth,1,,,,1,,,,,,,,,,,,,,,, +github.com/go-jose/go-jose,3,,4,,2,1,,,,,,,,,,,,,,4, +github.com/go-kit/kit/auth/jwt,1,,,,1,,,,,,,,,,,,,,,, +github.com/go-pg/pg/orm,,,6,,,,,,,,,,,,,,,,,6, +github.com/go-xmlpath/xmlpath,2,,,,,,,,,,,,,,,2,,,,, +github.com/gobuffalo/envy,,7,,,,,,,,,,,,,,,7,,,, +github.com/gobwas/ws,,2,,,,,,,,,,,,,,,,,2,, +github.com/gofiber/fiber,5,,,,,,4,,,,,,,,1,,,,,, +github.com/gogf/gf-jwt,1,,,,1,,,,,,,,,,,,,,,, +github.com/going/toolkit/xmlpath,2,,,,,,,,,,,,,,,2,,,,, +github.com/golang-jwt/jwt,3,,11,,2,1,,,,,,,,,,,,,,11, +github.com/golang/protobuf/proto,,,4,,,,,,,,,,,,,,,,,4, +github.com/gorilla/mux,,1,,,,,,,,,,,,,,,,,1,, +github.com/gorilla/websocket,,3,,,,,,,,,,,,,,,,,3,, +github.com/hashicorp/go-envparse,,1,,,,,,,,,,,,,,,1,,,, +github.com/jbowtie/gokogiri/xml,4,,,,,,,,,,,,,,,4,,,,, +github.com/jbowtie/gokogiri/xpath,1,,,,,,,,,,,,,,,1,,,,, +github.com/joho/godotenv,,4,,,,,,,,,,,,,,,4,,,, +github.com/json-iterator/go,,,4,,,,,,,,,,,,,,,,,4, +github.com/kataras/iris/context,6,,,,,,6,,,,,,,,,,,,,, +github.com/kataras/iris/middleware/jwt,2,,,,2,,,,,,,,,,,,,,,, +github.com/kataras/iris/server/web/context,6,,,,,,6,,,,,,,,,,,,,, +github.com/kataras/jwt,5,,,,5,,,,,,,,,,,,,,,, +github.com/kelseyhightower/envconfig,,6,,,,,,,,,,,,,,,6,,,, +github.com/labstack/echo,3,12,2,,,,2,,,,,,1,,,,,,12,2, +github.com/lestrrat-go/jwx,2,,,,2,,,,,,,,,,,,,,,, +github.com/lestrrat-go/libxml2/parser,3,,,,,,,,,,,,,,,3,,,,, +github.com/lestrrat/go-jwx/jwk,1,,,,1,,,,,,,,,,,,,,,, +github.com/masterzen/xmlpath,2,,,,,,,,,,,,,,,2,,,,, +github.com/moovweb/gokogiri/xml,4,,,,,,,,,,,,,,,4,,,,, +github.com/moovweb/gokogiri/xpath,1,,,,,,,,,,,,,,,1,,,,, +github.com/ory/fosite/token/jwt,2,,,,2,,,,,,,,,,,,,,,, +github.com/revel/revel,2,23,10,,,,1,,,,,,1,,,,,,23,10, +github.com/robfig/revel,2,23,10,,,,1,,,,,,1,,,,,,23,10, +github.com/santhosh-tekuri/xpathparser,2,,,,,,,,,,,,,,,2,,,,, +github.com/sendgrid/sendgrid-go/helpers/mail,,,1,,,,,,,,,,,,,,,,,1, +github.com/spf13/afero,34,,,,,,34,,,,,,,,,,,,,, +github.com/square/go-jose,3,,4,,2,1,,,,,,,,,,,,,,4, +github.com/valyala/fasthttp,35,50,5,,,,8,,,,17,8,2,,,,,,50,5, +go.uber.org/zap,,,11,,,,,,,,,,,,,,,,,11, +golang.org/x/crypto/ssh,4,,,4,,,,,,,,,,,,,,,,, +golang.org/x/net/context,,,5,,,,,,,,,,,,,,,,,5, +golang.org/x/net/html,,,16,,,,,,,,,,,,,,,,,16, +golang.org/x/net/websocket,,2,,,,,,,,,,,,,,,,,2,, +google.golang.org/protobuf/internal/encoding/text,,,1,,,,,,,,,,,,,,,,,1, +google.golang.org/protobuf/internal/impl,,,2,,,,,,,,,,,,,,,,,2, +google.golang.org/protobuf/proto,,,8,,,,,,,,,,,,,,,,,8, +google.golang.org/protobuf/reflect/protoreflect,,,1,,,,,,,,,,,,,,,,,1, +gopkg.in/couchbase/gocb,,,18,,,,,,,,,,,,,,,,,18, +gopkg.in/go-jose/go-jose,3,,4,,2,1,,,,,,,,,,,,,,4, +gopkg.in/go-xmlpath/xmlpath,2,,,,,,,,,,,,,,,2,,,,, +gopkg.in/macaron,1,12,1,,,,,,,,,,,,1,,,,12,1, +gopkg.in/square/go-jose,3,,4,,2,1,,,,,,,,,,,,,,4, +gopkg.in/xmlpath,2,,,,,,,,,,,,,,,2,,,,, +gopkg.in/yaml,,,9,,,,,,,,,,,,,,,,,9, +html,,,8,,,,,,,,,,,,,,,,,8, +io,5,4,34,,,,5,,,,,,,,,,,4,,34, +k8s.io/api/core,,,10,,,,,,,,,,,,,,,,,10, +k8s.io/apimachinery/pkg/runtime,,,47,,,,,,,,,,,,,,,,,47, +launchpad.net/xmlpath,2,,,,,,,,,,,,,,,2,,,,, +log,,,3,,,,,,,,,,,,,,,,,3, +math/big,,,1,,,,,,,,,,,,,,,,,1, +mime,,,14,,,,,,,,,,,,,,,,,14, +net,2,16,100,,,,1,,,,,,,1,,,,,16,100, +nhooyr.io/websocket,,2,,,,,,,,,,,,,,,,,2,, +os,29,10,6,3,,,26,,,,,,,,,,7,3,,6, +path,,,18,,,,,,,,,,,,,,,,,18, +reflect,,,37,,,,,,,,,,,,,,,,,37, +regexp,10,,20,,,,,3,3,4,,,,,,,,,,20, +sort,,,1,,,,,,,,,,,,,,,,,1, +strconv,,,9,,,,,,,,,,,,,,,,,9, +strings,,,34,,,,,,,,,,,,,,,,,34, +sync,,,34,,,,,,,,,,,,,,,,,34, +syscall,5,2,8,5,,,,,,,,,,,,,2,,,8, +text/scanner,,,3,,,,,,,,,,,,,,,,,3, +text/tabwriter,,,1,,,,,,,,,,,,,,,,,1, +text/template,,,6,,,,,,,,,,,,,,,,,6, diff --git a/go/documentation/library-coverage/coverage.rst b/go/documentation/library-coverage/coverage.rst index 3030f7da828..848d989d2d5 100644 --- a/go/documentation/library-coverage/coverage.rst +++ b/go/documentation/library-coverage/coverage.rst @@ -7,31 +7,39 @@ Go framework & library support :widths: auto Framework / library,Package,Flow sources,Taint & value steps,Sinks (total) + `Afero `_,``github.com/spf13/afero*``,,,34 + `CleverGo `_,"``clevergo.tech/clevergo*``, ``github.com/clevergo/clevergo*``",,,2 `Couchbase official client(gocb) `_,"``github.com/couchbase/gocb*``, ``gopkg.in/couchbase/gocb*``",,36, `Couchbase unofficial client `_,``github.com/couchbaselabs/gocb*``,,18, `Echo `_,``github.com/labstack/echo*``,12,2,3 + `Fiber `_,``github.com/gofiber/fiber*``,,,5 `Fosite `_,``github.com/ory/fosite*``,,,2 `Gin `_,``github.com/gin-gonic/gin*``,46,2,3 + `Glog `_,"``github.com/golang/glog*``, ``gopkg.in/glog*``, ``k8s.io/klog*``",,, `Go JOSE `_,"``github.com/go-jose/go-jose*``, ``github.com/square/go-jose*``, ``gopkg.in/square/go-jose*``, ``gopkg.in/go-jose/go-jose*``",,16,12 `Go kit `_,``github.com/go-kit/kit*``,,,1 + `Go-spew `_,``github.com/davecgh/go-spew/spew*``,,, `Gokogiri `_,"``github.com/jbowtie/gokogiri*``, ``github.com/moovweb/gokogiri*``",,,10 `Iris `_,``github.com/kataras/iris*``,,,14 `Kubernetes `_,"``k8s.io/api*``, ``k8s.io/apimachinery*``",,57, + `Logrus `_,"``github.com/Sirupsen/logrus*``, ``github.com/sirupsen/logrus*``",,, `Macaron `_,``gopkg.in/macaron*``,12,1,1 `Revel `_,"``github.com/revel/revel*``, ``github.com/robfig/revel*``",46,20,4 `SendGrid `_,``github.com/sendgrid/sendgrid-go*``,,1, - `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``",16,584,74 + `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``",32,587,51 `XPath `_,``github.com/antchfx/xpath*``,,,4 `appleboy/gin-jwt `_,``github.com/appleboy/gin-jwt*``,,,1 - `beego `_,"``github.com/astaxie/beego*``, ``github.com/beego/beego*``",63,63,123 + `beego `_,"``github.com/astaxie/beego*``, ``github.com/beego/beego*``",63,63,21 `chi `_,``github.com/go-chi/chi*``,3,, `cristalhq/jwt `_,``github.com/cristalhq/jwt*``,,,1 `fasthttp `_,``github.com/valyala/fasthttp*``,50,5,35 `gf-jwt `_,``github.com/gogf/gf-jwt*``,,,1 `go-pg `_,``github.com/go-pg/pg*``,,6, `go-restful `_,``github.com/emicklei/go-restful*``,7,, + `go-sh `_,``github.com/codeskyblue/go-sh*``,,,4 + `golang.org/x/crypto/ssh `_,``golang.org/x/crypto/ssh*``,,,4 `golang.org/x/net `_,``golang.org/x/net*``,2,21, - `goproxy `_,``github.com/elazarl/goproxy*``,2,2,2 + `goproxy `_,``github.com/elazarl/goproxy*``,2,2, `gorilla/mux `_,``github.com/gorilla/mux*``,1,, `gorilla/websocket `_,``github.com/gorilla/websocket*``,3,, `goxpath `_,``github.com/ChrisTrenkamp/goxpath*``,,,3 @@ -51,7 +59,7 @@ Go framework & library support `xmlquery `_,``github.com/antchfx/xmlquery*``,,,8 `xpathparser `_,``github.com/santhosh-tekuri/xpathparser*``,,,2 `yaml `_,``gopkg.in/yaml*``,,9, - `zap `_,``go.uber.org/zap*``,,11,33 - Others,"``clevergo.tech/clevergo``, ``github.com/Sirupsen/logrus``, ``github.com/clevergo/clevergo``, ``github.com/codeskyblue/go-sh``, ``github.com/davecgh/go-spew/spew``, ``github.com/gofiber/fiber``, ``github.com/golang/glog``, ``github.com/sirupsen/logrus``, ``github.com/spf13/afero``, ``golang.org/x/crypto/ssh``, ``gopkg.in/glog``, ``k8s.io/klog``",,,564 - Totals,,267,906,943 + `zap `_,``go.uber.org/zap*``,,11, + Others,"``github.com/caarlos0/env``, ``github.com/gobuffalo/envy``, ``github.com/hashicorp/go-envparse``, ``github.com/joho/godotenv``, ``github.com/kelseyhightower/envconfig``",23,2, + Totals,,306,911,268 diff --git a/go/ql/consistency-queries/CHANGELOG.md b/go/ql/consistency-queries/CHANGELOG.md index 2e7162889c3..6976ee14e27 100644 --- a/go/ql/consistency-queries/CHANGELOG.md +++ b/go/ql/consistency-queries/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/go/ql/consistency-queries/change-notes/released/1.0.6.md b/go/ql/consistency-queries/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/go/ql/consistency-queries/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +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 42da17b3841..8033d980afa 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.5 +lastReleaseVersion: 1.0.6 diff --git a/go/ql/consistency-queries/qlpack.yml b/go/ql/consistency-queries/qlpack.yml index 17f966d2c41..fc1029a0c85 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.6-dev +version: 1.0.7-dev groups: - go - queries diff --git a/go/ql/lib/CHANGELOG.md b/go/ql/lib/CHANGELOG.md index 41cfec4595e..d44205e61f7 100644 --- a/go/ql/lib/CHANGELOG.md +++ b/go/ql/lib/CHANGELOG.md @@ -1,3 +1,21 @@ +## 1.1.5 + +### Minor Analysis Improvements + +* Local source models for reading and parsing environment variables have been added for the following libraries: + - os + - syscall + - github.com/caarlos0/env + - github.com/gobuffalo/envy + - github.com/hashicorp/go-envparse + - github.com/joho/godotenv + - github.com/kelseyhightower/envconfig +* Local source models have been added for the APIs which open files in the `io/fs`, `io/ioutil` and `os` packages in the Go standard library. You can optionally include threat models as appropriate when using the CodeQL CLI and in GitHub code scanning. For more information, see [Analyzing your code with CodeQL queries](https://docs.github.com/code-security/codeql-cli/getting-started-with-the-codeql-cli/analyzing-your-code-with-codeql-queries#including-model-packs-to-add-potential-sources-of-tainted-data>) and [Customizing your advanced setup for code scanning](https://docs.github.com/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#extending-codeql-coverage-with-threat-models). + +### Bug Fixes + +* Fixed an issue where `io/ioutil.WriteFile`'s non-path arguments incorrectly generated `go/path-injection` alerts when untrusted data was written to a file, or controlled the file's mode. + ## 1.1.4 No user-facing changes. diff --git a/go/ql/lib/change-notes/2024-08-12-add-environment-models.md b/go/ql/lib/change-notes/2024-08-12-add-environment-models.md deleted file mode 100644 index c511718475d..00000000000 --- a/go/ql/lib/change-notes/2024-08-12-add-environment-models.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -category: minorAnalysis ---- -* Local source models for reading and parsing environment variables have been added for the following libraries: - - os - - syscall - - github.com/caarlos0/env - - github.com/gobuffalo/envy - - github.com/hashicorp/go-envparse - - github.com/joho/godotenv - - github.com/kelseyhightower/envconfig diff --git a/go/ql/lib/change-notes/2024-08-12-add-file-models.md b/go/ql/lib/change-notes/2024-09-03-local-threat-models-file-environment.md similarity index 72% rename from go/ql/lib/change-notes/2024-08-12-add-file-models.md rename to go/ql/lib/change-notes/2024-09-03-local-threat-models-file-environment.md index eed216dd361..5efdd8a369e 100644 --- a/go/ql/lib/change-notes/2024-08-12-add-file-models.md +++ b/go/ql/lib/change-notes/2024-09-03-local-threat-models-file-environment.md @@ -1,4 +1,12 @@ --- category: minorAnalysis --- +* Local source models for reading and parsing environment variables have been added for the following libraries: + * os + * syscall + * github.com/caarlos0/env + * github.com/gobuffalo/envy + * github.com/hashicorp/go-envparse + * github.com/joho/godotenv + * github.com/kelseyhightower/envconfig * Local source models have been added for the APIs which open files in the `io/fs`, `io/ioutil` and `os` packages in the Go standard library. You can optionally include threat models as appropriate when using the CodeQL CLI and in GitHub code scanning. For more information, see [Analyzing your code with CodeQL queries](https://docs.github.com/code-security/codeql-cli/getting-started-with-the-codeql-cli/analyzing-your-code-with-codeql-queries#including-model-packs-to-add-potential-sources-of-tainted-data>) and [Customizing your advanced setup for code scanning](https://docs.github.com/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#extending-codeql-coverage-with-threat-models). diff --git a/go/ql/lib/change-notes/2024-09-03-outdated-deprecations.md b/go/ql/lib/change-notes/2024-09-03-outdated-deprecations.md new file mode 100644 index 00000000000..4826864fcc2 --- /dev/null +++ b/go/ql/lib/change-notes/2024-09-03-outdated-deprecations.md @@ -0,0 +1,5 @@ +--- +category: breaking +--- +* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`. +* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration` instead. diff --git a/go/ql/lib/change-notes/released/1.1.5.md b/go/ql/lib/change-notes/released/1.1.5.md new file mode 100644 index 00000000000..ccec4d55ebb --- /dev/null +++ b/go/ql/lib/change-notes/released/1.1.5.md @@ -0,0 +1,5 @@ +## 1.1.5 + +### Bug Fixes + +* Fixed an issue where `io/ioutil.WriteFile`'s non-path arguments incorrectly generated `go/path-injection` alerts when untrusted data was written to a file, or controlled the file's mode. diff --git a/go/ql/lib/codeql-pack.release.yml b/go/ql/lib/codeql-pack.release.yml index 26cbcd3f123..df39a9de059 100644 --- a/go/ql/lib/codeql-pack.release.yml +++ b/go/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.1.4 +lastReleaseVersion: 1.1.5 diff --git a/go/ql/lib/ext/database.sql.driver.model.yml b/go/ql/lib/ext/database.sql.driver.model.yml index 50b699e4371..c2d780bb7c8 100644 --- a/go/ql/lib/ext/database.sql.driver.model.yml +++ b/go/ql/lib/ext/database.sql.driver.model.yml @@ -1,14 +1,4 @@ extensions: - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["database/sql/driver", "Execer", False, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql/driver", "ExecerContext", False, "ExecContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql/driver", "Conn", False, "Prepare", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql/driver", "ConnPrepareContext", False, "PrepareContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql/driver", "Queryer", False, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql/driver", "QueryerContext", False, "QueryContext", "", "", "Argument[1]", "sql-injection", "manual"] - addsTo: pack: codeql/go-all extensible: summaryModel diff --git a/go/ql/lib/ext/database.sql.model.yml b/go/ql/lib/ext/database.sql.model.yml index b8fb85bb893..e1083f6e49a 100644 --- a/go/ql/lib/ext/database.sql.model.yml +++ b/go/ql/lib/ext/database.sql.model.yml @@ -1,32 +1,4 @@ extensions: - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["database/sql", "Conn", False, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql", "Conn", False, "ExecContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql", "Conn", False, "Prepare", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql", "Conn", False, "PrepareContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql", "Conn", False, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql", "Conn", False, "QueryContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql", "Conn", False, "QueryRow", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql", "Conn", False, "QueryRowContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql", "DB", False, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql", "DB", False, "ExecContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql", "DB", False, "Prepare", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql", "DB", False, "PrepareContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql", "DB", False, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql", "DB", False, "QueryContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql", "DB", False, "QueryRow", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql", "DB", False, "QueryRowContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql", "Tx", False, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql", "Tx", False, "ExecContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql", "Tx", False, "Prepare", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql", "Tx", False, "PrepareContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql", "Tx", False, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql", "Tx", False, "QueryContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["database/sql", "Tx", False, "QueryRow", "", "", "Argument[0]", "sql-injection", "manual"] - - ["database/sql", "Tx", False, "QueryRowContext", "", "", "Argument[1]", "sql-injection", "manual"] - addsTo: pack: codeql/go-all extensible: summaryModel diff --git a/go/ql/lib/ext/fmt.model.yml b/go/ql/lib/ext/fmt.model.yml index ff975cf423c..5234b509933 100644 --- a/go/ql/lib/ext/fmt.model.yml +++ b/go/ql/lib/ext/fmt.model.yml @@ -1,11 +1,4 @@ extensions: - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["fmt", "", False, "Print", "", "", "Argument[0]", "log-injection", "manual"] - - ["fmt", "", False, "Printf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["fmt", "", False, "Println", "", "", "Argument[0]", "log-injection", "manual"] - addsTo: pack: codeql/go-all extensible: summaryModel diff --git a/go/ql/lib/ext/github.com.beego.beego.client.orm.model.yml b/go/ql/lib/ext/github.com.beego.beego.client.orm.model.yml deleted file mode 100644 index 9e8849423eb..00000000000 --- a/go/ql/lib/ext/github.com.beego.beego.client.orm.model.yml +++ /dev/null @@ -1,42 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: packageGrouping - data: - - ["beego-orm", "github.com/beego/beego/client/orm"] - - ["beego-orm", "github.com/astaxie/beego/orm"] - - ["beego-orm", "github.com/beego/beego/orm"] - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["group:beego-orm", "Condition", False, "Raw", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:beego-orm", "DB", False, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "DB", False, "ExecContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:beego-orm", "DB", False, "Prepare", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "DB", False, "PrepareContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:beego-orm", "DB", False, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "DB", False, "QueryContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:beego-orm", "DB", False, "QueryRow", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "DB", False, "QueryRowContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:beego-orm", "Ormer", False, "Raw", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "And", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "Delete", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "From", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "GroupBy", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "Having", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "In", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "InnerJoin", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "InsertInto", "", "", "Argument[0..1]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "LeftJoin", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "On", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "Or", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "OrderBy", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "RightJoin", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "Select", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "Set", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "Subquery", "", "", "Argument[0..1]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "Update", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "Values", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QueryBuilder", False, "Where", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:beego-orm", "QuerySeter", False, "FilterRaw", "", "", "Argument[1]", "sql-injection", "manual"] diff --git a/go/ql/lib/ext/github.com.beego.beego.core.logs.model.yml b/go/ql/lib/ext/github.com.beego.beego.core.logs.model.yml deleted file mode 100644 index 3dfbbe89719..00000000000 --- a/go/ql/lib/ext/github.com.beego.beego.core.logs.model.yml +++ /dev/null @@ -1,34 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: packageGrouping - data: - - ["beego-logs", "github.com/astaxie/beego/logs"] - - ["beego-logs", "github.com/beego/beego/logs"] - - ["beego-logs", "github.com/beego/beego/core/logs"] - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["group:beego-logs", "", False, "Alert", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "", False, "Critical", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "", False, "Debug", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "", False, "Emergency", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "", False, "Error", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "", False, "Info", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "", False, "Informational", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "", False, "Notice", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "", False, "Trace", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "", False, "Warn", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "", False, "Warning", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "BeeLogger", False, "Alert", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "BeeLogger", False, "Critical", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "BeeLogger", False, "Debug", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "BeeLogger", False, "Emergency", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "BeeLogger", False, "Error", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "BeeLogger", False, "Info", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "BeeLogger", False, "Informational", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "BeeLogger", False, "Notice", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "BeeLogger", False, "Trace", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "BeeLogger", False, "Warn", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego-logs", "BeeLogger", False, "Warning", "", "", "Argument[0..1]", "log-injection", "manual"] diff --git a/go/ql/lib/ext/github.com.beego.beego.core.utils.model.yml b/go/ql/lib/ext/github.com.beego.beego.core.utils.model.yml index 63c05b92040..4eb0688e37e 100644 --- a/go/ql/lib/ext/github.com.beego.beego.core.utils.model.yml +++ b/go/ql/lib/ext/github.com.beego.beego.core.utils.model.yml @@ -6,11 +6,6 @@ extensions: - ["beego-utils", "github.com/astaxie/beego/utils"] - ["beego-utils", "github.com/beego/beego/utils"] - ["beego-utils", "github.com/beego/beego/core/utils"] - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["group:beego-utils", "", False, "Display", "", "", "Argument[0]", "log-injection", "manual"] - addsTo: pack: codeql/go-all extensible: summaryModel diff --git a/go/ql/lib/ext/github.com.beego.beego.server.web.model.yml b/go/ql/lib/ext/github.com.beego.beego.server.web.model.yml index c55d620c2e4..8a11da7ad83 100644 --- a/go/ql/lib/ext/github.com.beego.beego.server.web.model.yml +++ b/go/ql/lib/ext/github.com.beego.beego.server.web.model.yml @@ -10,18 +10,6 @@ extensions: pack: codeql/go-all extensible: sinkModel data: - # log-injection - - ["group:beego", "", False, "Alert", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego", "", False, "Critical", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego", "", False, "Debug", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego", "", False, "Emergency", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego", "", False, "Error", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego", "", False, "Info", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego", "", False, "Informational", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego", "", False, "Notice", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego", "", False, "Trace", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego", "", False, "Warn", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:beego", "", False, "Warning", "", "", "Argument[0..1]", "log-injection", "manual"] # path-injection - ["group:beego", "", False, "Walk", "", "", "Argument[1]", "path-injection", "manual"] - ["group:beego", "Controller", False, "SaveToFile", "", "", "Argument[1]", "path-injection", "manual"] diff --git a/go/ql/lib/ext/github.com.couchbase.gocb.model.yml b/go/ql/lib/ext/github.com.couchbase.gocb.model.yml index d17b53dd6da..ff0a4c22c8d 100644 --- a/go/ql/lib/ext/github.com.couchbase.gocb.model.yml +++ b/go/ql/lib/ext/github.com.couchbase.gocb.model.yml @@ -3,43 +3,28 @@ extensions: pack: codeql/go-all extensible: packageGrouping data: - - ["gocb1", "fixed-version:github.com/couchbase/gocb"] - - ["gocb1", "fixed-version:gopkg.in/couchbase/gocb.v1"] - - ["gocb1", "fixed-version:github.com/couchbaselabs/gocb"] - - ["gocb2", "github.com/couchbase/gocb/v2"] - - ["gocb2", "gopkg.in/couchbase/gocb.v2"] - - ["gocb2", "github.com/couchbaselabs/gocb/v2"] - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["group:gocb1", "Bucket", True, "ExecuteN1qlQuery", "", "", "Argument[0]", "nosql-injection", "manual"] - - ["group:gocb1", "Bucket", True, "ExecuteAnalyticsQuery", "", "", "Argument[0]", "nosql-injection", "manual"] - - ["group:gocb1", "Cluster", True, "ExecuteN1qlQuery", "", "", "Argument[0]", "nosql-injection", "manual"] - - ["group:gocb1", "Cluster", True, "ExecuteAnalyticsQuery", "", "", "Argument[0]", "nosql-injection", "manual"] - - ["group:gocb2", "Cluster", True, "AnalyticsQuery", "", "", "Argument[0]", "nosql-injection", "manual"] - - ["group:gocb2", "Cluster", True, "Query", "", "", "Argument[0]", "nosql-injection", "manual"] - - ["group:gocb2", "Scope", True, "AnalyticsQuery", "", "", "Argument[0]", "nosql-injection", "manual"] - - ["group:gocb2", "Scope", True, "Query", "", "", "Argument[0]", "nosql-injection", "manual"] + - ["gocb", "github.com/couchbase/gocb"] + - ["gocb", "gopkg.in/couchbase/gocb"] + - ["gocb", "github.com/couchbaselabs/gocb"] - addsTo: pack: codeql/go-all extensible: summaryModel data: - - ["group:gocb1", "", False, "NewAnalyticsQuery", "", "", "Argument[0]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "", False, "NewN1qlQuery", "", "", "Argument[0]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "AnalyticsQuery", True, "ContextId", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "AnalyticsQuery", True, "Deferred", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "AnalyticsQuery", True, "Pretty", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "AnalyticsQuery", True, "Priority", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "AnalyticsQuery", True, "RawParam", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "AnalyticsQuery", True, "ServerSideTimeout", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "N1qlQuery", True, "AdHoc", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "N1qlQuery", True, "Consistency", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "N1qlQuery", True, "ConsistentWith", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "N1qlQuery", True, "Custom", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "N1qlQuery", True, "PipelineBatch", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "N1qlQuery", True, "PipelineCap", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "N1qlQuery", True, "Profile", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "N1qlQuery", True, "ReadOnly", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "N1qlQuery", True, "ScanCap", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] - - ["group:gocb1", "N1qlQuery", True, "Timeout", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "", False, "NewAnalyticsQuery", "", "", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "", False, "NewN1qlQuery", "", "", "Argument[0]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "AnalyticsQuery", True, "ContextId", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "AnalyticsQuery", True, "Deferred", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "AnalyticsQuery", True, "Pretty", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "AnalyticsQuery", True, "Priority", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "AnalyticsQuery", True, "RawParam", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "AnalyticsQuery", True, "ServerSideTimeout", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "N1qlQuery", True, "AdHoc", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "N1qlQuery", True, "Consistency", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "N1qlQuery", True, "ConsistentWith", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "N1qlQuery", True, "Custom", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "N1qlQuery", True, "PipelineBatch", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "N1qlQuery", True, "PipelineCap", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "N1qlQuery", True, "Profile", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "N1qlQuery", True, "ReadOnly", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "N1qlQuery", True, "ScanCap", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] + - ["group:gocb", "N1qlQuery", True, "Timeout", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"] diff --git a/go/ql/lib/ext/github.com.davecgh.go-spew.spew.model.yml b/go/ql/lib/ext/github.com.davecgh.go-spew.spew.model.yml deleted file mode 100644 index 4b4996926e3..00000000000 --- a/go/ql/lib/ext/github.com.davecgh.go-spew.spew.model.yml +++ /dev/null @@ -1,14 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["github.com/davecgh/go-spew/spew", "", False, "Dump", "", "", "Argument[0]", "log-injection", "manual"] - - ["github.com/davecgh/go-spew/spew", "", False, "Errorf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["github.com/davecgh/go-spew/spew", "", False, "Fdump", "", "", "Argument[1]", "log-injection", "manual"] - - ["github.com/davecgh/go-spew/spew", "", False, "Fprint", "", "", "Argument[1]", "log-injection", "manual"] - - ["github.com/davecgh/go-spew/spew", "", False, "Fprintf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["github.com/davecgh/go-spew/spew", "", False, "Fprintln", "", "", "Argument[1]", "log-injection", "manual"] - - ["github.com/davecgh/go-spew/spew", "", False, "Print", "", "", "Argument[0]", "log-injection", "manual"] - - ["github.com/davecgh/go-spew/spew", "", False, "Printf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["github.com/davecgh/go-spew/spew", "", False, "Println", "", "", "Argument[0]", "log-injection", "manual"] diff --git a/go/ql/lib/ext/github.com.elazarl.goproxy.model.yml b/go/ql/lib/ext/github.com.elazarl.goproxy.model.yml index 01a61d2c3ac..20e4a26f1cd 100644 --- a/go/ql/lib/ext/github.com.elazarl.goproxy.model.yml +++ b/go/ql/lib/ext/github.com.elazarl.goproxy.model.yml @@ -1,10 +1,4 @@ extensions: - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["github.com/elazarl/goproxy", "ProxyCtx", False, "Logf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["github.com/elazarl/goproxy", "ProxyCtx", False, "Warnf", "", "", "Argument[0..1]", "log-injection", "manual"] - addsTo: pack: codeql/go-all extensible: summaryModel diff --git a/go/ql/lib/ext/github.com.gogf.gf.database.gdb.model.yml b/go/ql/lib/ext/github.com.gogf.gf.database.gdb.model.yml deleted file mode 100644 index 030656c6eb8..00000000000 --- a/go/ql/lib/ext/github.com.gogf.gf.database.gdb.model.yml +++ /dev/null @@ -1,57 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - # These models are for v1. Some of them hold for v2, but we should model v2 properly. - - ["github.com/gogf/gf/database/gdb", "Core", True, "DoCommit", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "DoExec", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "DoGetAll", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "DoQuery", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "DoPrepare", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "GetAll", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "GetArray", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "GetCount", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "GetOne", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "GetScan", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "GetStruct", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "GetStructs", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "GetValue", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "Prepare", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Core", True, "Raw", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "DoCommit", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "DoExec", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "DoGetAll", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "DoQuery", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "DoPrepare", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "GetAll", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "GetArray", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "GetCount", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "GetOne", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "GetScan", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "GetStruct", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "GetStructs", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "GetValue", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "Prepare", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "DB", True, "Raw", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "DoCommit", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "DoExec", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "DoGetAll", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "DoQuery", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "DoPrepare", "", "", "Argument[2]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "GetAll", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "GetArray", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "GetCount", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "GetOne", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "GetScan", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "GetStruct", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "GetStructs", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "GetValue", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "Prepare", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/gogf/gf/database/gdb", "Tx", True, "Raw", "", "", "Argument[0]", "sql-injection", "manual"] diff --git a/go/ql/lib/ext/github.com.golang.glog.model.yml b/go/ql/lib/ext/github.com.golang.glog.model.yml deleted file mode 100644 index dd36e6a7d8f..00000000000 --- a/go/ql/lib/ext/github.com.golang.glog.model.yml +++ /dev/null @@ -1,102 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: packageGrouping - data: - - ["glog", "github.com/golang/glog"] - - ["glog", "gopkg.in/glog"] - - ["glog", "k8s.io/klog"] - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["group:glog", "", False, "Error", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "", False, "ErrorContext", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "", False, "ErrorContextDepth", "", "", "Argument[2]", "log-injection", "manual"] - - ["group:glog", "", False, "ErrorContextDepthf", "", "", "Argument[2..3]", "log-injection", "manual"] - - ["group:glog", "", False, "ErrorContextf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "", False, "ErrorDepth", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "", False, "ErrorDepthf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "", False, "Errorf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:glog", "", False, "Errorln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "", False, "Exit", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "", False, "ExitContext", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "", False, "ExitContextDepth", "", "", "Argument[2]", "log-injection", "manual"] - - ["group:glog", "", False, "ExitContextDepthf", "", "", "Argument[2..3]", "log-injection", "manual"] - - ["group:glog", "", False, "ExitContextf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "", False, "ExitDepth", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "", False, "ExitDepthf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "", False, "Exitf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:glog", "", False, "Exitln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "", False, "Fatal", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "", False, "FatalContext", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "", False, "FatalContextDepth", "", "", "Argument[2]", "log-injection", "manual"] - - ["group:glog", "", False, "FatalContextDepthf", "", "", "Argument[2..3]", "log-injection", "manual"] - - ["group:glog", "", False, "FatalContextf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "", False, "FatalDepth", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "", False, "FatalDepthf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "", False, "Fatalf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:glog", "", False, "Fatalln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "", False, "Info", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "", False, "InfoContext", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "", False, "InfoContextDepth", "", "", "Argument[2]", "log-injection", "manual"] - - ["group:glog", "", False, "InfoContextDepthf", "", "", "Argument[2..3]", "log-injection", "manual"] - - ["group:glog", "", False, "InfoContextf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "", False, "InfoDepth", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "", False, "InfoDepthf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "", False, "Infof", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:glog", "", False, "Infoln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "", False, "Warning", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "", False, "WarningContext", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "", False, "WarningContextDepth", "", "", "Argument[2]", "log-injection", "manual"] - - ["group:glog", "", False, "WarningContextDepthf", "", "", "Argument[2..3]", "log-injection", "manual"] - - ["group:glog", "", False, "WarningContextf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "", False, "WarningDepth", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "", False, "WarningDepthf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "", False, "Warningf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:glog", "", False, "Warningln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Error", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "ErrorContext", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "ErrorContextDepth", "", "", "Argument[2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "ErrorContextDepthf", "", "", "Argument[2..3]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "ErrorContextf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "ErrorDepth", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "ErrorDepthf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Errorf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Errorln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Exit", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "ExitContext", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "ExitContextDepth", "", "", "Argument[2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "ExitContextDepthf", "", "", "Argument[2..3]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "ExitContextf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "ExitDepth", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "ExitDepthf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Exitf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Exitln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Fatal", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "FatalContext", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "FatalContextDepth", "", "", "Argument[2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "FatalContextDepthf", "", "", "Argument[2..3]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "FatalContextf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "FatalDepth", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "FatalDepthf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Fatalf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Fatalln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Info", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "InfoContext", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "InfoContextDepth", "", "", "Argument[2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "InfoContextDepthf", "", "", "Argument[2..3]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "InfoContextf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "InfoDepth", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "InfoDepthf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Infof", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Infoln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Warning", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "WarningContext", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "WarningContextDepth", "", "", "Argument[2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "WarningContextDepthf", "", "", "Argument[2..3]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "WarningContextf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "WarningDepth", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "WarningDepthf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Warningf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:glog", "Verbose", False, "Warningln", "", "", "Argument[0]", "log-injection", "manual"] diff --git a/go/ql/lib/ext/github.com.jmoiron.sqlx.model.yml b/go/ql/lib/ext/github.com.jmoiron.sqlx.model.yml deleted file mode 100644 index 8c9d19b4b85..00000000000 --- a/go/ql/lib/ext/github.com.jmoiron.sqlx.model.yml +++ /dev/null @@ -1,17 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["github.com/jmoiron/sqlx", "DB", True, "Get", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/jmoiron/sqlx", "DB", True, "MustExec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/jmoiron/sqlx", "DB", True, "NamedExec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/jmoiron/sqlx", "DB", True, "NamedQuery", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/jmoiron/sqlx", "DB", True, "Queryx", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/jmoiron/sqlx", "DB", True, "Select", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/jmoiron/sqlx", "Tx", True, "Get", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/jmoiron/sqlx", "Tx", True, "MustExec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/jmoiron/sqlx", "Tx", True, "NamedExec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/jmoiron/sqlx", "Tx", True, "NamedQuery", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/jmoiron/sqlx", "Tx", True, "Queryx", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/jmoiron/sqlx", "Tx", True, "Select", "", "", "Argument[1]", "sql-injection", "manual"] diff --git a/go/ql/lib/ext/github.com.mastermind.squirrel.model.yml b/go/ql/lib/ext/github.com.mastermind.squirrel.model.yml deleted file mode 100644 index a5f46d7c214..00000000000 --- a/go/ql/lib/ext/github.com.mastermind.squirrel.model.yml +++ /dev/null @@ -1,51 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: packageGrouping - data: - - ["squirrel", "github.com/Masterminds/squirrel"] - - ["squirrel", "gopkg.in/Masterminds/squirrel"] - - ["squirrel", "github.com/lann/squirrel"] - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["group:squirrel", "", True, "Delete", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "", True, "Expr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "", True, "Insert", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "", True, "Select", "", "", "Argument[0]", "sql-injection", "manual"] # TODO: when sources can have access paths, use .ArrayElement - - ["group:squirrel", "", True, "Update", "", "", "Argument[0]", "sql-injection", "manual"] # TODO: when sources can have access paths, use .ArrayElement - - - ["group:squirrel", "DeleteBuilder", True, "From", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "DeleteBuilder", True, "OrderBy", "", "", "Argument[0]", "sql-injection", "manual"] # TODO: when sources can have access paths, use .ArrayElement - - ["group:squirrel", "DeleteBuilder", True, "Prefix", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "DeleteBuilder", True, "Suffix", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "DeleteBuilder", True, "Where", "", "", "Argument[0]", "sql-injection", "manual"] - - - ["group:squirrel", "InsertBuilder", True, "Columns", "", "", "Argument[0]", "sql-injection", "manual"] # TODO: when sources can have access paths, use .ArrayElement - - ["group:squirrel", "InsertBuilder", True, "Into", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "InsertBuilder", True, "Options", "", "", "Argument[0]", "sql-injection", "manual"] # TODO: when sources can have access paths, use .ArrayElement - - ["group:squirrel", "InsertBuilder", True, "Prefix", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "InsertBuilder", True, "Suffix", "", "", "Argument[0]", "sql-injection", "manual"] - - - ["group:squirrel", "SelectBuilder", True, "CrossJoin", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "SelectBuilder", True, "Column", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "SelectBuilder", True, "Columns", "", "", "Argument[0]", "sql-injection", "manual"] # TODO: when sources can have access paths, use .ArrayElement - - ["group:squirrel", "SelectBuilder", True, "From", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "SelectBuilder", True, "GroupBy", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "SelectBuilder", True, "InnerJoin", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "SelectBuilder", True, "LeftJoin", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "SelectBuilder", True, "Options", "", "", "Argument[0]", "sql-injection", "manual"] # TODO: when sources can have access paths, use .ArrayElement - - ["group:squirrel", "SelectBuilder", True, "OrderBy", "", "", "Argument[0]", "sql-injection", "manual"] # TODO: when sources can have access paths, use .ArrayElement - - ["group:squirrel", "SelectBuilder", True, "Prefix", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "SelectBuilder", True, "RightJoin", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "SelectBuilder", True, "Suffix", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "SelectBuilder", True, "Where", "", "", "Argument[0]", "sql-injection", "manual"] - - - ["group:squirrel", "UpdateBuilder", True, "From", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "UpdateBuilder", True, "OrderBy", "", "", "Argument[0]", "sql-injection", "manual"] # TODO: when sources can have access paths, use .ArrayElement - - ["group:squirrel", "UpdateBuilder", True, "Prefix", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "UpdateBuilder", True, "Set", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "UpdateBuilder", True, "Suffix", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "UpdateBuilder", True, "Table", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:squirrel", "UpdateBuilder", True, "Where", "", "", "Argument[0]", "sql-injection", "manual"] diff --git a/go/ql/lib/ext/github.com.rqlite.gorqlite.model.yml b/go/ql/lib/ext/github.com.rqlite.gorqlite.model.yml deleted file mode 100644 index 62e24f2c920..00000000000 --- a/go/ql/lib/ext/github.com.rqlite.gorqlite.model.yml +++ /dev/null @@ -1,35 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: packageGrouping - data: - - ["gorqlite", "github.com/rqlite/gorqlite"] - - ["gorqlite", "github.com/raindog308/gorqlite"] - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["group:gorqlite", "Connection", True, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueryContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueryOne", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueryOneContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueryOneParameterized", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueryOneParameterizedContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueryParameterized", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueryParameterizedContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "Queue", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueueContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueueOne", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueueOneContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueueOneParameterized", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueueOneParameterizedContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueueParameterized", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "QueueParameterizedContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "Write", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "WriteContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "WriteOne", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "WriteOneContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "WriteOneParameterized", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "WriteOneParameterizedContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "WriteParameterized", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorqlite", "Connection", True, "WriteParameterizedContext", "", "", "Argument[1]", "sql-injection", "manual"] diff --git a/go/ql/lib/ext/github.com.sirupsen.logrus.model.yml b/go/ql/lib/ext/github.com.sirupsen.logrus.model.yml deleted file mode 100644 index 54f802e0241..00000000000 --- a/go/ql/lib/ext/github.com.sirupsen.logrus.model.yml +++ /dev/null @@ -1,131 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: packageGrouping - data: - - ["logrus", "github.com/sirupsen/logrus"] - - ["logrus", "github.com/Sirupsen/logrus"] - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["group:logrus", "", False, "Debug", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "DebugFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Debugf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "", False, "Debugln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Error", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "ErrorFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Errorf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "", False, "Errorln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Fatal", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "FatalFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Fatalf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "", False, "Fatalln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Info", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "InfoFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Infof", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "", False, "Infoln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Panic", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "PanicFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Panicf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "", False, "Panicln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Print", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "PrintFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Printf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "", False, "Println", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Trace", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "TraceFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Tracef", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "", False, "Traceln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Warn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "WarnFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Warnf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "", False, "Warnln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Warning", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "WarningFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "Warningf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "", False, "Warningln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "WithError", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "WithField", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "", False, "WithFields", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "", False, "WithTime", "", "", "Argument[0]", "log-injection", "manual"] - - - ["group:logrus", "Entry", False, "Debug", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Debugf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Debugln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Error", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Errorf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Errorln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Fatal", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Fatalf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Fatalln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Info", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Infof", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Infoln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Log", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Logf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Logln", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Panic", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Panicf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Panicln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Print", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Printf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Println", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Trace", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Tracef", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Traceln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Warn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Warnf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Warnln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Warning", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Warningf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "Warningln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "WithError", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "WithField", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "WithFields", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Entry", False, "WithTime", "", "", "Argument[0]", "log-injection", "manual"] - - - ["group:logrus", "Logger", False, "Debug", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "DebugFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Debugf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Debugln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Error", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "ErrorFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Errorf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Errorln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Fatal", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "FatalFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Fatalf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Fatalln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Info", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "InfoFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Infof", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Infoln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Log", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "LogFn", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Logf", "", "", "Argument[1..2]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Logln", "", "", "Argument[1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Panic", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "PanicFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Panicf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Panicln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Print", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "PrintFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Printf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Println", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Trace", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "TraceFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Tracef", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Traceln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Warn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "WarnFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Warnf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Warnln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Warning", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "WarningFn", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Warningf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "Warningln", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "WithError", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "WithField", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "WithFields", "", "", "Argument[0]", "log-injection", "manual"] - - ["group:logrus", "Logger", False, "WithTime", "", "", "Argument[0]", "log-injection", "manual"] diff --git a/go/ql/lib/ext/github.com.uptrace.bun.model.yml b/go/ql/lib/ext/github.com.uptrace.bun.model.yml deleted file mode 100644 index eb060b4f9cc..00000000000 --- a/go/ql/lib/ext/github.com.uptrace.bun.model.yml +++ /dev/null @@ -1,68 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["github.com/uptrace/bun", "", True, "NewRawQuery", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "AddColumnQuery", True, "ColumnExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "AddColumnQuery", True, "ModelTableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "AddColumnQuery", True, "TableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "Conn", True, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "Conn", True, "ExecContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "Conn", True, "NewRaw", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "Conn", True, "Prepare", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "Conn", True, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "Conn", True, "QueryRow", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "Conn", True, "PrepareContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "Conn", True, "QueryContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "Conn", True, "QueryRowContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "Conn", True, "Raw", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "CreateIndexQuery", True, "ColumnExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "CreateIndexQuery", True, "ModelTableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "CreateIndexQuery", True, "TableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "CreateIndexQuery", True, "Where", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "CreateIndexQuery", True, "WhereOr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "CreateTableQuery", True, "ColumnExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "CreateTableQuery", True, "ModelTableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "CreateTableQuery", True, "TableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DB", True, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DB", True, "ExecContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DB", True, "NewRaw", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DB", True, "Prepare", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DB", True, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DB", True, "QueryRow", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DB", True, "PrepareContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DB", True, "QueryContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DB", True, "QueryRowContext", "", "", "Argument[1]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DB", True, "Raw", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DeleteQuery", True, "TableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DeleteQuery", True, "Where", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DeleteQuery", True, "WhereOr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DropColumnQuery", True, "ColumnExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DropColumnQuery", True, "ModelTableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DropColumnQuery", True, "TableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DropTableQuery", True, "ModelTableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "DropTableQuery", True, "TableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "InsertQuery", True, "ColumnExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "InsertQuery", True, "ModelTableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "InsertQuery", True, "TableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "InsertQuery", True, "Where", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "InsertQuery", True, "WhereOr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "MergeQuery", True, "ModelTableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "MergeQuery", True, "TableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "RawQuery", True, "NewRaw", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "SelectQuery", True, "ColumnExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "SelectQuery", True, "DistinctOn", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "SelectQuery", True, "For", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "SelectQuery", True, "GroupExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "SelectQuery", True, "Having", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "SelectQuery", True, "ModelTableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "SelectQuery", True, "OrderExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "SelectQuery", True, "TableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "SelectQuery", True, "Where", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "SelectQuery", True, "WhereOr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "TruncateTableQuery", True, "TableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "UpdateQuery", True, "ModelTableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "UpdateQuery", True, "TableExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "UpdateQuery", True, "Where", "", "", "Argument[0]", "sql-injection", "manual"] - - ["github.com/uptrace/bun", "UpdateQuery", True, "WhereOr", "", "", "Argument[0]", "sql-injection", "manual"] diff --git a/go/ql/lib/ext/go.mongodb.org.mongo-driver.mongo.model.yml b/go/ql/lib/ext/go.mongodb.org.mongo-driver.mongo.model.yml deleted file mode 100644 index 6c2d4afdeae..00000000000 --- a/go/ql/lib/ext/go.mongodb.org.mongo-driver.mongo.model.yml +++ /dev/null @@ -1,19 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "Aggregate", "", "", "Argument[1]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "CountDocuments", "", "", "Argument[1]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "DeleteMany", "", "", "Argument[1]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "DeleteOne", "", "", "Argument[1]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "Distinct", "", "", "Argument[2]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "Find", "", "", "Argument[1]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "FindOne", "", "", "Argument[1]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "FindOneAndDelete", "", "", "Argument[1]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "FindOneAndReplace", "", "", "Argument[1]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "FindOneAndUpdate", "", "", "Argument[1]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "ReplaceOne", "", "", "Argument[1]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "UpdateMany", "", "", "Argument[1]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "UpdateOne", "", "", "Argument[1]", "nosql-injection", "manual"] - - ["go.mongodb.org/mongo-driver/mongo", "Collection", True, "Watch", "", "", "Argument[1]", "nosql-injection", "manual"] diff --git a/go/ql/lib/ext/go.uber.org.zap.model.yml b/go/ql/lib/ext/go.uber.org.zap.model.yml index c4e43356f26..2ca7f7e8a80 100644 --- a/go/ql/lib/ext/go.uber.org.zap.model.yml +++ b/go/ql/lib/ext/go.uber.org.zap.model.yml @@ -1,41 +1,4 @@ extensions: - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["go.uber.org/zap", "Logger", False, "DPanic", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "Logger", False, "Debug", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "Logger", False, "Error", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "Logger", False, "Fatal", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "Logger", False, "Info", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "Logger", False, "Named", "", "", "Argument[0]", "log-injection", "manual"] - - ["go.uber.org/zap", "Logger", False, "Panic", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "Logger", False, "Warn", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "Logger", False, "With", "", "", "Argument[0]", "log-injection", "manual"] - - ["go.uber.org/zap", "Logger", False, "WithOptions", "", "", "Argument[0]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "DPanic", "", "", "Argument[0]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "DPanicf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "DPanicw", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Debug", "", "", "Argument[0]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Debugf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Debugw", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Error", "", "", "Argument[0]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Errorf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Errorw", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Fatal", "", "", "Argument[0]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Fatalf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Fatalw", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Info", "", "", "Argument[0]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Infof", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Infow", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Named", "", "", "Argument[0]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Panic", "", "", "Argument[0]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Panicf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Panicw", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Warn", "", "", "Argument[0]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Warnf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "Warnw", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["go.uber.org/zap", "SugaredLogger", False, "With", "", "", "Argument[0]", "log-injection", "manual"] - addsTo: pack: codeql/go-all extensible: summaryModel diff --git a/go/ql/lib/ext/gorm.io.gorm.model.yml b/go/ql/lib/ext/gorm.io.gorm.model.yml deleted file mode 100644 index bfcf1fa66a7..00000000000 --- a/go/ql/lib/ext/gorm.io.gorm.model.yml +++ /dev/null @@ -1,25 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: packageGrouping - data: - - ["gorm", "gorm.io/gorm"] - - ["gorm", "github.com/jinzhu/gorm"] - - ["gorm", "github.com/go-gorm/gorm"] - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["group:gorm", "DB", True, "Where", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorm", "DB", True, "Raw", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorm", "DB", True, "Order", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorm", "DB", True, "Not", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorm", "DB", True, "Or", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorm", "DB", True, "Select", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorm", "DB", True, "Table", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorm", "DB", True, "Group", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorm", "DB", True, "Having", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorm", "DB", True, "Joins", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorm", "DB", True, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorm", "DB", True, "Distinct", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:gorm", "DB", True, "Pluck", "", "", "Argument[0]", "sql-injection", "manual"] diff --git a/go/ql/lib/ext/log.model.yml b/go/ql/lib/ext/log.model.yml index 1ebce079a52..7f52a173307 100644 --- a/go/ql/lib/ext/log.model.yml +++ b/go/ql/lib/ext/log.model.yml @@ -1,28 +1,4 @@ extensions: - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["log", "", False, "Fatal", "", "", "Argument[0]", "log-injection", "manual"] - - ["log", "", False, "Fatalf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["log", "", False, "Fatalln", "", "", "Argument[0]", "log-injection", "manual"] - - ["log", "", False, "Output", "", "", "Argument[1]", "log-injection", "manual"] - - ["log", "", False, "Panic", "", "", "Argument[0]", "log-injection", "manual"] - - ["log", "", False, "Panicf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["log", "", False, "Panicln", "", "", "Argument[0]", "log-injection", "manual"] - - ["log", "", False, "Print", "", "", "Argument[0]", "log-injection", "manual"] - - ["log", "", False, "Printf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["log", "", False, "Println", "", "", "Argument[0]", "log-injection", "manual"] - - ["log", "Logger", False, "Fatal", "", "", "Argument[0]", "log-injection", "manual"] - - ["log", "Logger", False, "Fatalf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["log", "Logger", False, "Fatalln", "", "", "Argument[0]", "log-injection", "manual"] - - ["log", "Logger", False, "Output", "", "", "Argument[1]", "log-injection", "manual"] - - ["log", "Logger", False, "Panic", "", "", "Argument[0]", "log-injection", "manual"] - - ["log", "Logger", False, "Panicf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["log", "Logger", False, "Panicln", "", "", "Argument[0]", "log-injection", "manual"] - - ["log", "Logger", False, "Print", "", "", "Argument[0]", "log-injection", "manual"] - - ["log", "Logger", False, "Printf", "", "", "Argument[0..1]", "log-injection", "manual"] - - ["log", "Logger", False, "Println", "", "", "Argument[0]", "log-injection", "manual"] - addsTo: pack: codeql/go-all extensible: summaryModel diff --git a/go/ql/lib/ext/xorm.io.xorm.model.yml b/go/ql/lib/ext/xorm.io.xorm.model.yml deleted file mode 100644 index fd73b7c9a66..00000000000 --- a/go/ql/lib/ext/xorm.io.xorm.model.yml +++ /dev/null @@ -1,53 +0,0 @@ -extensions: - - addsTo: - pack: codeql/go-all - extensible: packageGrouping - data: - - ["xorm", "xorm.io/xorm"] - - ["xorm", "github.com/go-xorm/xorm"] - - addsTo: - pack: codeql/go-all - extensible: sinkModel - data: - - ["group:xorm", "Engine", True, "Alias", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "And", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "GroupBy", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "Having", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "In", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "Join", "", "", "Argument[0..2]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "NotIn", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "Or", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "OrderBy", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "QueryString", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "QueryInterface", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "Select", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "SetExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "SQL", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "Sum", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "Sums", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "SumInt", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "SumsInt", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:xorm", "Engine", True, "Where", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "Alias", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "And", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "Exec", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "GroupBy", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "Having", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "In", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "Join", "", "", "Argument[0..2]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "NotIn", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "Or", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "OrderBy", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "Query", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "QueryString", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "QueryInterface", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "Select", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "SetExpr", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "SQL", "", "", "Argument[0]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "Sum", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "Sums", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "SumInt", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "SumsInt", "", "", "Argument[1]", "sql-injection", "manual"] - - ["group:xorm", "Session", True, "Where", "", "", "Argument[0]", "sql-injection", "manual"] diff --git a/go/ql/lib/qlpack.yml b/go/ql/lib/qlpack.yml index 5d56d0ecc73..b81046b49cd 100644 --- a/go/ql/lib/qlpack.yml +++ b/go/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-all -version: 1.1.5-dev +version: 1.1.6-dev groups: go dbscheme: go.dbscheme extractor: go diff --git a/go/ql/lib/semmle/go/Concepts.qll b/go/ql/lib/semmle/go/Concepts.qll index 8fd38a56e1c..c15d3683b40 100644 --- a/go/ql/lib/semmle/go/Concepts.qll +++ b/go/ql/lib/semmle/go/Concepts.qll @@ -373,19 +373,6 @@ module LoggerCall { } } -private class DefaultLoggerCall extends LoggerCall::Range, DataFlow::CallNode { - DataFlow::ArgumentNode messageArgument; - - DefaultLoggerCall() { - sinkNode(messageArgument, "log-injection") and - this = messageArgument.getCall() - } - - override DataFlow::Node getAMessageComponent() { - result = messageArgument.getACorrespondingSyntacticArgument() - } -} - /** * A function that encodes data into a binary or textual format. * diff --git a/go/ql/lib/semmle/go/Scopes.qll b/go/ql/lib/semmle/go/Scopes.qll index 04cb65fa987..7386b81868f 100644 --- a/go/ql/lib/semmle/go/Scopes.qll +++ b/go/ql/lib/semmle/go/Scopes.qll @@ -197,8 +197,11 @@ class PackageEntity extends Entity, @pkgobject { } /** A built-in or declared named type. */ class TypeEntity extends Entity, @typeobject { } +/** The parent of a type parameter type, either a declared type or a declared function. */ +class TypeParamParentEntity extends Entity, @typeparamparentobject { } + /** A declared named type. */ -class DeclaredType extends TypeEntity, DeclaredEntity, @decltypeobject { +class DeclaredType extends TypeEntity, DeclaredEntity, TypeParamParentEntity, @decltypeobject { /** Gets the declaration specifier declaring this type. */ TypeSpec getSpec() { result.getNameExpr() = this.getDeclaration() } } @@ -598,7 +601,7 @@ class PromotedMethod extends Method { } /** A declared function. */ -class DeclaredFunction extends Function, DeclaredEntity, @declfunctionobject { +class DeclaredFunction extends Function, DeclaredEntity, TypeParamParentEntity, @declfunctionobject { override FuncDecl getFuncDecl() { result.getNameExpr() = this.getDeclaration() } override predicate mayHaveSideEffects() { diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 026b009aa3f..645f0e3fe67 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -381,6 +381,12 @@ class TypeParamType extends @typeparamtype, CompositeType { override InterfaceType getUnderlyingType() { result = this.getConstraint().getUnderlyingType() } + /** Gets the parent object of this type parameter type. */ + TypeParamParentEntity getParent() { typeparam(this, _, _, result, _) } + + /** Gets the index of this type parameter type. */ + int getIndex() { typeparam(this, _, _, _, result) } + override string pp() { result = this.getParamName() } /** diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll index 3b1439511d1..359fa71744b 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl1.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll b/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll index 3b1439511d1..359fa71744b 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/DataFlowImpl2.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/go/ql/lib/semmle/go/frameworks/Beego.qll b/go/ql/lib/semmle/go/frameworks/Beego.qll index a9e296a1f97..9f6ee598003 100644 --- a/go/ql/lib/semmle/go/frameworks/Beego.qll +++ b/go/ql/lib/semmle/go/frameworks/Beego.qll @@ -33,6 +33,13 @@ module Beego { result = package(v2modulePath(), "server/web/context") } + /** Gets the path for the logs package of beego. */ + string logsPackagePath() { + result = package(v1modulePath(), "logs") + or + result = package(v2modulePath(), "core/logs") + } + /** Gets the path for the utils package of beego. */ string utilsPackagePath() { result = package(v1modulePath(), "utils") @@ -165,6 +172,36 @@ module Beego { override string getAContentType() { none() } } + private string getALogFunctionName() { + result = + [ + "Alert", "Critical", "Debug", "Emergency", "Error", "Info", "Informational", "Notice", + "Trace", "Warn", "Warning" + ] + } + + private class ToplevelBeegoLoggers extends LoggerCall::Range, DataFlow::CallNode { + ToplevelBeegoLoggers() { + this.getTarget().hasQualifiedName([packagePath(), logsPackagePath()], getALogFunctionName()) + } + + override DataFlow::Node getAMessageComponent() { result = this.getASyntacticArgument() } + } + + private class BeegoLoggerMethods extends LoggerCall::Range, DataFlow::MethodCallNode { + BeegoLoggerMethods() { + this.getTarget().hasQualifiedName(logsPackagePath(), "BeeLogger", getALogFunctionName()) + } + + override DataFlow::Node getAMessageComponent() { result = this.getASyntacticArgument() } + } + + private class UtilLoggers extends LoggerCall::Range, DataFlow::CallNode { + UtilLoggers() { this.getTarget().hasQualifiedName(utilsPackagePath(), "Display") } + + override DataFlow::Node getAMessageComponent() { result = this.getASyntacticArgument() } + } + private class HtmlQuoteSanitizer extends SharedXss::Sanitizer { HtmlQuoteSanitizer() { exists(DataFlow::CallNode c | c.getTarget().hasQualifiedName(packagePath(), "Htmlquote") | diff --git a/go/ql/lib/semmle/go/frameworks/BeegoOrm.qll b/go/ql/lib/semmle/go/frameworks/BeegoOrm.qll index 925b0f19fa3..c1de0cf4244 100644 --- a/go/ql/lib/semmle/go/frameworks/BeegoOrm.qll +++ b/go/ql/lib/semmle/go/frameworks/BeegoOrm.qll @@ -14,6 +14,57 @@ module BeegoOrm { /** Gets the package name `github.com/astaxie/beego/orm`. */ string packagePath() { result = package("github.com/astaxie/beego", "orm") } + private class DbSink extends SQL::QueryString::Range { + DbSink() { + exists(Method m, string methodName, int argNum | + m.hasQualifiedName(packagePath(), "DB", methodName) and + ( + methodName = ["Exec", "Prepare", "Query", "QueryRow"] and + argNum = 0 + or + methodName = ["ExecContext", "PrepareContext", "QueryContext", "QueryRowContext"] and + argNum = 1 + ) + | + this = m.getACall().getArgument(argNum) + ) + } + } + + private class QueryBuilderSink extends SQL::QueryString::Range { + // Note this class doesn't do any escaping, unlike the true ORM part of the package + QueryBuilderSink() { + exists(Method impl | impl.implements(packagePath(), "QueryBuilder", _) | + this = impl.getACall().getASyntacticArgument() + ) and + this.getType().getUnderlyingType() instanceof StringType + } + } + + private class OrmerRawSink extends SQL::QueryString::Range { + OrmerRawSink() { + exists(Method impl | impl.implements(packagePath(), "Ormer", "Raw") | + this = impl.getACall().getArgument(0) + ) + } + } + + private class QuerySeterFilterRawSink extends SQL::QueryString::Range { + QuerySeterFilterRawSink() { + exists(Method impl | impl.implements(packagePath(), "QuerySeter", "FilterRaw") | + this = impl.getACall().getArgument(1) + ) + } + } + + private class ConditionRawSink extends SQL::QueryString::Range { + ConditionRawSink() { + exists(Method impl | impl.implements(packagePath(), "Condition", "Raw") | + this = impl.getACall().getArgument(1) + ) + } + } + private class OrmerSource extends StoredXss::Source { OrmerSource() { exists(Method impl | diff --git a/go/ql/lib/semmle/go/frameworks/Couchbase.qll b/go/ql/lib/semmle/go/frameworks/Couchbase.qll index b5bfbcb22a2..5eaa4d20c3a 100644 --- a/go/ql/lib/semmle/go/frameworks/Couchbase.qll +++ b/go/ql/lib/semmle/go/frameworks/Couchbase.qll @@ -5,23 +5,57 @@ import go /** - * DEPRECATED - * * Provides models of commonly used functions in the official Couchbase Go SDK library. */ -deprecated module Couchbase { +module Couchbase { /** - * DEPRECATED - * * Gets a package path for the official Couchbase Go SDK library. * * Note that v1 and v2 have different APIs, but the names are disjoint so there is no need to * distinguish between them. */ - deprecated string packagePath() { + string packagePath() { result = package([ "gopkg.in/couchbase/gocb", "github.com/couchbase/gocb", "github.com/couchbaselabs/gocb" ], "") } + + /** + * A query used in an API function acting on a `Bucket` or `Cluster` struct of v1 of + * the official Couchbase Go library, gocb. + */ + private class CouchbaseV1Query extends NoSql::Query::Range { + CouchbaseV1Query() { + // func (b *Bucket) ExecuteAnalyticsQuery(q *AnalyticsQuery, params interface{}) (AnalyticsResults, error) + // func (b *Bucket) ExecuteN1qlQuery(q *N1qlQuery, params interface{}) (QueryResults, error) + // func (c *Cluster) ExecuteAnalyticsQuery(q *AnalyticsQuery, params interface{}) (AnalyticsResults, error) + // func (c *Cluster) ExecuteN1qlQuery(q *N1qlQuery, params interface{}) (QueryResults, error) + exists(Method meth, string structName, string methodName | + structName in ["Bucket", "Cluster"] and + methodName in ["ExecuteN1qlQuery", "ExecuteAnalyticsQuery"] and + meth.hasQualifiedName(packagePath(), structName, methodName) and + this = meth.getACall().getArgument(0) + ) + } + } + + /** + * A query used in an API function acting on a `Bucket` or `Cluster` struct of v1 of + * the official Couchbase Go library, gocb. + */ + private class CouchbaseV2Query extends NoSql::Query::Range { + CouchbaseV2Query() { + // func (c *Cluster) AnalyticsQuery(statement string, opts *AnalyticsOptions) (*AnalyticsResult, error) + // func (c *Cluster) Query(statement string, opts *QueryOptions) (*QueryResult, error) + // func (s *Scope) AnalyticsQuery(statement string, opts *AnalyticsOptions) (*AnalyticsResult, error) + // func (s *Scope) Query(statement string, opts *QueryOptions) (*QueryResult, error) + exists(Method meth, string structName, string methodName | + structName in ["Cluster", "Scope"] and + methodName in ["AnalyticsQuery", "Query"] and + meth.hasQualifiedName(packagePath(), structName, methodName) and + this = meth.getACall().getArgument(0) + ) + } + } } diff --git a/go/ql/lib/semmle/go/frameworks/ElazarlGoproxy.qll b/go/ql/lib/semmle/go/frameworks/ElazarlGoproxy.qll index b1bf4571216..4d10c8af312 100644 --- a/go/ql/lib/semmle/go/frameworks/ElazarlGoproxy.qll +++ b/go/ql/lib/semmle/go/frameworks/ElazarlGoproxy.qll @@ -100,4 +100,10 @@ module ElazarlGoproxy { override int getFormatStringIndex() { result = 0 } } + + private class ProxyLog extends LoggerCall::Range, DataFlow::MethodCallNode { + ProxyLog() { this.getTarget() instanceof ProxyLogFunction } + + override DataFlow::Node getAMessageComponent() { result = this.getASyntacticArgument() } + } } diff --git a/go/ql/lib/semmle/go/frameworks/Glog.qll b/go/ql/lib/semmle/go/frameworks/Glog.qll index 146b8a4f814..f9f5c9e3f11 100644 --- a/go/ql/lib/semmle/go/frameworks/Glog.qll +++ b/go/ql/lib/semmle/go/frameworks/Glog.qll @@ -40,4 +40,14 @@ module Glog { override int getFormatStringIndex() { result = super.getFirstPrintedArg() } } + + private class GlogCall extends LoggerCall::Range, DataFlow::CallNode { + GlogFunction callee; + + GlogCall() { this = callee.getACall() } + + override DataFlow::Node getAMessageComponent() { + result = this.getSyntacticArgument(any(int i | i >= callee.getFirstPrintedArg())) + } + } } diff --git a/go/ql/lib/semmle/go/frameworks/Logrus.qll b/go/ql/lib/semmle/go/frameworks/Logrus.qll index 83278a4cd9e..f7de9a75dae 100644 --- a/go/ql/lib/semmle/go/frameworks/Logrus.qll +++ b/go/ql/lib/semmle/go/frameworks/Logrus.qll @@ -28,6 +28,12 @@ module Logrus { } } + private class LogCall extends LoggerCall::Range, DataFlow::CallNode { + LogCall() { this = any(LogFunction f).getACall() } + + override DataFlow::Node getAMessageComponent() { result = this.getASyntacticArgument() } + } + private class StringFormatters extends StringOps::Formatting::Range instanceof LogFunction { int argOffset; diff --git a/go/ql/lib/semmle/go/frameworks/NoSQL.qll b/go/ql/lib/semmle/go/frameworks/NoSQL.qll index 36932149628..c2469fc02ac 100644 --- a/go/ql/lib/semmle/go/frameworks/NoSQL.qll +++ b/go/ql/lib/semmle/go/frameworks/NoSQL.qll @@ -31,6 +31,84 @@ module NoSql { ) } } + + /** + * Holds if method `name` of struct `Collection` from package + * [go.mongodb.org/mongo-driver/mongo](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo) + * interprets parameter `n` as a query. + */ + private predicate mongoDbCollectionMethod(string name, int n) { + // func (coll *Collection) CountDocuments(ctx context.Context, filter interface{}, + // opts ...*options.CountOptions) (int64, error) + name = "CountDocuments" and n = 1 + or + // func (coll *Collection) DeleteMany(ctx context.Context, filter interface{}, + // opts ...*options.DeleteOptions) (*DeleteResult, error) + name = "DeleteMany" and n = 1 + or + // func (coll *Collection) DeleteOne(ctx context.Context, filter interface{}, + // opts ...*options.DeleteOptions) (*DeleteResult, error) + name = "DeleteOne" and n = 1 + or + // func (coll *Collection) Distinct(ctx context.Context, fieldName string, filter interface{}, + // ...) ([]interface{}, error) + name = "Distinct" and n = 2 + or + // func (coll *Collection) Find(ctx context.Context, filter interface{}, + // opts ...*options.FindOptions) (*Cursor, error) + name = "Find" and n = 1 + or + // func (coll *Collection) FindOne(ctx context.Context, filter interface{}, + // opts ...*options.FindOneOptions) *SingleResult + name = "FindOne" and n = 1 + or + // func (coll *Collection) FindOneAndDelete(ctx context.Context, filter interface{}, ...) + // *SingleResult + name = "FindOneAndDelete" and n = 1 + or + // func (coll *Collection) FindOneAndReplace(ctx context.Context, filter interface{}, + // replacement interface{}, ...) *SingleResult + name = "FindOneAndReplace" and n = 1 + or + // func (coll *Collection) FindOneAndUpdate(ctx context.Context, filter interface{}, + // update interface{}, ...) *SingleResult + name = "FindOneAndUpdate" and n = 1 + or + // func (coll *Collection) ReplaceOne(ctx context.Context, filter interface{}, + // replacement interface{}, ...) (*UpdateResult, error) + name = "ReplaceOne" and n = 1 + or + // func (coll *Collection) UpdateMany(ctx context.Context, filter interface{}, + // update interface{}, ...) (*UpdateResult, error) + name = "UpdateMany" and n = 1 + or + // func (coll *Collection) UpdateOne(ctx context.Context, filter interface{}, + // update interface{}, ...) (*UpdateResult, error) + name = "UpdateOne" and n = 1 + or + // func (coll *Collection) Watch(ctx context.Context, pipeline interface{}, ...) + // (*ChangeStream, error) + name = "Watch" and n = 1 + or + // func (coll *Collection) Aggregate(ctx context.Context, pipeline interface{}, + // opts ...*options.AggregateOptions) (*Cursor, error) + name = "Aggregate" and n = 1 + } + + /** + * A query used in an API function acting on a `Collection` struct of package + * [go.mongodb.org/mongo-driver/mongo](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo). + */ + private class MongoDbCollectionQuery extends Range { + MongoDbCollectionQuery() { + exists(Method meth, string methodName, int n | + mongoDbCollectionMethod(methodName, n) and + meth.hasQualifiedName(package("go.mongodb.org/mongo-driver", "mongo"), "Collection", + methodName) and + this = meth.getACall().getArgument(n) + ) + } + } } /** diff --git a/go/ql/lib/semmle/go/frameworks/SQL.qll b/go/ql/lib/semmle/go/frameworks/SQL.qll index b97df15a37d..1a6e2280781 100644 --- a/go/ql/lib/semmle/go/frameworks/SQL.qll +++ b/go/ql/lib/semmle/go/frameworks/SQL.qll @@ -67,10 +67,42 @@ module SQL { */ abstract class Range extends DataFlow::Node { } - private class DefaultQueryString extends Range { - DefaultQueryString() { - exists(DataFlow::ArgumentNode arg | sinkNode(arg, "sql-injection") | - this = arg.getACorrespondingSyntacticArgument() + /** + * An argument to an API of the squirrel library that is directly interpreted as SQL without + * taking syntactic structure into account. + */ + private class SquirrelQueryString extends Range { + SquirrelQueryString() { + exists(Function fn | + exists(string sq | + sq = + package([ + "github.com/Masterminds/squirrel", "gopkg.in/Masterminds/squirrel", + "github.com/lann/squirrel" + ], "") + | + fn.hasQualifiedName(sq, ["Delete", "Expr", "Insert", "Select", "Update"]) + or + exists(Method m, string builder | m = fn | + builder = ["DeleteBuilder", "InsertBuilder", "SelectBuilder", "UpdateBuilder"] and + m.hasQualifiedName(sq, builder, + ["Columns", "From", "Options", "OrderBy", "Prefix", "Suffix", "Where"]) + or + builder = "InsertBuilder" and + m.hasQualifiedName(sq, builder, ["Replace", "Into"]) + or + builder = "SelectBuilder" and + m.hasQualifiedName(sq, builder, + ["CrossJoin", "GroupBy", "InnerJoin", "LeftJoin", "RightJoin"]) + or + builder = "UpdateBuilder" and + m.hasQualifiedName(sq, builder, ["Set", "Table"]) + ) + ) and + this = fn.getACall().getArgument(0) + | + this.getType().getUnderlyingType() instanceof StringType or + this.getType().getUnderlyingType().(SliceType).getElementType() instanceof StringType ) } } @@ -81,6 +113,14 @@ module SQL { /** A string that might identify package `go-pg/pg/orm` or a specific version of it. */ private string gopgorm() { result = package("github.com/go-pg/pg", "orm") } + /** A string that might identify package `github.com/rqlite/gorqlite` or `github.com/raindog308/gorqlite` or a specific version of it. */ + private string gorqlite() { + result = package(["github.com/rqlite/gorqlite", "github.com/raindog308/gorqlite"], "") + } + + /** A string that might identify package `github.com/gogf/gf/database/gdb` or a specific version of it. */ + private string gogf() { result = package("github.com/gogf/gf", "database/gdb") } + /** * A string argument to an API of `go-pg/pg` that is directly interpreted as SQL without * taking syntactic structure into account. @@ -145,6 +185,94 @@ module SQL { ) } } + + /** + * A string argument to an API of `github.com/rqlite/gorqlite`, or a specific version of it, that is directly interpreted as SQL without + * taking syntactic structure into account. + */ + private class GorqliteQueryString extends Range { + GorqliteQueryString() { + // func (conn *Connection) Query(sqlStatements []string) (results []QueryResult, err error) + // func (conn *Connection) QueryOne(sqlStatement string) (qr QueryResult, err error) + // func (conn *Connection) Queue(sqlStatements []string) (seq int64, err error) + // func (conn *Connection) QueueOne(sqlStatement string) (seq int64, err error) + // func (conn *Connection) Write(sqlStatements []string) (results []WriteResult, err error) + // func (conn *Connection) WriteOne(sqlStatement string) (wr WriteResult, err error) + exists(Method m, string name | m.hasQualifiedName(gorqlite(), "Connection", name) | + name = ["Query", "QueryOne", "Queue", "QueueOne", "Write", "WriteOne"] and + this = m.getACall().getArgument(0) + ) + } + } + + /** + * A string argument to an API of `github.com/gogf/gf/database/gdb`, or a specific version of it, that is directly interpreted as SQL without + * taking syntactic structure into account. + */ + private class GogfQueryString extends Range { + GogfQueryString() { + exists(Method m, string name | m.implements(gogf(), ["DB", "Core", "TX"], name) | + // func (c *Core) Exec(sql string, args ...interface{}) (result sql.Result, err error) + // func (c *Core) GetAll(sql string, args ...interface{}) (Result, error) + // func (c *Core) GetArray(sql string, args ...interface{}) ([]Value, error) + // func (c *Core) GetCount(sql string, args ...interface{}) (int, error) + // func (c *Core) GetOne(sql string, args ...interface{}) (Record, error) + // func (c *Core) GetValue(sql string, args ...interface{}) (Value, error) + // func (c *Core) Prepare(sql string, execOnMaster ...bool) (*Stmt, error) + // func (c *Core) Query(sql string, args ...interface{}) (rows *sql.Rows, err error) + // func (c *Core) Raw(rawSql string, args ...interface{}) *Model + name = + [ + "Query", "Exec", "Prepare", "GetAll", "GetOne", "GetValue", "GetArray", "GetCount", + "Raw" + ] and + this = m.getACall().getArgument(0) + or + // func (c *Core) GetScan(pointer interface{}, sql string, args ...interface{}) error + // func (c *Core) GetStruct(pointer interface{}, sql string, args ...interface{}) error + // func (c *Core) GetStructs(pointer interface{}, sql string, args ...interface{}) error + name = ["GetScan", "GetStruct", "GetStructs"] and + this = m.getACall().getArgument(1) + or + // func (c *Core) DoCommit(ctx context.Context, link Link, sql string, args []interface{}) (newSql string, newArgs []interface{}, err error) + // func (c *Core) DoExec(ctx context.Context, link Link, sql string, args ...interface{}) (result sql.Result, err error) + // func (c *Core) DoGetAll(ctx context.Context, link Link, sql string, args ...interface{}) (result Result, err error) + // func (c *Core) DoPrepare(ctx context.Context, link Link, sql string) (*Stmt, error) + // func (c *Core) DoQuery(ctx context.Context, link Link, sql string, args ...interface{}) (rows *sql.Rows, err error) + name = ["DoGetAll", "DoQuery", "DoExec", "DoCommit", "DoPrepare"] and + this = m.getACall().getArgument(2) + ) + } + } + } + + /** A model for sinks of GORM. */ + private class GormSink extends SQL::QueryString::Range { + GormSink() { + exists(Method meth, string package, string name | + meth.hasQualifiedName(package, "DB", name) and + this = meth.getACall().getSyntacticArgument(0) and + package = Gorm::packagePath() and + name in [ + "Where", "Raw", "Order", "Not", "Or", "Select", "Table", "Group", "Having", "Joins", + "Exec", "Distinct", "Pluck" + ] + ) + } + } + + /** A model for sinks of github.com/jmoiron/sqlx. */ + private class SqlxSink extends SQL::QueryString::Range { + SqlxSink() { + exists(Method meth, string name, int n | + meth.hasQualifiedName(package("github.com/jmoiron/sqlx", ""), ["DB", "Tx"], name) and + this = meth.getACall().getArgument(n) + | + name = ["Select", "Get"] and n = 1 + or + name = ["MustExec", "Queryx", "NamedExec", "NamedQuery"] and n = 0 + ) + } } } @@ -164,11 +292,70 @@ module Gorm { module Xorm { /** Gets the package name for Xorm. */ string packagePath() { result = package(["xorm.io/xorm", "github.com/go-xorm/xorm"], "") } + + /** A model for sinks of XORM. */ + private class XormSink extends SQL::QueryString::Range { + XormSink() { + exists(Method meth, string type, string name, int n | + meth.hasQualifiedName(Xorm::packagePath(), type, name) and + this = meth.getACall().getSyntacticArgument(n) and + type = ["Engine", "Session"] + | + name = + [ + "Query", "Exec", "QueryString", "QueryInterface", "SQL", "Where", "And", "Or", "Alias", + "NotIn", "In", "Select", "SetExpr", "OrderBy", "Having", "GroupBy" + ] and + n = 0 + or + name = ["SumInt", "Sum", "Sums", "SumsInt"] and n = 1 + or + name = "Join" and n = [0, 1, 2] + ) + } + } } /** - * DEPRECATED - * * Provides classes for working with the [Bun](https://bun.uptrace.dev/) package. */ -deprecated module Bun { } +module Bun { + /** Gets the package name for Bun package. */ + private string packagePath() { result = package("github.com/uptrace/bun", "") } + + /** A model for sinks of Bun. */ + private class BunSink extends SQL::QueryString::Range { + BunSink() { + exists(Function f, string m, int arg | this = f.getACall().getArgument(arg) | + f.hasQualifiedName(packagePath(), m) and + m = "NewRawQuery" and + arg = 1 + ) + or + exists(Method f, string tp, string m, int arg | this = f.getACall().getArgument(arg) | + f.hasQualifiedName(packagePath(), tp, m) and + ( + tp = ["DB", "Conn"] and + m = ["ExecContext", "PrepareContext", "QueryContext", "QueryRowContext"] and + arg = 1 + or + tp = ["DB", "Conn"] and + m = ["Exec", "NewRaw", "Prepare", "Query", "QueryRow", "Raw"] and + arg = 0 + or + tp.matches("%Query") and + m = + [ + "ColumnExpr", "DistinctOn", "For", "GroupExpr", "Having", "ModelTableExpr", + "OrderExpr", "TableExpr", "Where", "WhereOr" + ] and + arg = 0 + or + tp = "RawQuery" and + m = "NewRaw" and + arg = 0 + ) + ) + } + } +} diff --git a/go/ql/lib/semmle/go/frameworks/Spew.qll b/go/ql/lib/semmle/go/frameworks/Spew.qll index f49a4aa4d89..b12bd0fed81 100644 --- a/go/ql/lib/semmle/go/frameworks/Spew.qll +++ b/go/ql/lib/semmle/go/frameworks/Spew.qll @@ -33,6 +33,16 @@ module Spew { override int getFormatStringIndex() { result = super.getFirstPrintedArg() } } + private class SpewCall extends LoggerCall::Range, DataFlow::CallNode { + SpewFunction target; + + SpewCall() { this = target.getACall() } + + override DataFlow::Node getAMessageComponent() { + result = this.getSyntacticArgument(any(int i | i >= target.getFirstPrintedArg())) + } + } + // These are expressed using TaintTracking::FunctionModel because varargs functions don't work with Models-as-Data sumamries yet. /** The `Sprint` function or one of its variants. */ class Sprinter extends TaintTracking::FunctionModel { diff --git a/go/ql/lib/semmle/go/frameworks/Zap.qll b/go/ql/lib/semmle/go/frameworks/Zap.qll index 0928d2b0595..359f9aba410 100644 --- a/go/ql/lib/semmle/go/frameworks/Zap.qll +++ b/go/ql/lib/semmle/go/frameworks/Zap.qll @@ -34,6 +34,18 @@ module Zap { override int getFormatStringIndex() { result = 0 } } + /** + * A call to a logger function in Zap. + * + * Functions which add data to be included the next time a direct logging + * function is called are included. + */ + private class ZapCall extends LoggerCall::Range, DataFlow::MethodCallNode { + ZapCall() { this = any(ZapFunction f).getACall() } + + override DataFlow::Node getAMessageComponent() { result = this.getASyntacticArgument() } + } + // These are expressed using TaintTracking::FunctionModel because varargs functions don't work with Models-as-Data sumamries yet. /** The function `Fields` that creates an `Option` that can be added to the logger out of `Field`s. */ class FieldsFunction extends TaintTracking::FunctionModel { diff --git a/go/ql/lib/semmle/go/frameworks/stdlib/DatabaseSql.qll b/go/ql/lib/semmle/go/frameworks/stdlib/DatabaseSql.qll index f4132688796..845225af5bd 100644 --- a/go/ql/lib/semmle/go/frameworks/stdlib/DatabaseSql.qll +++ b/go/ql/lib/semmle/go/frameworks/stdlib/DatabaseSql.qll @@ -26,7 +26,7 @@ module DatabaseSql { override DataFlow::Node getAResult() { result = this.getResult(0) } override SQL::QueryString getAQueryString() { - result = this.getASyntacticArgument() + result = this.getAnArgument() or // attempt to resolve a `QueryString` for `Stmt`s using local data flow. t = "Stmt" and @@ -34,6 +34,24 @@ module DatabaseSql { } } + /** A query string used in an API function of the `database/sql` package. */ + private class QueryString extends SQL::QueryString::Range { + QueryString() { + exists(Method meth, string base, string t, string m, int n | + t = ["DB", "Tx", "Conn"] and + meth.hasQualifiedName("database/sql", t, m) and + this = meth.getACall().getArgument(n) + | + base = ["Exec", "Prepare", "Query", "QueryRow"] and + ( + m = base and n = 0 + or + m = base + "Context" and n = 1 + ) + ) + } + } + /** A query in the standard `database/sql/driver` package. */ private class DriverQuery extends SQL::Query::Range, DataFlow::MethodCallNode { DriverQuery() { @@ -60,13 +78,36 @@ module DatabaseSql { override DataFlow::Node getAResult() { result = this.getResult(0) } override SQL::QueryString getAQueryString() { - result = this.getASyntacticArgument() + result = this.getAnArgument() or this.getTarget().hasQualifiedName("database/sql/driver", "Stmt") and result = this.getReceiver().getAPredecessor*().(DataFlow::MethodCallNode).getAnArgument() } } + /** A query string used in an API function of the standard `database/sql/driver` package. */ + private class DriverQueryString extends SQL::QueryString::Range { + DriverQueryString() { + exists(Method meth, int n | + ( + meth.hasQualifiedName("database/sql/driver", "Execer", "Exec") and n = 0 + or + meth.hasQualifiedName("database/sql/driver", "ExecerContext", "ExecContext") and n = 1 + or + meth.hasQualifiedName("database/sql/driver", "Conn", "Prepare") and n = 0 + or + meth.hasQualifiedName("database/sql/driver", "ConnPrepareContext", "PrepareContext") and + n = 1 + or + meth.hasQualifiedName("database/sql/driver", "Queryer", "Query") and n = 0 + or + meth.hasQualifiedName("database/sql/driver", "QueryerContext", "QueryContext") and n = 1 + ) and + this = meth.getACall().getArgument(n) + ) + } + } + // These are expressed using TaintTracking::FunctionModel because varargs functions don't work with Models-as-Data sumamries yet. private class SqlMethodModels extends TaintTracking::FunctionModel, Method { FunctionInput inp; diff --git a/go/ql/lib/semmle/go/frameworks/stdlib/Fmt.qll b/go/ql/lib/semmle/go/frameworks/stdlib/Fmt.qll index 8c4a5f27b3c..950b67483f0 100644 --- a/go/ql/lib/semmle/go/frameworks/stdlib/Fmt.qll +++ b/go/ql/lib/semmle/go/frameworks/stdlib/Fmt.qll @@ -41,6 +41,13 @@ module Fmt { Printer() { this.hasQualifiedName("fmt", ["Print", "Printf", "Println"]) } } + /** A call to `Print` or similar. */ + private class PrintCall extends LoggerCall::Range, DataFlow::CallNode { + PrintCall() { this.getTarget() instanceof Printer } + + override DataFlow::Node getAMessageComponent() { result = this.getASyntacticArgument() } + } + /** The `Fprint` function or one of its variants. */ private class Fprinter extends TaintTracking::FunctionModel { Fprinter() { diff --git a/go/ql/lib/semmle/go/frameworks/stdlib/Log.qll b/go/ql/lib/semmle/go/frameworks/stdlib/Log.qll index ca74160bf0d..5b402fca1b7 100644 --- a/go/ql/lib/semmle/go/frameworks/stdlib/Log.qll +++ b/go/ql/lib/semmle/go/frameworks/stdlib/Log.qll @@ -32,6 +32,16 @@ module Log { override int getFormatStringIndex() { result = 0 } } + private class LogCall extends LoggerCall::Range, DataFlow::CallNode { + LogFunction target; + + LogCall() { this = target.getACall() } + + override DataFlow::Node getAMessageComponent() { + result = this.getSyntacticArgument(any(int i | i >= target.getFirstPrintedArg())) + } + } + /** A fatal log function, which calls `os.Exit`. */ private class FatalLogFunction extends Function { FatalLogFunction() { this.hasQualifiedName("log", ["Fatal", "Fatalf", "Fatalln"]) } diff --git a/go/ql/lib/semmle/go/security/AllocationSizeOverflow.qll b/go/ql/lib/semmle/go/security/AllocationSizeOverflow.qll index 8d01d8b8163..9531e279812 100644 --- a/go/ql/lib/semmle/go/security/AllocationSizeOverflow.qll +++ b/go/ql/lib/semmle/go/security/AllocationSizeOverflow.qll @@ -13,21 +13,6 @@ import go module AllocationSizeOverflow { import AllocationSizeOverflowCustomizations::AllocationSizeOverflow - /** - * DEPRECATED: Use copies of `FindLargeLensConfig` and `FindLargeLensFlow` instead. - * - * A taint-tracking configuration for identifying `len(...)` calls whose argument may be large. - */ - deprecated class FindLargeLensConfiguration extends TaintTracking2::Configuration { - FindLargeLensConfiguration() { this = "AllocationSizeOverflow::FindLargeLens" } - - override predicate isSource(DataFlow::Node nd) { nd instanceof Source } - - override predicate isSink(DataFlow::Node nd) { nd = Builtin::len().getACall().getArgument(0) } - - override predicate isSanitizer(DataFlow::Node nd) { nd instanceof Sanitizer } - } - private module FindLargeLensConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node nd) { nd instanceof Source } @@ -47,39 +32,6 @@ module AllocationSizeOverflow { ) } - /** - * DEPRECATED: Use `Flow` instead. - * - * A taint-tracking configuration for identifying allocation-size overflows. - */ - deprecated class Configuration extends TaintTracking::Configuration { - Configuration() { this = "AllocationSizeOverflow" } - - override predicate isSource(DataFlow::Node nd) { nd instanceof Source } - - /** - * Holds if `nd` is at a position where overflow might occur, and its result is used to compute - * allocation size `allocsz`. - */ - predicate isSinkWithAllocationSize(DataFlow::Node nd, DataFlow::Node allocsz) { - nd.(Sink).getAllocationSize() = allocsz - } - - override predicate isSink(DataFlow::Node nd) { this.isSinkWithAllocationSize(nd, _) } - - override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { - additionalStep(pred, succ) - or - exists(DataFlow::CallNode c | - c = getALargeLenCall() and - pred = c.getArgument(0) and - succ = c - ) - } - - override predicate isSanitizer(DataFlow::Node nd) { nd instanceof Sanitizer } - } - /** * Holds if `nd` is at a position where overflow might occur, and its result is used to compute * allocation size `allocsz`. diff --git a/go/ql/lib/semmle/go/security/CommandInjection.qll b/go/ql/lib/semmle/go/security/CommandInjection.qll index bde5a443503..7dc6f3991fc 100644 --- a/go/ql/lib/semmle/go/security/CommandInjection.qll +++ b/go/ql/lib/semmle/go/security/CommandInjection.qll @@ -16,27 +16,6 @@ import go module CommandInjection { import CommandInjectionCustomizations::CommandInjection - /** - * DEPRECATED: Use `Flow` instead. - * - * A taint-tracking configuration for reasoning about command-injection vulnerabilities - * with sinks which are not sanitized by `--`. - */ - deprecated class Configuration extends TaintTracking::Configuration { - Configuration() { this = "CommandInjection" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { - exists(Sink s | sink = s | not s.doubleDashIsSanitizing()) - } - - override predicate isSanitizer(DataFlow::Node node) { - super.isSanitizer(node) or - node instanceof Sanitizer - } - } - private module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof Source } @@ -92,28 +71,6 @@ module CommandInjection { } } - /** - * DEPRECATED: Use `DoubleDashSanitizingFlow` instead. - * - * A taint-tracking configuration for reasoning about command-injection vulnerabilities - * with sinks which are sanitized by `--`. - */ - deprecated class DoubleDashSanitizingConfiguration extends TaintTracking::Configuration { - DoubleDashSanitizingConfiguration() { this = "CommandInjectionWithDoubleDashSanitizer" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { - exists(Sink s | sink = s | s.doubleDashIsSanitizing()) - } - - override predicate isSanitizer(DataFlow::Node node) { - super.isSanitizer(node) or - node instanceof Sanitizer or - node = any(ArgumentArrayWithDoubleDash array).getASanitizedElement() - } - } - private module DoubleDashSanitizingConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof Source } diff --git a/go/ql/lib/semmle/go/security/ExternalAPIs.qll b/go/ql/lib/semmle/go/security/ExternalAPIs.qll index 76d396f2b64..5eb41dd2579 100644 --- a/go/ql/lib/semmle/go/security/ExternalAPIs.qll +++ b/go/ql/lib/semmle/go/security/ExternalAPIs.qll @@ -182,19 +182,6 @@ class UnknownExternalApiDataNode extends ExternalApiDataNode { } } -/** - * DEPRECATED: Use `UntrustedDataToExternalApiFlow` instead. - * - * A configuration for tracking flow from `ThreatModelFlowSource`s to `ExternalApiDataNode`s. - */ -deprecated class UntrustedDataToExternalApiConfig extends TaintTracking::Configuration { - UntrustedDataToExternalApiConfig() { this = "UntrustedDataToExternalAPIConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } -} - private module UntrustedDataConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } @@ -206,19 +193,6 @@ private module UntrustedDataConfig implements DataFlow::ConfigSig { */ module UntrustedDataToExternalApiFlow = DataFlow::Global; -/** - * DEPRECATED: Use `UntrustedDataToUnknownExternalApiFlow` instead. - * - * A configuration for tracking flow from `ThreatModelFlowSource`s to `UnknownExternalApiDataNode`s. - */ -deprecated class UntrustedDataToUnknownExternalApiConfig extends TaintTracking::Configuration { - UntrustedDataToUnknownExternalApiConfig() { this = "UntrustedDataToUnknownExternalAPIConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof UnknownExternalApiDataNode } -} - private module UntrustedDataToUnknownExternalApiConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } diff --git a/go/ql/lib/semmle/go/security/LogInjection.qll b/go/ql/lib/semmle/go/security/LogInjection.qll index cb454716a8f..d8bc586ed91 100644 --- a/go/ql/lib/semmle/go/security/LogInjection.qll +++ b/go/ql/lib/semmle/go/security/LogInjection.qll @@ -14,21 +14,6 @@ import go module LogInjection { import LogInjectionCustomizations::LogInjection - /** - * DEPRECATED: Use `Flow` instead. - * - * A taint-tracking configuration for reasoning about log injection vulnerabilities. - */ - deprecated class Configuration extends TaintTracking::Configuration { - Configuration() { this = "LogInjection" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node sanitizer) { sanitizer instanceof Sanitizer } - } - /** Config for reasoning about log injection vulnerabilities. */ module Config implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof Source } diff --git a/go/ql/src/CHANGELOG.md b/go/ql/src/CHANGELOG.md index 36470f89eba..88ad1b3ceec 100644 --- a/go/ql/src/CHANGELOG.md +++ b/go/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/go/ql/src/change-notes/released/1.0.6.md b/go/ql/src/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/go/ql/src/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/go/ql/src/codeql-pack.release.yml b/go/ql/src/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/go/ql/src/codeql-pack.release.yml +++ b/go/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/go/ql/src/qlpack.yml b/go/ql/src/qlpack.yml index 4df9de83c21..1e6ffa6dac5 100644 --- a/go/ql/src/qlpack.yml +++ b/go/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-queries -version: 1.0.6-dev +version: 1.0.7-dev groups: - go - queries diff --git a/go/ql/test/library-tests/semmle/go/Function/TypeParamType.expected b/go/ql/test/library-tests/semmle/go/Function/TypeParamType.expected index bb614a4b41c..49a00ade7ab 100644 --- a/go/ql/test/library-tests/semmle/go/Function/TypeParamType.expected +++ b/go/ql/test/library-tests/semmle/go/Function/TypeParamType.expected @@ -1,30 +1,161 @@ -| E | Ordered | -| E | comparable | -| E | interface { } | -| E1 | interface { } | -| E2 | interface { } | -| Edge | EdgeConstraint | -| Edge | interface { } | -| F | floaty | -| K | comparable | -| Node | NodeConstraint | -| Node | interface { } | -| S | interface { } | -| S | interface { ~[]E } | -| S1 | interface { ~[]E1 } | -| S2 | interface { ~[]E2 } | -| SF2 | interface { } | -| SG2 | interface { } | -| T | Ordered | -| T | comparable | -| T | interface { string \| []uint8 } | -| T | interface { } | -| T1 | interface { } | -| T2 | interface { } | -| TF1 | interface { } | -| TF2 | interface { } | -| TG1 | interface { } | -| TG2 | interface { } | -| U | interface { } | -| V | interface { int64 \| float64 } | -| bytes | interface { []uint8 \| string } | +| cmp.Compare | 0 | T | Ordered | +| cmp.Less | 0 | T | Ordered | +| cmp.Or | 0 | T | comparable | +| cmp.isNaN | 0 | T | Ordered | +| codeql-go-tests/function.EdgeConstraint | 0 | Node | interface { } | +| codeql-go-tests/function.Element | 0 | S | interface { } | +| codeql-go-tests/function.GenericFunctionInAnotherFile | 0 | T | interface { } | +| codeql-go-tests/function.GenericFunctionOneTypeParam | 0 | T | interface { } | +| codeql-go-tests/function.GenericFunctionTwoTypeParams | 0 | K | comparable | +| codeql-go-tests/function.GenericFunctionTwoTypeParams | 1 | V | interface { int64 \| float64 } | +| codeql-go-tests/function.GenericStruct1 | 0 | T | interface { } | +| codeql-go-tests/function.GenericStruct1.f1 | 0 | TF1 | interface { } | +| codeql-go-tests/function.GenericStruct1.g1 | 0 | TG1 | interface { } | +| codeql-go-tests/function.GenericStruct2 | 0 | S | interface { } | +| codeql-go-tests/function.GenericStruct2 | 1 | T | interface { } | +| codeql-go-tests/function.GenericStruct2.f2 | 0 | SF2 | interface { } | +| codeql-go-tests/function.GenericStruct2.f2 | 1 | TF2 | interface { } | +| codeql-go-tests/function.GenericStruct2.g2 | 0 | SG2 | interface { } | +| codeql-go-tests/function.GenericStruct2.g2 | 1 | TG2 | interface { } | +| codeql-go-tests/function.Graph | 0 | Node | NodeConstraint | +| codeql-go-tests/function.Graph | 1 | Edge | EdgeConstraint | +| codeql-go-tests/function.Graph.ShortestPath | 0 | Node | NodeConstraint | +| codeql-go-tests/function.Graph.ShortestPath | 1 | Edge | EdgeConstraint | +| codeql-go-tests/function.List | 0 | T | interface { } | +| codeql-go-tests/function.List.MyLen | 0 | U | interface { } | +| codeql-go-tests/function.New | 0 | Node | NodeConstraint | +| codeql-go-tests/function.New | 1 | Edge | EdgeConstraint | +| codeql-go-tests/function.NodeConstraint | 0 | Edge | interface { } | +| github.com/anotherpkg.GenericFunctionInAnotherPackage | 0 | T | interface { } | +| internal/bytealg.HashStr | 0 | T | interface { string \| []uint8 } | +| internal/bytealg.HashStrRev | 0 | T | interface { string \| []uint8 } | +| internal/bytealg.IndexRabinKarp | 0 | T | interface { string \| []uint8 } | +| internal/bytealg.LastIndexRabinKarp | 0 | T | interface { string \| []uint8 } | +| runtime.fandbits | 0 | F | floaty | +| runtime.fmax | 0 | F | floaty | +| runtime.fmin | 0 | F | floaty | +| runtime.forbits | 0 | F | floaty | +| runtime.noEscapePtr | 0 | T | interface { } | +| runtime/internal/atomic.Pointer.CompareAndSwap | 0 | T | interface { } | +| runtime/internal/atomic.Pointer.CompareAndSwapNoWB | 0 | T | interface { } | +| runtime/internal/atomic.Pointer.Load | 0 | T | interface { } | +| runtime/internal/atomic.Pointer.Store | 0 | T | interface { } | +| runtime/internal/atomic.Pointer.StoreNoWB | 0 | T | interface { } | +| slices.BinarySearch | 0 | S | interface { ~[]E } | +| slices.BinarySearch | 1 | E | Ordered | +| slices.BinarySearchFunc | 0 | S | interface { ~[]E } | +| slices.BinarySearchFunc | 1 | E | interface { } | +| slices.BinarySearchFunc | 2 | T | interface { } | +| slices.Clip | 0 | S | interface { ~[]E } | +| slices.Clip | 1 | E | interface { } | +| slices.Clone | 0 | S | interface { ~[]E } | +| slices.Clone | 1 | E | interface { } | +| slices.Compact | 0 | S | interface { ~[]E } | +| slices.Compact | 1 | E | comparable | +| slices.CompactFunc | 0 | S | interface { ~[]E } | +| slices.CompactFunc | 1 | E | interface { } | +| slices.Compare | 0 | S | interface { ~[]E } | +| slices.Compare | 1 | E | Ordered | +| slices.CompareFunc | 0 | S1 | interface { ~[]E1 } | +| slices.CompareFunc | 1 | S2 | interface { ~[]E2 } | +| slices.CompareFunc | 2 | E1 | interface { } | +| slices.CompareFunc | 3 | E2 | interface { } | +| slices.Concat | 0 | S | interface { ~[]E } | +| slices.Concat | 1 | E | interface { } | +| slices.Contains | 0 | S | interface { ~[]E } | +| slices.Contains | 1 | E | comparable | +| slices.ContainsFunc | 0 | S | interface { ~[]E } | +| slices.ContainsFunc | 1 | E | interface { } | +| slices.Delete | 0 | S | interface { ~[]E } | +| slices.Delete | 1 | E | interface { } | +| slices.DeleteFunc | 0 | S | interface { ~[]E } | +| slices.DeleteFunc | 1 | E | interface { } | +| slices.Equal | 0 | S | interface { ~[]E } | +| slices.Equal | 1 | E | comparable | +| slices.EqualFunc | 0 | S1 | interface { ~[]E1 } | +| slices.EqualFunc | 1 | S2 | interface { ~[]E2 } | +| slices.EqualFunc | 2 | E1 | interface { } | +| slices.EqualFunc | 3 | E2 | interface { } | +| slices.Grow | 0 | S | interface { ~[]E } | +| slices.Grow | 1 | E | interface { } | +| slices.Index | 0 | S | interface { ~[]E } | +| slices.Index | 1 | E | comparable | +| slices.IndexFunc | 0 | S | interface { ~[]E } | +| slices.IndexFunc | 1 | E | interface { } | +| slices.Insert | 0 | S | interface { ~[]E } | +| slices.Insert | 1 | E | interface { } | +| slices.IsSorted | 0 | S | interface { ~[]E } | +| slices.IsSorted | 1 | E | Ordered | +| slices.IsSortedFunc | 0 | S | interface { ~[]E } | +| slices.IsSortedFunc | 1 | E | interface { } | +| slices.Max | 0 | S | interface { ~[]E } | +| slices.Max | 1 | E | Ordered | +| slices.MaxFunc | 0 | S | interface { ~[]E } | +| slices.MaxFunc | 1 | E | interface { } | +| slices.Min | 0 | S | interface { ~[]E } | +| slices.Min | 1 | E | Ordered | +| slices.MinFunc | 0 | S | interface { ~[]E } | +| slices.MinFunc | 1 | E | interface { } | +| slices.Replace | 0 | S | interface { ~[]E } | +| slices.Replace | 1 | E | interface { } | +| slices.Reverse | 0 | S | interface { ~[]E } | +| slices.Reverse | 1 | E | interface { } | +| slices.Sort | 0 | S | interface { ~[]E } | +| slices.Sort | 1 | E | Ordered | +| slices.SortFunc | 0 | S | interface { ~[]E } | +| slices.SortFunc | 1 | E | interface { } | +| slices.SortStableFunc | 0 | S | interface { ~[]E } | +| slices.SortStableFunc | 1 | E | interface { } | +| slices.breakPatternsCmpFunc | 0 | E | interface { } | +| slices.breakPatternsOrdered | 0 | E | Ordered | +| slices.choosePivotCmpFunc | 0 | E | interface { } | +| slices.choosePivotOrdered | 0 | E | Ordered | +| slices.heapSortCmpFunc | 0 | E | interface { } | +| slices.heapSortOrdered | 0 | E | Ordered | +| slices.insertionSortCmpFunc | 0 | E | interface { } | +| slices.insertionSortOrdered | 0 | E | Ordered | +| slices.isNaN | 0 | T | Ordered | +| slices.medianAdjacentCmpFunc | 0 | E | interface { } | +| slices.medianAdjacentOrdered | 0 | E | Ordered | +| slices.medianCmpFunc | 0 | E | interface { } | +| slices.medianOrdered | 0 | E | Ordered | +| slices.order2CmpFunc | 0 | E | interface { } | +| slices.order2Ordered | 0 | E | Ordered | +| slices.overlaps | 0 | E | interface { } | +| slices.partialInsertionSortCmpFunc | 0 | E | interface { } | +| slices.partialInsertionSortOrdered | 0 | E | Ordered | +| slices.partitionCmpFunc | 0 | E | interface { } | +| slices.partitionEqualCmpFunc | 0 | E | interface { } | +| slices.partitionEqualOrdered | 0 | E | Ordered | +| slices.partitionOrdered | 0 | E | Ordered | +| slices.pdqsortCmpFunc | 0 | E | interface { } | +| slices.pdqsortOrdered | 0 | E | Ordered | +| slices.reverseRangeCmpFunc | 0 | E | interface { } | +| slices.reverseRangeOrdered | 0 | E | Ordered | +| slices.rotateCmpFunc | 0 | E | interface { } | +| slices.rotateLeft | 0 | E | interface { } | +| slices.rotateOrdered | 0 | E | Ordered | +| slices.rotateRight | 0 | E | interface { } | +| slices.siftDownCmpFunc | 0 | E | interface { } | +| slices.siftDownOrdered | 0 | E | Ordered | +| slices.stableCmpFunc | 0 | E | interface { } | +| slices.stableOrdered | 0 | E | Ordered | +| slices.startIdx | 0 | E | interface { } | +| slices.swap | 0 | E | interface { } | +| slices.swapRangeCmpFunc | 0 | E | interface { } | +| slices.swapRangeOrdered | 0 | E | Ordered | +| slices.symMergeCmpFunc | 0 | E | interface { } | +| slices.symMergeOrdered | 0 | E | Ordered | +| sync.OnceValue | 0 | T | interface { } | +| sync.OnceValues | 0 | T1 | interface { } | +| sync.OnceValues | 1 | T2 | interface { } | +| sync/atomic.Pointer | 0 | T | interface { } | +| sync/atomic.Pointer.CompareAndSwap | 0 | T | interface { } | +| sync/atomic.Pointer.Load | 0 | T | interface { } | +| sync/atomic.Pointer.Store | 0 | T | interface { } | +| sync/atomic.Pointer.Swap | 0 | T | interface { } | +| time.atoi | 0 | bytes | interface { []uint8 \| string } | +| time.isDigit | 0 | bytes | interface { []uint8 \| string } | +| time.leadingInt | 0 | bytes | interface { []uint8 \| string } | +| time.parseNanoseconds | 0 | bytes | interface { []uint8 \| string } | +| time.parseRFC3339 | 0 | bytes | interface { []uint8 \| string } | diff --git a/go/ql/test/library-tests/semmle/go/Function/TypeParamType.ql b/go/ql/test/library-tests/semmle/go/Function/TypeParamType.ql index a4167f8d702..9170c0d35ed 100644 --- a/go/ql/test/library-tests/semmle/go/Function/TypeParamType.ql +++ b/go/ql/test/library-tests/semmle/go/Function/TypeParamType.ql @@ -1,4 +1,5 @@ import go -from TypeParamType tpt -select tpt.getParamName(), tpt.getConstraint().pp() +from TypeParamType tpt, TypeParamParentEntity ty +where ty = tpt.getParent() +select ty.getQualifiedName(), tpt.getIndex(), tpt.getParamName(), tpt.getConstraint().pp() diff --git a/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/SqlInjection.expected b/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/SqlInjection.expected index 992c1387103..6cc1e09486b 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/SqlInjection.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/BeegoOrm/SqlInjection.expected @@ -32,61 +32,40 @@ | test.go:59:31:59:39 | untrusted | test.go:57:15:57:41 | call to UserAgent | test.go:59:31:59:39 | untrusted | This query depends on a $@. | test.go:57:15:57:41 | call to UserAgent | user-provided value | | test.go:65:19:65:27 | untrusted | test.go:63:15:63:41 | call to UserAgent | test.go:65:19:65:27 | untrusted | This query depends on a $@. | test.go:63:15:63:41 | call to UserAgent | user-provided value | edges -| test.go:11:15:11:41 | call to UserAgent | test.go:13:11:13:19 | untrusted | provenance | Src:MaD:22 Sink:MaD:2 | -| test.go:11:15:11:41 | call to UserAgent | test.go:14:23:14:31 | untrusted | provenance | Src:MaD:22 Sink:MaD:3 | -| test.go:11:15:11:41 | call to UserAgent | test.go:15:14:15:22 | untrusted | provenance | Src:MaD:22 Sink:MaD:4 | -| test.go:11:15:11:41 | call to UserAgent | test.go:16:26:16:34 | untrusted | provenance | Src:MaD:22 Sink:MaD:5 | -| test.go:11:15:11:41 | call to UserAgent | test.go:17:12:17:20 | untrusted | provenance | Src:MaD:22 Sink:MaD:6 | -| test.go:11:15:11:41 | call to UserAgent | test.go:18:24:18:32 | untrusted | provenance | Src:MaD:22 Sink:MaD:7 | -| test.go:11:15:11:41 | call to UserAgent | test.go:19:15:19:23 | untrusted | provenance | Src:MaD:22 Sink:MaD:8 | -| test.go:11:15:11:41 | call to UserAgent | test.go:20:27:20:35 | untrusted | provenance | Src:MaD:22 Sink:MaD:9 | -| test.go:25:15:25:41 | call to UserAgent | test.go:28:12:28:20 | untrusted | provenance | Src:MaD:22 | -| test.go:25:15:25:41 | call to UserAgent | test.go:29:10:29:18 | untrusted | provenance | Src:MaD:22 | -| test.go:25:15:25:41 | call to UserAgent | test.go:30:15:30:23 | untrusted | provenance | Src:MaD:22 Sink:MaD:13 | -| test.go:25:15:25:41 | call to UserAgent | test.go:31:14:31:22 | untrusted | provenance | Src:MaD:22 Sink:MaD:15 | -| test.go:25:15:25:41 | call to UserAgent | test.go:32:15:32:23 | untrusted | provenance | Src:MaD:22 Sink:MaD:18 | -| test.go:25:15:25:41 | call to UserAgent | test.go:33:8:33:16 | untrusted | provenance | Src:MaD:22 Sink:MaD:16 | -| test.go:25:15:25:41 | call to UserAgent | test.go:34:11:34:19 | untrusted | provenance | Src:MaD:22 Sink:MaD:20 | -| test.go:25:15:25:41 | call to UserAgent | test.go:35:9:35:17 | untrusted | provenance | Src:MaD:22 Sink:MaD:11 | -| test.go:25:15:25:41 | call to UserAgent | test.go:36:8:36:16 | untrusted | provenance | Src:MaD:22 Sink:MaD:17 | -| test.go:25:15:25:41 | call to UserAgent | test.go:37:8:37:16 | untrusted | provenance | Src:MaD:22 | -| test.go:25:15:25:41 | call to UserAgent | test.go:38:13:38:21 | untrusted | provenance | Src:MaD:22 | -| test.go:25:15:25:41 | call to UserAgent | test.go:39:13:39:21 | untrusted | provenance | Src:MaD:22 | -| test.go:25:15:25:41 | call to UserAgent | test.go:40:12:40:20 | untrusted | provenance | Src:MaD:22 Sink:MaD:12 | -| test.go:25:15:25:41 | call to UserAgent | test.go:41:12:41:20 | untrusted | provenance | Src:MaD:22 | -| test.go:25:15:25:41 | call to UserAgent | test.go:42:9:42:17 | untrusted | provenance | Src:MaD:22 | -| test.go:25:15:25:41 | call to UserAgent | test.go:43:12:43:20 | untrusted | provenance | Src:MaD:22 | -| test.go:25:15:25:41 | call to UserAgent | test.go:44:16:44:24 | untrusted | provenance | Src:MaD:22 Sink:MaD:14 | -| test.go:25:15:25:41 | call to UserAgent | test.go:45:12:45:20 | untrusted | provenance | Src:MaD:22 | -| test.go:25:15:25:41 | call to UserAgent | test.go:46:14:46:22 | untrusted | provenance | Src:MaD:22 Sink:MaD:19 | -| test.go:26:16:26:42 | call to UserAgent | test.go:44:27:44:36 | untrusted2 | provenance | Src:MaD:22 | -| test.go:26:16:26:42 | call to UserAgent | test.go:46:25:46:34 | untrusted2 | provenance | Src:MaD:22 Sink:MaD:19 | -| test.go:50:15:50:41 | call to UserAgent | test.go:52:12:52:20 | untrusted | provenance | Src:MaD:22 Sink:MaD:10 | -| test.go:57:15:57:41 | call to UserAgent | test.go:59:31:59:39 | untrusted | provenance | Src:MaD:22 Sink:MaD:21 | -| test.go:63:15:63:41 | call to UserAgent | test.go:65:19:65:27 | untrusted | provenance | Src:MaD:22 Sink:MaD:1 | +| test.go:11:15:11:41 | call to UserAgent | test.go:13:11:13:19 | untrusted | provenance | Src:MaD:1 | +| test.go:11:15:11:41 | call to UserAgent | test.go:14:23:14:31 | untrusted | provenance | Src:MaD:1 | +| test.go:11:15:11:41 | call to UserAgent | test.go:15:14:15:22 | untrusted | provenance | Src:MaD:1 | +| test.go:11:15:11:41 | call to UserAgent | test.go:16:26:16:34 | untrusted | provenance | Src:MaD:1 | +| test.go:11:15:11:41 | call to UserAgent | test.go:17:12:17:20 | untrusted | provenance | Src:MaD:1 | +| test.go:11:15:11:41 | call to UserAgent | test.go:18:24:18:32 | untrusted | provenance | Src:MaD:1 | +| test.go:11:15:11:41 | call to UserAgent | test.go:19:15:19:23 | untrusted | provenance | Src:MaD:1 | +| test.go:11:15:11:41 | call to UserAgent | test.go:20:27:20:35 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:28:12:28:20 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:29:10:29:18 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:30:15:30:23 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:31:14:31:22 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:32:15:32:23 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:33:8:33:16 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:34:11:34:19 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:35:9:35:17 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:36:8:36:16 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:37:8:37:16 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:38:13:38:21 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:39:13:39:21 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:40:12:40:20 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:41:12:41:20 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:42:9:42:17 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:43:12:43:20 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:44:16:44:24 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:45:12:45:20 | untrusted | provenance | Src:MaD:1 | +| test.go:25:15:25:41 | call to UserAgent | test.go:46:14:46:22 | untrusted | provenance | Src:MaD:1 | +| test.go:26:16:26:42 | call to UserAgent | test.go:44:27:44:36 | untrusted2 | provenance | Src:MaD:1 | +| test.go:26:16:26:42 | call to UserAgent | test.go:46:25:46:34 | untrusted2 | provenance | Src:MaD:1 | +| test.go:50:15:50:41 | call to UserAgent | test.go:52:12:52:20 | untrusted | provenance | Src:MaD:1 | +| test.go:57:15:57:41 | call to UserAgent | test.go:59:31:59:39 | untrusted | provenance | Src:MaD:1 | +| test.go:63:15:63:41 | call to UserAgent | test.go:65:19:65:27 | untrusted | provenance | Src:MaD:1 | models -| 1 | Sink: group:beego-orm; Condition; false; Raw; ; ; Argument[1]; sql-injection; manual | -| 2 | Sink: group:beego-orm; DB; false; Exec; ; ; Argument[0]; sql-injection; manual | -| 3 | Sink: group:beego-orm; DB; false; ExecContext; ; ; Argument[1]; sql-injection; manual | -| 4 | Sink: group:beego-orm; DB; false; Prepare; ; ; Argument[0]; sql-injection; manual | -| 5 | Sink: group:beego-orm; DB; false; PrepareContext; ; ; Argument[1]; sql-injection; manual | -| 6 | Sink: group:beego-orm; DB; false; Query; ; ; Argument[0]; sql-injection; manual | -| 7 | Sink: group:beego-orm; DB; false; QueryContext; ; ; Argument[1]; sql-injection; manual | -| 8 | Sink: group:beego-orm; DB; false; QueryRow; ; ; Argument[0]; sql-injection; manual | -| 9 | Sink: group:beego-orm; DB; false; QueryRowContext; ; ; Argument[1]; sql-injection; manual | -| 10 | Sink: group:beego-orm; Ormer; false; Raw; ; ; Argument[0]; sql-injection; manual | -| 11 | Sink: group:beego-orm; QueryBuilder; false; And; ; ; Argument[0]; sql-injection; manual | -| 12 | Sink: group:beego-orm; QueryBuilder; false; Having; ; ; Argument[0]; sql-injection; manual | -| 13 | Sink: group:beego-orm; QueryBuilder; false; InnerJoin; ; ; Argument[0]; sql-injection; manual | -| 14 | Sink: group:beego-orm; QueryBuilder; false; InsertInto; ; ; Argument[0..1]; sql-injection; manual | -| 15 | Sink: group:beego-orm; QueryBuilder; false; LeftJoin; ; ; Argument[0]; sql-injection; manual | -| 16 | Sink: group:beego-orm; QueryBuilder; false; On; ; ; Argument[0]; sql-injection; manual | -| 17 | Sink: group:beego-orm; QueryBuilder; false; Or; ; ; Argument[0]; sql-injection; manual | -| 18 | Sink: group:beego-orm; QueryBuilder; false; RightJoin; ; ; Argument[0]; sql-injection; manual | -| 19 | Sink: group:beego-orm; QueryBuilder; false; Subquery; ; ; Argument[0..1]; sql-injection; manual | -| 20 | Sink: group:beego-orm; QueryBuilder; false; Where; ; ; Argument[0]; sql-injection; manual | -| 21 | Sink: group:beego-orm; QuerySeter; false; FilterRaw; ; ; Argument[1]; sql-injection; manual | -| 22 | Source: net/http; Request; true; UserAgent; ; ; ReturnValue; remote; manual | +| 1 | Source: net/http; Request; true; UserAgent; ; ; ReturnValue; remote; manual | nodes | test.go:11:15:11:41 | call to UserAgent | semmle.label | call to UserAgent | | test.go:13:11:13:19 | untrusted | semmle.label | untrusted | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/QueryString.expected b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/QueryString.expected deleted file mode 100644 index db33d6d2504..00000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/QueryString.expected +++ /dev/null @@ -1,3 +0,0 @@ -testFailures -invalidModelRow -failures diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/QueryString.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/QueryString.ql deleted file mode 100644 index eeb43a82fad..00000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/QueryString.ql +++ /dev/null @@ -1,60 +0,0 @@ -import go -import semmle.go.dataflow.ExternalFlow -import ModelValidation -import TestUtilities.InlineExpectationsTest - -module SqlTest implements TestSig { - string getARelevantTag() { result = "query" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "query" and - exists(SQL::Query q, SQL::QueryString qs | qs = q.getAQueryString() | - q.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - element = q.toString() and - value = qs.toString() - ) - } -} - -module QueryString implements TestSig { - string getARelevantTag() { result = "querystring" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "querystring" and - element = "" and - exists(SQL::QueryString qs | not exists(SQL::Query q | qs = q.getAQueryString()) | - qs.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - value = qs.toString() - ) - } -} - -module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node n) { n.asExpr() instanceof StringLit } - - predicate isSink(DataFlow::Node n) { - n = any(DataFlow::CallNode cn | cn.getTarget().getName() = "sink").getAnArgument() - } -} - -module Flow = TaintTracking::Global; - -module TaintFlow implements TestSig { - string getARelevantTag() { result = "flowfrom" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "flowfrom" and - element = "" and - exists(DataFlow::Node fromNode, DataFlow::Node toNode | - toNode - .hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - Flow::flow(fromNode, toNode) and - value = fromNode.asExpr().(StringLit).getValue() - ) - } -} - -import MakeTest> diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/gorm.expected b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/gorm.expected new file mode 100644 index 00000000000..ca70ed07c33 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/gorm.expected @@ -0,0 +1,25 @@ +| gorm.go:20:12:20:20 | untrusted | github.com/jinzhu/gorm | DB | Where | +| gorm.go:21:10:21:18 | untrusted | github.com/jinzhu/gorm | DB | Raw | +| gorm.go:22:10:22:18 | untrusted | github.com/jinzhu/gorm | DB | Not | +| gorm.go:23:12:23:20 | untrusted | github.com/jinzhu/gorm | DB | Order | +| gorm.go:24:9:24:17 | untrusted | github.com/jinzhu/gorm | DB | Or | +| gorm.go:25:13:25:21 | untrusted | github.com/jinzhu/gorm | DB | Select | +| gorm.go:26:12:26:20 | untrusted | github.com/jinzhu/gorm | DB | Table | +| gorm.go:27:12:27:20 | untrusted | github.com/jinzhu/gorm | DB | Group | +| gorm.go:28:13:28:21 | untrusted | github.com/jinzhu/gorm | DB | Having | +| gorm.go:29:12:29:20 | untrusted | github.com/jinzhu/gorm | DB | Joins | +| gorm.go:30:11:30:19 | untrusted | github.com/jinzhu/gorm | DB | Exec | +| gorm.go:31:12:31:20 | untrusted | github.com/jinzhu/gorm | DB | Pluck | +| gorm.go:34:12:34:20 | untrusted | gorm.io/gorm | DB | Where | +| gorm.go:35:10:35:18 | untrusted | gorm.io/gorm | DB | Raw | +| gorm.go:36:10:36:18 | untrusted | gorm.io/gorm | DB | Not | +| gorm.go:37:12:37:20 | untrusted | gorm.io/gorm | DB | Order | +| gorm.go:38:9:38:17 | untrusted | gorm.io/gorm | DB | Or | +| gorm.go:39:13:39:21 | untrusted | gorm.io/gorm | DB | Select | +| gorm.go:40:12:40:20 | untrusted | gorm.io/gorm | DB | Table | +| gorm.go:41:12:41:20 | untrusted | gorm.io/gorm | DB | Group | +| gorm.go:42:13:42:21 | untrusted | gorm.io/gorm | DB | Having | +| gorm.go:43:12:43:20 | untrusted | gorm.io/gorm | DB | Joins | +| gorm.go:44:11:44:19 | untrusted | gorm.io/gorm | DB | Exec | +| gorm.go:45:15:45:23 | untrusted | gorm.io/gorm | DB | Distinct | +| gorm.go:46:12:46:20 | untrusted | gorm.io/gorm | DB | Pluck | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/gorm.go b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/gorm.go index 2d736e2407c..bee8edbf7af 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/gorm.go +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/gorm.go @@ -13,35 +13,36 @@ func getUntrustedString() string { } func main() { + untrusted := getUntrustedString() db1 := gorm1.DB{} - db1.Where(untrusted) // $ querystring=untrusted - db1.Raw(untrusted) // $ querystring=untrusted - db1.Not(untrusted) // $ querystring=untrusted - db1.Order(untrusted) // $ querystring=untrusted - db1.Or(untrusted) // $ querystring=untrusted - db1.Select(untrusted) // $ querystring=untrusted - db1.Table(untrusted) // $ querystring=untrusted - db1.Group(untrusted) // $ querystring=untrusted - db1.Having(untrusted) // $ querystring=untrusted - db1.Joins(untrusted) // $ querystring=untrusted - db1.Exec(untrusted) // $ querystring=untrusted - db1.Pluck(untrusted, nil) // $ querystring=untrusted + db1.Where(untrusted) + db1.Raw(untrusted) + db1.Not(untrusted) + db1.Order(untrusted) + db1.Or(untrusted) + db1.Select(untrusted) + db1.Table(untrusted) + db1.Group(untrusted) + db1.Having(untrusted) + db1.Joins(untrusted) + db1.Exec(untrusted) + db1.Pluck(untrusted, nil) db2 := gorm2.DB{} - db2.Where(untrusted) // $ querystring=untrusted - db2.Raw(untrusted) // $ querystring=untrusted - db2.Not(untrusted) // $ querystring=untrusted - db2.Order(untrusted) // $ querystring=untrusted - db2.Or(untrusted) // $ querystring=untrusted - db2.Select(untrusted) // $ querystring=untrusted - db2.Table(untrusted) // $ querystring=untrusted - db2.Group(untrusted) // $ querystring=untrusted - db2.Having(untrusted) // $ querystring=untrusted - db2.Joins(untrusted) // $ querystring=untrusted - db2.Exec(untrusted) // $ querystring=untrusted - db2.Distinct(untrusted) // $ querystring=untrusted - db2.Pluck(untrusted, nil) // $ querystring=untrusted + db2.Where(untrusted) + db2.Raw(untrusted) + db2.Not(untrusted) + db2.Order(untrusted) + db2.Or(untrusted) + db2.Select(untrusted) + db2.Table(untrusted) + db2.Group(untrusted) + db2.Having(untrusted) + db2.Joins(untrusted) + db2.Exec(untrusted) + db2.Distinct(untrusted) + db2.Pluck(untrusted, nil) } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/gorm.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/gorm.ql new file mode 100644 index 00000000000..e08b506deaf --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Gorm/gorm.ql @@ -0,0 +1,5 @@ +import go + +from SQL::QueryString qs, Method meth, string a, string b, string c +where meth.hasQualifiedName(a, b, c) and qs = meth.getACall().getSyntacticArgument(0) +select qs, a, b, c diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/QueryString.expected b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/QueryString.expected deleted file mode 100644 index db33d6d2504..00000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/QueryString.expected +++ /dev/null @@ -1,3 +0,0 @@ -testFailures -invalidModelRow -failures diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/QueryString.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/QueryString.ql deleted file mode 100644 index eeb43a82fad..00000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/QueryString.ql +++ /dev/null @@ -1,60 +0,0 @@ -import go -import semmle.go.dataflow.ExternalFlow -import ModelValidation -import TestUtilities.InlineExpectationsTest - -module SqlTest implements TestSig { - string getARelevantTag() { result = "query" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "query" and - exists(SQL::Query q, SQL::QueryString qs | qs = q.getAQueryString() | - q.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - element = q.toString() and - value = qs.toString() - ) - } -} - -module QueryString implements TestSig { - string getARelevantTag() { result = "querystring" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "querystring" and - element = "" and - exists(SQL::QueryString qs | not exists(SQL::Query q | qs = q.getAQueryString()) | - qs.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - value = qs.toString() - ) - } -} - -module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node n) { n.asExpr() instanceof StringLit } - - predicate isSink(DataFlow::Node n) { - n = any(DataFlow::CallNode cn | cn.getTarget().getName() = "sink").getAnArgument() - } -} - -module Flow = TaintTracking::Global; - -module TaintFlow implements TestSig { - string getARelevantTag() { result = "flowfrom" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "flowfrom" and - element = "" and - exists(DataFlow::Node fromNode, DataFlow::Node toNode | - toNode - .hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - Flow::flow(fromNode, toNode) and - value = fromNode.asExpr().(StringLit).getValue() - ) - } -} - -import MakeTest> diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/sqlx.expected b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/sqlx.expected new file mode 100644 index 00000000000..0540a78fb34 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/sqlx.expected @@ -0,0 +1,12 @@ +| sqlx.go:15:17:15:25 | untrusted | +| sqlx.go:16:14:16:22 | untrusted | +| sqlx.go:17:14:17:22 | untrusted | +| sqlx.go:18:12:18:20 | untrusted | +| sqlx.go:19:15:19:23 | untrusted | +| sqlx.go:20:16:20:24 | untrusted | +| sqlx.go:23:17:23:25 | untrusted | +| sqlx.go:24:14:24:22 | untrusted | +| sqlx.go:25:14:25:22 | untrusted | +| sqlx.go:26:12:26:20 | untrusted | +| sqlx.go:27:15:27:23 | untrusted | +| sqlx.go:28:16:28:24 | untrusted | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/sqlx.go b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/sqlx.go index e4e8d43395b..edc29c4d4ee 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/sqlx.go +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/sqlx.go @@ -12,19 +12,19 @@ func main() { db := sqlx.DB{} untrusted := getUntrustedString() - db.Select(nil, untrusted) // $ querystring=untrusted - db.Get(nil, untrusted) // $ querystring=untrusted - db.MustExec(untrusted) // $ querystring=untrusted - db.Queryx(untrusted) // $ querystring=untrusted - db.NamedExec(untrusted, nil) // $ querystring=untrusted - db.NamedQuery(untrusted, nil) // $ querystring=untrusted + db.Select(nil, untrusted) + db.Get(nil, untrusted) + db.MustExec(untrusted) + db.Queryx(untrusted) + db.NamedExec(untrusted, nil) + db.NamedQuery(untrusted, nil) tx := sqlx.Tx{} - tx.Select(nil, untrusted) // $ querystring=untrusted - tx.Get(nil, untrusted) // $ querystring=untrusted - tx.MustExec(untrusted) // $ querystring=untrusted - tx.Queryx(untrusted) // $ querystring=untrusted - tx.NamedExec(untrusted, nil) // $ querystring=untrusted - tx.NamedQuery(untrusted, nil) // $ querystring=untrusted + tx.Select(nil, untrusted) + tx.Get(nil, untrusted) + tx.MustExec(untrusted) + tx.Queryx(untrusted) + tx.NamedExec(untrusted, nil) + tx.NamedQuery(untrusted, nil) } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/sqlx.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/sqlx.ql new file mode 100644 index 00000000000..7b56fd97441 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/Sqlx/sqlx.ql @@ -0,0 +1,4 @@ +import go + +from SQL::QueryString qs +select qs diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/QueryString.expected b/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/QueryString.expected deleted file mode 100644 index 105b7026d0c..00000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/QueryString.expected +++ /dev/null @@ -1,3 +0,0 @@ -failures -invalidModelRow -testFailures diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/QueryString.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/QueryString.ql deleted file mode 100644 index eeb43a82fad..00000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/QueryString.ql +++ /dev/null @@ -1,60 +0,0 @@ -import go -import semmle.go.dataflow.ExternalFlow -import ModelValidation -import TestUtilities.InlineExpectationsTest - -module SqlTest implements TestSig { - string getARelevantTag() { result = "query" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "query" and - exists(SQL::Query q, SQL::QueryString qs | qs = q.getAQueryString() | - q.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - element = q.toString() and - value = qs.toString() - ) - } -} - -module QueryString implements TestSig { - string getARelevantTag() { result = "querystring" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "querystring" and - element = "" and - exists(SQL::QueryString qs | not exists(SQL::Query q | qs = q.getAQueryString()) | - qs.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - value = qs.toString() - ) - } -} - -module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node n) { n.asExpr() instanceof StringLit } - - predicate isSink(DataFlow::Node n) { - n = any(DataFlow::CallNode cn | cn.getTarget().getName() = "sink").getAnArgument() - } -} - -module Flow = TaintTracking::Global; - -module TaintFlow implements TestSig { - string getARelevantTag() { result = "flowfrom" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "flowfrom" and - element = "" and - exists(DataFlow::Node fromNode, DataFlow::Node toNode | - toNode - .hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - Flow::flow(fromNode, toNode) and - value = fromNode.asExpr().(StringLit).getValue() - ) - } -} - -import MakeTest> diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/bun.go b/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/bun.go index 44a2e2c2fce..8ce4e5b0826 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/bun.go +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/bun/bun.go @@ -22,28 +22,28 @@ func main() { panic(err) } db := bun.NewDB(sqlite, sqlitedialect.New()) - bun.NewRawQuery(db, untrusted) // $ querystring=untrusted + bun.NewRawQuery(db, untrusted) - db.ExecContext(ctx, untrusted) // $ querystring=untrusted - db.PrepareContext(ctx, untrusted) // $ querystring=untrusted - db.QueryContext(ctx, untrusted) // $ querystring=untrusted - db.QueryRowContext(ctx, untrusted) // $ querystring=untrusted + db.ExecContext(ctx, untrusted) + db.PrepareContext(ctx, untrusted) + db.QueryContext(ctx, untrusted) + db.QueryRowContext(ctx, untrusted) - db.Exec(untrusted) // $ querystring=untrusted - db.NewRaw(untrusted) // $ querystring=untrusted - db.Prepare(untrusted) // $ querystring=untrusted - db.Query(untrusted) // $ querystring=untrusted - db.QueryRow(untrusted) // $ querystring=untrusted - db.Raw(untrusted) // $ querystring=untrusted + db.Exec(untrusted) + db.NewRaw(untrusted) + db.Prepare(untrusted) + db.Query(untrusted) + db.QueryRow(untrusted) + db.Raw(untrusted) - db.NewSelect().ColumnExpr(untrusted) // $ querystring=untrusted - db.NewSelect().DistinctOn(untrusted) // $ querystring=untrusted - db.NewSelect().For(untrusted) // $ querystring=untrusted - db.NewSelect().GroupExpr(untrusted) // $ querystring=untrusted - db.NewSelect().Having(untrusted) // $ querystring=untrusted - db.NewSelect().ModelTableExpr(untrusted) // $ querystring=untrusted - db.NewSelect().OrderExpr(untrusted) // $ querystring=untrusted - db.NewSelect().TableExpr(untrusted) // $ querystring=untrusted - db.NewSelect().Where(untrusted) // $ querystring=untrusted - db.NewSelect().WhereOr(untrusted) // $ querystring=untrusted + db.NewSelect().ColumnExpr(untrusted) + db.NewSelect().DistinctOn(untrusted) + db.NewSelect().For(untrusted) + db.NewSelect().GroupExpr(untrusted) + db.NewSelect().Having(untrusted) + db.NewSelect().ModelTableExpr(untrusted) + db.NewSelect().OrderExpr(untrusted) + db.NewSelect().TableExpr(untrusted) + db.NewSelect().Where(untrusted) + db.NewSelect().WhereOr(untrusted) } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/QueryString.expected b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/QueryString.expected deleted file mode 100644 index db33d6d2504..00000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/QueryString.expected +++ /dev/null @@ -1,3 +0,0 @@ -testFailures -invalidModelRow -failures diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/QueryString.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/QueryString.ql deleted file mode 100644 index eeb43a82fad..00000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/QueryString.ql +++ /dev/null @@ -1,60 +0,0 @@ -import go -import semmle.go.dataflow.ExternalFlow -import ModelValidation -import TestUtilities.InlineExpectationsTest - -module SqlTest implements TestSig { - string getARelevantTag() { result = "query" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "query" and - exists(SQL::Query q, SQL::QueryString qs | qs = q.getAQueryString() | - q.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - element = q.toString() and - value = qs.toString() - ) - } -} - -module QueryString implements TestSig { - string getARelevantTag() { result = "querystring" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "querystring" and - element = "" and - exists(SQL::QueryString qs | not exists(SQL::Query q | qs = q.getAQueryString()) | - qs.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - value = qs.toString() - ) - } -} - -module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node n) { n.asExpr() instanceof StringLit } - - predicate isSink(DataFlow::Node n) { - n = any(DataFlow::CallNode cn | cn.getTarget().getName() = "sink").getAnArgument() - } -} - -module Flow = TaintTracking::Global; - -module TaintFlow implements TestSig { - string getARelevantTag() { result = "flowfrom" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "flowfrom" and - element = "" and - exists(DataFlow::Node fromNode, DataFlow::Node toNode | - toNode - .hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - Flow::flow(fromNode, toNode) and - value = fromNode.asExpr().(StringLit).getValue() - ) - } -} - -import MakeTest> diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/gogf.expected b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/gogf.expected new file mode 100644 index 00000000000..f4e3e4f15b0 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/gogf.expected @@ -0,0 +1,47 @@ +| gogf.go:12:9:12:11 | sql | +| gogf.go:13:11:13:13 | sql | +| gogf.go:14:13:14:15 | sql | +| gogf.go:15:13:15:15 | sql | +| gogf.go:16:11:16:13 | sql | +| gogf.go:17:13:17:15 | sql | +| gogf.go:18:12:18:14 | sql | +| gogf.go:19:10:19:12 | sql | +| gogf.go:20:8:20:10 | sql | +| gogf.go:21:17:21:19 | sql | +| gogf.go:22:19:22:21 | sql | +| gogf.go:23:20:23:22 | sql | +| gogf.go:24:23:24:25 | sql | +| gogf.go:25:21:25:23 | sql | +| gogf.go:26:23:26:25 | sql | +| gogf.go:27:22:27:24 | sql | +| gogf.go:28:24:28:26 | sql | +| gogf.go:32:9:32:11 | sql | +| gogf.go:33:11:33:13 | sql | +| gogf.go:34:13:34:15 | sql | +| gogf.go:35:13:35:15 | sql | +| gogf.go:36:11:36:13 | sql | +| gogf.go:37:13:37:15 | sql | +| gogf.go:38:12:38:14 | sql | +| gogf.go:39:10:39:12 | sql | +| gogf.go:40:8:40:10 | sql | +| gogf.go:41:17:41:19 | sql | +| gogf.go:42:23:42:25 | sql | +| gogf.go:43:21:43:23 | sql | +| gogf.go:44:23:44:25 | sql | +| gogf.go:45:22:45:24 | sql | +| gogf.go:46:24:46:26 | sql | +| gogf.go:51:9:51:11 | sql | +| gogf.go:52:11:52:13 | sql | +| gogf.go:53:13:53:15 | sql | +| gogf.go:54:13:54:15 | sql | +| gogf.go:55:11:55:13 | sql | +| gogf.go:56:13:56:15 | sql | +| gogf.go:57:12:57:14 | sql | +| gogf.go:58:10:58:12 | sql | +| gogf.go:59:8:59:10 | sql | +| gogf.go:60:17:60:19 | sql | +| gogf.go:61:23:61:25 | sql | +| gogf.go:62:21:62:23 | sql | +| gogf.go:63:23:63:25 | sql | +| gogf.go:64:22:64:24 | sql | +| gogf.go:65:24:65:26 | sql | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/gogf.go b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/gogf.go index e2db8016cf0..d0eceaf862c 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/gogf.go +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/gogf.go @@ -4,13 +4,11 @@ package main //go:generate depstubber -vendor github.com/gogf/gf/database/gdb DB,Core,TX "" import ( - "context" - "github.com/gogf/gf/database/gdb" "github.com/gogf/gf/frame/g" ) -func gogfCoreTest(sql string, c *gdb.Core, ctx context.Context) { +func gogfCoreTest(sql string, c *gdb.Core) { c.Exec(sql, nil) // $ querystring=sql c.GetAll(sql, nil) // $ querystring=sql c.GetArray(sql, nil) // $ querystring=sql @@ -23,14 +21,14 @@ func gogfCoreTest(sql string, c *gdb.Core, ctx context.Context) { c.GetScan(nil, sql, nil) // $ querystring=sql c.GetStruct(nil, sql, nil) // $ querystring=sql c.GetStructs(nil, sql, nil) // $ querystring=sql - c.DoCommit(ctx, nil, sql, nil) // $ querystring=sql - c.DoExec(ctx, nil, sql, nil) // $ querystring=sql - c.DoGetAll(ctx, nil, sql, nil) // $ querystring=sql - c.DoQuery(ctx, nil, sql, nil) // $ querystring=sql - c.DoPrepare(ctx, nil, sql) // $ querystring=sql + c.DoCommit(nil, nil, sql, nil) // $ querystring=sql + c.DoExec(nil, nil, sql, nil) // $ querystring=sql + c.DoGetAll(nil, nil, sql, nil) // $ querystring=sql + c.DoQuery(nil, nil, sql, nil) // $ querystring=sql + c.DoPrepare(nil, nil, sql) // $ querystring=sql } -func gogfDbtest(sql string, c gdb.DB, ctx context.Context) { +func gogfDbtest(sql string, c gdb.DB) { c.Exec(sql, nil) // $ querystring=sql c.GetAll(sql, nil) // $ querystring=sql c.GetArray(sql, nil) // $ querystring=sql @@ -41,14 +39,14 @@ func gogfDbtest(sql string, c gdb.DB, ctx context.Context) { c.Query(sql, nil) // $ querystring=sql c.Raw(sql, nil) // $ querystring=sql c.GetScan(nil, sql, nil) // $ querystring=sql - c.DoCommit(ctx, nil, sql, nil) // $ querystring=sql - c.DoExec(ctx, nil, sql, nil) // $ querystring=sql - c.DoGetAll(ctx, nil, sql, nil) // $ querystring=sql - c.DoQuery(ctx, nil, sql, nil) // $ querystring=sql - c.DoPrepare(ctx, nil, sql) // $ querystring=sql + c.DoCommit(nil, nil, sql, nil) // $ querystring=sql + c.DoExec(nil, nil, sql, nil) // $ querystring=sql + c.DoGetAll(nil, nil, sql, nil) // $ querystring=sql + c.DoQuery(nil, nil, sql, nil) // $ querystring=sql + c.DoPrepare(nil, nil, sql) // $ querystring=sql } -func gogfGTest(sql string, ctx context.Context) { +func gogfGTest(sql string) { c := g.DB("ad") c.Exec(sql, nil) // $ querystring=sql c.GetAll(sql, nil) // $ querystring=sql @@ -60,11 +58,11 @@ func gogfGTest(sql string, ctx context.Context) { c.Query(sql, nil) // $ querystring=sql c.Raw(sql, nil) // $ querystring=sql c.GetScan(nil, sql, nil) // $ querystring=sql - c.DoCommit(ctx, nil, sql, nil) // $ querystring=sql - c.DoExec(ctx, nil, sql, nil) // $ querystring=sql - c.DoGetAll(ctx, nil, sql, nil) // $ querystring=sql - c.DoQuery(ctx, nil, sql, nil) // $ querystring=sql - c.DoPrepare(ctx, nil, sql) // $ querystring=sql + c.DoCommit(nil, nil, sql, nil) // $ querystring=sql + c.DoExec(nil, nil, sql, nil) // $ querystring=sql + c.DoGetAll(nil, nil, sql, nil) // $ querystring=sql + c.DoQuery(nil, nil, sql, nil) // $ querystring=sql + c.DoPrepare(nil, nil, sql) // $ querystring=sql } func main() { diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/gogf.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/gogf.ql new file mode 100644 index 00000000000..7b56fd97441 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gogf/gogf.ql @@ -0,0 +1,4 @@ +import go + +from SQL::QueryString qs +select qs diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/QueryString.expected b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/QueryString.expected deleted file mode 100644 index db33d6d2504..00000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/QueryString.expected +++ /dev/null @@ -1,3 +0,0 @@ -testFailures -invalidModelRow -failures diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/QueryString.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/QueryString.ql deleted file mode 100644 index eeb43a82fad..00000000000 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/QueryString.ql +++ /dev/null @@ -1,60 +0,0 @@ -import go -import semmle.go.dataflow.ExternalFlow -import ModelValidation -import TestUtilities.InlineExpectationsTest - -module SqlTest implements TestSig { - string getARelevantTag() { result = "query" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "query" and - exists(SQL::Query q, SQL::QueryString qs | qs = q.getAQueryString() | - q.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - element = q.toString() and - value = qs.toString() - ) - } -} - -module QueryString implements TestSig { - string getARelevantTag() { result = "querystring" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "querystring" and - element = "" and - exists(SQL::QueryString qs | not exists(SQL::Query q | qs = q.getAQueryString()) | - qs.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - value = qs.toString() - ) - } -} - -module Config implements DataFlow::ConfigSig { - predicate isSource(DataFlow::Node n) { n.asExpr() instanceof StringLit } - - predicate isSink(DataFlow::Node n) { - n = any(DataFlow::CallNode cn | cn.getTarget().getName() = "sink").getAnArgument() - } -} - -module Flow = TaintTracking::Global; - -module TaintFlow implements TestSig { - string getARelevantTag() { result = "flowfrom" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "flowfrom" and - element = "" and - exists(DataFlow::Node fromNode, DataFlow::Node toNode | - toNode - .hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), - location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and - Flow::flow(fromNode, toNode) and - value = fromNode.asExpr().(StringLit).getValue() - ) - } -} - -import MakeTest> diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/go.mod b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/go.mod index 826ed0eb1c0..1f243775658 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/go.mod +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/go.mod @@ -2,4 +2,4 @@ module main go 1.18 -require github.com/rqlite/gorqlite v0.0.0-20240808172217-12ae7d03ef19 +require github.com/rqlite/gorqlite v0.0.0-20220528150909-c4e99ae96be6 diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/gorqlite.expected b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/gorqlite.expected new file mode 100644 index 00000000000..cbd8166ea5e --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/gorqlite.expected @@ -0,0 +1,6 @@ +| gorqlite.go:11:13:11:16 | sqls | +| gorqlite.go:12:13:12:16 | sqls | +| gorqlite.go:13:13:13:16 | sqls | +| gorqlite.go:14:16:14:18 | sql | +| gorqlite.go:15:16:15:18 | sql | +| gorqlite.go:16:16:16:18 | sql | diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/gorqlite.go b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/gorqlite.go index ebd6e5fd9f3..9b60c6684e6 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/gorqlite.go +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/gorqlite.go @@ -1,49 +1,20 @@ package main -//go:generate depstubber -vendor github.com/rqlite/gorqlite Connection,ParameterizedStatement Open +//go:generate depstubber -vendor github.com/rqlite/gorqlite Connection Open import ( - "context" - "github.com/rqlite/gorqlite" ) -func gorqlitetest(sql string, sqls []string, param_sql gorqlite.ParameterizedStatement, param_sqls []gorqlite.ParameterizedStatement, ctx context.Context) { +func gorqlitetest(sql string, sqls []string) { conn, _ := gorqlite.Open("dbUrl") - - conn.Query(sqls) // $ querystring=sqls - conn.Queue(sqls) // $ querystring=sqls - conn.Write(sqls) // $ querystring=sqls - + conn.Query(sqls) // $ querystring=sqls + conn.Queue(sqls) // $ querystring=sqls + conn.Write(sqls) // $ querystring=sqls conn.QueryOne(sql) // $ querystring=sql conn.QueueOne(sql) // $ querystring=sql conn.WriteOne(sql) // $ querystring=sql - - conn.QueryParameterized(param_sqls) // $ querystring=param_sqls - conn.QueueParameterized(param_sqls) // $ querystring=param_sqls - conn.WriteParameterized(param_sqls) // $ querystring=param_sqls - - conn.QueryOneParameterized(param_sql) // $ querystring=param_sql - conn.QueueOneParameterized(param_sql) // $ querystring=param_sql - conn.WriteOneParameterized(param_sql) // $ querystring=param_sql - - conn.QueryContext(ctx, sqls) // $ querystring=sqls - conn.QueueContext(ctx, sqls) // $ querystring=sqls - conn.WriteContext(ctx, sqls) // $ querystring=sqls - - conn.QueryOneContext(ctx, sql) // $ querystring=sql - conn.QueueOneContext(ctx, sql) // $ querystring=sql - conn.WriteOneContext(ctx, sql) // $ querystring=sql - - conn.QueryParameterizedContext(ctx, param_sqls) // $ querystring=param_sqls - conn.QueueParameterizedContext(ctx, param_sqls) // $ querystring=param_sqls - conn.WriteParameterizedContext(ctx, param_sqls) // $ querystring=param_sqls - - conn.QueryOneParameterizedContext(ctx, param_sql) // $ querystring=param_sql - conn.QueueOneParameterizedContext(ctx, param_sql) // $ querystring=param_sql - conn.WriteOneParameterizedContext(ctx, param_sql) // $ querystring=param_sql } - func main() { return } diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/gorqlite.ql b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/gorqlite.ql new file mode 100644 index 00000000000..7b56fd97441 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/gorqlite.ql @@ -0,0 +1,4 @@ +import go + +from SQL::QueryString qs +select qs diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/vendor/github.com/rqlite/gorqlite/stub.go b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/vendor/github.com/rqlite/gorqlite/stub.go index 0572097582e..f6f4ca18ec1 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/vendor/github.com/rqlite/gorqlite/stub.go +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/vendor/github.com/rqlite/gorqlite/stub.go @@ -2,15 +2,11 @@ // This is a simple stub for github.com/rqlite/gorqlite, strictly for use in testing. // See the LICENSE file for information about the licensing of the original library. -// Source: github.com/rqlite/gorqlite (exports: Connection,ParameterizedStatement; functions: Open) +// Source: github.com/rqlite/gorqlite (exports: Connection; functions: Open) // Package gorqlite is a stub of github.com/rqlite/gorqlite, generated by depstubber. package gorqlite -import ( - context "context" -) - type Connection struct { ID string } @@ -33,83 +29,19 @@ func (_ *Connection) Query(_ []string) ([]QueryResult, error) { return nil, nil } -func (_ *Connection) QueryContext(_ context.Context, _ []string) ([]QueryResult, error) { - return nil, nil -} - func (_ *Connection) QueryOne(_ string) (QueryResult, error) { return QueryResult{}, nil } -func (_ *Connection) QueryOneContext(_ context.Context, _ string) (QueryResult, error) { - return QueryResult{}, nil -} - -func (_ *Connection) QueryOneParameterized(_ ParameterizedStatement) (QueryResult, error) { - return QueryResult{}, nil -} - -func (_ *Connection) QueryOneParameterizedContext(_ context.Context, _ ParameterizedStatement) (QueryResult, error) { - return QueryResult{}, nil -} - -func (_ *Connection) QueryParameterized(_ []ParameterizedStatement) ([]QueryResult, error) { - return nil, nil -} - -func (_ *Connection) QueryParameterizedContext(_ context.Context, _ []ParameterizedStatement) ([]QueryResult, error) { - return nil, nil -} - func (_ *Connection) Queue(_ []string) (int64, error) { return 0, nil } -func (_ *Connection) QueueContext(_ context.Context, _ []string) (int64, error) { - return 0, nil -} - func (_ *Connection) QueueOne(_ string) (int64, error) { return 0, nil } -func (_ *Connection) QueueOneContext(_ context.Context, _ string) (int64, error) { - return 0, nil -} - -func (_ *Connection) QueueOneParameterized(_ ParameterizedStatement) (int64, error) { - return 0, nil -} - -func (_ *Connection) QueueOneParameterizedContext(_ context.Context, _ ParameterizedStatement) (int64, error) { - return 0, nil -} - -func (_ *Connection) QueueParameterized(_ []ParameterizedStatement) (int64, error) { - return 0, nil -} - -func (_ *Connection) QueueParameterizedContext(_ context.Context, _ []ParameterizedStatement) (int64, error) { - return 0, nil -} - -func (_ *Connection) Request(_ []string) ([]RequestResult, error) { - return nil, nil -} - -func (_ *Connection) RequestContext(_ context.Context, _ []string) ([]RequestResult, error) { - return nil, nil -} - -func (_ *Connection) RequestParameterized(_ []ParameterizedStatement) ([]RequestResult, error) { - return nil, nil -} - -func (_ *Connection) RequestParameterizedContext(_ context.Context, _ []ParameterizedStatement) ([]RequestResult, error) { - return nil, nil -} - -func (_ *Connection) SetConsistencyLevel(_ interface{}) error { +func (_ *Connection) SetConsistencyLevel(_ string) error { return nil } @@ -121,41 +53,12 @@ func (_ *Connection) Write(_ []string) ([]WriteResult, error) { return nil, nil } -func (_ *Connection) WriteContext(_ context.Context, _ []string) ([]WriteResult, error) { - return nil, nil -} - func (_ *Connection) WriteOne(_ string) (WriteResult, error) { return WriteResult{}, nil } -func (_ *Connection) WriteOneContext(_ context.Context, _ string) (WriteResult, error) { - return WriteResult{}, nil -} - -func (_ *Connection) WriteOneParameterized(_ ParameterizedStatement) (WriteResult, error) { - return WriteResult{}, nil -} - -func (_ *Connection) WriteOneParameterizedContext(_ context.Context, _ ParameterizedStatement) (WriteResult, error) { - return WriteResult{}, nil -} - -func (_ *Connection) WriteParameterized(_ []ParameterizedStatement) ([]WriteResult, error) { - return nil, nil -} - -func (_ *Connection) WriteParameterizedContext(_ context.Context, _ []ParameterizedStatement) ([]WriteResult, error) { - return nil, nil -} - -func Open(_ string) (*Connection, error) { - return nil, nil -} - -type ParameterizedStatement struct { - Query string - Arguments []interface{} +func Open(_ string) (Connection, error) { + return Connection{}, nil } type QueryResult struct { @@ -187,20 +90,10 @@ func (_ *QueryResult) Scan(_ ...interface{}) error { return nil } -func (_ *QueryResult) Slice() ([]interface{}, error) { - return nil, nil -} - func (_ *QueryResult) Types() []string { return nil } -type RequestResult struct { - Err error - Query *QueryResult - Write *WriteResult -} - type WriteResult struct { Err error Timing float64 diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/vendor/modules.txt b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/vendor/modules.txt index dafb7c6d1a9..f5e5b9989ed 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/vendor/modules.txt +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/gorqlite/vendor/modules.txt @@ -1,3 +1,3 @@ -# github.com/rqlite/gorqlite v0.0.0-20240808172217-12ae7d03ef19 +# github.com/rqlite/gorqlite v0.0.0-20220528150909-c4e99ae96be6 ## explicit github.com/rqlite/gorqlite diff --git a/go/ql/test/library-tests/semmle/go/frameworks/SQL/squirrel.go b/go/ql/test/library-tests/semmle/go/frameworks/SQL/squirrel.go index 3629b8087cb..15b687c7ad1 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/SQL/squirrel.go +++ b/go/ql/test/library-tests/semmle/go/frameworks/SQL/squirrel.go @@ -10,35 +10,35 @@ func squirrelTest(querypart string) { squirrel.Expr(querypart) // $ querystring=querypart deleteBuilder := squirrel.Delete(querypart) // $ querystring=querypart deleteBuilder.From(querypart) // $ querystring=querypart - deleteBuilder.OrderBy(querypart) // $ querystring=querypart + deleteBuilder.OrderBy(querypart) // $ querystring=[]type{args} deleteBuilder.Prefix(querypart) // $ querystring=querypart deleteBuilder.Suffix(querypart) // $ querystring=querypart deleteBuilder.Where(querypart) // $ querystring=querypart insertBuilder := squirrel.Insert(querypart) // $ querystring=querypart - insertBuilder.Columns(querypart) // $ querystring=querypart - insertBuilder.Options(querypart) // $ querystring=querypart + insertBuilder.Columns(querypart) // $ querystring=[]type{args} + insertBuilder.Options(querypart) // $ querystring=[]type{args} insertBuilder.Prefix(querypart) // $ querystring=querypart insertBuilder.Suffix(querypart) // $ querystring=querypart insertBuilder.Into(querypart) // $ querystring=querypart - selectBuilder := squirrel.Select(querypart) // $ querystring=querypart - selectBuilder.Columns(querypart) // $ querystring=querypart + selectBuilder := squirrel.Select(querypart) // $ querystring=[]type{args} + selectBuilder.Columns(querypart) // $ querystring=[]type{args} selectBuilder.From(querypart) // $ querystring=querypart - selectBuilder.Options(querypart) // $ querystring=querypart - selectBuilder.OrderBy(querypart) // $ querystring=querypart + selectBuilder.Options(querypart) // $ querystring=[]type{args} + selectBuilder.OrderBy(querypart) // $ querystring=[]type{args} selectBuilder.Prefix(querypart) // $ querystring=querypart selectBuilder.Suffix(querypart) // $ querystring=querypart selectBuilder.Where(querypart) // $ querystring=querypart selectBuilder.CrossJoin(querypart) // $ querystring=querypart - selectBuilder.GroupBy(querypart) // $ querystring=querypart + selectBuilder.GroupBy(querypart) // $ querystring=[]type{args} selectBuilder.InnerJoin(querypart) // $ querystring=querypart selectBuilder.LeftJoin(querypart) // $ querystring=querypart selectBuilder.RightJoin(querypart) // $ querystring=querypart updateBuilder := squirrel.Update(querypart) // $ querystring=querypart updateBuilder.From(querypart) // $ querystring=querypart - updateBuilder.OrderBy(querypart) // $ querystring=querypart + updateBuilder.OrderBy(querypart) // $ querystring=[]type{args} updateBuilder.Prefix(querypart) // $ querystring=querypart updateBuilder.Suffix(querypart) // $ querystring=querypart updateBuilder.Where(querypart) // $ querystring=querypart diff --git a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/SqlInjection.expected b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/SqlInjection.expected index b7a66a6a903..446695b259b 100644 --- a/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/SqlInjection.expected +++ b/go/ql/test/library-tests/semmle/go/frameworks/XNetHtml/SqlInjection.expected @@ -1,12 +1,11 @@ #select | test.go:57:11:57:41 | call to EscapeString | test.go:56:2:56:42 | ... := ...[0] | test.go:57:11:57:41 | call to EscapeString | This query depends on a $@. | test.go:56:2:56:42 | ... := ...[0] | user-provided value | edges -| test.go:56:2:56:42 | ... := ...[0] | test.go:57:29:57:40 | selection of Value | provenance | Src:MaD:3 | -| test.go:57:29:57:40 | selection of Value | test.go:57:11:57:41 | call to EscapeString | provenance | MaD:2 Sink:MaD:1 | +| test.go:56:2:56:42 | ... := ...[0] | test.go:57:29:57:40 | selection of Value | provenance | Src:MaD:2 | +| test.go:57:29:57:40 | selection of Value | test.go:57:11:57:41 | call to EscapeString | provenance | MaD:1 | models -| 1 | Sink: database/sql; DB; false; Query; ; ; Argument[0]; sql-injection; manual | -| 2 | Summary: golang.org/x/net/html; ; false; EscapeString; ; ; Argument[0]; ReturnValue; taint; manual | -| 3 | Source: net/http; Request; true; Cookie; ; ; ReturnValue[0]; remote; manual | +| 1 | Summary: golang.org/x/net/html; ; false; EscapeString; ; ; Argument[0]; ReturnValue; taint; manual | +| 2 | Source: net/http; Request; true; Cookie; ; ; ReturnValue[0]; remote; manual | nodes | test.go:56:2:56:42 | ... := ...[0] | semmle.label | ... := ...[0] | | test.go:57:11:57:41 | call to EscapeString | semmle.label | call to EscapeString | diff --git a/go/ql/test/query-tests/Security/CWE-089/SqlInjection.expected b/go/ql/test/query-tests/Security/CWE-089/SqlInjection.expected index 2741f6545e9..0da4f893d87 100644 --- a/go/ql/test/query-tests/Security/CWE-089/SqlInjection.expected +++ b/go/ql/test/query-tests/Security/CWE-089/SqlInjection.expected @@ -25,53 +25,53 @@ | mongoDB.go:80:22:80:27 | filter | mongoDB.go:40:20:40:30 | call to Referer | mongoDB.go:80:22:80:27 | filter | This query depends on a $@. | mongoDB.go:40:20:40:30 | call to Referer | user-provided value | | mongoDB.go:81:18:81:25 | pipeline | mongoDB.go:40:20:40:30 | call to Referer | mongoDB.go:81:18:81:25 | pipeline | This query depends on a $@. | mongoDB.go:40:20:40:30 | call to Referer | user-provided value | edges -| SqlInjection.go:10:7:11:30 | []type{args} [array] | SqlInjection.go:10:7:11:30 | call to Sprintf | provenance | MaD:4 | -| SqlInjection.go:10:7:11:30 | call to Sprintf | SqlInjection.go:12:11:12:11 | q | provenance | Sink:MaD:1 | -| SqlInjection.go:11:3:11:9 | selection of URL | SqlInjection.go:11:3:11:17 | call to Query | provenance | Src:MaD:25 MaD:26 | +| SqlInjection.go:10:7:11:30 | []type{args} [array] | SqlInjection.go:10:7:11:30 | call to Sprintf | provenance | MaD:2 | +| SqlInjection.go:10:7:11:30 | call to Sprintf | SqlInjection.go:12:11:12:11 | q | provenance | | +| SqlInjection.go:11:3:11:9 | selection of URL | SqlInjection.go:11:3:11:17 | call to Query | provenance | Src:MaD:9 MaD:10 | | SqlInjection.go:11:3:11:17 | call to Query | SqlInjection.go:11:3:11:29 | index expression | provenance | | | SqlInjection.go:11:3:11:29 | index expression | SqlInjection.go:10:7:11:30 | []type{args} [array] | provenance | | | SqlInjection.go:11:3:11:29 | index expression | SqlInjection.go:10:7:11:30 | call to Sprintf | provenance | FunctionModel | | issue48.go:17:2:17:33 | ... := ...[0] | issue48.go:18:17:18:17 | b | provenance | | -| issue48.go:17:25:17:32 | selection of Body | issue48.go:17:2:17:33 | ... := ...[0] | provenance | Src:MaD:22 MaD:19 | -| issue48.go:18:17:18:17 | b | issue48.go:18:20:18:39 | &... | provenance | MaD:3 | +| issue48.go:17:25:17:32 | selection of Body | issue48.go:17:2:17:33 | ... := ...[0] | provenance | Src:MaD:6 MaD:3 | +| issue48.go:18:17:18:17 | b | issue48.go:18:20:18:39 | &... | provenance | MaD:1 | | issue48.go:18:20:18:39 | &... | issue48.go:21:3:21:33 | index expression | provenance | | -| issue48.go:20:8:21:34 | []type{args} [array] | issue48.go:20:8:21:34 | call to Sprintf | provenance | MaD:4 | -| issue48.go:20:8:21:34 | call to Sprintf | issue48.go:22:11:22:12 | q3 | provenance | Sink:MaD:1 | +| issue48.go:20:8:21:34 | []type{args} [array] | issue48.go:20:8:21:34 | call to Sprintf | provenance | MaD:2 | +| issue48.go:20:8:21:34 | call to Sprintf | issue48.go:22:11:22:12 | q3 | provenance | | | issue48.go:21:3:21:33 | index expression | issue48.go:20:8:21:34 | []type{args} [array] | provenance | | | issue48.go:21:3:21:33 | index expression | issue48.go:20:8:21:34 | call to Sprintf | provenance | FunctionModel | | issue48.go:27:2:27:34 | ... := ...[0] | issue48.go:28:17:28:18 | b2 | provenance | | -| issue48.go:27:26:27:33 | selection of Body | issue48.go:27:2:27:34 | ... := ...[0] | provenance | Src:MaD:22 MaD:19 | -| issue48.go:28:17:28:18 | b2 | issue48.go:28:21:28:41 | &... | provenance | MaD:3 | +| issue48.go:27:26:27:33 | selection of Body | issue48.go:27:2:27:34 | ... := ...[0] | provenance | Src:MaD:6 MaD:3 | +| issue48.go:28:17:28:18 | b2 | issue48.go:28:21:28:41 | &... | provenance | MaD:1 | | issue48.go:28:21:28:41 | &... | issue48.go:31:3:31:31 | selection of Category | provenance | | -| issue48.go:30:8:31:32 | []type{args} [array] | issue48.go:30:8:31:32 | call to Sprintf | provenance | MaD:4 | -| issue48.go:30:8:31:32 | call to Sprintf | issue48.go:32:11:32:12 | q4 | provenance | Sink:MaD:1 | +| issue48.go:30:8:31:32 | []type{args} [array] | issue48.go:30:8:31:32 | call to Sprintf | provenance | MaD:2 | +| issue48.go:30:8:31:32 | call to Sprintf | issue48.go:32:11:32:12 | q4 | provenance | | | issue48.go:31:3:31:31 | selection of Category | issue48.go:30:8:31:32 | []type{args} [array] | provenance | | | issue48.go:31:3:31:31 | selection of Category | issue48.go:30:8:31:32 | call to Sprintf | provenance | FunctionModel | -| issue48.go:37:17:37:50 | type conversion | issue48.go:37:53:37:73 | &... | provenance | MaD:3 | -| issue48.go:37:24:37:30 | selection of URL | issue48.go:37:24:37:38 | call to Query | provenance | Src:MaD:25 MaD:26 | +| issue48.go:37:17:37:50 | type conversion | issue48.go:37:53:37:73 | &... | provenance | MaD:1 | +| issue48.go:37:24:37:30 | selection of URL | issue48.go:37:24:37:38 | call to Query | provenance | Src:MaD:9 MaD:10 | | issue48.go:37:24:37:38 | call to Query | issue48.go:37:17:37:50 | type conversion | provenance | | | issue48.go:37:53:37:73 | &... | issue48.go:40:3:40:31 | selection of Category | provenance | | -| issue48.go:39:8:40:32 | []type{args} [array] | issue48.go:39:8:40:32 | call to Sprintf | provenance | MaD:4 | -| issue48.go:39:8:40:32 | call to Sprintf | issue48.go:41:11:41:12 | q5 | provenance | Sink:MaD:1 | +| issue48.go:39:8:40:32 | []type{args} [array] | issue48.go:39:8:40:32 | call to Sprintf | provenance | MaD:2 | +| issue48.go:39:8:40:32 | call to Sprintf | issue48.go:41:11:41:12 | q5 | provenance | | | issue48.go:40:3:40:31 | selection of Category | issue48.go:39:8:40:32 | []type{args} [array] | provenance | | | issue48.go:40:3:40:31 | selection of Category | issue48.go:39:8:40:32 | call to Sprintf | provenance | FunctionModel | -| main.go:11:11:11:16 | selection of Form | main.go:11:11:11:28 | index expression | provenance | Src:MaD:23 Sink:MaD:1 | -| main.go:15:11:15:84 | []type{args} [array] | main.go:15:11:15:84 | call to Sprintf | provenance | MaD:4 Sink:MaD:2 | -| main.go:15:63:15:67 | selection of URL | main.go:15:63:15:75 | call to Query | provenance | Src:MaD:25 MaD:26 | +| main.go:11:11:11:16 | selection of Form | main.go:11:11:11:28 | index expression | provenance | Src:MaD:7 | +| main.go:15:11:15:84 | []type{args} [array] | main.go:15:11:15:84 | call to Sprintf | provenance | MaD:2 | +| main.go:15:63:15:67 | selection of URL | main.go:15:63:15:75 | call to Query | provenance | Src:MaD:9 MaD:10 | | main.go:15:63:15:75 | call to Query | main.go:15:63:15:83 | index expression | provenance | | | main.go:15:63:15:83 | index expression | main.go:15:11:15:84 | []type{args} [array] | provenance | | -| main.go:15:63:15:83 | index expression | main.go:15:11:15:84 | call to Sprintf | provenance | FunctionModel Sink:MaD:2 | -| main.go:16:11:16:85 | []type{args} [array] | main.go:16:11:16:85 | call to Sprintf | provenance | MaD:4 Sink:MaD:2 | -| main.go:16:63:16:70 | selection of Header | main.go:16:63:16:84 | call to Get | provenance | Src:MaD:24 MaD:20 | +| main.go:15:63:15:83 | index expression | main.go:15:11:15:84 | call to Sprintf | provenance | FunctionModel | +| main.go:16:11:16:85 | []type{args} [array] | main.go:16:11:16:85 | call to Sprintf | provenance | MaD:2 | +| main.go:16:63:16:70 | selection of Header | main.go:16:63:16:84 | call to Get | provenance | Src:MaD:8 MaD:4 | | main.go:16:63:16:84 | call to Get | main.go:16:11:16:85 | []type{args} [array] | provenance | | -| main.go:16:63:16:84 | call to Get | main.go:16:11:16:85 | call to Sprintf | provenance | FunctionModel Sink:MaD:2 | +| main.go:16:63:16:84 | call to Get | main.go:16:11:16:85 | call to Sprintf | provenance | FunctionModel | | main.go:28:17:31:2 | &... [pointer, Category] | main.go:34:3:34:13 | RequestData [pointer, Category] | provenance | | | main.go:28:18:31:2 | struct literal [Category] | main.go:28:17:31:2 | &... [pointer, Category] | provenance | | -| main.go:30:13:30:19 | selection of URL | main.go:30:13:30:27 | call to Query | provenance | Src:MaD:25 MaD:26 | +| main.go:30:13:30:19 | selection of URL | main.go:30:13:30:27 | call to Query | provenance | Src:MaD:9 MaD:10 | | main.go:30:13:30:27 | call to Query | main.go:30:13:30:39 | index expression | provenance | | | main.go:30:13:30:39 | index expression | main.go:28:18:31:2 | struct literal [Category] | provenance | | -| main.go:33:7:34:23 | []type{args} [array] | main.go:33:7:34:23 | call to Sprintf | provenance | MaD:4 | -| main.go:33:7:34:23 | call to Sprintf | main.go:35:11:35:11 | q | provenance | Sink:MaD:1 | +| main.go:33:7:34:23 | []type{args} [array] | main.go:33:7:34:23 | call to Sprintf | provenance | MaD:2 | +| main.go:33:7:34:23 | call to Sprintf | main.go:35:11:35:11 | q | provenance | | | main.go:34:3:34:13 | RequestData [pointer, Category] | main.go:34:3:34:13 | implicit dereference [Category] | provenance | | | main.go:34:3:34:13 | implicit dereference [Category] | main.go:34:3:34:22 | selection of Category | provenance | | | main.go:34:3:34:22 | selection of Category | main.go:33:7:34:23 | []type{args} [array] | provenance | | @@ -80,11 +80,11 @@ edges | main.go:39:2:39:12 | definition of RequestData [pointer, Category] | main.go:43:3:43:13 | RequestData [pointer, Category] | provenance | | | main.go:40:2:40:12 | RequestData [pointer, Category] | main.go:40:2:40:12 | implicit dereference [Category] | provenance | | | main.go:40:2:40:12 | implicit dereference [Category] | main.go:39:2:39:12 | definition of RequestData [pointer, Category] | provenance | | -| main.go:40:25:40:31 | selection of URL | main.go:40:25:40:39 | call to Query | provenance | Src:MaD:25 MaD:26 | +| main.go:40:25:40:31 | selection of URL | main.go:40:25:40:39 | call to Query | provenance | Src:MaD:9 MaD:10 | | main.go:40:25:40:39 | call to Query | main.go:40:25:40:51 | index expression | provenance | | | main.go:40:25:40:51 | index expression | main.go:40:2:40:12 | implicit dereference [Category] | provenance | | -| main.go:42:7:43:23 | []type{args} [array] | main.go:42:7:43:23 | call to Sprintf | provenance | MaD:4 | -| main.go:42:7:43:23 | call to Sprintf | main.go:44:11:44:11 | q | provenance | Sink:MaD:1 | +| main.go:42:7:43:23 | []type{args} [array] | main.go:42:7:43:23 | call to Sprintf | provenance | MaD:2 | +| main.go:42:7:43:23 | call to Sprintf | main.go:44:11:44:11 | q | provenance | | | main.go:43:3:43:13 | RequestData [pointer, Category] | main.go:43:3:43:13 | implicit dereference [Category] | provenance | | | main.go:43:3:43:13 | implicit dereference [Category] | main.go:43:3:43:22 | selection of Category | provenance | | | main.go:43:3:43:22 | selection of Category | main.go:42:7:43:23 | []type{args} [array] | provenance | | @@ -93,11 +93,11 @@ edges | main.go:48:2:48:12 | definition of RequestData [pointer, Category] | main.go:52:3:52:13 | RequestData [pointer, Category] | provenance | | | main.go:49:3:49:14 | star expression [Category] | main.go:48:2:48:12 | definition of RequestData [pointer, Category] | provenance | | | main.go:49:4:49:14 | RequestData [pointer, Category] | main.go:49:3:49:14 | star expression [Category] | provenance | | -| main.go:49:28:49:34 | selection of URL | main.go:49:28:49:42 | call to Query | provenance | Src:MaD:25 MaD:26 | +| main.go:49:28:49:34 | selection of URL | main.go:49:28:49:42 | call to Query | provenance | Src:MaD:9 MaD:10 | | main.go:49:28:49:42 | call to Query | main.go:49:28:49:54 | index expression | provenance | | | main.go:49:28:49:54 | index expression | main.go:49:3:49:14 | star expression [Category] | provenance | | -| main.go:51:7:52:23 | []type{args} [array] | main.go:51:7:52:23 | call to Sprintf | provenance | MaD:4 | -| main.go:51:7:52:23 | call to Sprintf | main.go:53:11:53:11 | q | provenance | Sink:MaD:1 | +| main.go:51:7:52:23 | []type{args} [array] | main.go:51:7:52:23 | call to Sprintf | provenance | MaD:2 | +| main.go:51:7:52:23 | call to Sprintf | main.go:53:11:53:11 | q | provenance | | | main.go:52:3:52:13 | RequestData [pointer, Category] | main.go:52:3:52:13 | implicit dereference [Category] | provenance | | | main.go:52:3:52:13 | implicit dereference [Category] | main.go:52:3:52:22 | selection of Category | provenance | | | main.go:52:3:52:22 | selection of Category | main.go:51:7:52:23 | []type{args} [array] | provenance | | @@ -106,60 +106,44 @@ edges | main.go:57:2:57:12 | definition of RequestData [pointer, Category] | main.go:61:5:61:15 | RequestData [pointer, Category] | provenance | | | main.go:58:3:58:14 | star expression [Category] | main.go:57:2:57:12 | definition of RequestData [pointer, Category] | provenance | | | main.go:58:4:58:14 | RequestData [pointer, Category] | main.go:58:3:58:14 | star expression [Category] | provenance | | -| main.go:58:28:58:34 | selection of URL | main.go:58:28:58:42 | call to Query | provenance | Src:MaD:25 MaD:26 | +| main.go:58:28:58:34 | selection of URL | main.go:58:28:58:42 | call to Query | provenance | Src:MaD:9 MaD:10 | | main.go:58:28:58:42 | call to Query | main.go:58:28:58:54 | index expression | provenance | | | main.go:58:28:58:54 | index expression | main.go:58:3:58:14 | star expression [Category] | provenance | | -| main.go:60:7:61:26 | []type{args} [array] | main.go:60:7:61:26 | call to Sprintf | provenance | MaD:4 | -| main.go:60:7:61:26 | call to Sprintf | main.go:62:11:62:11 | q | provenance | Sink:MaD:1 | +| main.go:60:7:61:26 | []type{args} [array] | main.go:60:7:61:26 | call to Sprintf | provenance | MaD:2 | +| main.go:60:7:61:26 | call to Sprintf | main.go:62:11:62:11 | q | provenance | | | main.go:61:3:61:25 | selection of Category | main.go:60:7:61:26 | []type{args} [array] | provenance | | | main.go:61:3:61:25 | selection of Category | main.go:60:7:61:26 | call to Sprintf | provenance | FunctionModel | | main.go:61:4:61:15 | star expression [Category] | main.go:61:3:61:25 | selection of Category | provenance | | | main.go:61:5:61:15 | RequestData [pointer, Category] | main.go:61:4:61:15 | star expression [Category] | provenance | | -| mongoDB.go:40:20:40:30 | call to Referer | mongoDB.go:42:28:42:41 | untrustedInput | provenance | Src:MaD:21 | +| mongoDB.go:40:20:40:30 | call to Referer | mongoDB.go:42:28:42:41 | untrustedInput | provenance | Src:MaD:5 | | mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:50:34:50:39 | filter | provenance | | -| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:61:27:61:32 | filter | provenance | Sink:MaD:6 | -| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:63:23:63:28 | filter | provenance | Sink:MaD:7 | -| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:64:22:64:27 | filter | provenance | Sink:MaD:8 | -| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:66:32:66:37 | filter | provenance | Sink:MaD:9 | -| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:69:17:69:22 | filter | provenance | Sink:MaD:10 | -| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:70:20:70:25 | filter | provenance | Sink:MaD:11 | -| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:71:29:71:34 | filter | provenance | Sink:MaD:12 | -| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:72:30:72:35 | filter | provenance | Sink:MaD:13 | -| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:73:29:73:34 | filter | provenance | Sink:MaD:14 | -| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:78:23:78:28 | filter | provenance | Sink:MaD:15 | -| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:79:23:79:28 | filter | provenance | Sink:MaD:16 | -| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:80:22:80:27 | filter | provenance | Sink:MaD:17 | +| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:61:27:61:32 | filter | provenance | | +| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:63:23:63:28 | filter | provenance | | +| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:64:22:64:27 | filter | provenance | | +| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:66:32:66:37 | filter | provenance | | +| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:69:17:69:22 | filter | provenance | | +| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:70:20:70:25 | filter | provenance | | +| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:71:29:71:34 | filter | provenance | | +| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:72:30:72:35 | filter | provenance | | +| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:73:29:73:34 | filter | provenance | | +| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:78:23:78:28 | filter | provenance | | +| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:79:23:79:28 | filter | provenance | | +| mongoDB.go:42:19:42:42 | struct literal | mongoDB.go:80:22:80:27 | filter | provenance | | | mongoDB.go:42:28:42:41 | untrustedInput | mongoDB.go:42:19:42:42 | struct literal | provenance | Config | -| mongoDB.go:50:23:50:40 | struct literal | mongoDB.go:57:22:57:29 | pipeline | provenance | Sink:MaD:5 | -| mongoDB.go:50:23:50:40 | struct literal | mongoDB.go:81:18:81:25 | pipeline | provenance | Sink:MaD:18 | +| mongoDB.go:50:23:50:40 | struct literal | mongoDB.go:57:22:57:29 | pipeline | provenance | | +| mongoDB.go:50:23:50:40 | struct literal | mongoDB.go:81:18:81:25 | pipeline | provenance | | | mongoDB.go:50:34:50:39 | filter | mongoDB.go:50:23:50:40 | struct literal | provenance | Config | models -| 1 | Sink: database/sql; DB; false; Query; ; ; Argument[0]; sql-injection; manual | -| 2 | Sink: database/sql; Tx; false; Query; ; ; Argument[0]; sql-injection; manual | -| 3 | Summary: encoding/json; ; false; Unmarshal; ; ; Argument[0]; Argument[1]; taint; manual | -| 4 | Summary: fmt; ; true; Sprintf; ; ; Argument[1].ArrayElement; ReturnValue; taint; manual | -| 5 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; Aggregate; ; ; Argument[1]; nosql-injection; manual | -| 6 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; CountDocuments; ; ; Argument[1]; nosql-injection; manual | -| 7 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; DeleteMany; ; ; Argument[1]; nosql-injection; manual | -| 8 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; DeleteOne; ; ; Argument[1]; nosql-injection; manual | -| 9 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; Distinct; ; ; Argument[2]; nosql-injection; manual | -| 10 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; Find; ; ; Argument[1]; nosql-injection; manual | -| 11 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; FindOne; ; ; Argument[1]; nosql-injection; manual | -| 12 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; FindOneAndDelete; ; ; Argument[1]; nosql-injection; manual | -| 13 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; FindOneAndReplace; ; ; Argument[1]; nosql-injection; manual | -| 14 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; FindOneAndUpdate; ; ; Argument[1]; nosql-injection; manual | -| 15 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; ReplaceOne; ; ; Argument[1]; nosql-injection; manual | -| 16 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; UpdateMany; ; ; Argument[1]; nosql-injection; manual | -| 17 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; UpdateOne; ; ; Argument[1]; nosql-injection; manual | -| 18 | Sink: go.mongodb.org/mongo-driver/mongo; Collection; true; Watch; ; ; Argument[1]; nosql-injection; manual | -| 19 | Summary: io/ioutil; ; false; ReadAll; ; ; Argument[0]; ReturnValue[0]; taint; manual | -| 20 | Summary: net/http; Header; true; Get; ; ; Argument[receiver]; ReturnValue; taint; manual | -| 21 | Source: net/http; Request; true; Referer; ; ; ReturnValue; remote; manual | -| 22 | Source: net/http; Request; true; Body; ; ; ; remote; manual | -| 23 | Source: net/http; Request; true; Form; ; ; ; remote; manual | -| 24 | Source: net/http; Request; true; Header; ; ; ; remote; manual | -| 25 | Source: net/http; Request; true; URL; ; ; ; remote; manual | -| 26 | Summary: net/url; URL; true; Query; ; ; Argument[receiver]; ReturnValue; taint; manual | +| 1 | Summary: encoding/json; ; false; Unmarshal; ; ; Argument[0]; Argument[1]; taint; manual | +| 2 | Summary: fmt; ; true; Sprintf; ; ; Argument[1].ArrayElement; ReturnValue; taint; manual | +| 3 | Summary: io/ioutil; ; false; ReadAll; ; ; Argument[0]; ReturnValue[0]; taint; manual | +| 4 | Summary: net/http; Header; true; Get; ; ; Argument[receiver]; ReturnValue; taint; manual | +| 5 | Source: net/http; Request; true; Referer; ; ; ReturnValue; remote; manual | +| 6 | Source: net/http; Request; true; Body; ; ; ; remote; manual | +| 7 | Source: net/http; Request; true; Form; ; ; ; remote; manual | +| 8 | Source: net/http; Request; true; Header; ; ; ; remote; manual | +| 9 | Source: net/http; Request; true; URL; ; ; ; remote; manual | +| 10 | Summary: net/url; URL; true; Query; ; ; Argument[receiver]; ReturnValue; taint; manual | nodes | SqlInjection.go:10:7:11:30 | []type{args} [array] | semmle.label | []type{args} [array] | | SqlInjection.go:10:7:11:30 | call to Sprintf | semmle.label | call to Sprintf | diff --git a/java/documentation/library-coverage/coverage.csv b/java/documentation/library-coverage/coverage.csv index 7239329e51b..d9c920f443c 100644 --- a/java/documentation/library-coverage/coverage.csv +++ b/java/documentation/library-coverage/coverage.csv @@ -82,14 +82,14 @@ java.beans,,,193,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,193, java.io,66,1,256,,,,,,,,,22,,,,,,,,,,,,,,,44,,,,,,,,,,,,,,,,,,,,,,1,,249,7 java.lang,38,3,756,,13,,,,,,1,,,,,,,,,,,,8,,,,11,,,4,,,1,,,,,,,,,,,,,,,3,,,681,75 java.math,,,9,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9 -java.net,23,3,278,,,,1,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,21,,,,,,,,,,,,,,3,274,4 -java.nio,47,,361,,,,,,,,,5,,,,,,,,,,,,,,,41,,,,,,,,,1,,,,,,,,,,,,,,,259,102 +java.net,23,3,279,,,,1,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,21,,,,,,,,,,,,,,3,275,4 +java.nio,47,,373,,,,,,,,,5,,,,,,,,,,,,,,,41,,,,,,,,,1,,,,,,,,,,,,,,,267,106 java.rmi,,,71,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,71, -java.security,21,,543,,,11,10,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,539,4 +java.security,21,,547,,,11,10,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,543,4 java.sql,15,1,303,,,,1,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,4,,9,,,,,,,,,1,,,,303, java.text,,,134,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,134, java.time,,,123,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,35,88 -java.util,48,2,1218,,,,,,,,,1,,,,,,,,,,,34,,,,3,,,,5,2,,1,2,,,,,,,,,,,,,2,,,704,514 +java.util,48,2,1221,,,,,,,,,1,,,,,,,,,,,34,,,,3,,,,5,2,,1,2,,,,,,,,,,,,,2,,,705,516 javafx.scene.web,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,,, javax.accessibility,,,31,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,31, javax.activation,2,,7,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,1,,,,,,,,,,,,,,,7, @@ -102,7 +102,7 @@ javax.json,,,123,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,100,23 javax.lang.model.element,,,17,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,17, javax.lang.model.type,,,9,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9, javax.lang.model.util,,,68,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,68, -javax.management,2,,799,,,,,,,,,,,,,,,,,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,798,1 +javax.management,2,,802,,,,,,,,,,,,,,,,,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,801,1 javax.naming,7,,324,,,,,,,,,,,,,,,,,6,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,318,6 javax.net,4,,86,,,,2,,,,,,,,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,86, javax.portlet,1,,61,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,61, @@ -192,6 +192,7 @@ org.apache.ibatis.jdbc,6,,57,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6,,,,,,,,,,,,,57, org.apache.ibatis.mapping,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1, org.apache.log4j,11,,,,,,,,,,,,,,,,,,,,,,11,,,,,,,,,,,,,,,,,,,,,,,,,,,,, org.apache.logging.log4j,359,,8,,,,,,,,,,,,,,,,,,,,359,,,,,,,,,,,,,,,,,,,,,,,,,,,,4,4 +org.apache.shiro.authc,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,, org.apache.shiro.codec,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1, org.apache.shiro.jndi,1,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, org.apache.shiro.mgt,1,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/java/documentation/library-coverage/coverage.rst b/java/documentation/library-coverage/coverage.rst index 8fa6813991f..cea3d438ee2 100644 --- a/java/documentation/library-coverage/coverage.rst +++ b/java/documentation/library-coverage/coverage.rst @@ -18,10 +18,10 @@ Java framework & library support `Google Guava `_,``com.google.common.*``,,730,43,9,,,,, JBoss Logging,``org.jboss.logging``,,,324,,,,,, `JSON-java `_,``org.json``,,236,,,,,,, - Java Standard Library,``java.*``,10,4264,259,99,,9,,,26 - Java extensions,"``javax.*``, ``jakarta.*``",69,3257,90,10,4,2,1,1,4 + Java Standard Library,``java.*``,10,4284,259,99,,9,,,26 + Java extensions,"``javax.*``, ``jakarta.*``",69,3260,90,10,4,2,1,1,4 Kotlin Standard Library,``kotlin*``,,1849,16,14,,,,,2 `Spring `_,``org.springframework.*``,38,486,143,26,,28,14,,35 - Others,"``actions.osgi``, ``antlr``, ``ch.ethz.ssh2``, ``cn.hutool.core.codec``, ``com.alibaba.druid.sql``, ``com.alibaba.fastjson2``, ``com.amazonaws.auth``, ``com.auth0.jwt.algorithms``, ``com.azure.identity``, ``com.esotericsoftware.kryo.io``, ``com.esotericsoftware.kryo5.io``, ``com.fasterxml.jackson.core``, ``com.fasterxml.jackson.databind``, ``com.google.gson``, ``com.hubspot.jinjava``, ``com.jcraft.jsch``, ``com.microsoft.sqlserver.jdbc``, ``com.mitchellbosecke.pebble``, ``com.mongodb``, ``com.opensymphony.xwork2``, ``com.rabbitmq.client``, ``com.sshtools.j2ssh.authentication``, ``com.sun.crypto.provider``, ``com.sun.jndi.ldap``, ``com.sun.net.httpserver``, ``com.sun.net.ssl``, ``com.sun.rowset``, ``com.sun.security.auth.module``, ``com.sun.security.ntlm``, ``com.sun.security.sasl.digest``, ``com.thoughtworks.xstream``, ``com.trilead.ssh2``, ``com.unboundid.ldap.sdk``, ``com.zaxxer.hikari``, ``flexjson``, ``freemarker.cache``, ``freemarker.template``, ``groovy.lang``, ``groovy.text``, ``groovy.util``, ``hudson``, ``io.jsonwebtoken``, ``io.netty.bootstrap``, ``io.netty.buffer``, ``io.netty.channel``, ``io.netty.handler.codec``, ``io.netty.handler.ssl``, ``io.netty.handler.stream``, ``io.netty.resolver``, ``io.netty.util``, ``io.undertow.server.handlers.resource``, ``javafx.scene.web``, ``jenkins``, ``jodd.json``, ``liquibase.database.jvm``, ``liquibase.statement.core``, ``net.lingala.zip4j``, ``net.schmizz.sshj``, ``net.sf.json``, ``net.sf.saxon.s9api``, ``ognl``, ``okhttp3``, ``org.acegisecurity``, ``org.antlr.runtime``, ``org.apache.commons.codec``, ``org.apache.commons.compress.archivers.tar``, ``org.apache.commons.exec``, ``org.apache.commons.httpclient.util``, ``org.apache.commons.jelly``, ``org.apache.commons.jexl2``, ``org.apache.commons.jexl3``, ``org.apache.commons.lang``, ``org.apache.commons.logging``, ``org.apache.commons.net``, ``org.apache.commons.ognl``, ``org.apache.cxf.catalog``, ``org.apache.cxf.common.classloader``, ``org.apache.cxf.common.jaxb``, ``org.apache.cxf.common.logging``, ``org.apache.cxf.configuration.jsse``, ``org.apache.cxf.helpers``, ``org.apache.cxf.resource``, ``org.apache.cxf.staxutils``, ``org.apache.cxf.tools.corba.utils``, ``org.apache.cxf.tools.util``, ``org.apache.cxf.transform``, ``org.apache.directory.ldap.client.api``, ``org.apache.hadoop.fs``, ``org.apache.hadoop.hive.metastore``, ``org.apache.hadoop.hive.ql.exec``, ``org.apache.hadoop.hive.ql.metadata``, ``org.apache.hc.client5.http.async.methods``, ``org.apache.hc.client5.http.classic.methods``, ``org.apache.hc.client5.http.fluent``, ``org.apache.hive.hcatalog.templeton``, ``org.apache.ibatis.jdbc``, ``org.apache.ibatis.mapping``, ``org.apache.log4j``, ``org.apache.shiro.codec``, ``org.apache.shiro.jndi``, ``org.apache.shiro.mgt``, ``org.apache.sshd.client.session``, ``org.apache.struts.beanvalidation.validation.interceptor``, ``org.apache.struts2``, ``org.apache.tools.ant``, ``org.apache.tools.zip``, ``org.apache.velocity.app``, ``org.apache.velocity.runtime``, ``org.codehaus.cargo.container.installer``, ``org.codehaus.groovy.control``, ``org.dom4j``, ``org.eclipse.jetty.client``, ``org.fusesource.leveldbjni``, ``org.geogebra.web.full.main``, ``org.gradle.api.file``, ``org.hibernate``, ``org.influxdb``, ``org.jboss.vfs``, ``org.jdbi.v3.core``, ``org.jenkins.ui.icon``, ``org.jenkins.ui.symbol``, ``org.jooq``, ``org.keycloak.models.map.storage``, ``org.kohsuke.stapler``, ``org.lastaflute.web``, ``org.mvel2``, ``org.openjdk.jmh.runner.options``, ``org.owasp.esapi``, ``org.pac4j.jwt.config.encryption``, ``org.pac4j.jwt.config.signature``, ``org.scijava.log``, ``org.slf4j``, ``org.thymeleaf``, ``org.w3c.dom``, ``org.xml.sax``, ``org.xmlpull.v1``, ``org.yaml.snakeyaml``, ``play.libs.ws``, ``play.mvc``, ``ratpack.core.form``, ``ratpack.core.handling``, ``ratpack.core.http``, ``ratpack.exec``, ``ratpack.form``, ``ratpack.func``, ``ratpack.handling``, ``ratpack.http``, ``ratpack.util``, ``retrofit2``, ``software.amazon.awssdk.transfer.s3.model``, ``sun.awt``, ``sun.jvmstat.perfdata.monitor.protocol.local``, ``sun.jvmstat.perfdata.monitor.protocol.rmi``, ``sun.management.spi``, ``sun.misc``, ``sun.net.ftp``, ``sun.net.www.protocol.http``, ``sun.nio.ch``, ``sun.security.acl``, ``sun.security.jgss.krb5``, ``sun.security.krb5``, ``sun.security.pkcs``, ``sun.security.pkcs11``, ``sun.security.provider``, ``sun.security.ssl``, ``sun.security.x509``, ``sun.tools.jconsole``, ``sun.util.logging.internal``",132,10603,908,140,6,22,18,,208 - Totals,,311,25147,2635,404,16,128,33,1,409 + Others,"``actions.osgi``, ``antlr``, ``ch.ethz.ssh2``, ``cn.hutool.core.codec``, ``com.alibaba.druid.sql``, ``com.alibaba.fastjson2``, ``com.amazonaws.auth``, ``com.auth0.jwt.algorithms``, ``com.azure.identity``, ``com.esotericsoftware.kryo.io``, ``com.esotericsoftware.kryo5.io``, ``com.fasterxml.jackson.core``, ``com.fasterxml.jackson.databind``, ``com.google.gson``, ``com.hubspot.jinjava``, ``com.jcraft.jsch``, ``com.microsoft.sqlserver.jdbc``, ``com.mitchellbosecke.pebble``, ``com.mongodb``, ``com.opensymphony.xwork2``, ``com.rabbitmq.client``, ``com.sshtools.j2ssh.authentication``, ``com.sun.crypto.provider``, ``com.sun.jndi.ldap``, ``com.sun.net.httpserver``, ``com.sun.net.ssl``, ``com.sun.rowset``, ``com.sun.security.auth.module``, ``com.sun.security.ntlm``, ``com.sun.security.sasl.digest``, ``com.thoughtworks.xstream``, ``com.trilead.ssh2``, ``com.unboundid.ldap.sdk``, ``com.zaxxer.hikari``, ``flexjson``, ``freemarker.cache``, ``freemarker.template``, ``groovy.lang``, ``groovy.text``, ``groovy.util``, ``hudson``, ``io.jsonwebtoken``, ``io.netty.bootstrap``, ``io.netty.buffer``, ``io.netty.channel``, ``io.netty.handler.codec``, ``io.netty.handler.ssl``, ``io.netty.handler.stream``, ``io.netty.resolver``, ``io.netty.util``, ``io.undertow.server.handlers.resource``, ``javafx.scene.web``, ``jenkins``, ``jodd.json``, ``liquibase.database.jvm``, ``liquibase.statement.core``, ``net.lingala.zip4j``, ``net.schmizz.sshj``, ``net.sf.json``, ``net.sf.saxon.s9api``, ``ognl``, ``okhttp3``, ``org.acegisecurity``, ``org.antlr.runtime``, ``org.apache.commons.codec``, ``org.apache.commons.compress.archivers.tar``, ``org.apache.commons.exec``, ``org.apache.commons.httpclient.util``, ``org.apache.commons.jelly``, ``org.apache.commons.jexl2``, ``org.apache.commons.jexl3``, ``org.apache.commons.lang``, ``org.apache.commons.logging``, ``org.apache.commons.net``, ``org.apache.commons.ognl``, ``org.apache.cxf.catalog``, ``org.apache.cxf.common.classloader``, ``org.apache.cxf.common.jaxb``, ``org.apache.cxf.common.logging``, ``org.apache.cxf.configuration.jsse``, ``org.apache.cxf.helpers``, ``org.apache.cxf.resource``, ``org.apache.cxf.staxutils``, ``org.apache.cxf.tools.corba.utils``, ``org.apache.cxf.tools.util``, ``org.apache.cxf.transform``, ``org.apache.directory.ldap.client.api``, ``org.apache.hadoop.fs``, ``org.apache.hadoop.hive.metastore``, ``org.apache.hadoop.hive.ql.exec``, ``org.apache.hadoop.hive.ql.metadata``, ``org.apache.hc.client5.http.async.methods``, ``org.apache.hc.client5.http.classic.methods``, ``org.apache.hc.client5.http.fluent``, ``org.apache.hive.hcatalog.templeton``, ``org.apache.ibatis.jdbc``, ``org.apache.ibatis.mapping``, ``org.apache.log4j``, ``org.apache.shiro.authc``, ``org.apache.shiro.codec``, ``org.apache.shiro.jndi``, ``org.apache.shiro.mgt``, ``org.apache.sshd.client.session``, ``org.apache.struts.beanvalidation.validation.interceptor``, ``org.apache.struts2``, ``org.apache.tools.ant``, ``org.apache.tools.zip``, ``org.apache.velocity.app``, ``org.apache.velocity.runtime``, ``org.codehaus.cargo.container.installer``, ``org.codehaus.groovy.control``, ``org.dom4j``, ``org.eclipse.jetty.client``, ``org.fusesource.leveldbjni``, ``org.geogebra.web.full.main``, ``org.gradle.api.file``, ``org.hibernate``, ``org.influxdb``, ``org.jboss.vfs``, ``org.jdbi.v3.core``, ``org.jenkins.ui.icon``, ``org.jenkins.ui.symbol``, ``org.jooq``, ``org.keycloak.models.map.storage``, ``org.kohsuke.stapler``, ``org.lastaflute.web``, ``org.mvel2``, ``org.openjdk.jmh.runner.options``, ``org.owasp.esapi``, ``org.pac4j.jwt.config.encryption``, ``org.pac4j.jwt.config.signature``, ``org.scijava.log``, ``org.slf4j``, ``org.thymeleaf``, ``org.w3c.dom``, ``org.xml.sax``, ``org.xmlpull.v1``, ``org.yaml.snakeyaml``, ``play.libs.ws``, ``play.mvc``, ``ratpack.core.form``, ``ratpack.core.handling``, ``ratpack.core.http``, ``ratpack.exec``, ``ratpack.form``, ``ratpack.func``, ``ratpack.handling``, ``ratpack.http``, ``ratpack.util``, ``retrofit2``, ``software.amazon.awssdk.transfer.s3.model``, ``sun.awt``, ``sun.jvmstat.perfdata.monitor.protocol.local``, ``sun.jvmstat.perfdata.monitor.protocol.rmi``, ``sun.management.spi``, ``sun.misc``, ``sun.net.ftp``, ``sun.net.www.protocol.http``, ``sun.nio.ch``, ``sun.security.acl``, ``sun.security.jgss.krb5``, ``sun.security.krb5``, ``sun.security.pkcs``, ``sun.security.pkcs11``, ``sun.security.provider``, ``sun.security.ssl``, ``sun.security.x509``, ``sun.tools.jconsole``, ``sun.util.logging.internal``",133,10603,908,140,6,22,18,,208 + Totals,,312,25170,2635,404,16,128,33,1,409 diff --git a/java/ql/automodel/src/AutomodelApplicationModeCharacteristics.qll b/java/ql/automodel/src/AutomodelApplicationModeCharacteristics.qll index 13fbbe5d36f..8c8ad1a2df4 100644 --- a/java/ql/automodel/src/AutomodelApplicationModeCharacteristics.qll +++ b/java/ql/automodel/src/AutomodelApplicationModeCharacteristics.qll @@ -6,7 +6,6 @@ private import java private import semmle.code.Location as Location private import semmle.code.java.dataflow.DataFlow private import semmle.code.java.dataflow.TaintTracking -private import semmle.code.java.security.PathCreation private import semmle.code.java.dataflow.ExternalFlow as ExternalFlow private import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl private import semmle.code.java.security.ExternalAPIs as ExternalAPIs diff --git a/java/ql/automodel/src/AutomodelFrameworkModeCharacteristics.qll b/java/ql/automodel/src/AutomodelFrameworkModeCharacteristics.qll index 357b3a7573c..8985e6022eb 100644 --- a/java/ql/automodel/src/AutomodelFrameworkModeCharacteristics.qll +++ b/java/ql/automodel/src/AutomodelFrameworkModeCharacteristics.qll @@ -6,7 +6,6 @@ private import java private import semmle.code.Location as Location private import semmle.code.java.dataflow.DataFlow private import semmle.code.java.dataflow.TaintTracking -private import semmle.code.java.security.PathCreation private import semmle.code.java.dataflow.ExternalFlow as ExternalFlow private import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl private import semmle.code.java.security.ExternalAPIs as ExternalAPIs diff --git a/java/ql/automodel/src/CHANGELOG.md b/java/ql/automodel/src/CHANGELOG.md index 7dc759d1ac6..3d5fc1f2229 100644 --- a/java/ql/automodel/src/CHANGELOG.md +++ b/java/ql/automodel/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/java/ql/automodel/src/change-notes/released/1.0.6.md b/java/ql/automodel/src/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/java/ql/automodel/src/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/java/ql/automodel/src/codeql-pack.release.yml b/java/ql/automodel/src/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/java/ql/automodel/src/codeql-pack.release.yml +++ b/java/ql/automodel/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/java/ql/automodel/src/qlpack.yml b/java/ql/automodel/src/qlpack.yml index fd277afd1d7..5da02bb9e8e 100644 --- a/java/ql/automodel/src/qlpack.yml +++ b/java/ql/automodel/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-automodel-queries -version: 1.0.6-dev +version: 1.0.7-dev groups: - java - automodel diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/build.gradle b/java/ql/integration-tests/java/android-8-sample/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-8-sample/build.gradle rename to java/ql/integration-tests/java/android-8-sample/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/project/build.gradle b/java/ql/integration-tests/java/android-8-sample/project/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-8-sample/project/build.gradle rename to java/ql/integration-tests/java/android-8-sample/project/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/project/src/main/AndroidManifest.xml b/java/ql/integration-tests/java/android-8-sample/project/src/main/AndroidManifest.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-8-sample/project/src/main/AndroidManifest.xml rename to java/ql/integration-tests/java/android-8-sample/project/src/main/AndroidManifest.xml diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/project/src/main/java/com/github/androidsample/Main.java b/java/ql/integration-tests/java/android-8-sample/project/src/main/java/com/github/androidsample/Main.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-8-sample/project/src/main/java/com/github/androidsample/Main.java rename to java/ql/integration-tests/java/android-8-sample/project/src/main/java/com/github/androidsample/Main.java diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/settings.gradle b/java/ql/integration-tests/java/android-8-sample/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-8-sample/settings.gradle rename to java/ql/integration-tests/java/android-8-sample/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/source_archive.expected b/java/ql/integration-tests/java/android-8-sample/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-8-sample/source_archive.expected rename to java/ql/integration-tests/java/android-8-sample/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/android-8-sample/test.py b/java/ql/integration-tests/java/android-8-sample/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-8-sample/test.py rename to java/ql/integration-tests/java/android-8-sample/test.py diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/build.gradle.kts b/java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/build.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/build.gradle.kts rename to java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/build.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/project/build.gradle.kts b/java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/project/build.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/project/build.gradle.kts rename to java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/project/build.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/project/src/main/AndroidManifest.xml b/java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/project/src/main/AndroidManifest.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/project/src/main/AndroidManifest.xml rename to java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/project/src/main/AndroidManifest.xml diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/project/src/main/java/com/github/androidsample/Main.java b/java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/project/src/main/java/com/github/androidsample/Main.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/project/src/main/java/com/github/androidsample/Main.java rename to java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/project/src/main/java/com/github/androidsample/Main.java diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/settings.gradle.kts b/java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/settings.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/settings.gradle.kts rename to java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/settings.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/source_archive.expected b/java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/source_archive.expected rename to java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/test.py b/java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script-no-wrapper/test.py rename to java/ql/integration-tests/java/android-sample-kotlin-build-script-no-wrapper/test.py diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/build.gradle.kts b/java/ql/integration-tests/java/android-sample-kotlin-build-script/build.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/build.gradle.kts rename to java/ql/integration-tests/java/android-sample-kotlin-build-script/build.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/project/build.gradle.kts b/java/ql/integration-tests/java/android-sample-kotlin-build-script/project/build.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/project/build.gradle.kts rename to java/ql/integration-tests/java/android-sample-kotlin-build-script/project/build.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/project/src/main/AndroidManifest.xml b/java/ql/integration-tests/java/android-sample-kotlin-build-script/project/src/main/AndroidManifest.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/project/src/main/AndroidManifest.xml rename to java/ql/integration-tests/java/android-sample-kotlin-build-script/project/src/main/AndroidManifest.xml diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/project/src/main/java/com/github/androidsample/Main.java b/java/ql/integration-tests/java/android-sample-kotlin-build-script/project/src/main/java/com/github/androidsample/Main.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/project/src/main/java/com/github/androidsample/Main.java rename to java/ql/integration-tests/java/android-sample-kotlin-build-script/project/src/main/java/com/github/androidsample/Main.java diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/settings.gradle.kts b/java/ql/integration-tests/java/android-sample-kotlin-build-script/settings.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/settings.gradle.kts rename to java/ql/integration-tests/java/android-sample-kotlin-build-script/settings.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/source_archive.expected b/java/ql/integration-tests/java/android-sample-kotlin-build-script/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/source_archive.expected rename to java/ql/integration-tests/java/android-sample-kotlin-build-script/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/test.py b/java/ql/integration-tests/java/android-sample-kotlin-build-script/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-kotlin-build-script/test.py rename to java/ql/integration-tests/java/android-sample-kotlin-build-script/test.py diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/build.gradle b/java/ql/integration-tests/java/android-sample-no-wrapper/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/build.gradle rename to java/ql/integration-tests/java/android-sample-no-wrapper/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/project/build.gradle b/java/ql/integration-tests/java/android-sample-no-wrapper/project/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/project/build.gradle rename to java/ql/integration-tests/java/android-sample-no-wrapper/project/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/project/src/main/AndroidManifest.xml b/java/ql/integration-tests/java/android-sample-no-wrapper/project/src/main/AndroidManifest.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/project/src/main/AndroidManifest.xml rename to java/ql/integration-tests/java/android-sample-no-wrapper/project/src/main/AndroidManifest.xml diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/project/src/main/java/com/github/androidsample/Main.java b/java/ql/integration-tests/java/android-sample-no-wrapper/project/src/main/java/com/github/androidsample/Main.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/project/src/main/java/com/github/androidsample/Main.java rename to java/ql/integration-tests/java/android-sample-no-wrapper/project/src/main/java/com/github/androidsample/Main.java diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/settings.gradle b/java/ql/integration-tests/java/android-sample-no-wrapper/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/settings.gradle rename to java/ql/integration-tests/java/android-sample-no-wrapper/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/source_archive.expected b/java/ql/integration-tests/java/android-sample-no-wrapper/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/source_archive.expected rename to java/ql/integration-tests/java/android-sample-no-wrapper/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/test.py b/java/ql/integration-tests/java/android-sample-no-wrapper/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-no-wrapper/test.py rename to java/ql/integration-tests/java/android-sample-no-wrapper/test.py diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/README b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/README similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/README rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/README diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/build.gradle.kts b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/build.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/build.gradle.kts rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/build.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/project/build.gradle.kts b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/project/build.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/project/build.gradle.kts rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/project/build.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/project/src/main/AndroidManifest.xml b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/project/src/main/AndroidManifest.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/project/src/main/AndroidManifest.xml rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/project/src/main/AndroidManifest.xml diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/project/src/main/java/com/github/androidsample/Main.java b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/project/src/main/java/com/github/androidsample/Main.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/project/src/main/java/com/github/androidsample/Main.java rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/project/src/main/java/com/github/androidsample/Main.java diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/settings.gradle.kts b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/settings.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/settings.gradle.kts rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/settings.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/source_archive.expected b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/source_archive.expected rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/test.py b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script-no-wrapper/test.py rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script-no-wrapper/test.py diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/.gitattributes b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/.gitattributes similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/.gitattributes rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/.gitattributes diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/README b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/README similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/README rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/README diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/build.gradle.kts b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/build.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/build.gradle.kts rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/build.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/project/build.gradle.kts b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/project/build.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/project/build.gradle.kts rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/project/build.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/project/src/main/AndroidManifest.xml b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/project/src/main/AndroidManifest.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/project/src/main/AndroidManifest.xml rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/project/src/main/AndroidManifest.xml diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/project/src/main/java/com/github/androidsample/Main.java b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/project/src/main/java/com/github/androidsample/Main.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/project/src/main/java/com/github/androidsample/Main.java rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/project/src/main/java/com/github/androidsample/Main.java diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/settings.gradle.kts b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/settings.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/settings.gradle.kts rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/settings.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/source_archive.expected b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/source_archive.expected rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/test.py b/java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-kotlin-build-script/test.py rename to java/ql/integration-tests/java/android-sample-old-style-kotlin-build-script/test.py diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/README b/java/ql/integration-tests/java/android-sample-old-style-no-wrapper/README similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/README rename to java/ql/integration-tests/java/android-sample-old-style-no-wrapper/README diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/build.gradle b/java/ql/integration-tests/java/android-sample-old-style-no-wrapper/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/build.gradle rename to java/ql/integration-tests/java/android-sample-old-style-no-wrapper/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/project/build.gradle b/java/ql/integration-tests/java/android-sample-old-style-no-wrapper/project/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/project/build.gradle rename to java/ql/integration-tests/java/android-sample-old-style-no-wrapper/project/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/project/src/main/AndroidManifest.xml b/java/ql/integration-tests/java/android-sample-old-style-no-wrapper/project/src/main/AndroidManifest.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/project/src/main/AndroidManifest.xml rename to java/ql/integration-tests/java/android-sample-old-style-no-wrapper/project/src/main/AndroidManifest.xml diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/project/src/main/java/com/github/androidsample/Main.java b/java/ql/integration-tests/java/android-sample-old-style-no-wrapper/project/src/main/java/com/github/androidsample/Main.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/project/src/main/java/com/github/androidsample/Main.java rename to java/ql/integration-tests/java/android-sample-old-style-no-wrapper/project/src/main/java/com/github/androidsample/Main.java diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/settings.gradle b/java/ql/integration-tests/java/android-sample-old-style-no-wrapper/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/settings.gradle rename to java/ql/integration-tests/java/android-sample-old-style-no-wrapper/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/source_archive.expected b/java/ql/integration-tests/java/android-sample-old-style-no-wrapper/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/source_archive.expected rename to java/ql/integration-tests/java/android-sample-old-style-no-wrapper/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/test.py b/java/ql/integration-tests/java/android-sample-old-style-no-wrapper/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/test.py rename to java/ql/integration-tests/java/android-sample-old-style-no-wrapper/test.py diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style/README b/java/ql/integration-tests/java/android-sample-old-style/README similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style/README rename to java/ql/integration-tests/java/android-sample-old-style/README diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style/build.gradle b/java/ql/integration-tests/java/android-sample-old-style/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style/build.gradle rename to java/ql/integration-tests/java/android-sample-old-style/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style/project/build.gradle b/java/ql/integration-tests/java/android-sample-old-style/project/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style/project/build.gradle rename to java/ql/integration-tests/java/android-sample-old-style/project/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style/project/src/main/AndroidManifest.xml b/java/ql/integration-tests/java/android-sample-old-style/project/src/main/AndroidManifest.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style/project/src/main/AndroidManifest.xml rename to java/ql/integration-tests/java/android-sample-old-style/project/src/main/AndroidManifest.xml diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style/project/src/main/java/com/github/androidsample/Main.java b/java/ql/integration-tests/java/android-sample-old-style/project/src/main/java/com/github/androidsample/Main.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style/project/src/main/java/com/github/androidsample/Main.java rename to java/ql/integration-tests/java/android-sample-old-style/project/src/main/java/com/github/androidsample/Main.java diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style/settings.gradle b/java/ql/integration-tests/java/android-sample-old-style/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style/settings.gradle rename to java/ql/integration-tests/java/android-sample-old-style/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style/source_archive.expected b/java/ql/integration-tests/java/android-sample-old-style/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style/source_archive.expected rename to java/ql/integration-tests/java/android-sample-old-style/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/android-sample-old-style/test.py b/java/ql/integration-tests/java/android-sample-old-style/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample-old-style/test.py rename to java/ql/integration-tests/java/android-sample-old-style/test.py diff --git a/java/ql/integration-tests/all-platforms/java/android-sample/build.gradle b/java/ql/integration-tests/java/android-sample/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample/build.gradle rename to java/ql/integration-tests/java/android-sample/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-sample/project/build.gradle b/java/ql/integration-tests/java/android-sample/project/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample/project/build.gradle rename to java/ql/integration-tests/java/android-sample/project/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-sample/project/src/main/AndroidManifest.xml b/java/ql/integration-tests/java/android-sample/project/src/main/AndroidManifest.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample/project/src/main/AndroidManifest.xml rename to java/ql/integration-tests/java/android-sample/project/src/main/AndroidManifest.xml diff --git a/java/ql/integration-tests/all-platforms/java/android-sample/project/src/main/java/com/github/androidsample/Main.java b/java/ql/integration-tests/java/android-sample/project/src/main/java/com/github/androidsample/Main.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample/project/src/main/java/com/github/androidsample/Main.java rename to java/ql/integration-tests/java/android-sample/project/src/main/java/com/github/androidsample/Main.java diff --git a/java/ql/integration-tests/all-platforms/java/android-sample/settings.gradle b/java/ql/integration-tests/java/android-sample/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample/settings.gradle rename to java/ql/integration-tests/java/android-sample/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/android-sample/source_archive.expected b/java/ql/integration-tests/java/android-sample/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample/source_archive.expected rename to java/ql/integration-tests/java/android-sample/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/android-sample/test.py b/java/ql/integration-tests/java/android-sample/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/android-sample/test.py rename to java/ql/integration-tests/java/android-sample/test.py diff --git a/java/ql/integration-tests/all-platforms/java/ant-sample/build.xml b/java/ql/integration-tests/java/ant-sample/build.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ant-sample/build.xml rename to java/ql/integration-tests/java/ant-sample/build.xml diff --git a/java/ql/integration-tests/all-platforms/java/ant-sample/src/main/java/com/example/App.java b/java/ql/integration-tests/java/ant-sample/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ant-sample/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/ant-sample/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/ant-sample/test.expected b/java/ql/integration-tests/java/ant-sample/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ant-sample/test.expected rename to java/ql/integration-tests/java/ant-sample/test.expected diff --git a/java/ql/integration-tests/all-platforms/java/ant-sample/test.py b/java/ql/integration-tests/java/ant-sample/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ant-sample/test.py rename to java/ql/integration-tests/java/ant-sample/test.py diff --git a/java/ql/integration-tests/all-platforms/java/ant-sample/test.ql b/java/ql/integration-tests/java/ant-sample/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ant-sample/test.ql rename to java/ql/integration-tests/java/ant-sample/test.ql diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-dependency-different-repository/buildless-fetches.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/buildless-fetches.expected rename to java/ql/integration-tests/java/buildless-dependency-different-repository/buildless-fetches.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/pom.xml b/java/ql/integration-tests/java/buildless-dependency-different-repository/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/pom.xml rename to java/ql/integration-tests/java/buildless-dependency-different-repository/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.jar b/java/ql/integration-tests/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.jar similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.jar rename to java/ql/integration-tests/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.jar diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.jar.md5 b/java/ql/integration-tests/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.jar.md5 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.jar.md5 rename to java/ql/integration-tests/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.jar.md5 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.jar.sha1 b/java/ql/integration-tests/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.jar.sha1 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.jar.sha1 rename to java/ql/integration-tests/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.jar.sha1 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.pom b/java/ql/integration-tests/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.pom similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.pom rename to java/ql/integration-tests/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.pom diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.pom.md5 b/java/ql/integration-tests/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.pom.md5 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.pom.md5 rename to java/ql/integration-tests/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.pom.md5 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.pom.sha1 b/java/ql/integration-tests/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.pom.sha1 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.pom.sha1 rename to java/ql/integration-tests/java/buildless-dependency-different-repository/repo/releases/com/github/my/other/repo/test/otherreleasetest/1.0/otherreleasetest-1.0.pom.sha1 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.jar b/java/ql/integration-tests/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.jar similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.jar rename to java/ql/integration-tests/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.jar diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.jar.md5 b/java/ql/integration-tests/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.jar.md5 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.jar.md5 rename to java/ql/integration-tests/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.jar.md5 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.jar.sha1 b/java/ql/integration-tests/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.jar.sha1 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.jar.sha1 rename to java/ql/integration-tests/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.jar.sha1 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.pom b/java/ql/integration-tests/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.pom similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.pom rename to java/ql/integration-tests/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.pom diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.pom.md5 b/java/ql/integration-tests/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.pom.md5 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.pom.md5 rename to java/ql/integration-tests/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.pom.md5 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.pom.sha1 b/java/ql/integration-tests/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.pom.sha1 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.pom.sha1 rename to java/ql/integration-tests/java/buildless-dependency-different-repository/repo2/releases/com/github/hosted/in/other/repo/test/inotherrepo/1.0/inotherrepo-1.0.pom.sha1 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/src/main/java/Test.java b/java/ql/integration-tests/java/buildless-dependency-different-repository/src/main/java/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/src/main/java/Test.java rename to java/ql/integration-tests/java/buildless-dependency-different-repository/src/main/java/Test.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/test.expected b/java/ql/integration-tests/java/buildless-dependency-different-repository/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/test.expected rename to java/ql/integration-tests/java/buildless-dependency-different-repository/test.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/test.py b/java/ql/integration-tests/java/buildless-dependency-different-repository/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/test.py rename to java/ql/integration-tests/java/buildless-dependency-different-repository/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/test.ql b/java/ql/integration-tests/java/buildless-dependency-different-repository/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/test.ql rename to java/ql/integration-tests/java/buildless-dependency-different-repository/test.ql diff --git a/java/ql/integration-tests/all-platforms/java/buildless-erroneous/DatabaseQualityDiagnostics.expected b/java/ql/integration-tests/java/buildless-erroneous/DatabaseQualityDiagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-erroneous/DatabaseQualityDiagnostics.expected rename to java/ql/integration-tests/java/buildless-erroneous/DatabaseQualityDiagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-erroneous/DatabaseQualityDiagnostics.qlref b/java/ql/integration-tests/java/buildless-erroneous/DatabaseQualityDiagnostics.qlref similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-erroneous/DatabaseQualityDiagnostics.qlref rename to java/ql/integration-tests/java/buildless-erroneous/DatabaseQualityDiagnostics.qlref diff --git a/java/ql/integration-tests/all-platforms/java/buildless-erroneous/ExtractorInformation.expected b/java/ql/integration-tests/java/buildless-erroneous/ExtractorInformation.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-erroneous/ExtractorInformation.expected rename to java/ql/integration-tests/java/buildless-erroneous/ExtractorInformation.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-erroneous/ExtractorInformation.qlref b/java/ql/integration-tests/java/buildless-erroneous/ExtractorInformation.qlref similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-erroneous/ExtractorInformation.qlref rename to java/ql/integration-tests/java/buildless-erroneous/ExtractorInformation.qlref diff --git a/java/ql/integration-tests/all-platforms/java/buildless-erroneous/Test.java b/java/ql/integration-tests/java/buildless-erroneous/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-erroneous/Test.java rename to java/ql/integration-tests/java/buildless-erroneous/Test.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-erroneous/diagnostics.expected b/java/ql/integration-tests/java/buildless-erroneous/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-erroneous/diagnostics.expected rename to java/ql/integration-tests/java/buildless-erroneous/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-erroneous/test.py b/java/ql/integration-tests/java/buildless-erroneous/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-erroneous/test.py rename to java/ql/integration-tests/java/buildless-erroneous/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/build.gradle b/java/ql/integration-tests/java/buildless-gradle-classifiers/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/build.gradle rename to java/ql/integration-tests/java/buildless-gradle-classifiers/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-gradle-classifiers/buildless-fetches.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/buildless-fetches.expected rename to java/ql/integration-tests/java/buildless-gradle-classifiers/buildless-fetches.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/diagnostics.expected b/java/ql/integration-tests/java/buildless-gradle-classifiers/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/diagnostics.expected rename to java/ql/integration-tests/java/buildless-gradle-classifiers/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/settings.gradle b/java/ql/integration-tests/java/buildless-gradle-classifiers/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/settings.gradle rename to java/ql/integration-tests/java/buildless-gradle-classifiers/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/source_archive.expected b/java/ql/integration-tests/java/buildless-gradle-classifiers/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/source_archive.expected rename to java/ql/integration-tests/java/buildless-gradle-classifiers/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/src/main/java/com/fractestexample/Test.java b/java/ql/integration-tests/java/buildless-gradle-classifiers/src/main/java/com/fractestexample/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/src/main/java/com/fractestexample/Test.java rename to java/ql/integration-tests/java/buildless-gradle-classifiers/src/main/java/com/fractestexample/Test.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/test.py b/java/ql/integration-tests/java/buildless-gradle-classifiers/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-classifiers/test.py rename to java/ql/integration-tests/java/buildless-gradle-classifiers/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/.gitattributes b/java/ql/integration-tests/java/buildless-gradle-timeout/.gitattributes similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/.gitattributes rename to java/ql/integration-tests/java/buildless-gradle-timeout/.gitattributes diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/.gitignore b/java/ql/integration-tests/java/buildless-gradle-timeout/.gitignore similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/.gitignore rename to java/ql/integration-tests/java/buildless-gradle-timeout/.gitignore diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/build.gradle b/java/ql/integration-tests/java/buildless-gradle-timeout/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/build.gradle rename to java/ql/integration-tests/java/buildless-gradle-timeout/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/diagnostics.expected b/java/ql/integration-tests/java/buildless-gradle-timeout/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/diagnostics.expected rename to java/ql/integration-tests/java/buildless-gradle-timeout/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/verification-metadata.xml b/java/ql/integration-tests/java/buildless-gradle-timeout/gradle/verification-metadata.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/verification-metadata.xml rename to java/ql/integration-tests/java/buildless-gradle-timeout/gradle/verification-metadata.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.jar b/java/ql/integration-tests/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.jar rename to java/ql/integration-tests/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.jar diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.properties b/java/ql/integration-tests/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.properties rename to java/ql/integration-tests/java/buildless-gradle-timeout/gradle/wrapper/gradle-wrapper.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradlew b/java/ql/integration-tests/java/buildless-gradle-timeout/gradlew similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradlew rename to java/ql/integration-tests/java/buildless-gradle-timeout/gradlew diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradlew.bat b/java/ql/integration-tests/java/buildless-gradle-timeout/gradlew.bat similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/gradlew.bat rename to java/ql/integration-tests/java/buildless-gradle-timeout/gradlew.bat diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/settings.gradle b/java/ql/integration-tests/java/buildless-gradle-timeout/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/settings.gradle rename to java/ql/integration-tests/java/buildless-gradle-timeout/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/source_archive.expected b/java/ql/integration-tests/java/buildless-gradle-timeout/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/source_archive.expected rename to java/ql/integration-tests/java/buildless-gradle-timeout/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/src/main/java/com/example/App.java b/java/ql/integration-tests/java/buildless-gradle-timeout/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/buildless-gradle-timeout/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/buildless-gradle-timeout/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/buildless-gradle-timeout/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/test.py b/java/ql/integration-tests/java/buildless-gradle-timeout/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle-timeout/test.py rename to java/ql/integration-tests/java/buildless-gradle-timeout/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle/build.gradle b/java/ql/integration-tests/java/buildless-gradle/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle/build.gradle rename to java/ql/integration-tests/java/buildless-gradle/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-gradle/buildless-fetches.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle/buildless-fetches.expected rename to java/ql/integration-tests/java/buildless-gradle/buildless-fetches.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle/diagnostics.expected b/java/ql/integration-tests/java/buildless-gradle/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle/diagnostics.expected rename to java/ql/integration-tests/java/buildless-gradle/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle/settings.gradle b/java/ql/integration-tests/java/buildless-gradle/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle/settings.gradle rename to java/ql/integration-tests/java/buildless-gradle/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle/source_archive.expected b/java/ql/integration-tests/java/buildless-gradle/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle/source_archive.expected rename to java/ql/integration-tests/java/buildless-gradle/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle/src/main/java/com/fractestexample/Test.java b/java/ql/integration-tests/java/buildless-gradle/src/main/java/com/fractestexample/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle/src/main/java/com/fractestexample/Test.java rename to java/ql/integration-tests/java/buildless-gradle/src/main/java/com/fractestexample/Test.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-gradle/test.py b/java/ql/integration-tests/java/buildless-gradle/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-gradle/test.py rename to java/ql/integration-tests/java/buildless-gradle/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-inherit-trust-store/buildless-fetches.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/buildless-fetches.expected rename to java/ql/integration-tests/java/buildless-inherit-trust-store/buildless-fetches.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/cert.pem b/java/ql/integration-tests/java/buildless-inherit-trust-store/cert.pem similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/cert.pem rename to java/ql/integration-tests/java/buildless-inherit-trust-store/cert.pem diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/diagnostics.expected b/java/ql/integration-tests/java/buildless-inherit-trust-store/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/diagnostics.expected rename to java/ql/integration-tests/java/buildless-inherit-trust-store/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/jdk8_shipped_cacerts_plus_cert_pem b/java/ql/integration-tests/java/buildless-inherit-trust-store/jdk8_shipped_cacerts_plus_cert_pem similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/jdk8_shipped_cacerts_plus_cert_pem rename to java/ql/integration-tests/java/buildless-inherit-trust-store/jdk8_shipped_cacerts_plus_cert_pem diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/key.pem b/java/ql/integration-tests/java/buildless-inherit-trust-store/key.pem similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/key.pem rename to java/ql/integration-tests/java/buildless-inherit-trust-store/key.pem diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/pom.xml b/java/ql/integration-tests/java/buildless-inherit-trust-store/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/pom.xml rename to java/ql/integration-tests/java/buildless-inherit-trust-store/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml b/java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml rename to java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.md5 b/java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.md5 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.md5 rename to java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.md5 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.sha1 b/java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.sha1 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.sha1 rename to java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.sha1 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar b/java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar rename to java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.md5 b/java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.md5 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.md5 rename to java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.md5 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.sha1 b/java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.sha1 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.sha1 rename to java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.sha1 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom b/java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom rename to java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.md5 b/java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.md5 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.md5 rename to java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.md5 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.sha1 b/java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.sha1 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.sha1 rename to java/ql/integration-tests/java/buildless-inherit-trust-store/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.sha1 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/server.py b/java/ql/integration-tests/java/buildless-inherit-trust-store/server.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/server.py rename to java/ql/integration-tests/java/buildless-inherit-trust-store/server.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/src/main/java/Test.java b/java/ql/integration-tests/java/buildless-inherit-trust-store/src/main/java/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/src/main/java/Test.java rename to java/ql/integration-tests/java/buildless-inherit-trust-store/src/main/java/Test.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.expected b/java/ql/integration-tests/java/buildless-inherit-trust-store/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.expected rename to java/ql/integration-tests/java/buildless-inherit-trust-store/test.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.py b/java/ql/integration-tests/java/buildless-inherit-trust-store/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.py rename to java/ql/integration-tests/java/buildless-inherit-trust-store/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.ql b/java/ql/integration-tests/java/buildless-inherit-trust-store/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/test.ql rename to java/ql/integration-tests/java/buildless-inherit-trust-store/test.ql diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-maven-executable-war/buildless-fetches.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/buildless-fetches.expected rename to java/ql/integration-tests/java/buildless-maven-executable-war/buildless-fetches.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/diagnostics.expected b/java/ql/integration-tests/java/buildless-maven-executable-war/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/diagnostics.expected rename to java/ql/integration-tests/java/buildless-maven-executable-war/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/pom.xml b/java/ql/integration-tests/java/buildless-maven-executable-war/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/pom.xml rename to java/ql/integration-tests/java/buildless-maven-executable-war/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/source_archive.expected b/java/ql/integration-tests/java/buildless-maven-executable-war/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/source_archive.expected rename to java/ql/integration-tests/java/buildless-maven-executable-war/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/src/main/java/com/example/App.java b/java/ql/integration-tests/java/buildless-maven-executable-war/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/buildless-maven-executable-war/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/src/main/resources/my-app.properties b/java/ql/integration-tests/java/buildless-maven-executable-war/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/buildless-maven-executable-war/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/src/main/resources/page.xml b/java/ql/integration-tests/java/buildless-maven-executable-war/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/src/main/resources/page.xml rename to java/ql/integration-tests/java/buildless-maven-executable-war/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/src/main/resources/struts.xml b/java/ql/integration-tests/java/buildless-maven-executable-war/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/src/main/resources/struts.xml rename to java/ql/integration-tests/java/buildless-maven-executable-war/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/buildless-maven-executable-war/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/buildless-maven-executable-war/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/test.py b/java/ql/integration-tests/java/buildless-maven-executable-war/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-executable-war/test.py rename to java/ql/integration-tests/java/buildless-maven-executable-war/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-maven-multimodule/buildless-fetches.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/buildless-fetches.expected rename to java/ql/integration-tests/java/buildless-maven-multimodule/buildless-fetches.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/diagnostics.expected b/java/ql/integration-tests/java/buildless-maven-multimodule/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/diagnostics.expected rename to java/ql/integration-tests/java/buildless-maven-multimodule/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/pom.xml b/java/ql/integration-tests/java/buildless-maven-multimodule/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/pom.xml rename to java/ql/integration-tests/java/buildless-maven-multimodule/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/source_archive.expected b/java/ql/integration-tests/java/buildless-maven-multimodule/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/source_archive.expected rename to java/ql/integration-tests/java/buildless-maven-multimodule/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod1/pom.xml b/java/ql/integration-tests/java/buildless-maven-multimodule/submod1/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod1/pom.xml rename to java/ql/integration-tests/java/buildless-maven-multimodule/submod1/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod1/src/main/java/com/example/App.java b/java/ql/integration-tests/java/buildless-maven-multimodule/submod1/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod1/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/buildless-maven-multimodule/submod1/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod1/src/main/resources/my-app.properties b/java/ql/integration-tests/java/buildless-maven-multimodule/submod1/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod1/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/buildless-maven-multimodule/submod1/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod1/src/main/resources/page.xml b/java/ql/integration-tests/java/buildless-maven-multimodule/submod1/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod1/src/main/resources/page.xml rename to java/ql/integration-tests/java/buildless-maven-multimodule/submod1/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod1/src/main/resources/struts.xml b/java/ql/integration-tests/java/buildless-maven-multimodule/submod1/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod1/src/main/resources/struts.xml rename to java/ql/integration-tests/java/buildless-maven-multimodule/submod1/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod1/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/buildless-maven-multimodule/submod1/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod1/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/buildless-maven-multimodule/submod1/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod2/pom.xml b/java/ql/integration-tests/java/buildless-maven-multimodule/submod2/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod2/pom.xml rename to java/ql/integration-tests/java/buildless-maven-multimodule/submod2/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod2/src/main/java/com/example/App2.java b/java/ql/integration-tests/java/buildless-maven-multimodule/submod2/src/main/java/com/example/App2.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod2/src/main/java/com/example/App2.java rename to java/ql/integration-tests/java/buildless-maven-multimodule/submod2/src/main/java/com/example/App2.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod2/src/main/resources/my-app.properties b/java/ql/integration-tests/java/buildless-maven-multimodule/submod2/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod2/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/buildless-maven-multimodule/submod2/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod2/src/main/resources/page.xml b/java/ql/integration-tests/java/buildless-maven-multimodule/submod2/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod2/src/main/resources/page.xml rename to java/ql/integration-tests/java/buildless-maven-multimodule/submod2/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod2/src/main/resources/struts.xml b/java/ql/integration-tests/java/buildless-maven-multimodule/submod2/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod2/src/main/resources/struts.xml rename to java/ql/integration-tests/java/buildless-maven-multimodule/submod2/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod2/src/test/java/com/example/AppTest2.java b/java/ql/integration-tests/java/buildless-maven-multimodule/submod2/src/test/java/com/example/AppTest2.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/submod2/src/test/java/com/example/AppTest2.java rename to java/ql/integration-tests/java/buildless-maven-multimodule/submod2/src/test/java/com/example/AppTest2.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/test.py b/java/ql/integration-tests/java/buildless-maven-multimodule/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/test.py rename to java/ql/integration-tests/java/buildless-maven-multimodule/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.gitattributes b/java/ql/integration-tests/java/buildless-maven-timeout/.gitattributes similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.gitattributes rename to java/ql/integration-tests/java/buildless-maven-timeout/.gitattributes diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.jar b/java/ql/integration-tests/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.jar similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.jar rename to java/ql/integration-tests/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.jar diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.properties b/java/ql/integration-tests/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.properties rename to java/ql/integration-tests/java/buildless-maven-timeout/.mvn/wrapper/maven-wrapper.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/diagnostics.expected b/java/ql/integration-tests/java/buildless-maven-timeout/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/diagnostics.expected rename to java/ql/integration-tests/java/buildless-maven-timeout/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/mvnw b/java/ql/integration-tests/java/buildless-maven-timeout/mvnw similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/mvnw rename to java/ql/integration-tests/java/buildless-maven-timeout/mvnw diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/mvnw.cmd b/java/ql/integration-tests/java/buildless-maven-timeout/mvnw.cmd similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/mvnw.cmd rename to java/ql/integration-tests/java/buildless-maven-timeout/mvnw.cmd diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/pom.xml b/java/ql/integration-tests/java/buildless-maven-timeout/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/pom.xml rename to java/ql/integration-tests/java/buildless-maven-timeout/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/source_archive.expected b/java/ql/integration-tests/java/buildless-maven-timeout/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/source_archive.expected rename to java/ql/integration-tests/java/buildless-maven-timeout/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/java/com/example/App.java b/java/ql/integration-tests/java/buildless-maven-timeout/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/buildless-maven-timeout/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/my-app.properties b/java/ql/integration-tests/java/buildless-maven-timeout/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/buildless-maven-timeout/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/page.xml b/java/ql/integration-tests/java/buildless-maven-timeout/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/page.xml rename to java/ql/integration-tests/java/buildless-maven-timeout/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/struts.xml b/java/ql/integration-tests/java/buildless-maven-timeout/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/main/resources/struts.xml rename to java/ql/integration-tests/java/buildless-maven-timeout/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/buildless-maven-timeout/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/buildless-maven-timeout/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/test.py b/java/ql/integration-tests/java/buildless-maven-timeout/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-timeout/test.py rename to java/ql/integration-tests/java/buildless-maven-timeout/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/buildless-fetches.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/buildless-fetches.expected rename to java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/buildless-fetches.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/diagnostics.expected b/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/diagnostics.expected rename to java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/pom.xml b/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/pom.xml rename to java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/src/main/java/dlfs/App.java b/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/src/main/java/dlfs/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/src/main/java/dlfs/App.java rename to java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/src/main/java/dlfs/App.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/src/site/site.xml b/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/src/site/site.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/src/site/site.xml rename to java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/src/site/site.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/src/test/java/dlfs/AppTest.java b/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/src/test/java/dlfs/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/src/test/java/dlfs/AppTest.java rename to java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/src/test/java/dlfs/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/test.py b/java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/test.py rename to java/ql/integration-tests/java/buildless-maven-tolerate-unavailable-dependency/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-maven/buildless-fetches.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven/buildless-fetches.expected rename to java/ql/integration-tests/java/buildless-maven/buildless-fetches.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven/diagnostics.expected b/java/ql/integration-tests/java/buildless-maven/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven/diagnostics.expected rename to java/ql/integration-tests/java/buildless-maven/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven/pom.xml b/java/ql/integration-tests/java/buildless-maven/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven/pom.xml rename to java/ql/integration-tests/java/buildless-maven/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven/source_archive.expected b/java/ql/integration-tests/java/buildless-maven/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven/source_archive.expected rename to java/ql/integration-tests/java/buildless-maven/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven/src/main/java/com/example/App.java b/java/ql/integration-tests/java/buildless-maven/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/buildless-maven/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven/src/main/resources/my-app.properties b/java/ql/integration-tests/java/buildless-maven/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/buildless-maven/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven/src/main/resources/page.xml b/java/ql/integration-tests/java/buildless-maven/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven/src/main/resources/page.xml rename to java/ql/integration-tests/java/buildless-maven/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven/src/main/resources/struts.xml b/java/ql/integration-tests/java/buildless-maven/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven/src/main/resources/struts.xml rename to java/ql/integration-tests/java/buildless-maven/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/buildless-maven/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/buildless-maven/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven/test.py b/java/ql/integration-tests/java/buildless-maven/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-maven/test.py rename to java/ql/integration-tests/java/buildless-maven/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-module-definition-not-in-module-info-file/PrintAst.expected b/java/ql/integration-tests/java/buildless-module-definition-not-in-module-info-file/PrintAst.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-module-definition-not-in-module-info-file/PrintAst.expected rename to java/ql/integration-tests/java/buildless-module-definition-not-in-module-info-file/PrintAst.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-module-definition-not-in-module-info-file/PrintAst.qlref b/java/ql/integration-tests/java/buildless-module-definition-not-in-module-info-file/PrintAst.qlref similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-module-definition-not-in-module-info-file/PrintAst.qlref rename to java/ql/integration-tests/java/buildless-module-definition-not-in-module-info-file/PrintAst.qlref diff --git a/java/ql/integration-tests/all-platforms/java/buildless-module-definition-not-in-module-info-file/Test.java b/java/ql/integration-tests/java/buildless-module-definition-not-in-module-info-file/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-module-definition-not-in-module-info-file/Test.java rename to java/ql/integration-tests/java/buildless-module-definition-not-in-module-info-file/Test.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-module-definition-not-in-module-info-file/Test2.java b/java/ql/integration-tests/java/buildless-module-definition-not-in-module-info-file/Test2.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-module-definition-not-in-module-info-file/Test2.java rename to java/ql/integration-tests/java/buildless-module-definition-not-in-module-info-file/Test2.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-module-definition-not-in-module-info-file/test.py b/java/ql/integration-tests/java/buildless-module-definition-not-in-module-info-file/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-module-definition-not-in-module-info-file/test.py rename to java/ql/integration-tests/java/buildless-module-definition-not-in-module-info-file/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/build.gradle b/java/ql/integration-tests/java/buildless-proxy-gradle/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/build.gradle rename to java/ql/integration-tests/java/buildless-proxy-gradle/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-proxy-gradle/buildless-fetches.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/buildless-fetches.expected rename to java/ql/integration-tests/java/buildless-proxy-gradle/buildless-fetches.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/diagnostics.expected b/java/ql/integration-tests/java/buildless-proxy-gradle/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/diagnostics.expected rename to java/ql/integration-tests/java/buildless-proxy-gradle/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/settings.gradle b/java/ql/integration-tests/java/buildless-proxy-gradle/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/settings.gradle rename to java/ql/integration-tests/java/buildless-proxy-gradle/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/source_archive.expected b/java/ql/integration-tests/java/buildless-proxy-gradle/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/source_archive.expected rename to java/ql/integration-tests/java/buildless-proxy-gradle/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/src/main/java/com/fractestexample/Test.java b/java/ql/integration-tests/java/buildless-proxy-gradle/src/main/java/com/fractestexample/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/src/main/java/com/fractestexample/Test.java rename to java/ql/integration-tests/java/buildless-proxy-gradle/src/main/java/com/fractestexample/Test.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/test.py b/java/ql/integration-tests/java/buildless-proxy-gradle/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-gradle/test.py rename to java/ql/integration-tests/java/buildless-proxy-gradle/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-proxy-maven/buildless-fetches.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/buildless-fetches.expected rename to java/ql/integration-tests/java/buildless-proxy-maven/buildless-fetches.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/diagnostics.expected b/java/ql/integration-tests/java/buildless-proxy-maven/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/diagnostics.expected rename to java/ql/integration-tests/java/buildless-proxy-maven/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/pom.xml b/java/ql/integration-tests/java/buildless-proxy-maven/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/pom.xml rename to java/ql/integration-tests/java/buildless-proxy-maven/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/source_archive.expected b/java/ql/integration-tests/java/buildless-proxy-maven/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/source_archive.expected rename to java/ql/integration-tests/java/buildless-proxy-maven/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/src/main/java/com/example/App.java b/java/ql/integration-tests/java/buildless-proxy-maven/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/buildless-proxy-maven/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/src/main/resources/my-app.properties b/java/ql/integration-tests/java/buildless-proxy-maven/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/buildless-proxy-maven/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/src/main/resources/page.xml b/java/ql/integration-tests/java/buildless-proxy-maven/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/src/main/resources/page.xml rename to java/ql/integration-tests/java/buildless-proxy-maven/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/src/main/resources/struts.xml b/java/ql/integration-tests/java/buildless-proxy-maven/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/src/main/resources/struts.xml rename to java/ql/integration-tests/java/buildless-proxy-maven/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/buildless-proxy-maven/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/buildless-proxy-maven/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/test.py b/java/ql/integration-tests/java/buildless-proxy-maven/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/test.py rename to java/ql/integration-tests/java/buildless-proxy-maven/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-sibling-projects/buildless-fetches.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/buildless-fetches.expected rename to java/ql/integration-tests/java/buildless-sibling-projects/buildless-fetches.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/diagnostics.expected b/java/ql/integration-tests/java/buildless-sibling-projects/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/diagnostics.expected rename to java/ql/integration-tests/java/buildless-sibling-projects/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/.gitattributes b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/.gitattributes similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/.gitattributes rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/.gitattributes diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/.gitignore b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/.gitignore similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/.gitignore rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/.gitignore diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/build.gradle b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/build.gradle rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/gradle/verification-metadata.xml b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/gradle/verification-metadata.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/gradle/verification-metadata.xml rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/gradle/verification-metadata.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/gradle/wrapper/gradle-wrapper.jar b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/gradle/wrapper/gradle-wrapper.jar rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/gradle/wrapper/gradle-wrapper.jar diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/gradle/wrapper/gradle-wrapper.properties b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/gradle/wrapper/gradle-wrapper.properties rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/gradle/wrapper/gradle-wrapper.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/gradlew b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/gradlew similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/gradlew rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/gradlew diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/gradlew.bat b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/gradlew.bat similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/gradlew.bat rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/gradlew.bat diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/settings.gradle b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/settings.gradle rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/src/main/java/com/example/App.java b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/.gitattributes b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/.gitattributes similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/.gitattributes rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/.gitattributes diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/.gitignore b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/.gitignore similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/.gitignore rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/.gitignore diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/build.gradle b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/build.gradle rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/gradle/verification-metadata.xml b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/gradle/verification-metadata.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/gradle/verification-metadata.xml rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/gradle/verification-metadata.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/gradle/wrapper/gradle-wrapper.jar b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/gradle/wrapper/gradle-wrapper.jar rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/gradle/wrapper/gradle-wrapper.jar diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/gradle/wrapper/gradle-wrapper.properties b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/gradle/wrapper/gradle-wrapper.properties rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/gradle/wrapper/gradle-wrapper.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/gradlew b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/gradlew similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/gradlew rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/gradlew diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/gradlew.bat b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/gradlew.bat similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/gradlew.bat rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/gradlew.bat diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/settings.gradle b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/settings.gradle rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/src/main/java/com/example/App2.java b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/src/main/java/com/example/App2.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/src/main/java/com/example/App2.java rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/src/main/java/com/example/App2.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/src/test/java/com/example/AppTest2.java b/java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/src/test/java/com/example/AppTest2.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/gradle-sample2/src/test/java/com/example/AppTest2.java rename to java/ql/integration-tests/java/buildless-sibling-projects/gradle-sample2/src/test/java/com/example/AppTest2.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-1/pom.xml b/java/ql/integration-tests/java/buildless-sibling-projects/maven-project-1/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-1/pom.xml rename to java/ql/integration-tests/java/buildless-sibling-projects/maven-project-1/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-1/src/main/java/com/example/App3.java b/java/ql/integration-tests/java/buildless-sibling-projects/maven-project-1/src/main/java/com/example/App3.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-1/src/main/java/com/example/App3.java rename to java/ql/integration-tests/java/buildless-sibling-projects/maven-project-1/src/main/java/com/example/App3.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-1/src/main/resources/my-app.properties b/java/ql/integration-tests/java/buildless-sibling-projects/maven-project-1/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-1/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/buildless-sibling-projects/maven-project-1/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-1/src/main/resources/page.xml b/java/ql/integration-tests/java/buildless-sibling-projects/maven-project-1/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-1/src/main/resources/page.xml rename to java/ql/integration-tests/java/buildless-sibling-projects/maven-project-1/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-1/src/main/resources/struts.xml b/java/ql/integration-tests/java/buildless-sibling-projects/maven-project-1/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-1/src/main/resources/struts.xml rename to java/ql/integration-tests/java/buildless-sibling-projects/maven-project-1/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-1/src/test/java/com/example/AppTest3.java b/java/ql/integration-tests/java/buildless-sibling-projects/maven-project-1/src/test/java/com/example/AppTest3.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-1/src/test/java/com/example/AppTest3.java rename to java/ql/integration-tests/java/buildless-sibling-projects/maven-project-1/src/test/java/com/example/AppTest3.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-2/pom.xml b/java/ql/integration-tests/java/buildless-sibling-projects/maven-project-2/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-2/pom.xml rename to java/ql/integration-tests/java/buildless-sibling-projects/maven-project-2/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-2/src/main/java/com/example/App4.java b/java/ql/integration-tests/java/buildless-sibling-projects/maven-project-2/src/main/java/com/example/App4.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-2/src/main/java/com/example/App4.java rename to java/ql/integration-tests/java/buildless-sibling-projects/maven-project-2/src/main/java/com/example/App4.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-2/src/main/resources/my-app.properties b/java/ql/integration-tests/java/buildless-sibling-projects/maven-project-2/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-2/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/buildless-sibling-projects/maven-project-2/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-2/src/main/resources/page.xml b/java/ql/integration-tests/java/buildless-sibling-projects/maven-project-2/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-2/src/main/resources/page.xml rename to java/ql/integration-tests/java/buildless-sibling-projects/maven-project-2/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-2/src/main/resources/struts.xml b/java/ql/integration-tests/java/buildless-sibling-projects/maven-project-2/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-2/src/main/resources/struts.xml rename to java/ql/integration-tests/java/buildless-sibling-projects/maven-project-2/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-2/src/test/java/com/example/AppTest4.java b/java/ql/integration-tests/java/buildless-sibling-projects/maven-project-2/src/test/java/com/example/AppTest4.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/maven-project-2/src/test/java/com/example/AppTest4.java rename to java/ql/integration-tests/java/buildless-sibling-projects/maven-project-2/src/test/java/com/example/AppTest4.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/source_archive.expected b/java/ql/integration-tests/java/buildless-sibling-projects/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/source_archive.expected rename to java/ql/integration-tests/java/buildless-sibling-projects/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/test.py b/java/ql/integration-tests/java/buildless-sibling-projects/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-sibling-projects/test.py rename to java/ql/integration-tests/java/buildless-sibling-projects/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/buildless-fetches.expected b/java/ql/integration-tests/java/buildless-snapshot-repository/buildless-fetches.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/buildless-fetches.expected rename to java/ql/integration-tests/java/buildless-snapshot-repository/buildless-fetches.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/pom.xml b/java/ql/integration-tests/java/buildless-snapshot-repository/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/pom.xml rename to java/ql/integration-tests/java/buildless-snapshot-repository/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml b/java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml rename to java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.md5 b/java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.md5 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.md5 rename to java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.md5 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.sha1 b/java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.sha1 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.sha1 rename to java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.sha1 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar b/java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar rename to java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.md5 b/java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.md5 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.md5 rename to java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.md5 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.sha1 b/java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.sha1 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.sha1 rename to java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.sha1 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom b/java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom rename to java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.md5 b/java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.md5 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.md5 rename to java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.md5 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.sha1 b/java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.sha1 similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.sha1 rename to java/ql/integration-tests/java/buildless-snapshot-repository/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.sha1 diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/src/main/java/Test.java b/java/ql/integration-tests/java/buildless-snapshot-repository/src/main/java/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/src/main/java/Test.java rename to java/ql/integration-tests/java/buildless-snapshot-repository/src/main/java/Test.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.expected b/java/ql/integration-tests/java/buildless-snapshot-repository/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.expected rename to java/ql/integration-tests/java/buildless-snapshot-repository/test.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.py b/java/ql/integration-tests/java/buildless-snapshot-repository/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.py rename to java/ql/integration-tests/java/buildless-snapshot-repository/test.py diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.ql b/java/ql/integration-tests/java/buildless-snapshot-repository/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.ql rename to java/ql/integration-tests/java/buildless-snapshot-repository/test.ql diff --git a/java/ql/integration-tests/all-platforms/java/buildless/diagnostics.expected b/java/ql/integration-tests/java/buildless/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless/diagnostics.expected rename to java/ql/integration-tests/java/buildless/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless/source_archive.expected b/java/ql/integration-tests/java/buildless/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless/source_archive.expected rename to java/ql/integration-tests/java/buildless/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/buildless/src/main/java/com/example/App.java b/java/ql/integration-tests/java/buildless/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/buildless/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless/src/main/resources/my-app.properties b/java/ql/integration-tests/java/buildless/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/buildless/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/buildless/src/main/resources/page.xml b/java/ql/integration-tests/java/buildless/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless/src/main/resources/page.xml rename to java/ql/integration-tests/java/buildless/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless/src/main/resources/struts.xml b/java/ql/integration-tests/java/buildless/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless/src/main/resources/struts.xml rename to java/ql/integration-tests/java/buildless/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/buildless/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/buildless/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/buildless/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/buildless/test.py b/java/ql/integration-tests/java/buildless/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/buildless/test.py rename to java/ql/integration-tests/java/buildless/test.py diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/build.gradle b/java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/build.gradle rename to java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/diagnostics.expected b/java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/diagnostics.expected rename to java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/project/build.gradle b/java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/project/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/project/build.gradle rename to java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/project/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/project/src/main/AndroidManifest.xml b/java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/project/src/main/AndroidManifest.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/project/src/main/AndroidManifest.xml rename to java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/project/src/main/AndroidManifest.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/project/src/main/java/com/github/androidsample/Main.java b/java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/project/src/main/java/com/github/androidsample/Main.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/project/src/main/java/com/github/androidsample/Main.java rename to java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/project/src/main/java/com/github/androidsample/Main.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/settings.gradle b/java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/settings.gradle rename to java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/test.py b/java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/test.py rename to java/ql/integration-tests/java/diagnostics/android-gradle-incompatibility/test.py diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/diagnostics.expected b/java/ql/integration-tests/java/diagnostics/compilation-error/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/diagnostics.expected rename to java/ql/integration-tests/java/diagnostics/compilation-error/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/pom.xml b/java/ql/integration-tests/java/diagnostics/compilation-error/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/pom.xml rename to java/ql/integration-tests/java/diagnostics/compilation-error/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/src/main/java/com/example/App.java b/java/ql/integration-tests/java/diagnostics/compilation-error/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/diagnostics/compilation-error/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/src/main/resources/my-app.properties b/java/ql/integration-tests/java/diagnostics/compilation-error/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/diagnostics/compilation-error/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/src/main/resources/page.xml b/java/ql/integration-tests/java/diagnostics/compilation-error/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/src/main/resources/page.xml rename to java/ql/integration-tests/java/diagnostics/compilation-error/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/src/main/resources/struts.xml b/java/ql/integration-tests/java/diagnostics/compilation-error/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/src/main/resources/struts.xml rename to java/ql/integration-tests/java/diagnostics/compilation-error/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/diagnostics/compilation-error/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/diagnostics/compilation-error/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/test.py b/java/ql/integration-tests/java/diagnostics/compilation-error/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/test.py rename to java/ql/integration-tests/java/diagnostics/compilation-error/test.py diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/diagnostics.expected b/java/ql/integration-tests/java/diagnostics/dependency-error/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/diagnostics.expected rename to java/ql/integration-tests/java/diagnostics/dependency-error/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/pom.xml b/java/ql/integration-tests/java/diagnostics/dependency-error/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/pom.xml rename to java/ql/integration-tests/java/diagnostics/dependency-error/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/src/main/java/com/example/App.java b/java/ql/integration-tests/java/diagnostics/dependency-error/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/diagnostics/dependency-error/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/src/main/resources/my-app.properties b/java/ql/integration-tests/java/diagnostics/dependency-error/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/diagnostics/dependency-error/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/src/main/resources/page.xml b/java/ql/integration-tests/java/diagnostics/dependency-error/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/src/main/resources/page.xml rename to java/ql/integration-tests/java/diagnostics/dependency-error/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/src/main/resources/struts.xml b/java/ql/integration-tests/java/diagnostics/dependency-error/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/src/main/resources/struts.xml rename to java/ql/integration-tests/java/diagnostics/dependency-error/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/diagnostics/dependency-error/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/diagnostics/dependency-error/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/test.py b/java/ql/integration-tests/java/diagnostics/dependency-error/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/test.py rename to java/ql/integration-tests/java/diagnostics/dependency-error/test.py diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/build.gradle b/java/ql/integration-tests/java/diagnostics/java-version-too-old/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/build.gradle rename to java/ql/integration-tests/java/diagnostics/java-version-too-old/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/diagnostics.expected b/java/ql/integration-tests/java/diagnostics/java-version-too-old/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/diagnostics.expected rename to java/ql/integration-tests/java/diagnostics/java-version-too-old/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/settings.gradle b/java/ql/integration-tests/java/diagnostics/java-version-too-old/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/settings.gradle rename to java/ql/integration-tests/java/diagnostics/java-version-too-old/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/src/main/java/com/example/App.java b/java/ql/integration-tests/java/diagnostics/java-version-too-old/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/diagnostics/java-version-too-old/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/diagnostics/java-version-too-old/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/diagnostics/java-version-too-old/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/test.py b/java/ql/integration-tests/java/diagnostics/java-version-too-old/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/test.py rename to java/ql/integration-tests/java/diagnostics/java-version-too-old/test.py diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/toolchains.xml b/java/ql/integration-tests/java/diagnostics/java-version-too-old/toolchains.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/toolchains.xml rename to java/ql/integration-tests/java/diagnostics/java-version-too-old/toolchains.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/.gitattributes b/java/ql/integration-tests/java/diagnostics/maven-http-repository/.gitattributes similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/.gitattributes rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/.gitattributes diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/.mvn/wrapper/maven-wrapper.jar b/java/ql/integration-tests/java/diagnostics/maven-http-repository/.mvn/wrapper/maven-wrapper.jar similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/.mvn/wrapper/maven-wrapper.jar rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/.mvn/wrapper/maven-wrapper.jar diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/.mvn/wrapper/maven-wrapper.properties b/java/ql/integration-tests/java/diagnostics/maven-http-repository/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/.mvn/wrapper/maven-wrapper.properties rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/.mvn/wrapper/maven-wrapper.properties diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/diagnostics.expected b/java/ql/integration-tests/java/diagnostics/maven-http-repository/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/diagnostics.expected rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/mvnw b/java/ql/integration-tests/java/diagnostics/maven-http-repository/mvnw similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/mvnw rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/mvnw diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/mvnw.cmd b/java/ql/integration-tests/java/diagnostics/maven-http-repository/mvnw.cmd similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/mvnw.cmd rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/mvnw.cmd diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/pom.xml b/java/ql/integration-tests/java/diagnostics/maven-http-repository/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/pom.xml rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/src/main/java/com/example/App.java b/java/ql/integration-tests/java/diagnostics/maven-http-repository/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/src/main/resources/my-app.properties b/java/ql/integration-tests/java/diagnostics/maven-http-repository/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/src/main/resources/page.xml b/java/ql/integration-tests/java/diagnostics/maven-http-repository/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/src/main/resources/page.xml rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/src/main/resources/struts.xml b/java/ql/integration-tests/java/diagnostics/maven-http-repository/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/src/main/resources/struts.xml rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/diagnostics/maven-http-repository/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/test.py b/java/ql/integration-tests/java/diagnostics/maven-http-repository/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/test.py rename to java/ql/integration-tests/java/diagnostics/maven-http-repository/test.py diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-1/pom.xml b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-1/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-1/pom.xml rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-1/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/java/com/example/App.java b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/resources/my-app.properties b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/resources/page.xml b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/resources/page.xml rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/resources/struts.xml b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/resources/struts.xml rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-1/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-1/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-1/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-1/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-1/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-2/pom.xml b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-2/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-2/pom.xml rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-2/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/java/com/example/App.java b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/resources/my-app.properties b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/resources/page.xml b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/resources/page.xml rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/resources/struts.xml b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/resources/struts.xml rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-2/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-2/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-2/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/maven-project-2/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/maven-project-2/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/test.py b/java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/test.py rename to java/ql/integration-tests/java/diagnostics/multiple-candidate-builds/test.py diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/Test.java b/java/ql/integration-tests/java/diagnostics/no-build-system/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/Test.java rename to java/ql/integration-tests/java/diagnostics/no-build-system/Test.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/diagnostics.expected b/java/ql/integration-tests/java/diagnostics/no-build-system/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/diagnostics.expected rename to java/ql/integration-tests/java/diagnostics/no-build-system/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/test.py b/java/ql/integration-tests/java/diagnostics/no-build-system/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/test.py rename to java/ql/integration-tests/java/diagnostics/no-build-system/test.py diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/build.gradle b/java/ql/integration-tests/java/diagnostics/no-gradle-test-classes/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/build.gradle rename to java/ql/integration-tests/java/diagnostics/no-gradle-test-classes/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected b/java/ql/integration-tests/java/diagnostics/no-gradle-test-classes/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected rename to java/ql/integration-tests/java/diagnostics/no-gradle-test-classes/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/settings.gradle b/java/ql/integration-tests/java/diagnostics/no-gradle-test-classes/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/settings.gradle rename to java/ql/integration-tests/java/diagnostics/no-gradle-test-classes/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/test.py b/java/ql/integration-tests/java/diagnostics/no-gradle-test-classes/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/test.py rename to java/ql/integration-tests/java/diagnostics/no-gradle-test-classes/test.py diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/.gitattributes b/java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/.gitattributes similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/.gitattributes rename to java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/.gitattributes diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/.gitignore b/java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/.gitignore similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/.gitignore rename to java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/.gitignore diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/build.gradle b/java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/build.gradle rename to java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/diagnostics.expected b/java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/diagnostics.expected rename to java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/settings.gradle b/java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/settings.gradle rename to java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/src/main/java/com/example/App.java b/java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/test.py b/java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/test.py rename to java/ql/integration-tests/java/diagnostics/no-gradle-wrapper/test.py diff --git a/java/ql/integration-tests/all-platforms/java/ecj-sample-noexit/Test.java b/java/ql/integration-tests/java/ecj-sample-noexit/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-sample-noexit/Test.java rename to java/ql/integration-tests/java/ecj-sample-noexit/Test.java diff --git a/java/ql/integration-tests/all-platforms/java/ecj-sample-noexit/source_archive.expected b/java/ql/integration-tests/java/ecj-sample-noexit/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-sample-noexit/source_archive.expected rename to java/ql/integration-tests/java/ecj-sample-noexit/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/ecj-sample-noexit/test.py b/java/ql/integration-tests/java/ecj-sample-noexit/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-sample-noexit/test.py rename to java/ql/integration-tests/java/ecj-sample-noexit/test.py diff --git a/java/ql/integration-tests/all-platforms/java/ecj-sample/Test.java b/java/ql/integration-tests/java/ecj-sample/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-sample/Test.java rename to java/ql/integration-tests/java/ecj-sample/Test.java diff --git a/java/ql/integration-tests/all-platforms/java/ecj-sample/source_archive.expected b/java/ql/integration-tests/java/ecj-sample/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-sample/source_archive.expected rename to java/ql/integration-tests/java/ecj-sample/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/ecj-sample/test.py b/java/ql/integration-tests/java/ecj-sample/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-sample/test.py rename to java/ql/integration-tests/java/ecj-sample/test.py diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Diag.expected b/java/ql/integration-tests/java/ecj-tolerate-enum-annotations/Diag.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Diag.expected rename to java/ql/integration-tests/java/ecj-tolerate-enum-annotations/Diag.expected diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Diag.ql b/java/ql/integration-tests/java/ecj-tolerate-enum-annotations/Diag.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Diag.ql rename to java/ql/integration-tests/java/ecj-tolerate-enum-annotations/Diag.ql diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Test.java b/java/ql/integration-tests/java/ecj-tolerate-enum-annotations/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Test.java rename to java/ql/integration-tests/java/ecj-tolerate-enum-annotations/Test.java diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Test2.java b/java/ql/integration-tests/java/ecj-tolerate-enum-annotations/Test2.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Test2.java rename to java/ql/integration-tests/java/ecj-tolerate-enum-annotations/Test2.java diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.expected b/java/ql/integration-tests/java/ecj-tolerate-enum-annotations/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.expected rename to java/ql/integration-tests/java/ecj-tolerate-enum-annotations/test.expected diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.py b/java/ql/integration-tests/java/ecj-tolerate-enum-annotations/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.py rename to java/ql/integration-tests/java/ecj-tolerate-enum-annotations/test.py diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.ql b/java/ql/integration-tests/java/ecj-tolerate-enum-annotations/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.ql rename to java/ql/integration-tests/java/ecj-tolerate-enum-annotations/test.ql diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/.gitattributes b/java/ql/integration-tests/java/gradle-sample-kotlin-script/.gitattributes similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/.gitattributes rename to java/ql/integration-tests/java/gradle-sample-kotlin-script/.gitattributes diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/app/build.gradle.kts b/java/ql/integration-tests/java/gradle-sample-kotlin-script/app/build.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/app/build.gradle.kts rename to java/ql/integration-tests/java/gradle-sample-kotlin-script/app/build.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/app/src/main/java/test/App.java b/java/ql/integration-tests/java/gradle-sample-kotlin-script/app/src/main/java/test/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/app/src/main/java/test/App.java rename to java/ql/integration-tests/java/gradle-sample-kotlin-script/app/src/main/java/test/App.java diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/app/src/test/java/test/AppTest.java b/java/ql/integration-tests/java/gradle-sample-kotlin-script/app/src/test/java/test/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/app/src/test/java/test/AppTest.java rename to java/ql/integration-tests/java/gradle-sample-kotlin-script/app/src/test/java/test/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/gradlew b/java/ql/integration-tests/java/gradle-sample-kotlin-script/gradlew similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/gradlew rename to java/ql/integration-tests/java/gradle-sample-kotlin-script/gradlew diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/gradlew.bat b/java/ql/integration-tests/java/gradle-sample-kotlin-script/gradlew.bat similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/gradlew.bat rename to java/ql/integration-tests/java/gradle-sample-kotlin-script/gradlew.bat diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/settings.gradle.kts b/java/ql/integration-tests/java/gradle-sample-kotlin-script/settings.gradle.kts similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/settings.gradle.kts rename to java/ql/integration-tests/java/gradle-sample-kotlin-script/settings.gradle.kts diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/source_archive.expected b/java/ql/integration-tests/java/gradle-sample-kotlin-script/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/source_archive.expected rename to java/ql/integration-tests/java/gradle-sample-kotlin-script/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/test.py b/java/ql/integration-tests/java/gradle-sample-kotlin-script/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample-kotlin-script/test.py rename to java/ql/integration-tests/java/gradle-sample-kotlin-script/test.py diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample/build.gradle b/java/ql/integration-tests/java/gradle-sample/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample/build.gradle rename to java/ql/integration-tests/java/gradle-sample/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample/settings.gradle b/java/ql/integration-tests/java/gradle-sample/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample/settings.gradle rename to java/ql/integration-tests/java/gradle-sample/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample/source_archive.expected b/java/ql/integration-tests/java/gradle-sample/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample/source_archive.expected rename to java/ql/integration-tests/java/gradle-sample/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample/src/main/java/com/example/App.java b/java/ql/integration-tests/java/gradle-sample/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/gradle-sample/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/gradle-sample/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/gradle-sample/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/gradle-sample/test.py b/java/ql/integration-tests/java/gradle-sample/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/gradle-sample/test.py rename to java/ql/integration-tests/java/gradle-sample/test.py diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/.gitignore b/java/ql/integration-tests/java/java-web-jsp/.gitignore similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/.gitignore rename to java/ql/integration-tests/java/java-web-jsp/.gitignore diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/README.txt b/java/ql/integration-tests/java/java-web-jsp/README.txt similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/README.txt rename to java/ql/integration-tests/java/java-web-jsp/README.txt diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/pom.xml b/java/ql/integration-tests/java/java-web-jsp/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/pom.xml rename to java/ql/integration-tests/java/java-web-jsp/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/spotbugs-security-exclude.xml b/java/ql/integration-tests/java/java-web-jsp/spotbugs-security-exclude.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/spotbugs-security-exclude.xml rename to java/ql/integration-tests/java/java-web-jsp/spotbugs-security-exclude.xml diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/spotbugs-security-include.xml b/java/ql/integration-tests/java/java-web-jsp/spotbugs-security-include.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/spotbugs-security-include.xml rename to java/ql/integration-tests/java/java-web-jsp/spotbugs-security-include.xml diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/com/acme/Counter.java b/java/ql/integration-tests/java/java-web-jsp/src/main/java/com/acme/Counter.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/com/acme/Counter.java rename to java/ql/integration-tests/java/java-web-jsp/src/main/java/com/acme/Counter.java diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/com/acme/Date2Tag.java b/java/ql/integration-tests/java/java-web-jsp/src/main/java/com/acme/Date2Tag.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/com/acme/Date2Tag.java rename to java/ql/integration-tests/java/java-web-jsp/src/main/java/com/acme/Date2Tag.java diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/com/acme/DateServlet.java b/java/ql/integration-tests/java/java-web-jsp/src/main/java/com/acme/DateServlet.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/com/acme/DateServlet.java rename to java/ql/integration-tests/java/java-web-jsp/src/main/java/com/acme/DateServlet.java diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/com/acme/DateTag.java b/java/ql/integration-tests/java/java-web-jsp/src/main/java/com/acme/DateTag.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/com/acme/DateTag.java rename to java/ql/integration-tests/java/java-web-jsp/src/main/java/com/acme/DateTag.java diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/com/acme/TagListener.java b/java/ql/integration-tests/java/java-web-jsp/src/main/java/com/acme/TagListener.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/com/acme/TagListener.java rename to java/ql/integration-tests/java/java-web-jsp/src/main/java/com/acme/TagListener.java diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/org/eclipse/jetty/demo/LoggingUtil.java b/java/ql/integration-tests/java/java-web-jsp/src/main/java/org/eclipse/jetty/demo/LoggingUtil.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/org/eclipse/jetty/demo/LoggingUtil.java rename to java/ql/integration-tests/java/java-web-jsp/src/main/java/org/eclipse/jetty/demo/LoggingUtil.java diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/org/eclipse/jetty/demo/Main.java b/java/ql/integration-tests/java/java-web-jsp/src/main/java/org/eclipse/jetty/demo/Main.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/org/eclipse/jetty/demo/Main.java rename to java/ql/integration-tests/java/java-web-jsp/src/main/java/org/eclipse/jetty/demo/Main.java diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/org/eclipse/jetty/demo/SystemOutHandler.java b/java/ql/integration-tests/java/java-web-jsp/src/main/java/org/eclipse/jetty/demo/SystemOutHandler.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/java/org/eclipse/jetty/demo/SystemOutHandler.java rename to java/ql/integration-tests/java/java-web-jsp/src/main/java/org/eclipse/jetty/demo/SystemOutHandler.java diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/resources/jetty-logging.properties b/java/ql/integration-tests/java/java-web-jsp/src/main/resources/jetty-logging.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/resources/jetty-logging.properties rename to java/ql/integration-tests/java/java-web-jsp/src/main/resources/jetty-logging.properties diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/resources/logging.properties b/java/ql/integration-tests/java/java-web-jsp/src/main/resources/logging.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/resources/logging.properties rename to java/ql/integration-tests/java/java-web-jsp/src/main/resources/logging.properties diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/acme-taglib.tld b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/acme-taglib.tld similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/acme-taglib.tld rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/acme-taglib.tld diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/acme-taglib2.tld b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/acme-taglib2.tld similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/acme-taglib2.tld rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/acme-taglib2.tld diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/applicationContext.xml b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/applicationContext.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/applicationContext.xml rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/applicationContext.xml diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/secret.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/secret.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/secret.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/secret.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/spring.tld b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/spring.tld similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/spring.tld rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/spring.tld diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/tags/panel.tag b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/tags/panel.tag similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/tags/panel.tag rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/tags/panel.tag diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/web.xml b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/web.xml rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/web.xml diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/weblogic.xml b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/weblogic.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/WEB-INF/weblogic.xml rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/WEB-INF/weblogic.xml diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/include/${param.secret_param}.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/include/${param.secret_param}.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/include/${param.secret_param}.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/include/${param.secret_param}.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/include/jsp_include_1.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/include/jsp_include_1.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/include/jsp_include_1.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/include/jsp_include_1.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/include/jsp_include_2_safe.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/include/jsp_include_2_safe.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/include/jsp_include_2_safe.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/include/jsp_include_2_safe.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/include/jsp_include_3.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/include/jsp_include_3.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/include/jsp_include_3.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/include/jsp_include_3.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/index.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/index.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/index.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/index.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/jstl/jstl_escape_1.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/jstl/jstl_escape_1.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/jstl/jstl_escape_1.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/jstl/jstl_escape_1.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/jstl/jstl_escape_2.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/jstl/jstl_escape_2.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/jstl/jstl_escape_2.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/jstl/jstl_escape_2.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/jstl/jstl_escape_3.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/jstl/jstl_escape_3.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/jstl/jstl_escape_3.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/jstl/jstl_escape_3.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/random.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/random.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/random.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/random.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/spring/spring_eval_1.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/spring/spring_eval_1.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/spring/spring_eval_1.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/spring/spring_eval_1.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/spring/spring_eval_2.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/spring/spring_eval_2.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/spring/spring_eval_2.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/spring/spring_eval_2.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/spring/spring_eval_3.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/spring/spring_eval_3.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/spring/spring_eval_3.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/spring/spring_eval_3.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/spring/spring_eval_4_safe.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/spring/spring_eval_4_safe.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/spring/spring_eval_4_safe.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/spring/spring_eval_4_safe.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/bean1.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/bean1.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/bean1.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/bean1.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/bean2.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/bean2.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/bean2.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/bean2.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/dump.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/dump.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/dump.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/dump.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/expr.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/expr.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/expr.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/expr.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/foo/foo.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/foo/foo.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/foo/foo.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/foo/foo.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/jstl.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/jstl.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/jstl.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/jstl.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/tag.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/tag.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/tag.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/tag.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/tag2.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/tag2.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/tag2.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/tag2.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/tagfile.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/tagfile.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/test/tagfile.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/test/tagfile.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/various.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/various.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/various.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/various.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xml/xml1.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xml/xml1.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xml/xml1.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xml/xml1.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xml/xml2.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xml/xml2.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xml/xml2.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xml/xml2.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xsl/xsl1.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xsl/xsl1.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xsl/xsl1.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xsl/xsl1.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xsl/xsl2.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xsl/xsl2.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xsl/xsl2.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xsl/xsl2.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xsl/xsl3.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xsl/xsl3.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xsl/xsl3.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xsl/xsl3.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xsl/xsl4.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xsl/xsl4.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xsl/xsl4.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xsl/xsl4.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xss/xss0.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xss/xss0.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xss/xss0.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xss/xss0.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xss/xss1.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xss/xss1.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xss/xss1.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xss/xss1.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xss/xss2.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xss/xss2.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xss/xss2.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xss/xss2.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xss/xss3.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xss/xss3.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xss/xss3.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xss/xss3.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xss/xss4.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xss/xss4.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xss/xss4.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xss/xss4.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xss/xss5.jsp b/java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xss/xss5.jsp similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/src/main/webapp/xss/xss5.jsp rename to java/ql/integration-tests/java/java-web-jsp/src/main/webapp/xss/xss5.jsp diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/test.expected b/java/ql/integration-tests/java/java-web-jsp/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/test.expected rename to java/ql/integration-tests/java/java-web-jsp/test.expected diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/test.py b/java/ql/integration-tests/java/java-web-jsp/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/test.py rename to java/ql/integration-tests/java/java-web-jsp/test.py diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/test.ql b/java/ql/integration-tests/java/java-web-jsp/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/java/java-web-jsp/test.ql rename to java/ql/integration-tests/java/java-web-jsp/test.ql diff --git a/java/ql/integration-tests/all-platforms/java/maven-enforcer/pom.xml b/java/ql/integration-tests/java/maven-enforcer/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-enforcer/pom.xml rename to java/ql/integration-tests/java/maven-enforcer/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-enforcer/source_archive.expected b/java/ql/integration-tests/java/maven-enforcer/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-enforcer/source_archive.expected rename to java/ql/integration-tests/java/maven-enforcer/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/maven-enforcer/src/main/java/com/example/App.java b/java/ql/integration-tests/java/maven-enforcer/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-enforcer/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/maven-enforcer/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-enforcer/src/main/resources/my-app.properties b/java/ql/integration-tests/java/maven-enforcer/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-enforcer/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/maven-enforcer/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-enforcer/src/main/resources/page.xml b/java/ql/integration-tests/java/maven-enforcer/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-enforcer/src/main/resources/page.xml rename to java/ql/integration-tests/java/maven-enforcer/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-enforcer/src/main/resources/struts.xml b/java/ql/integration-tests/java/maven-enforcer/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-enforcer/src/main/resources/struts.xml rename to java/ql/integration-tests/java/maven-enforcer/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-enforcer/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/maven-enforcer/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-enforcer/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/maven-enforcer/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-enforcer/test.py b/java/ql/integration-tests/java/maven-enforcer/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-enforcer/test.py rename to java/ql/integration-tests/java/maven-enforcer/test.py diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/pom.xml b/java/ql/integration-tests/java/maven-sample-extract-properties/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/pom.xml rename to java/ql/integration-tests/java/maven-sample-extract-properties/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/source_archive.expected b/java/ql/integration-tests/java/maven-sample-extract-properties/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/source_archive.expected rename to java/ql/integration-tests/java/maven-sample-extract-properties/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/src/main/java/com/example/App.java b/java/ql/integration-tests/java/maven-sample-extract-properties/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/maven-sample-extract-properties/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/src/main/resources/my-app.properties b/java/ql/integration-tests/java/maven-sample-extract-properties/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/maven-sample-extract-properties/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/src/main/resources/page.xml b/java/ql/integration-tests/java/maven-sample-extract-properties/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/src/main/resources/page.xml rename to java/ql/integration-tests/java/maven-sample-extract-properties/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/src/main/resources/struts.xml b/java/ql/integration-tests/java/maven-sample-extract-properties/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/src/main/resources/struts.xml rename to java/ql/integration-tests/java/maven-sample-extract-properties/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/maven-sample-extract-properties/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/maven-sample-extract-properties/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/test.py b/java/ql/integration-tests/java/maven-sample-extract-properties/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/test.py rename to java/ql/integration-tests/java/maven-sample-extract-properties/test.py diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/pom.xml b/java/ql/integration-tests/java/maven-sample-large-xml-files/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/pom.xml rename to java/ql/integration-tests/java/maven-sample-large-xml-files/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/source_archive.expected b/java/ql/integration-tests/java/maven-sample-large-xml-files/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/source_archive.expected rename to java/ql/integration-tests/java/maven-sample-large-xml-files/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/src/main/java/com/example/App.java b/java/ql/integration-tests/java/maven-sample-large-xml-files/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/maven-sample-large-xml-files/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/src/main/resources/my-app.properties b/java/ql/integration-tests/java/maven-sample-large-xml-files/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/maven-sample-large-xml-files/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/src/main/resources/page.xml b/java/ql/integration-tests/java/maven-sample-large-xml-files/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/src/main/resources/page.xml rename to java/ql/integration-tests/java/maven-sample-large-xml-files/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/src/main/resources/struts.xml b/java/ql/integration-tests/java/maven-sample-large-xml-files/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/src/main/resources/struts.xml rename to java/ql/integration-tests/java/maven-sample-large-xml-files/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/maven-sample-large-xml-files/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/maven-sample-large-xml-files/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/test.py b/java/ql/integration-tests/java/maven-sample-large-xml-files/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/test.py rename to java/ql/integration-tests/java/maven-sample-large-xml-files/test.py diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/pom.xml b/java/ql/integration-tests/java/maven-sample-small-xml-files/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/pom.xml rename to java/ql/integration-tests/java/maven-sample-small-xml-files/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/source_archive.expected b/java/ql/integration-tests/java/maven-sample-small-xml-files/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/source_archive.expected rename to java/ql/integration-tests/java/maven-sample-small-xml-files/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/src/main/java/com/example/App.java b/java/ql/integration-tests/java/maven-sample-small-xml-files/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/maven-sample-small-xml-files/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/src/main/resources/my-app.properties b/java/ql/integration-tests/java/maven-sample-small-xml-files/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/maven-sample-small-xml-files/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/src/main/resources/page.xml b/java/ql/integration-tests/java/maven-sample-small-xml-files/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/src/main/resources/page.xml rename to java/ql/integration-tests/java/maven-sample-small-xml-files/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/src/main/resources/struts.xml b/java/ql/integration-tests/java/maven-sample-small-xml-files/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/src/main/resources/struts.xml rename to java/ql/integration-tests/java/maven-sample-small-xml-files/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/maven-sample-small-xml-files/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/maven-sample-small-xml-files/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/test.py b/java/ql/integration-tests/java/maven-sample-small-xml-files/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/test.py rename to java/ql/integration-tests/java/maven-sample-small-xml-files/test.py diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/pom.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-all/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/pom.xml rename to java/ql/integration-tests/java/maven-sample-xml-mode-all/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/source_archive.expected b/java/ql/integration-tests/java/maven-sample-xml-mode-all/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/source_archive.expected rename to java/ql/integration-tests/java/maven-sample-xml-mode-all/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/src/main/java/com/example/App.java b/java/ql/integration-tests/java/maven-sample-xml-mode-all/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/maven-sample-xml-mode-all/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/src/main/resources/my-app.properties b/java/ql/integration-tests/java/maven-sample-xml-mode-all/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/maven-sample-xml-mode-all/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/src/main/resources/page.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-all/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/src/main/resources/page.xml rename to java/ql/integration-tests/java/maven-sample-xml-mode-all/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/src/main/resources/struts.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-all/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/src/main/resources/struts.xml rename to java/ql/integration-tests/java/maven-sample-xml-mode-all/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/maven-sample-xml-mode-all/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/maven-sample-xml-mode-all/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/test.py b/java/ql/integration-tests/java/maven-sample-xml-mode-all/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/test.py rename to java/ql/integration-tests/java/maven-sample-xml-mode-all/test.py diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/pom.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-byname/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/pom.xml rename to java/ql/integration-tests/java/maven-sample-xml-mode-byname/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/source_archive.expected b/java/ql/integration-tests/java/maven-sample-xml-mode-byname/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/source_archive.expected rename to java/ql/integration-tests/java/maven-sample-xml-mode-byname/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/src/main/java/com/example/App.java b/java/ql/integration-tests/java/maven-sample-xml-mode-byname/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/maven-sample-xml-mode-byname/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/src/main/resources/my-app.properties b/java/ql/integration-tests/java/maven-sample-xml-mode-byname/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/maven-sample-xml-mode-byname/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/src/main/resources/page.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-byname/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/src/main/resources/page.xml rename to java/ql/integration-tests/java/maven-sample-xml-mode-byname/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/src/main/resources/struts.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-byname/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/src/main/resources/struts.xml rename to java/ql/integration-tests/java/maven-sample-xml-mode-byname/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/maven-sample-xml-mode-byname/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/maven-sample-xml-mode-byname/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/test.py b/java/ql/integration-tests/java/maven-sample-xml-mode-byname/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/test.py rename to java/ql/integration-tests/java/maven-sample-xml-mode-byname/test.py diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/pom.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/pom.xml rename to java/ql/integration-tests/java/maven-sample-xml-mode-disabled/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/source_archive.expected b/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/source_archive.expected rename to java/ql/integration-tests/java/maven-sample-xml-mode-disabled/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/src/main/java/com/example/App.java b/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/maven-sample-xml-mode-disabled/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/src/main/resources/my-app.properties b/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/maven-sample-xml-mode-disabled/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/src/main/resources/page.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/src/main/resources/page.xml rename to java/ql/integration-tests/java/maven-sample-xml-mode-disabled/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/src/main/resources/struts.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/src/main/resources/struts.xml rename to java/ql/integration-tests/java/maven-sample-xml-mode-disabled/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/maven-sample-xml-mode-disabled/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/test.py b/java/ql/integration-tests/java/maven-sample-xml-mode-disabled/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/test.py rename to java/ql/integration-tests/java/maven-sample-xml-mode-disabled/test.py diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/pom.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-smart/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/pom.xml rename to java/ql/integration-tests/java/maven-sample-xml-mode-smart/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/source_archive.expected b/java/ql/integration-tests/java/maven-sample-xml-mode-smart/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/source_archive.expected rename to java/ql/integration-tests/java/maven-sample-xml-mode-smart/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/src/main/java/com/example/App.java b/java/ql/integration-tests/java/maven-sample-xml-mode-smart/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/maven-sample-xml-mode-smart/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/src/main/resources/my-app.properties b/java/ql/integration-tests/java/maven-sample-xml-mode-smart/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/maven-sample-xml-mode-smart/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/src/main/resources/page.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-smart/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/src/main/resources/page.xml rename to java/ql/integration-tests/java/maven-sample-xml-mode-smart/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/src/main/resources/struts.xml b/java/ql/integration-tests/java/maven-sample-xml-mode-smart/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/src/main/resources/struts.xml rename to java/ql/integration-tests/java/maven-sample-xml-mode-smart/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/maven-sample-xml-mode-smart/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/maven-sample-xml-mode-smart/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/test.py b/java/ql/integration-tests/java/maven-sample-xml-mode-smart/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/test.py rename to java/ql/integration-tests/java/maven-sample-xml-mode-smart/test.py diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample/pom.xml b/java/ql/integration-tests/java/maven-sample/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample/pom.xml rename to java/ql/integration-tests/java/maven-sample/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample/source_archive.expected b/java/ql/integration-tests/java/maven-sample/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample/source_archive.expected rename to java/ql/integration-tests/java/maven-sample/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample/src/main/java/com/example/App.java b/java/ql/integration-tests/java/maven-sample/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/maven-sample/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample/src/main/resources/my-app.properties b/java/ql/integration-tests/java/maven-sample/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/maven-sample/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample/src/main/resources/page.xml b/java/ql/integration-tests/java/maven-sample/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample/src/main/resources/page.xml rename to java/ql/integration-tests/java/maven-sample/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample/src/main/resources/struts.xml b/java/ql/integration-tests/java/maven-sample/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample/src/main/resources/struts.xml rename to java/ql/integration-tests/java/maven-sample/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/maven-sample/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/maven-sample/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample/test.py b/java/ql/integration-tests/java/maven-sample/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-sample/test.py rename to java/ql/integration-tests/java/maven-sample/test.py diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/.gitattributes b/java/ql/integration-tests/java/maven-wrapper-script-only/.gitattributes similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/.gitattributes rename to java/ql/integration-tests/java/maven-wrapper-script-only/.gitattributes diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/.mvn/wrapper/maven-wrapper.properties b/java/ql/integration-tests/java/maven-wrapper-script-only/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/.mvn/wrapper/maven-wrapper.properties rename to java/ql/integration-tests/java/maven-wrapper-script-only/.mvn/wrapper/maven-wrapper.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/mvnw b/java/ql/integration-tests/java/maven-wrapper-script-only/mvnw similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/mvnw rename to java/ql/integration-tests/java/maven-wrapper-script-only/mvnw diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/mvnw.cmd b/java/ql/integration-tests/java/maven-wrapper-script-only/mvnw.cmd similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/mvnw.cmd rename to java/ql/integration-tests/java/maven-wrapper-script-only/mvnw.cmd diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/pom.xml b/java/ql/integration-tests/java/maven-wrapper-script-only/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/pom.xml rename to java/ql/integration-tests/java/maven-wrapper-script-only/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/source_archive.expected b/java/ql/integration-tests/java/maven-wrapper-script-only/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/source_archive.expected rename to java/ql/integration-tests/java/maven-wrapper-script-only/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/java/com/example/App.java b/java/ql/integration-tests/java/maven-wrapper-script-only/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/maven-wrapper-script-only/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/my-app.properties b/java/ql/integration-tests/java/maven-wrapper-script-only/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/maven-wrapper-script-only/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/page.xml b/java/ql/integration-tests/java/maven-wrapper-script-only/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/page.xml rename to java/ql/integration-tests/java/maven-wrapper-script-only/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/struts.xml b/java/ql/integration-tests/java/maven-wrapper-script-only/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/main/resources/struts.xml rename to java/ql/integration-tests/java/maven-wrapper-script-only/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/maven-wrapper-script-only/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/maven-wrapper-script-only/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/test.py b/java/ql/integration-tests/java/maven-wrapper-script-only/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-script-only/test.py rename to java/ql/integration-tests/java/maven-wrapper-script-only/test.py diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.gitattributes b/java/ql/integration-tests/java/maven-wrapper-source-only/.gitattributes similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.gitattributes rename to java/ql/integration-tests/java/maven-wrapper-source-only/.gitattributes diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.mvn/wrapper/MavenWrapperDownloader.java b/java/ql/integration-tests/java/maven-wrapper-source-only/.mvn/wrapper/MavenWrapperDownloader.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.mvn/wrapper/MavenWrapperDownloader.java rename to java/ql/integration-tests/java/maven-wrapper-source-only/.mvn/wrapper/MavenWrapperDownloader.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.mvn/wrapper/maven-wrapper.properties b/java/ql/integration-tests/java/maven-wrapper-source-only/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/.mvn/wrapper/maven-wrapper.properties rename to java/ql/integration-tests/java/maven-wrapper-source-only/.mvn/wrapper/maven-wrapper.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/mvnw b/java/ql/integration-tests/java/maven-wrapper-source-only/mvnw similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/mvnw rename to java/ql/integration-tests/java/maven-wrapper-source-only/mvnw diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/mvnw.cmd b/java/ql/integration-tests/java/maven-wrapper-source-only/mvnw.cmd similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/mvnw.cmd rename to java/ql/integration-tests/java/maven-wrapper-source-only/mvnw.cmd diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/pom.xml b/java/ql/integration-tests/java/maven-wrapper-source-only/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/pom.xml rename to java/ql/integration-tests/java/maven-wrapper-source-only/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/source_archive.expected b/java/ql/integration-tests/java/maven-wrapper-source-only/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/source_archive.expected rename to java/ql/integration-tests/java/maven-wrapper-source-only/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/java/com/example/App.java b/java/ql/integration-tests/java/maven-wrapper-source-only/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/maven-wrapper-source-only/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/my-app.properties b/java/ql/integration-tests/java/maven-wrapper-source-only/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/maven-wrapper-source-only/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/page.xml b/java/ql/integration-tests/java/maven-wrapper-source-only/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/page.xml rename to java/ql/integration-tests/java/maven-wrapper-source-only/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/struts.xml b/java/ql/integration-tests/java/maven-wrapper-source-only/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/main/resources/struts.xml rename to java/ql/integration-tests/java/maven-wrapper-source-only/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/maven-wrapper-source-only/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/maven-wrapper-source-only/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/test.py b/java/ql/integration-tests/java/maven-wrapper-source-only/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper-source-only/test.py rename to java/ql/integration-tests/java/maven-wrapper-source-only/test.py diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/.gitattributes b/java/ql/integration-tests/java/maven-wrapper/.gitattributes similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/.gitattributes rename to java/ql/integration-tests/java/maven-wrapper/.gitattributes diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/.mvn/wrapper/maven-wrapper.jar b/java/ql/integration-tests/java/maven-wrapper/.mvn/wrapper/maven-wrapper.jar similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/.mvn/wrapper/maven-wrapper.jar rename to java/ql/integration-tests/java/maven-wrapper/.mvn/wrapper/maven-wrapper.jar diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/.mvn/wrapper/maven-wrapper.properties b/java/ql/integration-tests/java/maven-wrapper/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/.mvn/wrapper/maven-wrapper.properties rename to java/ql/integration-tests/java/maven-wrapper/.mvn/wrapper/maven-wrapper.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/mvnw b/java/ql/integration-tests/java/maven-wrapper/mvnw similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/mvnw rename to java/ql/integration-tests/java/maven-wrapper/mvnw diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/mvnw.cmd b/java/ql/integration-tests/java/maven-wrapper/mvnw.cmd similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/mvnw.cmd rename to java/ql/integration-tests/java/maven-wrapper/mvnw.cmd diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/pom.xml b/java/ql/integration-tests/java/maven-wrapper/pom.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/pom.xml rename to java/ql/integration-tests/java/maven-wrapper/pom.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/source_archive.expected b/java/ql/integration-tests/java/maven-wrapper/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/source_archive.expected rename to java/ql/integration-tests/java/maven-wrapper/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/java/com/example/App.java b/java/ql/integration-tests/java/maven-wrapper/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/maven-wrapper/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/my-app.properties b/java/ql/integration-tests/java/maven-wrapper/src/main/resources/my-app.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/my-app.properties rename to java/ql/integration-tests/java/maven-wrapper/src/main/resources/my-app.properties diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/page.xml b/java/ql/integration-tests/java/maven-wrapper/src/main/resources/page.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/page.xml rename to java/ql/integration-tests/java/maven-wrapper/src/main/resources/page.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/struts.xml b/java/ql/integration-tests/java/maven-wrapper/src/main/resources/struts.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/src/main/resources/struts.xml rename to java/ql/integration-tests/java/maven-wrapper/src/main/resources/struts.xml diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/maven-wrapper/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/maven-wrapper/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/maven-wrapper/test.py b/java/ql/integration-tests/java/maven-wrapper/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/maven-wrapper/test.py rename to java/ql/integration-tests/java/maven-wrapper/test.py diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/ExtractorInformation.expected b/java/ql/integration-tests/java/multi-release-jar-java11/ExtractorInformation.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/ExtractorInformation.expected rename to java/ql/integration-tests/java/multi-release-jar-java11/ExtractorInformation.expected diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/ExtractorInformation.qlref b/java/ql/integration-tests/java/multi-release-jar-java11/ExtractorInformation.qlref similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/ExtractorInformation.qlref rename to java/ql/integration-tests/java/multi-release-jar-java11/ExtractorInformation.qlref diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod1/mod1pkg/Mod1Class.java b/java/ql/integration-tests/java/multi-release-jar-java11/mod1/mod1pkg/Mod1Class.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod1/mod1pkg/Mod1Class.java rename to java/ql/integration-tests/java/multi-release-jar-java11/mod1/mod1pkg/Mod1Class.java diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod1/module-info.java b/java/ql/integration-tests/java/multi-release-jar-java11/mod1/module-info.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod1/module-info.java rename to java/ql/integration-tests/java/multi-release-jar-java11/mod1/module-info.java diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod2/mod2pkg/User.java b/java/ql/integration-tests/java/multi-release-jar-java11/mod2/mod2pkg/User.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod2/mod2pkg/User.java rename to java/ql/integration-tests/java/multi-release-jar-java11/mod2/mod2pkg/User.java diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod2/module-info.java b/java/ql/integration-tests/java/multi-release-jar-java11/mod2/module-info.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod2/module-info.java rename to java/ql/integration-tests/java/multi-release-jar-java11/mod2/module-info.java diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/test.py b/java/ql/integration-tests/java/multi-release-jar-java11/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/test.py rename to java/ql/integration-tests/java/multi-release-jar-java11/test.py diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/ExtractorInformation.expected b/java/ql/integration-tests/java/multi-release-jar-java17/ExtractorInformation.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/ExtractorInformation.expected rename to java/ql/integration-tests/java/multi-release-jar-java17/ExtractorInformation.expected diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/ExtractorInformation.qlref b/java/ql/integration-tests/java/multi-release-jar-java17/ExtractorInformation.qlref similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/ExtractorInformation.qlref rename to java/ql/integration-tests/java/multi-release-jar-java17/ExtractorInformation.qlref diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod1/mod1pkg/Mod1Class.java b/java/ql/integration-tests/java/multi-release-jar-java17/mod1/mod1pkg/Mod1Class.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod1/mod1pkg/Mod1Class.java rename to java/ql/integration-tests/java/multi-release-jar-java17/mod1/mod1pkg/Mod1Class.java diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod1/module-info.java b/java/ql/integration-tests/java/multi-release-jar-java17/mod1/module-info.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod1/module-info.java rename to java/ql/integration-tests/java/multi-release-jar-java17/mod1/module-info.java diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod2/mod2pkg/User.java b/java/ql/integration-tests/java/multi-release-jar-java17/mod2/mod2pkg/User.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod2/mod2pkg/User.java rename to java/ql/integration-tests/java/multi-release-jar-java17/mod2/mod2pkg/User.java diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod2/module-info.java b/java/ql/integration-tests/java/multi-release-jar-java17/mod2/module-info.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod2/module-info.java rename to java/ql/integration-tests/java/multi-release-jar-java17/mod2/module-info.java diff --git a/java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/test.py b/java/ql/integration-tests/java/multi-release-jar-java17/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/test.py rename to java/ql/integration-tests/java/multi-release-jar-java17/test.py diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample/.gitattributes b/java/ql/integration-tests/java/partial-gradle-sample-without-gradle/.gitattributes similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample/.gitattributes rename to java/ql/integration-tests/java/partial-gradle-sample-without-gradle/.gitattributes diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/.gitignore b/java/ql/integration-tests/java/partial-gradle-sample-without-gradle/.gitignore similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/.gitignore rename to java/ql/integration-tests/java/partial-gradle-sample-without-gradle/.gitignore diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/build.gradle b/java/ql/integration-tests/java/partial-gradle-sample-without-gradle/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/build.gradle rename to java/ql/integration-tests/java/partial-gradle-sample-without-gradle/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/gradle/verification-metadata.xml b/java/ql/integration-tests/java/partial-gradle-sample-without-gradle/gradle/verification-metadata.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/gradle/verification-metadata.xml rename to java/ql/integration-tests/java/partial-gradle-sample-without-gradle/gradle/verification-metadata.xml diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/gradle/wrapper/gradle-wrapper.properties b/java/ql/integration-tests/java/partial-gradle-sample-without-gradle/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/gradle/wrapper/gradle-wrapper.properties rename to java/ql/integration-tests/java/partial-gradle-sample-without-gradle/gradle/wrapper/gradle-wrapper.properties diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/gradlew b/java/ql/integration-tests/java/partial-gradle-sample-without-gradle/gradlew similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/gradlew rename to java/ql/integration-tests/java/partial-gradle-sample-without-gradle/gradlew diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/gradlew.bat b/java/ql/integration-tests/java/partial-gradle-sample-without-gradle/gradlew.bat similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/gradlew.bat rename to java/ql/integration-tests/java/partial-gradle-sample-without-gradle/gradlew.bat diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/settings.gradle b/java/ql/integration-tests/java/partial-gradle-sample-without-gradle/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/settings.gradle rename to java/ql/integration-tests/java/partial-gradle-sample-without-gradle/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/source_archive.expected b/java/ql/integration-tests/java/partial-gradle-sample-without-gradle/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/source_archive.expected rename to java/ql/integration-tests/java/partial-gradle-sample-without-gradle/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/src/main/java/com/example/App.java b/java/ql/integration-tests/java/partial-gradle-sample-without-gradle/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/partial-gradle-sample-without-gradle/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/partial-gradle-sample-without-gradle/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/partial-gradle-sample-without-gradle/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/test.py b/java/ql/integration-tests/java/partial-gradle-sample-without-gradle/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample-without-gradle/test.py rename to java/ql/integration-tests/java/partial-gradle-sample-without-gradle/test.py diff --git a/java/ql/integration-tests/java/partial-gradle-sample/.gitattributes b/java/ql/integration-tests/java/partial-gradle-sample/.gitattributes new file mode 100644 index 00000000000..00a51aff5e5 --- /dev/null +++ b/java/ql/integration-tests/java/partial-gradle-sample/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf + diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample/build.gradle b/java/ql/integration-tests/java/partial-gradle-sample/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample/build.gradle rename to java/ql/integration-tests/java/partial-gradle-sample/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample/gradle/verification-metadata.xml b/java/ql/integration-tests/java/partial-gradle-sample/gradle/verification-metadata.xml similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample/gradle/verification-metadata.xml rename to java/ql/integration-tests/java/partial-gradle-sample/gradle/verification-metadata.xml diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample/gradle/wrapper/gradle-wrapper.properties b/java/ql/integration-tests/java/partial-gradle-sample/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample/gradle/wrapper/gradle-wrapper.properties rename to java/ql/integration-tests/java/partial-gradle-sample/gradle/wrapper/gradle-wrapper.properties diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample/gradlew b/java/ql/integration-tests/java/partial-gradle-sample/gradlew similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample/gradlew rename to java/ql/integration-tests/java/partial-gradle-sample/gradlew diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample/gradlew.bat b/java/ql/integration-tests/java/partial-gradle-sample/gradlew.bat similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample/gradlew.bat rename to java/ql/integration-tests/java/partial-gradle-sample/gradlew.bat diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample/settings.gradle b/java/ql/integration-tests/java/partial-gradle-sample/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample/settings.gradle rename to java/ql/integration-tests/java/partial-gradle-sample/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample/source_archive.expected b/java/ql/integration-tests/java/partial-gradle-sample/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample/source_archive.expected rename to java/ql/integration-tests/java/partial-gradle-sample/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample/src/main/java/com/example/App.java b/java/ql/integration-tests/java/partial-gradle-sample/src/main/java/com/example/App.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample/src/main/java/com/example/App.java rename to java/ql/integration-tests/java/partial-gradle-sample/src/main/java/com/example/App.java diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample/src/test/java/com/example/AppTest.java b/java/ql/integration-tests/java/partial-gradle-sample/src/test/java/com/example/AppTest.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample/src/test/java/com/example/AppTest.java rename to java/ql/integration-tests/java/partial-gradle-sample/src/test/java/com/example/AppTest.java diff --git a/java/ql/integration-tests/all-platforms/java/partial-gradle-sample/test.py b/java/ql/integration-tests/java/partial-gradle-sample/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/partial-gradle-sample/test.py rename to java/ql/integration-tests/java/partial-gradle-sample/test.py diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/README b/java/ql/integration-tests/java/spring-boot-sample/README similarity index 100% rename from java/ql/integration-tests/all-platforms/java/spring-boot-sample/README rename to java/ql/integration-tests/java/spring-boot-sample/README diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/build.gradle b/java/ql/integration-tests/java/spring-boot-sample/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/spring-boot-sample/build.gradle rename to java/ql/integration-tests/java/spring-boot-sample/build.gradle diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/settings.gradle b/java/ql/integration-tests/java/spring-boot-sample/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/java/spring-boot-sample/settings.gradle rename to java/ql/integration-tests/java/spring-boot-sample/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/source_archive.expected b/java/ql/integration-tests/java/spring-boot-sample/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/java/spring-boot-sample/source_archive.expected rename to java/ql/integration-tests/java/spring-boot-sample/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/main/java/com/github/springbootsample/SpringBootSampleApplication.java b/java/ql/integration-tests/java/spring-boot-sample/src/main/java/com/github/springbootsample/SpringBootSampleApplication.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/main/java/com/github/springbootsample/SpringBootSampleApplication.java rename to java/ql/integration-tests/java/spring-boot-sample/src/main/java/com/github/springbootsample/SpringBootSampleApplication.java diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/main/resources/application.properties b/java/ql/integration-tests/java/spring-boot-sample/src/main/resources/application.properties similarity index 100% rename from java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/main/resources/application.properties rename to java/ql/integration-tests/java/spring-boot-sample/src/main/resources/application.properties diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/test/java/com/github/springbootsample/SpringBootSampleApplicationTests.java b/java/ql/integration-tests/java/spring-boot-sample/src/test/java/com/github/springbootsample/SpringBootSampleApplicationTests.java similarity index 100% rename from java/ql/integration-tests/all-platforms/java/spring-boot-sample/src/test/java/com/github/springbootsample/SpringBootSampleApplicationTests.java rename to java/ql/integration-tests/java/spring-boot-sample/src/test/java/com/github/springbootsample/SpringBootSampleApplicationTests.java diff --git a/java/ql/integration-tests/all-platforms/java/spring-boot-sample/test.py b/java/ql/integration-tests/java/spring-boot-sample/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/java/spring-boot-sample/test.py rename to java/ql/integration-tests/java/spring-boot-sample/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/PrintAst.expected b/java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/PrintAst.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/PrintAst.expected rename to java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/PrintAst.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/PrintAst.qlref b/java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/PrintAst.qlref similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/PrintAst.qlref rename to java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/PrintAst.qlref diff --git a/java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/User.java b/java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/User.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/User.java rename to java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/User.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/deprecatedAnnotationTypes.expected b/java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/deprecatedAnnotationTypes.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/deprecatedAnnotationTypes.expected rename to java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/deprecatedAnnotationTypes.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/deprecatedAnnotationTypes.ql b/java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/deprecatedAnnotationTypes.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/deprecatedAnnotationTypes.ql rename to java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/deprecatedAnnotationTypes.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/ktUser.kt b/java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/ktUser.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/ktUser.kt rename to java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/ktUser.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/qlpack.yml b/java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/qlpack.yml similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/qlpack.yml rename to java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/qlpack.yml diff --git a/java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/test.ext.yml b/java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/test.ext.yml similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/test.ext.yml rename to java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/test.ext.yml diff --git a/java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/test.kt b/java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/test.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/test.kt rename to java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/test.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/test.py b/java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/annotation-id-consistency/test.py rename to java/ql/integration-tests/kotlin/all-platforms/annotation-id-consistency/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/app/build.gradle b/java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/app/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/app/build.gradle rename to java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/app/build.gradle diff --git a/java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/app/src/main/kotlin/testProject/App.kt b/java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/app/src/main/kotlin/testProject/App.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/app/src/main/kotlin/testProject/App.kt rename to java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/app/src/main/kotlin/testProject/App.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/compArgs.expected b/java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/compArgs.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/compArgs.expected rename to java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/compArgs.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/compArgs.ql b/java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/compArgs.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/compArgs.ql rename to java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/compArgs.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/settings.gradle b/java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/settings.gradle rename to java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/test.py b/java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/compiler_arguments/test.py rename to java/ql/integration-tests/kotlin/all-platforms/compiler_arguments/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/lib.kt b/java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/lib.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/lib.kt rename to java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/lib.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/qlpack.yml b/java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/qlpack.yml similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/qlpack.yml rename to java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/qlpack.yml diff --git a/java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/test.expected b/java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/test.ext.yml b/java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/test.ext.yml similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/test.ext.yml rename to java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/test.ext.yml diff --git a/java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/test.py b/java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/test.py rename to java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/test.ql b/java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/user.kt b/java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/user.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/default-parameter-mad-flow/user.kt rename to java/ql/integration-tests/kotlin/all-platforms/default-parameter-mad-flow/user.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/diagnostics.expected b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/diagnostics.expected rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/com/intellij/mock/MockProject.java b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/com/intellij/mock/MockProject.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/com/intellij/mock/MockProject.java rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/com/intellij/mock/MockProject.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/com/intellij/openapi/Disposable.java b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/com/intellij/openapi/Disposable.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/com/intellij/openapi/Disposable.java rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/com/intellij/openapi/Disposable.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/driver/Main.java b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/driver/Main.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/driver/Main.java rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/driver/Main.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/kotlin/KotlinVersion.java b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/kotlin/KotlinVersion.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/kotlin/KotlinVersion.java rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/kotlin/KotlinVersion.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/ExitCode.java b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/ExitCode.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/ExitCode.java rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/ExitCode.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/arguments/CommonToolArguments.java b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/arguments/CommonToolArguments.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/arguments/CommonToolArguments.java rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/arguments/CommonToolArguments.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.java b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.java rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/arguments/ParseCommandLineArgumentsKt.java b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/arguments/ParseCommandLineArgumentsKt.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/arguments/ParseCommandLineArgumentsKt.java rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/common/arguments/ParseCommandLineArgumentsKt.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.java b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.java rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/config/CompilerConfiguration.java b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/config/CompilerConfiguration.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/config/CompilerConfiguration.java rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/config/CompilerConfiguration.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/utils/KotlinPaths.java b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/utils/KotlinPaths.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/utils/KotlinPaths.java rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/fake-kotlinc-source/org/jetbrains/kotlin/utils/KotlinPaths.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/test.py b/java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/diagnostics/kotlin-version-too-new/test.py rename to java/ql/integration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/enabling/KotlinDefault.kt b/java/ql/integration-tests/kotlin/all-platforms/enabling/KotlinDefault.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/enabling/KotlinDefault.kt rename to java/ql/integration-tests/kotlin/all-platforms/enabling/KotlinDefault.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/enabling/KotlinDisabled.kt b/java/ql/integration-tests/kotlin/all-platforms/enabling/KotlinDisabled.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/enabling/KotlinDisabled.kt rename to java/ql/integration-tests/kotlin/all-platforms/enabling/KotlinDisabled.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/enabling/KotlinEnabled.kt b/java/ql/integration-tests/kotlin/all-platforms/enabling/KotlinEnabled.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/enabling/KotlinEnabled.kt rename to java/ql/integration-tests/kotlin/all-platforms/enabling/KotlinEnabled.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/enabling/source_archive.expected b/java/ql/integration-tests/kotlin/all-platforms/enabling/source_archive.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/enabling/source_archive.expected rename to java/ql/integration-tests/kotlin/all-platforms/enabling/source_archive.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/enabling/test.py b/java/ql/integration-tests/kotlin/all-platforms/enabling/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/enabling/test.py rename to java/ql/integration-tests/kotlin/all-platforms/enabling/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/enhanced-nullability/NotNull.java b/java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/NotNull.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/enhanced-nullability/NotNull.java rename to java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/NotNull.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/enhanced-nullability/Test.java b/java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/enhanced-nullability/Test.java rename to java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/Test.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/enhanced-nullability/test.expected b/java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/enhanced-nullability/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/enhanced-nullability/test.py b/java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/enhanced-nullability/test.py rename to java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/enhanced-nullability/test.ql b/java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/enhanced-nullability/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/enhanced-nullability/user.kt b/java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/user.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/enhanced-nullability/user.kt rename to java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/user.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/external-property-overloads/test.expected b/java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/external-property-overloads/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/external-property-overloads/test.kt b/java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/test.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/external-property-overloads/test.kt rename to java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/test.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/external-property-overloads/test.py b/java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/external-property-overloads/test.py rename to java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/external-property-overloads/test.ql b/java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/external-property-overloads/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/external-property-overloads/user.kt b/java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/user.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/external-property-overloads/user.kt rename to java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/user.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_crash/classes.expected b/java/ql/integration-tests/kotlin/all-platforms/extractor_crash/classes.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_crash/classes.expected rename to java/ql/integration-tests/kotlin/all-platforms/extractor_crash/classes.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_crash/classes.ql b/java/ql/integration-tests/kotlin/all-platforms/extractor_crash/classes.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_crash/classes.ql rename to java/ql/integration-tests/kotlin/all-platforms/extractor_crash/classes.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_crash/code/A.kt b/java/ql/integration-tests/kotlin/all-platforms/extractor_crash/code/A.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_crash/code/A.kt rename to java/ql/integration-tests/kotlin/all-platforms/extractor_crash/code/A.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_crash/code/B.kt b/java/ql/integration-tests/kotlin/all-platforms/extractor_crash/code/B.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_crash/code/B.kt rename to java/ql/integration-tests/kotlin/all-platforms/extractor_crash/code/B.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_crash/code/C.kt b/java/ql/integration-tests/kotlin/all-platforms/extractor_crash/code/C.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_crash/code/C.kt rename to java/ql/integration-tests/kotlin/all-platforms/extractor_crash/code/C.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_crash/compilationFiles.expected b/java/ql/integration-tests/kotlin/all-platforms/extractor_crash/compilationFiles.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_crash/compilationFiles.expected rename to java/ql/integration-tests/kotlin/all-platforms/extractor_crash/compilationFiles.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_crash/compilationFiles.ql b/java/ql/integration-tests/kotlin/all-platforms/extractor_crash/compilationFiles.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_crash/compilationFiles.ql rename to java/ql/integration-tests/kotlin/all-platforms/extractor_crash/compilationFiles.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_crash/compilations.expected b/java/ql/integration-tests/kotlin/all-platforms/extractor_crash/compilations.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_crash/compilations.expected rename to java/ql/integration-tests/kotlin/all-platforms/extractor_crash/compilations.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_crash/compilations.ql b/java/ql/integration-tests/kotlin/all-platforms/extractor_crash/compilations.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_crash/compilations.ql rename to java/ql/integration-tests/kotlin/all-platforms/extractor_crash/compilations.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_crash/test.py b/java/ql/integration-tests/kotlin/all-platforms/extractor_crash/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_crash/test.py rename to java/ql/integration-tests/kotlin/all-platforms/extractor_crash/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/ExtractorInformation.expected b/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/ExtractorInformation.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/ExtractorInformation.expected rename to java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/ExtractorInformation.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/ExtractorInformation.ext.yml b/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/ExtractorInformation.ext.yml similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/ExtractorInformation.ext.yml rename to java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/ExtractorInformation.ext.yml diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/ExtractorInformation.qlref b/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/ExtractorInformation.qlref similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/ExtractorInformation.qlref rename to java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/ExtractorInformation.qlref diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/SomeClass.kt b/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/SomeClass.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/SomeClass.kt rename to java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/SomeClass.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/test.py b/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin1/test.py rename to java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/ExtractorInformation.expected b/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin2/ExtractorInformation.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/ExtractorInformation.expected rename to java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin2/ExtractorInformation.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/ExtractorInformation.ext.yml b/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin2/ExtractorInformation.ext.yml similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/ExtractorInformation.ext.yml rename to java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin2/ExtractorInformation.ext.yml diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/ExtractorInformation.qlref b/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin2/ExtractorInformation.qlref similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/ExtractorInformation.qlref rename to java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin2/ExtractorInformation.qlref diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/SomeClass.kt b/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin2/SomeClass.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/SomeClass.kt rename to java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin2/SomeClass.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/test.py b/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin2/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/extractor_information_kotlin2/test.py rename to java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin2/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/file_classes/A.kt b/java/ql/integration-tests/kotlin/all-platforms/file_classes/A.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/file_classes/A.kt rename to java/ql/integration-tests/kotlin/all-platforms/file_classes/A.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/file_classes/B.kt b/java/ql/integration-tests/kotlin/all-platforms/file_classes/B.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/file_classes/B.kt rename to java/ql/integration-tests/kotlin/all-platforms/file_classes/B.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/file_classes/C.kt b/java/ql/integration-tests/kotlin/all-platforms/file_classes/C.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/file_classes/C.kt rename to java/ql/integration-tests/kotlin/all-platforms/file_classes/C.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/file_classes/classes.expected b/java/ql/integration-tests/kotlin/all-platforms/file_classes/classes.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/file_classes/classes.expected rename to java/ql/integration-tests/kotlin/all-platforms/file_classes/classes.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/file_classes/classes.ql b/java/ql/integration-tests/kotlin/all-platforms/file_classes/classes.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/file_classes/classes.ql rename to java/ql/integration-tests/kotlin/all-platforms/file_classes/classes.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/file_classes/test.py b/java/ql/integration-tests/kotlin/all-platforms/file_classes/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/file_classes/test.py rename to java/ql/integration-tests/kotlin/all-platforms/file_classes/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/app/build.gradle b/java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/app/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/app/build.gradle rename to java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/app/build.gradle diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/app/src/main/kotlin/testProject/App.kt b/java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/app/src/main/kotlin/testProject/App.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/app/src/main/kotlin/testProject/App.kt rename to java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/app/src/main/kotlin/testProject/App.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/compilations.expected b/java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/compilations.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/compilations.expected rename to java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/compilations.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/compilations.ql b/java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/compilations.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/compilations.ql rename to java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/compilations.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/methods.expected b/java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/methods.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/methods.expected rename to java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/methods.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/methods.ql b/java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/methods.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/methods.ql rename to java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/methods.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/settings.gradle b/java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/settings.gradle rename to java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/test.py b/java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_groovy_app/test.py rename to java/ql/integration-tests/kotlin/all-platforms/gradle_groovy_app/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/ConstantExpAppearsNonConstant.expected b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/ConstantExpAppearsNonConstant.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/ConstantExpAppearsNonConstant.expected rename to java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/ConstantExpAppearsNonConstant.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/ConstantExpAppearsNonConstant.qlref b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/ConstantExpAppearsNonConstant.qlref similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/ConstantExpAppearsNonConstant.qlref rename to java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/ConstantExpAppearsNonConstant.qlref diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/PrintAst.expected b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/PrintAst.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/PrintAst.expected rename to java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/PrintAst.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/PrintAst.qlref b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/PrintAst.qlref similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/PrintAst.qlref rename to java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/PrintAst.qlref diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/app/build.gradle b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/app/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/app/build.gradle rename to java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/app/build.gradle diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/app/src/main/kotlin/testProject/App.kt b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/app/src/main/kotlin/testProject/App.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/app/src/main/kotlin/testProject/App.kt rename to java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/app/src/main/kotlin/testProject/App.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/diag.expected b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/diag.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/diag.expected rename to java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/diag.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/diag.ql b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/diag.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/diag.ql rename to java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/diag.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/settings.gradle b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/settings.gradle rename to java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/test.py b/java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/gradle_kotlinx_serialization/test.py rename to java/ql/integration-tests/kotlin/all-platforms/gradle_kotlinx_serialization/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/java-interface-redeclares-tostring/Test.java b/java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/Test.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/java-interface-redeclares-tostring/Test.java rename to java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/Test.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/java-interface-redeclares-tostring/test.expected b/java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/java-interface-redeclares-tostring/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/java-interface-redeclares-tostring/test.py b/java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/java-interface-redeclares-tostring/test.py rename to java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/java-interface-redeclares-tostring/test.ql b/java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/java-interface-redeclares-tostring/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/java-interface-redeclares-tostring/user.kt b/java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/user.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/java-interface-redeclares-tostring/user.kt rename to java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/user.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/java_modifiers/libsrc/extlib/A.java b/java/ql/integration-tests/kotlin/all-platforms/java_modifiers/libsrc/extlib/A.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/java_modifiers/libsrc/extlib/A.java rename to java/ql/integration-tests/kotlin/all-platforms/java_modifiers/libsrc/extlib/A.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/java_modifiers/test.expected b/java/ql/integration-tests/kotlin/all-platforms/java_modifiers/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/java_modifiers/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/java_modifiers/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/java_modifiers/test.kt b/java/ql/integration-tests/kotlin/all-platforms/java_modifiers/test.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/java_modifiers/test.kt rename to java/ql/integration-tests/kotlin/all-platforms/java_modifiers/test.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/java_modifiers/test.py b/java/ql/integration-tests/kotlin/all-platforms/java_modifiers/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/java_modifiers/test.py rename to java/ql/integration-tests/kotlin/all-platforms/java_modifiers/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/java_modifiers/test.ql b/java/ql/integration-tests/kotlin/all-platforms/java_modifiers/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/java_modifiers/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/java_modifiers/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/jvmoverloads-external-class/User.java b/java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/User.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/jvmoverloads-external-class/User.java rename to java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/User.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/jvmoverloads-external-class/test.expected b/java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/jvmoverloads-external-class/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/jvmoverloads-external-class/test.kt b/java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/test.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/jvmoverloads-external-class/test.kt rename to java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/test.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/jvmoverloads-external-class/test.py b/java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/jvmoverloads-external-class/test.py rename to java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/jvmoverloads-external-class/test.ql b/java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/jvmoverloads-external-class/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/jvmoverloads-external-class/user.kt b/java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/user.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/jvmoverloads-external-class/user.kt rename to java/ql/integration-tests/kotlin/all-platforms/jvmoverloads-external-class/user.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin-interface-inherited-default/User.java b/java/ql/integration-tests/kotlin/all-platforms/kotlin-interface-inherited-default/User.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin-interface-inherited-default/User.java rename to java/ql/integration-tests/kotlin/all-platforms/kotlin-interface-inherited-default/User.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin-interface-inherited-default/noforwards.kt b/java/ql/integration-tests/kotlin/all-platforms/kotlin-interface-inherited-default/noforwards.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin-interface-inherited-default/noforwards.kt rename to java/ql/integration-tests/kotlin/all-platforms/kotlin-interface-inherited-default/noforwards.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin-interface-inherited-default/test.expected b/java/ql/integration-tests/kotlin/all-platforms/kotlin-interface-inherited-default/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin-interface-inherited-default/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/kotlin-interface-inherited-default/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin-interface-inherited-default/test.kt b/java/ql/integration-tests/kotlin/all-platforms/kotlin-interface-inherited-default/test.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin-interface-inherited-default/test.kt rename to java/ql/integration-tests/kotlin/all-platforms/kotlin-interface-inherited-default/test.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin-interface-inherited-default/test.py b/java/ql/integration-tests/kotlin/all-platforms/kotlin-interface-inherited-default/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin-interface-inherited-default/test.py rename to java/ql/integration-tests/kotlin/all-platforms/kotlin-interface-inherited-default/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin-interface-inherited-default/test.ql b/java/ql/integration-tests/kotlin/all-platforms/kotlin-interface-inherited-default/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin-interface-inherited-default/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/kotlin-interface-inherited-default/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_compiler_java_source/J.java b/java/ql/integration-tests/kotlin/all-platforms/kotlin_compiler_java_source/J.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_compiler_java_source/J.java rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_compiler_java_source/J.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_compiler_java_source/K.kt b/java/ql/integration-tests/kotlin/all-platforms/kotlin_compiler_java_source/K.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_compiler_java_source/K.kt rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_compiler_java_source/K.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_compiler_java_source/K2.kt b/java/ql/integration-tests/kotlin/all-platforms/kotlin_compiler_java_source/K2.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_compiler_java_source/K2.kt rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_compiler_java_source/K2.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_compiler_java_source/jlocs.expected b/java/ql/integration-tests/kotlin/all-platforms/kotlin_compiler_java_source/jlocs.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_compiler_java_source/jlocs.expected rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_compiler_java_source/jlocs.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_compiler_java_source/jlocs.ql b/java/ql/integration-tests/kotlin/all-platforms/kotlin_compiler_java_source/jlocs.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_compiler_java_source/jlocs.ql rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_compiler_java_source/jlocs.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_compiler_java_source/test.py b/java/ql/integration-tests/kotlin/all-platforms/kotlin_compiler_java_source/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_compiler_java_source/test.py rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_compiler_java_source/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_file_import/libsrc/longsig.kt b/java/ql/integration-tests/kotlin/all-platforms/kotlin_file_import/libsrc/longsig.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_file_import/libsrc/longsig.kt rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_file_import/libsrc/longsig.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_file_import/test.expected b/java/ql/integration-tests/kotlin/all-platforms/kotlin_file_import/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_file_import/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_file_import/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_file_import/test.py b/java/ql/integration-tests/kotlin/all-platforms/kotlin_file_import/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_file_import/test.py rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_file_import/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_file_import/test.ql b/java/ql/integration-tests/kotlin/all-platforms/kotlin_file_import/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_file_import/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_file_import/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_file_import/user.kt b/java/ql/integration-tests/kotlin/all-platforms/kotlin_file_import/user.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_file_import/user.kt rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_file_import/user.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/JavaDefns.java b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/JavaDefns.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/JavaDefns.java rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/JavaDefns.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/JavaDefns2.java b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/JavaDefns2.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/JavaDefns2.java rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/JavaDefns2.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/JavaUser.java b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/JavaUser.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/JavaUser.java rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/JavaUser.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/kotlindefns.kt b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/kotlindefns.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/kotlindefns.kt rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/kotlindefns.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/kotlinuser.kt b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/kotlinuser.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/kotlinuser.kt rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/kotlinuser.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/test.expected b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/test.py b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/test.py rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/test.ql b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_lowering_wildcards/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/ReadsFields.java b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/ReadsFields.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/ReadsFields.java rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/ReadsFields.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/hasFields.kt b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/hasFields.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/hasFields.kt rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/hasFields.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/test.expected b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/test.py b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/test.py rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/test.ql b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_java_static_fields/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_java_static_fields/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/app/build.gradle b/java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/app/build.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/app/build.gradle rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/app/build.gradle diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/app/src/main/kotlin/testProject/App.kt b/java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/app/src/main/kotlin/testProject/App.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/app/src/main/kotlin/testProject/App.kt rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/app/src/main/kotlin/testProject/App.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/diag.expected b/java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/diag.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/diag.expected rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/diag.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/diag.ql b/java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/diag.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/diag.ql rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/diag.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/settings.gradle b/java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/settings.gradle similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/settings.gradle rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/settings.gradle diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/test.py b/java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlin_kfunction/test.py rename to java/ql/integration-tests/kotlin/all-platforms/kotlin_kfunction/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/FileA.kt b/java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/FileA.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/FileA.kt rename to java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/FileA.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/FileB.kt b/java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/FileB.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/FileB.kt rename to java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/FileB.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/compilations.expected b/java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/compilations.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/compilations.expected rename to java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/compilations.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/compilations.ql b/java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/compilations.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/compilations.ql rename to java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/compilations.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/methods.expected b/java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/methods.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/methods.expected rename to java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/methods.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/methods.ql b/java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/methods.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/methods.ql rename to java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/methods.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/test.py b/java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/kotlinc_multi/test.py rename to java/ql/integration-tests/kotlin/all-platforms/kotlinc_multi/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/logs/logs.expected b/java/ql/integration-tests/kotlin/all-platforms/logs/logs.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/logs/logs.expected rename to java/ql/integration-tests/kotlin/all-platforms/logs/logs.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/logs/test.kt b/java/ql/integration-tests/kotlin/all-platforms/logs/test.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/logs/test.kt rename to java/ql/integration-tests/kotlin/all-platforms/logs/test.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/logs/test.py b/java/ql/integration-tests/kotlin/all-platforms/logs/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/logs/test.py rename to java/ql/integration-tests/kotlin/all-platforms/logs/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/JavaUser.java b/java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/JavaUser.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/JavaUser.java rename to java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/JavaUser.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/KotlinUser.kt b/java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/KotlinUser.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/KotlinUser.kt rename to java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/KotlinUser.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/libsrc/extlib/OuterGeneric.java b/java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/libsrc/extlib/OuterGeneric.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/libsrc/extlib/OuterGeneric.java rename to java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/libsrc/extlib/OuterGeneric.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/libsrc/extlib/OuterManyParams.java b/java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/libsrc/extlib/OuterManyParams.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/libsrc/extlib/OuterManyParams.java rename to java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/libsrc/extlib/OuterManyParams.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/libsrc/extlib/OuterNotGeneric.java b/java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/libsrc/extlib/OuterNotGeneric.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/libsrc/extlib/OuterNotGeneric.java rename to java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/libsrc/extlib/OuterNotGeneric.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/libsrc/extlib/TypeParamVisibility.java b/java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/libsrc/extlib/TypeParamVisibility.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/libsrc/extlib/TypeParamVisibility.java rename to java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/libsrc/extlib/TypeParamVisibility.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/test.expected b/java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/test.py b/java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/test.py rename to java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/test.ql b/java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nested_generic_types/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/nested_generic_types/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/AnnotatedInterface.java b/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/AnnotatedInterface.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/AnnotatedInterface.java rename to java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/AnnotatedInterface.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/AnnotatedMethods.java b/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/AnnotatedMethods.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/AnnotatedMethods.java rename to java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/AnnotatedMethods.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/JavaUser.java b/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/JavaUser.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/JavaUser.java rename to java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/JavaUser.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/ktUser.kt b/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/ktUser.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/ktUser.kt rename to java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/ktUser.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/org/jetbrains/annotations/NotNull.java b/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/org/jetbrains/annotations/NotNull.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/org/jetbrains/annotations/NotNull.java rename to java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/org/jetbrains/annotations/NotNull.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/org/jetbrains/annotations/Nullable.java b/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/org/jetbrains/annotations/Nullable.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/org/jetbrains/annotations/Nullable.java rename to java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/org/jetbrains/annotations/Nullable.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/test.expected b/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/test.py b/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/test.py rename to java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/test.ql b/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/zpkg/A.java b/java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/zpkg/A.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/nullability-annotations/zpkg/A.java rename to java/ql/integration-tests/kotlin/all-platforms/nullability-annotations/zpkg/A.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/path_transformer/classes.expected b/java/ql/integration-tests/kotlin/all-platforms/path_transformer/classes.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/path_transformer/classes.expected rename to java/ql/integration-tests/kotlin/all-platforms/path_transformer/classes.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/path_transformer/classes.ql b/java/ql/integration-tests/kotlin/all-platforms/path_transformer/classes.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/path_transformer/classes.ql rename to java/ql/integration-tests/kotlin/all-platforms/path_transformer/classes.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/path_transformer/kotlin_source.kt b/java/ql/integration-tests/kotlin/all-platforms/path_transformer/kotlin_source.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/path_transformer/kotlin_source.kt rename to java/ql/integration-tests/kotlin/all-platforms/path_transformer/kotlin_source.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/path_transformer/test.py b/java/ql/integration-tests/kotlin/all-platforms/path_transformer/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/path_transformer/test.py rename to java/ql/integration-tests/kotlin/all-platforms/path_transformer/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/private_property_accessors/hasprops.kt b/java/ql/integration-tests/kotlin/all-platforms/private_property_accessors/hasprops.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/private_property_accessors/hasprops.kt rename to java/ql/integration-tests/kotlin/all-platforms/private_property_accessors/hasprops.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/private_property_accessors/test.expected b/java/ql/integration-tests/kotlin/all-platforms/private_property_accessors/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/private_property_accessors/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/private_property_accessors/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/private_property_accessors/test.py b/java/ql/integration-tests/kotlin/all-platforms/private_property_accessors/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/private_property_accessors/test.py rename to java/ql/integration-tests/kotlin/all-platforms/private_property_accessors/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/private_property_accessors/test.ql b/java/ql/integration-tests/kotlin/all-platforms/private_property_accessors/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/private_property_accessors/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/private_property_accessors/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/private_property_accessors/usesprops.kt b/java/ql/integration-tests/kotlin/all-platforms/private_property_accessors/usesprops.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/private_property_accessors/usesprops.kt rename to java/ql/integration-tests/kotlin/all-platforms/private_property_accessors/usesprops.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/JavaUser.java b/java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/JavaUser.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/JavaUser.java rename to java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/JavaUser.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/KotlinUser.kt b/java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/KotlinUser.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/KotlinUser.kt rename to java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/KotlinUser.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/libsrc/extlib/GenericTypeJava.java b/java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/libsrc/extlib/GenericTypeJava.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/libsrc/extlib/GenericTypeJava.java rename to java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/libsrc/extlib/GenericTypeJava.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/libsrc/extlib/GenericTypeKotlin.java b/java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/libsrc/extlib/GenericTypeKotlin.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/libsrc/extlib/GenericTypeKotlin.java rename to java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/libsrc/extlib/GenericTypeKotlin.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/libsrc/extlib/RawTypesInSignatureJava.java b/java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/libsrc/extlib/RawTypesInSignatureJava.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/libsrc/extlib/RawTypesInSignatureJava.java rename to java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/libsrc/extlib/RawTypesInSignatureJava.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/libsrc/extlib/RawTypesInSignatureKotlin.java b/java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/libsrc/extlib/RawTypesInSignatureKotlin.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/libsrc/extlib/RawTypesInSignatureKotlin.java rename to java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/libsrc/extlib/RawTypesInSignatureKotlin.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/test.expected b/java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/test.py b/java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/test.py rename to java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/test.ql b/java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/raw_generic_types/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/raw_generic_types/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/JavaDefinedContainer.java b/java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/JavaDefinedContainer.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/JavaDefinedContainer.java rename to java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/JavaDefinedContainer.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/JavaDefinedRepeatable.java b/java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/JavaDefinedRepeatable.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/JavaDefinedRepeatable.java rename to java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/JavaDefinedRepeatable.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/JavaUser.java b/java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/JavaUser.java similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/JavaUser.java rename to java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/JavaUser.java diff --git a/java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/lib.kt b/java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/lib.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/lib.kt rename to java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/lib.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/test.expected b/java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/test.expected similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/test.expected rename to java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/test.expected diff --git a/java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/test.kt b/java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/test.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/test.kt rename to java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/test.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/test.py b/java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/test.py rename to java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/test.py diff --git a/java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/test.ql b/java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/test.ql similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/repeatable-annotations/test.ql rename to java/ql/integration-tests/kotlin/all-platforms/repeatable-annotations/test.ql diff --git a/java/ql/integration-tests/all-platforms/kotlin/trap_compression/test.kt b/java/ql/integration-tests/kotlin/all-platforms/trap_compression/test.kt similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/trap_compression/test.kt rename to java/ql/integration-tests/kotlin/all-platforms/trap_compression/test.kt diff --git a/java/ql/integration-tests/all-platforms/kotlin/trap_compression/test.py b/java/ql/integration-tests/kotlin/all-platforms/trap_compression/test.py similarity index 100% rename from java/ql/integration-tests/all-platforms/kotlin/trap_compression/test.py rename to java/ql/integration-tests/kotlin/all-platforms/trap_compression/test.py diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/PrintAst.expected b/java/ql/integration-tests/kotlin/linux/custom_plugin/PrintAst.expected similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/PrintAst.expected rename to java/ql/integration-tests/kotlin/linux/custom_plugin/PrintAst.expected diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/PrintAst.qlref b/java/ql/integration-tests/kotlin/linux/custom_plugin/PrintAst.qlref similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/PrintAst.qlref rename to java/ql/integration-tests/kotlin/linux/custom_plugin/PrintAst.qlref diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/a.kt b/java/ql/integration-tests/kotlin/linux/custom_plugin/a.kt similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/a.kt rename to java/ql/integration-tests/kotlin/linux/custom_plugin/a.kt diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/b.kt b/java/ql/integration-tests/kotlin/linux/custom_plugin/b.kt similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/b.kt rename to java/ql/integration-tests/kotlin/linux/custom_plugin/b.kt diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/c.kt b/java/ql/integration-tests/kotlin/linux/custom_plugin/c.kt similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/c.kt rename to java/ql/integration-tests/kotlin/linux/custom_plugin/c.kt diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/d.kt b/java/ql/integration-tests/kotlin/linux/custom_plugin/d.kt similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/d.kt rename to java/ql/integration-tests/kotlin/linux/custom_plugin/d.kt diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/diag.expected b/java/ql/integration-tests/kotlin/linux/custom_plugin/diag.expected similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/diag.expected rename to java/ql/integration-tests/kotlin/linux/custom_plugin/diag.expected diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/diag.ql b/java/ql/integration-tests/kotlin/linux/custom_plugin/diag.ql similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/diag.ql rename to java/ql/integration-tests/kotlin/linux/custom_plugin/diag.ql diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/e.kt b/java/ql/integration-tests/kotlin/linux/custom_plugin/e.kt similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/e.kt rename to java/ql/integration-tests/kotlin/linux/custom_plugin/e.kt diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/methods.expected b/java/ql/integration-tests/kotlin/linux/custom_plugin/methods.expected similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/methods.expected rename to java/ql/integration-tests/kotlin/linux/custom_plugin/methods.expected diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/methods.ql b/java/ql/integration-tests/kotlin/linux/custom_plugin/methods.ql similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/methods.ql rename to java/ql/integration-tests/kotlin/linux/custom_plugin/methods.ql diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/plugin/BUILD.bazel b/java/ql/integration-tests/kotlin/linux/custom_plugin/plugin/BUILD.bazel similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/plugin/BUILD.bazel rename to java/ql/integration-tests/kotlin/linux/custom_plugin/plugin/BUILD.bazel diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/plugin/Plugin.kt b/java/ql/integration-tests/kotlin/linux/custom_plugin/plugin/Plugin.kt similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/plugin/Plugin.kt rename to java/ql/integration-tests/kotlin/linux/custom_plugin/plugin/Plugin.kt diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/plugin/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar b/java/ql/integration-tests/kotlin/linux/custom_plugin/plugin/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/plugin/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar rename to java/ql/integration-tests/kotlin/linux/custom_plugin/plugin/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/qlpack.yml b/java/ql/integration-tests/kotlin/linux/custom_plugin/qlpack.yml similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/qlpack.yml rename to java/ql/integration-tests/kotlin/linux/custom_plugin/qlpack.yml diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/rootClasses.expected b/java/ql/integration-tests/kotlin/linux/custom_plugin/rootClasses.expected similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/rootClasses.expected rename to java/ql/integration-tests/kotlin/linux/custom_plugin/rootClasses.expected diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/rootClasses.ql b/java/ql/integration-tests/kotlin/linux/custom_plugin/rootClasses.ql similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/rootClasses.ql rename to java/ql/integration-tests/kotlin/linux/custom_plugin/rootClasses.ql diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/staticinit.expected b/java/ql/integration-tests/kotlin/linux/custom_plugin/staticinit.expected similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/staticinit.expected rename to java/ql/integration-tests/kotlin/linux/custom_plugin/staticinit.expected diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/staticinit.ql b/java/ql/integration-tests/kotlin/linux/custom_plugin/staticinit.ql similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/staticinit.ql rename to java/ql/integration-tests/kotlin/linux/custom_plugin/staticinit.ql diff --git a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/test.py b/java/ql/integration-tests/kotlin/linux/custom_plugin/test.py similarity index 82% rename from java/ql/integration-tests/linux-only/kotlin/custom_plugin/test.py rename to java/ql/integration-tests/kotlin/linux/custom_plugin/test.py index 2ec685ac685..71b6514059f 100644 --- a/java/ql/integration-tests/linux-only/kotlin/custom_plugin/test.py +++ b/java/ql/integration-tests/kotlin/linux/custom_plugin/test.py @@ -13,7 +13,7 @@ def test(codeql, java_full, cwd, semmle_code_dir, test_dir): f"--output_user_root={build_dir}", "--max_idle_secs=1", "build", - "//java/ql/integration-tests/linux-only/kotlin/custom_plugin/plugin", + "//java/ql/integration-tests/kotlin/linux/custom_plugin/plugin", "--spawn_strategy=local", "--nouse_action_cache", "--noremote_accept_cached", @@ -23,7 +23,7 @@ def test(codeql, java_full, cwd, semmle_code_dir, test_dir): _cwd=test_dir, ) shutil.copy( - "bazel-bin/java/ql/integration-tests/linux-only/kotlin/custom_plugin/plugin/plugin.jar", + "bazel-bin/java/ql/integration-tests/kotlin/linux/custom_plugin/plugin/plugin.jar", "plugin.jar", ) codeql.database.create( diff --git a/java/ql/integration-tests/linux-only/kotlin/use_java_library/javasrc/extlib/BoundedGenericTest.java b/java/ql/integration-tests/kotlin/linux/use_java_library/javasrc/extlib/BoundedGenericTest.java similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/use_java_library/javasrc/extlib/BoundedGenericTest.java rename to java/ql/integration-tests/kotlin/linux/use_java_library/javasrc/extlib/BoundedGenericTest.java diff --git a/java/ql/integration-tests/linux-only/kotlin/use_java_library/javasrc/extlib/ComplexBoundedGenericTest.java b/java/ql/integration-tests/kotlin/linux/use_java_library/javasrc/extlib/ComplexBoundedGenericTest.java similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/use_java_library/javasrc/extlib/ComplexBoundedGenericTest.java rename to java/ql/integration-tests/kotlin/linux/use_java_library/javasrc/extlib/ComplexBoundedGenericTest.java diff --git a/java/ql/integration-tests/linux-only/kotlin/use_java_library/javasrc/extlib/GenericTest.java b/java/ql/integration-tests/kotlin/linux/use_java_library/javasrc/extlib/GenericTest.java similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/use_java_library/javasrc/extlib/GenericTest.java rename to java/ql/integration-tests/kotlin/linux/use_java_library/javasrc/extlib/GenericTest.java diff --git a/java/ql/integration-tests/linux-only/kotlin/use_java_library/javasrc/extlib/Lib.java b/java/ql/integration-tests/kotlin/linux/use_java_library/javasrc/extlib/Lib.java similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/use_java_library/javasrc/extlib/Lib.java rename to java/ql/integration-tests/kotlin/linux/use_java_library/javasrc/extlib/Lib.java diff --git a/java/ql/integration-tests/linux-only/kotlin/use_java_library/parameterTypes.expected b/java/ql/integration-tests/kotlin/linux/use_java_library/parameterTypes.expected similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/use_java_library/parameterTypes.expected rename to java/ql/integration-tests/kotlin/linux/use_java_library/parameterTypes.expected diff --git a/java/ql/integration-tests/linux-only/kotlin/use_java_library/parameterTypes.ql b/java/ql/integration-tests/kotlin/linux/use_java_library/parameterTypes.ql similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/use_java_library/parameterTypes.ql rename to java/ql/integration-tests/kotlin/linux/use_java_library/parameterTypes.ql diff --git a/java/ql/integration-tests/linux-only/kotlin/use_java_library/test.py b/java/ql/integration-tests/kotlin/linux/use_java_library/test.py similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/use_java_library/test.py rename to java/ql/integration-tests/kotlin/linux/use_java_library/test.py diff --git a/java/ql/integration-tests/linux-only/kotlin/use_java_library/user.kt b/java/ql/integration-tests/kotlin/linux/use_java_library/user.kt similarity index 100% rename from java/ql/integration-tests/linux-only/kotlin/use_java_library/user.kt rename to java/ql/integration-tests/kotlin/linux/use_java_library/user.kt diff --git a/java/ql/integration-tests/posix-only/kotlin/generic-extension-property/User.java b/java/ql/integration-tests/kotlin/posix/generic-extension-property/User.java similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/generic-extension-property/User.java rename to java/ql/integration-tests/kotlin/posix/generic-extension-property/User.java diff --git a/java/ql/integration-tests/posix-only/kotlin/generic-extension-property/test.expected b/java/ql/integration-tests/kotlin/posix/generic-extension-property/test.expected similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/generic-extension-property/test.expected rename to java/ql/integration-tests/kotlin/posix/generic-extension-property/test.expected diff --git a/java/ql/integration-tests/posix-only/kotlin/generic-extension-property/test.kt b/java/ql/integration-tests/kotlin/posix/generic-extension-property/test.kt similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/generic-extension-property/test.kt rename to java/ql/integration-tests/kotlin/posix/generic-extension-property/test.kt diff --git a/java/ql/integration-tests/posix-only/kotlin/generic-extension-property/test.py b/java/ql/integration-tests/kotlin/posix/generic-extension-property/test.py similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/generic-extension-property/test.py rename to java/ql/integration-tests/kotlin/posix/generic-extension-property/test.py diff --git a/java/ql/integration-tests/posix-only/kotlin/generic-extension-property/test.ql b/java/ql/integration-tests/kotlin/posix/generic-extension-property/test.ql similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/generic-extension-property/test.ql rename to java/ql/integration-tests/kotlin/posix/generic-extension-property/test.ql diff --git a/java/ql/integration-tests/posix-only/kotlin/java_kotlin_extraction_orders/test.expected b/java/ql/integration-tests/kotlin/posix/java_kotlin_extraction_orders/test.expected similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/java_kotlin_extraction_orders/test.expected rename to java/ql/integration-tests/kotlin/posix/java_kotlin_extraction_orders/test.expected diff --git a/java/ql/integration-tests/posix-only/kotlin/java_kotlin_extraction_orders/test.py b/java/ql/integration-tests/kotlin/posix/java_kotlin_extraction_orders/test.py similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/java_kotlin_extraction_orders/test.py rename to java/ql/integration-tests/kotlin/posix/java_kotlin_extraction_orders/test.py diff --git a/java/ql/integration-tests/posix-only/kotlin/java_kotlin_extraction_orders/test.ql b/java/ql/integration-tests/kotlin/posix/java_kotlin_extraction_orders/test.ql similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/java_kotlin_extraction_orders/test.ql rename to java/ql/integration-tests/kotlin/posix/java_kotlin_extraction_orders/test.ql diff --git a/java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/code/doubleIntercepted.kt b/java/ql/integration-tests/kotlin/posix/kotlin_double_interception/code/doubleIntercepted.kt similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/code/doubleIntercepted.kt rename to java/ql/integration-tests/kotlin/posix/kotlin_double_interception/code/doubleIntercepted.kt diff --git a/java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/code/manual.kt b/java/ql/integration-tests/kotlin/posix/kotlin_double_interception/code/manual.kt similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/code/manual.kt rename to java/ql/integration-tests/kotlin/posix/kotlin_double_interception/code/manual.kt diff --git a/java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/code/manuallyIntercepted.kt b/java/ql/integration-tests/kotlin/posix/kotlin_double_interception/code/manuallyIntercepted.kt similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/code/manuallyIntercepted.kt rename to java/ql/integration-tests/kotlin/posix/kotlin_double_interception/code/manuallyIntercepted.kt diff --git a/java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/code/normal.kt b/java/ql/integration-tests/kotlin/posix/kotlin_double_interception/code/normal.kt similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/code/normal.kt rename to java/ql/integration-tests/kotlin/posix/kotlin_double_interception/code/normal.kt diff --git a/java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/code/notSeen.kt b/java/ql/integration-tests/kotlin/posix/kotlin_double_interception/code/notSeen.kt similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/code/notSeen.kt rename to java/ql/integration-tests/kotlin/posix/kotlin_double_interception/code/notSeen.kt diff --git a/java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/files.expected b/java/ql/integration-tests/kotlin/posix/kotlin_double_interception/files.expected similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/files.expected rename to java/ql/integration-tests/kotlin/posix/kotlin_double_interception/files.expected diff --git a/java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/files.ql b/java/ql/integration-tests/kotlin/posix/kotlin_double_interception/files.ql similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/files.ql rename to java/ql/integration-tests/kotlin/posix/kotlin_double_interception/files.ql diff --git a/java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/test.py b/java/ql/integration-tests/kotlin/posix/kotlin_double_interception/test.py similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/kotlin_double_interception/test.py rename to java/ql/integration-tests/kotlin/posix/kotlin_double_interception/test.py diff --git a/java/ql/integration-tests/posix-only/kotlin/module_mangled_names/User.java b/java/ql/integration-tests/kotlin/posix/module_mangled_names/User.java similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/module_mangled_names/User.java rename to java/ql/integration-tests/kotlin/posix/module_mangled_names/User.java diff --git a/java/ql/integration-tests/posix-only/kotlin/module_mangled_names/test.expected b/java/ql/integration-tests/kotlin/posix/module_mangled_names/test.expected similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/module_mangled_names/test.expected rename to java/ql/integration-tests/kotlin/posix/module_mangled_names/test.expected diff --git a/java/ql/integration-tests/posix-only/kotlin/module_mangled_names/test.py b/java/ql/integration-tests/kotlin/posix/module_mangled_names/test.py similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/module_mangled_names/test.py rename to java/ql/integration-tests/kotlin/posix/module_mangled_names/test.py diff --git a/java/ql/integration-tests/posix-only/kotlin/module_mangled_names/test.ql b/java/ql/integration-tests/kotlin/posix/module_mangled_names/test.ql similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/module_mangled_names/test.ql rename to java/ql/integration-tests/kotlin/posix/module_mangled_names/test.ql diff --git a/java/ql/integration-tests/posix-only/kotlin/module_mangled_names/test1.kt b/java/ql/integration-tests/kotlin/posix/module_mangled_names/test1.kt similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/module_mangled_names/test1.kt rename to java/ql/integration-tests/kotlin/posix/module_mangled_names/test1.kt diff --git a/java/ql/integration-tests/posix-only/kotlin/module_mangled_names/test2.kt b/java/ql/integration-tests/kotlin/posix/module_mangled_names/test2.kt similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/module_mangled_names/test2.kt rename to java/ql/integration-tests/kotlin/posix/module_mangled_names/test2.kt diff --git a/java/ql/integration-tests/posix-only/kotlin/module_mangled_names/test3.kt b/java/ql/integration-tests/kotlin/posix/module_mangled_names/test3.kt similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/module_mangled_names/test3.kt rename to java/ql/integration-tests/kotlin/posix/module_mangled_names/test3.kt diff --git a/java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/Test.java b/java/ql/integration-tests/kotlin/posix/needless-java-wildcards/Test.java similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/Test.java rename to java/ql/integration-tests/kotlin/posix/needless-java-wildcards/Test.java diff --git a/java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/kConsumer.kt b/java/ql/integration-tests/kotlin/posix/needless-java-wildcards/kConsumer.kt similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/kConsumer.kt rename to java/ql/integration-tests/kotlin/posix/needless-java-wildcards/kConsumer.kt diff --git a/java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/test.expected b/java/ql/integration-tests/kotlin/posix/needless-java-wildcards/test.expected similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/test.expected rename to java/ql/integration-tests/kotlin/posix/needless-java-wildcards/test.expected diff --git a/java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/test.py b/java/ql/integration-tests/kotlin/posix/needless-java-wildcards/test.py similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/test.py rename to java/ql/integration-tests/kotlin/posix/needless-java-wildcards/test.py diff --git a/java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/test.ql b/java/ql/integration-tests/kotlin/posix/needless-java-wildcards/test.ql similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/test.ql rename to java/ql/integration-tests/kotlin/posix/needless-java-wildcards/test.ql diff --git a/java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/user.kt b/java/ql/integration-tests/kotlin/posix/needless-java-wildcards/user.kt similarity index 100% rename from java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/user.kt rename to java/ql/integration-tests/kotlin/posix/needless-java-wildcards/user.kt diff --git a/java/ql/lib/CHANGELOG.md b/java/ql/lib/CHANGELOG.md index 2dd89daf33f..608f229f028 100644 --- a/java/ql/lib/CHANGELOG.md +++ b/java/ql/lib/CHANGELOG.md @@ -1,3 +1,15 @@ +## 3.0.1 + +### Minor Analysis Improvements + +* Threat-model for `System.in` changed from `commandargs` to newly created `stdin` (both subgroups of `local`). + +### Bug Fixes + +* Fixed an issue where analysis in `build-mode: none` may very occasionally throw a `CoderMalfunctionError` while resolving dependencies provided by a build system (Maven or Gradle), which could cause some dependency resolution and consequently alerts to vary unpredictably from one run to another. +* Fixed an issue where Java analysis in `build-mode: none` would fail to resolve dependencies using the `executable-war` Maven artifact type. +* Fixed an issue where analysis in `build-mode: none` may fail to resolve dependencies of Gradle projects where the dependency uses a non-empty artifact classifier -- for example, `someproject-1.2.3-tests.jar`, which has the classifier `tests`. + ## 3.0.0 ### Breaking Changes diff --git a/java/ql/lib/change-notes/2024-08-09-buildless-executable-war.md b/java/ql/lib/change-notes/2024-08-09-buildless-executable-war.md deleted file mode 100644 index 96088e50532..00000000000 --- a/java/ql/lib/change-notes/2024-08-09-buildless-executable-war.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: fix ---- -* Fixed an issue where Java analysis in `build-mode: none` would fail to resolve dependencies using the `executable-war` Maven artifact type. diff --git a/java/ql/lib/change-notes/2024-08-09-buildless-gradle-classifiers.md b/java/ql/lib/change-notes/2024-08-09-buildless-gradle-classifiers.md deleted file mode 100644 index d8ed932ecf2..00000000000 --- a/java/ql/lib/change-notes/2024-08-09-buildless-gradle-classifiers.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: fix ---- -* Fixed an issue where analysis in `build-mode: none` may fail to resolve dependencies of Gradle projects where the dependency uses a non-empty artifact classifier -- for example, `someproject-1.2.3-tests.jar`, which has the classifier `tests`. diff --git a/java/ql/lib/change-notes/2024-08-13-stdin-threat-model.md b/java/ql/lib/change-notes/2024-08-13-stdin-threat-model.md deleted file mode 100644 index 93d456dc2a3..00000000000 --- a/java/ql/lib/change-notes/2024-08-13-stdin-threat-model.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Threat-model for `System.in` changed from `commandargs` to newly created `stdin` (both subgroups of `local`). diff --git a/java/ql/lib/change-notes/2024-08-14-buildless-coder-malfunction.md b/java/ql/lib/change-notes/2024-08-14-buildless-coder-malfunction.md deleted file mode 100644 index a84fec4c8f1..00000000000 --- a/java/ql/lib/change-notes/2024-08-14-buildless-coder-malfunction.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: fix ---- -* Fixed an issue where analysis in `build-mode: none` may very occasionally throw a `CoderMalfunctionError` while resolving dependencies provided by a build system (Maven or Gradle), which could cause some dependency resolution and consequently alerts to vary unpredictably from one run to another. diff --git a/java/ql/lib/change-notes/2024-09-03-outdated-deprecations.md b/java/ql/lib/change-notes/2024-09-03-outdated-deprecations.md new file mode 100644 index 00000000000..a1477ef25ce --- /dev/null +++ b/java/ql/lib/change-notes/2024-09-03-outdated-deprecations.md @@ -0,0 +1,11 @@ +--- +category: breaking +--- +* Deleted the deprecated `ProcessBuilderConstructor`, `MethodProcessBuilderCommand`, and `MethodRuntimeExec` from `JDK.qll`. +* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration` instead. +* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`. +* Deleted the deprecated `getURI` predicate from `CamelJavaDslToDecl` and `SpringCamelXmlToElement`, use `getUri` instead. +* Deleted the deprecated `ExecCallable` class from `ExternalProcess.qll`. +* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`. +* Deleted the deprecated `PathCreation.qll` file. +* Deleted the deprecated `WebviewDubuggingEnabledQuery.qll` file. diff --git a/java/ql/lib/change-notes/released/3.0.1.md b/java/ql/lib/change-notes/released/3.0.1.md new file mode 100644 index 00000000000..6c67dd0d9bf --- /dev/null +++ b/java/ql/lib/change-notes/released/3.0.1.md @@ -0,0 +1,11 @@ +## 3.0.1 + +### Minor Analysis Improvements + +* Threat-model for `System.in` changed from `commandargs` to newly created `stdin` (both subgroups of `local`). + +### Bug Fixes + +* Fixed an issue where analysis in `build-mode: none` may very occasionally throw a `CoderMalfunctionError` while resolving dependencies provided by a build system (Maven or Gradle), which could cause some dependency resolution and consequently alerts to vary unpredictably from one run to another. +* Fixed an issue where Java analysis in `build-mode: none` would fail to resolve dependencies using the `executable-war` Maven artifact type. +* Fixed an issue where analysis in `build-mode: none` may fail to resolve dependencies of Gradle projects where the dependency uses a non-empty artifact classifier -- for example, `someproject-1.2.3-tests.jar`, which has the classifier `tests`. diff --git a/java/ql/lib/codeql-pack.release.yml b/java/ql/lib/codeql-pack.release.yml index 33d3a2cd113..e3b15d965db 100644 --- a/java/ql/lib/codeql-pack.release.yml +++ b/java/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 3.0.0 +lastReleaseVersion: 3.0.1 diff --git a/java/ql/lib/qlpack.yml b/java/ql/lib/qlpack.yml index 3b1e06d84ae..2d416db7f68 100644 --- a/java/ql/lib/qlpack.yml +++ b/java/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-all -version: 3.0.1-dev +version: 3.0.2-dev groups: java dbscheme: config/semmlecode.dbscheme extractor: java diff --git a/java/ql/lib/semmle/code/java/JDK.qll b/java/ql/lib/semmle/code/java/JDK.qll index 55d420dbcae..ee86cf0a191 100644 --- a/java/ql/lib/semmle/code/java/JDK.qll +++ b/java/ql/lib/semmle/code/java/JDK.qll @@ -210,39 +210,6 @@ class TypeFile extends Class { } // --- Standard methods --- -/** - * DEPRECATED: Any constructor of class `java.lang.ProcessBuilder`. - */ -deprecated class ProcessBuilderConstructor extends Constructor, ExecCallable { - ProcessBuilderConstructor() { this.getDeclaringType() instanceof TypeProcessBuilder } - - override int getAnExecutedArgument() { result = 0 } -} - -/** - * DEPRECATED: Any of the methods named `command` on class `java.lang.ProcessBuilder`. - */ -deprecated class MethodProcessBuilderCommand extends Method, ExecCallable { - MethodProcessBuilderCommand() { - this.hasName("command") and - this.getDeclaringType() instanceof TypeProcessBuilder - } - - override int getAnExecutedArgument() { result = 0 } -} - -/** - * DEPRECATED: Any method named `exec` on class `java.lang.Runtime`. - */ -deprecated class MethodRuntimeExec extends Method, ExecCallable { - MethodRuntimeExec() { - this.hasName("exec") and - this.getDeclaringType() instanceof TypeRuntime - } - - override int getAnExecutedArgument() { result = 0 } -} - /** * Any method named `getenv` on class `java.lang.System`. */ diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll index 3b1439511d1..359fa71744b 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl1.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll index 3b1439511d1..359fa71744b 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl2.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll index 3b1439511d1..359fa71744b 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl3.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll index 3b1439511d1..359fa71744b 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl4.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll index 3b1439511d1..359fa71744b 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl5.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll index 3b1439511d1..359fa71744b 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl6.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/java/ql/lib/semmle/code/java/frameworks/JsonIo.qll b/java/ql/lib/semmle/code/java/frameworks/JsonIo.qll index 9dc6510c5e7..d40e7ebf81e 100644 --- a/java/ql/lib/semmle/code/java/frameworks/JsonIo.qll +++ b/java/ql/lib/semmle/code/java/frameworks/JsonIo.qll @@ -43,34 +43,6 @@ class JsonIoUseMapsSetter extends MethodCall { } } -/** - * DEPRECATED: Use `SafeJsonIoFlow` instead. - * - * A data flow configuration tracing flow from JsonIo safe settings. - */ -deprecated class SafeJsonIoConfig extends DataFlow2::Configuration { - SafeJsonIoConfig() { this = "UnsafeDeserialization::SafeJsonIoConfig" } - - override predicate isSource(DataFlow::Node src) { - exists(MethodCall ma | - ma instanceof JsonIoUseMapsSetter and - src.asExpr() = ma.getQualifier() - ) - } - - override predicate isSink(DataFlow::Node sink) { - exists(MethodCall ma | - ma.getMethod() instanceof JsonIoJsonToJavaMethod and - sink.asExpr() = ma.getArgument(1) - ) - or - exists(ClassInstanceExpr cie | - cie.getConstructor().getDeclaringType() instanceof JsonIoJsonReader and - sink.asExpr() = cie.getArgument(1) - ) - } -} - /** * A data flow configuration tracing flow from JsonIo safe settings. */ diff --git a/java/ql/lib/semmle/code/java/frameworks/camel/CamelJavaDSL.qll b/java/ql/lib/semmle/code/java/frameworks/camel/CamelJavaDSL.qll index 79c476cdf20..ed09baf8ead 100644 --- a/java/ql/lib/semmle/code/java/frameworks/camel/CamelJavaDSL.qll +++ b/java/ql/lib/semmle/code/java/frameworks/camel/CamelJavaDSL.qll @@ -42,9 +42,6 @@ class CamelJavaDslToDecl extends ProcessorDefinitionElement { * Gets the URI specified by this `to` declaration. */ string getUri() { result = this.getArgument(0).(CompileTimeConstantExpr).getStringValue() } - - /** DEPRECATED: Alias for getUri */ - deprecated string getURI() { result = this.getUri() } } /** diff --git a/java/ql/lib/semmle/code/java/frameworks/spring/SpringCamel.qll b/java/ql/lib/semmle/code/java/frameworks/spring/SpringCamel.qll index 985565255b6..6fec620ccd5 100644 --- a/java/ql/lib/semmle/code/java/frameworks/spring/SpringCamel.qll +++ b/java/ql/lib/semmle/code/java/frameworks/spring/SpringCamel.qll @@ -97,9 +97,6 @@ class SpringCamelXmlToElement extends SpringCamelXmlRouteElement { * Gets the URI attribute for this `` element. */ string getUri() { result = this.getAttribute("uri").getValue() } - - /** DEPRECATED: Alias for getUri */ - deprecated string getURI() { result = this.getUri() } } /** diff --git a/java/ql/lib/semmle/code/java/security/AndroidIntentRedirectionQuery.qll b/java/ql/lib/semmle/code/java/security/AndroidIntentRedirectionQuery.qll index 42d420a76b3..b179a4f92e0 100644 --- a/java/ql/lib/semmle/code/java/security/AndroidIntentRedirectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/AndroidIntentRedirectionQuery.qll @@ -7,27 +7,6 @@ import semmle.code.java.dataflow.TaintTracking deprecated import semmle.code.java.dataflow.TaintTracking3 import semmle.code.java.security.AndroidIntentRedirection -/** - * DEPRECATED: Use `IntentRedirectionFlow` instead. - * - * A taint tracking configuration for tainted Intents being used to start Android components. - */ -deprecated class IntentRedirectionConfiguration extends TaintTracking::Configuration { - IntentRedirectionConfiguration() { this = "IntentRedirectionConfiguration" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof IntentRedirectionSink } - - override predicate isSanitizer(DataFlow::Node sanitizer) { - sanitizer instanceof IntentRedirectionSanitizer - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(IntentRedirectionAdditionalTaintStep c).step(node1, node2) - } -} - /** A taint tracking configuration for tainted Intents being used to start Android components. */ module IntentRedirectionConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } diff --git a/java/ql/lib/semmle/code/java/security/AndroidSensitiveCommunicationQuery.qll b/java/ql/lib/semmle/code/java/security/AndroidSensitiveCommunicationQuery.qll index a4f9713ac30..2ba13c06feb 100644 --- a/java/ql/lib/semmle/code/java/security/AndroidSensitiveCommunicationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/AndroidSensitiveCommunicationQuery.qll @@ -122,36 +122,6 @@ private predicate isStartActivityOrServiceSink(DataFlow::Node arg) { ) } -/** - * DEPRECATED: Use `SensitiveCommunicationFlow` instead. - * - * Taint configuration tracking flow from variables containing sensitive information to broadcast Intents. - */ -deprecated class SensitiveCommunicationConfig extends TaintTracking::Configuration { - SensitiveCommunicationConfig() { this = "Sensitive Communication Configuration" } - - override predicate isSource(DataFlow::Node source) { - source.asExpr() instanceof SensitiveInfoExpr - } - - override predicate isSink(DataFlow::Node sink) { - isSensitiveBroadcastSink(sink) - or - isStartActivityOrServiceSink(sink) - } - - /** - * Holds if broadcast doesn't specify receiving package name of the 3rd party app - */ - override predicate isSanitizer(DataFlow::Node node) { node instanceof ExplicitIntentSanitizer } - - override predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c) { - super.allowImplicitRead(node, c) - or - this.isSink(node) - } -} - /** * A sensitive communication sink node. */ diff --git a/java/ql/lib/semmle/code/java/security/CommandLineQuery.qll b/java/ql/lib/semmle/code/java/security/CommandLineQuery.qll index 903dae5d67e..692bdfc1a70 100644 --- a/java/ql/lib/semmle/code/java/security/CommandLineQuery.qll +++ b/java/ql/lib/semmle/code/java/security/CommandLineQuery.qll @@ -109,37 +109,3 @@ predicate execIsTainted( InputToArgumentToExecFlow::flowPath(source, sink) and argumentToExec(execArg, sink.getNode()) } - -/** - * DEPRECATED: Use `execIsTainted` instead. - * - * Implementation of `ExecTainted.ql`. It is extracted to a QLL - * so that it can be excluded from `ExecUnescaped.ql` to avoid - * reporting overlapping results. - */ -deprecated predicate execTainted(DataFlow::PathNode source, DataFlow::PathNode sink, Expr execArg) { - exists(RemoteUserInputToArgumentToExecFlowConfig conf | - conf.hasFlowPath(source, sink) and argumentToExec(execArg, sink.getNode()) - ) -} - -/** - * DEPRECATED: Use `RemoteUserInputToArgumentToExecFlow` instead. - * - * A taint-tracking configuration for unvalidated user input that is used to run an external process. - */ -deprecated class RemoteUserInputToArgumentToExecFlowConfig extends TaintTracking::Configuration { - RemoteUserInputToArgumentToExecFlowConfig() { - this = "ExecCommon::RemoteUserInputToArgumentToExecFlowConfig" - } - - override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof CommandInjectionSink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof CommandInjectionSanitizer } - - override predicate isAdditionalTaintStep(DataFlow::Node n1, DataFlow::Node n2) { - any(CommandInjectionAdditionalTaintStep s).step(n1, n2) - } -} diff --git a/java/ql/lib/semmle/code/java/security/ConditionalBypassQuery.qll b/java/ql/lib/semmle/code/java/security/ConditionalBypassQuery.qll index 63a93134512..96d3c5a528c 100644 --- a/java/ql/lib/semmle/code/java/security/ConditionalBypassQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ConditionalBypassQuery.qll @@ -36,23 +36,6 @@ private predicate endsWithStep(DataFlow::Node node1, DataFlow::Node node2) { ) } -/** - * DEPRECATED: Use `ConditionalBypassFlow` instead. - * - * A taint tracking configuration for untrusted data flowing to sensitive conditions. - */ -deprecated class ConditionalBypassFlowConfig extends TaintTracking::Configuration { - ConditionalBypassFlowConfig() { this = "ConditionalBypassFlowConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { conditionControlsMethod(_, sink.asExpr()) } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - endsWithStep(node1, node2) - } -} - /** * A taint tracking configuration for untrusted data flowing to sensitive conditions. */ diff --git a/java/ql/lib/semmle/code/java/security/ExternalAPIs.qll b/java/ql/lib/semmle/code/java/security/ExternalAPIs.qll index f27b677722f..6838555179a 100644 --- a/java/ql/lib/semmle/code/java/security/ExternalAPIs.qll +++ b/java/ql/lib/semmle/code/java/security/ExternalAPIs.qll @@ -92,19 +92,6 @@ class ExternalApiDataNode extends DataFlow::Node { string getMethodDescription() { result = this.getMethod().getQualifiedName() } } -/** - * DEPRECATED: Use `UntrustedDataToExternalApiFlow` instead. - * - * A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. - */ -deprecated class UntrustedDataToExternalApiConfig extends TaintTracking::Configuration { - UntrustedDataToExternalApiConfig() { this = "UntrustedDataToExternalAPIConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } -} - /** * Taint tracking configuration for flow from `ThreatModelFlowSource`s to `ExternalApiDataNode`s. */ diff --git a/java/ql/lib/semmle/code/java/security/ExternalProcess.qll b/java/ql/lib/semmle/code/java/security/ExternalProcess.qll index 385d2f6c548..58f7457e9e3 100644 --- a/java/ql/lib/semmle/code/java/security/ExternalProcess.qll +++ b/java/ql/lib/semmle/code/java/security/ExternalProcess.qll @@ -4,16 +4,6 @@ import semmle.code.java.Member private import semmle.code.java.dataflow.DataFlow private import semmle.code.java.security.CommandLineQuery -/** - * DEPRECATED: A callable that executes a command. - */ -abstract deprecated class ExecCallable extends Callable { - /** - * Gets the index of an argument that will be part of the command that is executed. - */ - abstract int getAnExecutedArgument(); -} - /** * An expression used as an argument to a call that executes an external command. For calls to * varargs method calls, this only includes the first argument, which will be the command diff --git a/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll index 97ad1d7a564..f625807470d 100644 --- a/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/FragmentInjectionQuery.qll @@ -5,24 +5,6 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.FragmentInjection -/** - * DEPRECATED: Use `FragmentInjectionFlow` instead. - * - * A taint-tracking configuration for unsafe user input - * that is used to create Android fragments dynamically. - */ -deprecated class FragmentInjectionTaintConf extends TaintTracking::Configuration { - FragmentInjectionTaintConf() { this = "FragmentInjectionTaintConf" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof FragmentInjectionSink } - - override predicate isAdditionalTaintStep(DataFlow::Node n1, DataFlow::Node n2) { - any(FragmentInjectionAdditionalTaintStep c).step(n1, n2) - } -} - /** * A taint-tracking configuration for unsafe user input * that is used to create Android fragments dynamically. diff --git a/java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll index aecd634b541..3af836cac97 100644 --- a/java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/GroovyInjectionQuery.qll @@ -5,24 +5,6 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.GroovyInjection -/** - * DEPRECATED: Use `GroovyInjectionFlow` instead. - * - * A taint-tracking configuration for unsafe user input - * that is used to evaluate a Groovy expression. - */ -deprecated class GroovyInjectionConfig extends TaintTracking::Configuration { - GroovyInjectionConfig() { this = "GroovyInjectionConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof GroovyInjectionSink } - - override predicate isAdditionalTaintStep(DataFlow::Node fromNode, DataFlow::Node toNode) { - any(GroovyInjectionAdditionalTaintStep c).step(fromNode, toNode) - } -} - /** * A taint-tracking configuration for unsafe user input * that is used to evaluate a Groovy expression. diff --git a/java/ql/lib/semmle/code/java/security/HardcodedCredentialsApiCallQuery.qll b/java/ql/lib/semmle/code/java/security/HardcodedCredentialsApiCallQuery.qll index 92d4f2a22aa..f623973a657 100644 --- a/java/ql/lib/semmle/code/java/security/HardcodedCredentialsApiCallQuery.qll +++ b/java/ql/lib/semmle/code/java/security/HardcodedCredentialsApiCallQuery.qll @@ -6,55 +6,6 @@ import java import semmle.code.java.dataflow.DataFlow import HardcodedCredentials -/** - * DEPRECATED: Use `HardcodedCredentialApiCallFlow` instead. - * - * A data-flow configuration that tracks flow from a hard-coded credential in a call to a sensitive Java API which may compromise security. - */ -deprecated class HardcodedCredentialApiCallConfiguration extends DataFlow::Configuration { - HardcodedCredentialApiCallConfiguration() { this = "HardcodedCredentialApiCallConfiguration" } - - override predicate isSource(DataFlow::Node n) { - n.asExpr() instanceof HardcodedExpr and - not n.asExpr().getEnclosingCallable() instanceof ToStringMethod - } - - override predicate isSink(DataFlow::Node n) { n.asExpr() instanceof CredentialsApiSink } - - override predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { - node1.asExpr().getType() instanceof TypeString and - ( - exists(MethodCall ma | ma.getMethod().hasName(["getBytes", "toCharArray"]) | - node2.asExpr() = ma and - ma.getQualifier() = node1.asExpr() - ) - or - // These base64 routines are usually taint propagators, and this is not a general - // TaintTracking::Configuration, so we must specifically include them here - // as a common transform applied to a constant before passing to a remote API. - exists(MethodCall ma | - ma.getMethod() - .hasQualifiedName([ - "java.util", "cn.hutool.core.codec", "org.apache.shiro.codec", - "apache.commons.codec.binary", "org.springframework.util" - ], ["Base64$Encoder", "Base64$Decoder", "Base64", "Base64Utils"], - [ - "encode", "encodeToString", "decode", "decodeBase64", "encodeBase64", - "encodeBase64Chunked", "encodeBase64String", "encodeBase64URLSafe", - "encodeBase64URLSafeString" - ]) - | - node1.asExpr() = ma.getArgument(0) and - node2.asExpr() = ma - ) - ) - } - - override predicate isBarrier(DataFlow::Node n) { - n.asExpr().(MethodCall).getMethod() instanceof MethodSystemGetenv - } -} - /** * A data-flow configuration that tracks flow from a hard-coded credential in a call to a sensitive Java API which may compromise security. */ diff --git a/java/ql/lib/semmle/code/java/security/HardcodedCredentialsSourceCallQuery.qll b/java/ql/lib/semmle/code/java/security/HardcodedCredentialsSourceCallQuery.qll index 67383877d7e..2192c5c70de 100644 --- a/java/ql/lib/semmle/code/java/security/HardcodedCredentialsSourceCallQuery.qll +++ b/java/ql/lib/semmle/code/java/security/HardcodedCredentialsSourceCallQuery.qll @@ -8,22 +8,6 @@ deprecated import semmle.code.java.dataflow.DataFlow2 private import semmle.code.java.dataflow.DataFlow2 import HardcodedCredentials -/** - * DEPRECATED: Use `HardcodedCredentialSourceCallFlow` instead. - * - * A data-flow configuration that tracks hardcoded expressions flowing to a parameter whose name suggests - * it may be a credential, excluding those which flow on to other such insecure usage sites. - */ -deprecated class HardcodedCredentialSourceCallConfiguration extends DataFlow::Configuration { - HardcodedCredentialSourceCallConfiguration() { - this = "HardcodedCredentialSourceCallConfiguration" - } - - override predicate isSource(DataFlow::Node n) { n.asExpr() instanceof HardcodedExpr } - - override predicate isSink(DataFlow::Node n) { n.asExpr() instanceof FinalCredentialsSourceSink } -} - /** * A data-flow configuration that tracks hardcoded expressions flowing to a parameter whose name suggests * it may be a credential, excluding those which flow on to other such insecure usage sites. @@ -40,22 +24,6 @@ module HardcodedCredentialSourceCallConfig implements DataFlow::ConfigSig { */ module HardcodedCredentialSourceCallFlow = DataFlow::Global; -/** - * DEPRECATED: Use `HardcodedCredentialParameterSourceCallFlow` instead. - * - * A data-flow configuration that tracks flow from an argument whose corresponding parameter name suggests - * a credential, to an argument to a sensitive call. - */ -deprecated class HardcodedCredentialSourceCallConfiguration2 extends DataFlow2::Configuration { - HardcodedCredentialSourceCallConfiguration2() { - this = "HardcodedCredentialSourceCallConfiguration2" - } - - override predicate isSource(DataFlow::Node n) { n.asExpr() instanceof CredentialsSourceSink } - - override predicate isSink(DataFlow::Node n) { n.asExpr() instanceof CredentialsSink } -} - /** * A data-flow configuration that tracks flow from an argument whose corresponding parameter name suggests * a credential, to an argument to a sensitive call. diff --git a/java/ql/lib/semmle/code/java/security/HttpsUrlsQuery.qll b/java/ql/lib/semmle/code/java/security/HttpsUrlsQuery.qll index ae9d3d6201e..031066d506e 100644 --- a/java/ql/lib/semmle/code/java/security/HttpsUrlsQuery.qll +++ b/java/ql/lib/semmle/code/java/security/HttpsUrlsQuery.qll @@ -6,27 +6,6 @@ import semmle.code.java.frameworks.Networking import semmle.code.java.security.HttpsUrls private import semmle.code.java.security.Sanitizers -/** - * DEPRECATED: Use `HttpsStringToUrlOpenMethodFlow` instead. - * - * A taint tracking configuration for HTTP connections. - */ -deprecated class HttpStringToUrlOpenMethodFlowConfig extends TaintTracking::Configuration { - HttpStringToUrlOpenMethodFlowConfig() { this = "HttpStringToUrlOpenMethodFlowConfig" } - - override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof HttpStringLiteral } - - override predicate isSink(DataFlow::Node sink) { sink instanceof UrlOpenSink } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(HttpUrlsAdditionalTaintStep c).step(node1, node2) - } - - override predicate isSanitizer(DataFlow::Node node) { - node.getType() instanceof PrimitiveType or node.getType() instanceof BoxedType - } -} - /** * A taint tracking configuration for HTTP connections. */ diff --git a/java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll b/java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll index 402dacb2e9a..0a8e0686549 100644 --- a/java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ImplicitPendingIntentsQuery.qll @@ -6,55 +6,6 @@ import semmle.code.java.frameworks.android.Intent import semmle.code.java.frameworks.android.PendingIntent import semmle.code.java.security.ImplicitPendingIntents -/** - * DEPRECATED: Use `ImplicitPendingIntentStartFlow` instead. - * - * A taint tracking configuration for implicit `PendingIntent`s - * being wrapped in another implicit `Intent` that gets started. - */ -deprecated class ImplicitPendingIntentStartConf extends TaintTracking::Configuration { - ImplicitPendingIntentStartConf() { this = "ImplicitPendingIntentStartConf" } - - override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { - source.(ImplicitPendingIntentSource).hasState(state) - } - - override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { - sink.(ImplicitPendingIntentSink).hasState(state) - } - - override predicate isSanitizer(DataFlow::Node sanitizer) { - sanitizer instanceof ExplicitIntentSanitizer - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(ImplicitPendingIntentAdditionalTaintStep c).step(node1, node2) - } - - override predicate isAdditionalTaintStep( - DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2, - DataFlow::FlowState state2 - ) { - any(ImplicitPendingIntentAdditionalTaintStep c).step(node1, state1, node2, state2) - } - - override predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c) { - super.allowImplicitRead(node, c) - or - this.isSink(node, _) and - allowIntentExtrasImplicitRead(node, c) - or - this.isAdditionalTaintStep(node, _) and - c.(DataFlow::FieldContent).getType() instanceof PendingIntent - or - // Allow implicit reads of Intent arrays for steps like getActivities - // or sinks like startActivities - (this.isSink(node, _) or this.isAdditionalFlowStep(node, _, _, _)) and - node.getType().(Array).getElementType() instanceof TypeIntent and - c instanceof DataFlow::ArrayContent - } -} - /** * A taint tracking configuration for implicit `PendingIntent`s * being wrapped in another implicit `Intent` that gets started. diff --git a/java/ql/lib/semmle/code/java/security/InsecureBasicAuthQuery.qll b/java/ql/lib/semmle/code/java/security/InsecureBasicAuthQuery.qll index 60e16662d9a..9e69308e458 100644 --- a/java/ql/lib/semmle/code/java/security/InsecureBasicAuthQuery.qll +++ b/java/ql/lib/semmle/code/java/security/InsecureBasicAuthQuery.qll @@ -5,24 +5,6 @@ import semmle.code.java.security.HttpsUrls import semmle.code.java.security.InsecureBasicAuth import semmle.code.java.dataflow.TaintTracking -/** - * DEPRECATED: Use `InsecureBasicAuthFlow` instead. - * - * A taint tracking configuration for the Basic authentication scheme - * being used in HTTP connections. - */ -deprecated class BasicAuthFlowConfig extends TaintTracking::Configuration { - BasicAuthFlowConfig() { this = "InsecureBasicAuth::BasicAuthFlowConfig" } - - override predicate isSource(DataFlow::Node src) { src instanceof InsecureBasicAuthSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof InsecureBasicAuthSink } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(HttpUrlsAdditionalTaintStep c).step(node1, node2) - } -} - /** * A taint tracking configuration for the Basic authentication scheme * being used in HTTP connections. diff --git a/java/ql/lib/semmle/code/java/security/InsecureTrustManagerQuery.qll b/java/ql/lib/semmle/code/java/security/InsecureTrustManagerQuery.qll index a7514ceff96..d732716ec2e 100644 --- a/java/ql/lib/semmle/code/java/security/InsecureTrustManagerQuery.qll +++ b/java/ql/lib/semmle/code/java/security/InsecureTrustManagerQuery.qll @@ -4,28 +4,6 @@ import java import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.InsecureTrustManager -/** - * DEPRECATED: Use `InsecureTrustManagerFlow` instead. - * - * A configuration to model the flow of an insecure `TrustManager` - * to the initialization of an SSL context. - */ -deprecated class InsecureTrustManagerConfiguration extends DataFlow::Configuration { - InsecureTrustManagerConfiguration() { this = "InsecureTrustManagerConfiguration" } - - override predicate isSource(DataFlow::Node source) { - source instanceof InsecureTrustManagerSource - } - - override predicate isSink(DataFlow::Node sink) { sink instanceof InsecureTrustManagerSink } - - override predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c) { - (this.isSink(node) or this.isAdditionalFlowStep(node, _)) and - node.getType() instanceof Array and - c instanceof DataFlow::ArrayContent - } -} - /** * A configuration to model the flow of an insecure `TrustManager` * to the initialization of an SSL context. diff --git a/java/ql/lib/semmle/code/java/security/InsufficientKeySizeQuery.qll b/java/ql/lib/semmle/code/java/security/InsufficientKeySizeQuery.qll index 67678d72a28..e08cd50cdb3 100644 --- a/java/ql/lib/semmle/code/java/security/InsufficientKeySizeQuery.qll +++ b/java/ql/lib/semmle/code/java/security/InsufficientKeySizeQuery.qll @@ -3,23 +3,6 @@ import semmle.code.java.dataflow.DataFlow import semmle.code.java.security.InsufficientKeySize -/** - * DEPRECATED: Use `KeySizeFlow` instead. - * - * A data flow configuration for tracking key sizes used in cryptographic algorithms. - */ -deprecated class KeySizeConfiguration extends DataFlow::Configuration { - KeySizeConfiguration() { this = "KeySizeConfiguration" } - - override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { - exists(KeySizeState s | source.(InsufficientKeySizeSource).hasState(s) and state = s.toString()) - } - - override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { - exists(KeySizeState s | sink.(InsufficientKeySizeSink).hasState(s) and state = s.toString()) - } -} - /** * A data flow configuration for tracking key sizes used in cryptographic algorithms. */ diff --git a/java/ql/lib/semmle/code/java/security/IntentUriPermissionManipulationQuery.qll b/java/ql/lib/semmle/code/java/security/IntentUriPermissionManipulationQuery.qll index b9fc3f42eb7..740ce24bf62 100644 --- a/java/ql/lib/semmle/code/java/security/IntentUriPermissionManipulationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/IntentUriPermissionManipulationQuery.qll @@ -8,29 +8,6 @@ private import semmle.code.java.dataflow.FlowSources private import semmle.code.java.dataflow.DataFlow private import IntentUriPermissionManipulation -/** - * DEPRECATED: Use `IntentUriPermissionManipulationFlow` instead. - * - * A taint tracking configuration for user-provided Intents being returned to third party apps. - */ -deprecated class IntentUriPermissionManipulationConf extends TaintTracking::Configuration { - IntentUriPermissionManipulationConf() { this = "UriPermissionManipulationConf" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { - sink instanceof IntentUriPermissionManipulationSink - } - - override predicate isSanitizer(DataFlow::Node barrier) { - barrier instanceof IntentUriPermissionManipulationSanitizer - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(IntentUriPermissionManipulationAdditionalTaintStep c).step(node1, node2) - } -} - /** * A taint tracking configuration for user-provided Intents being returned to third party apps. */ diff --git a/java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll index 6f3a7ad00af..de49560e779 100644 --- a/java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/JexlInjectionQuery.qll @@ -38,25 +38,6 @@ private class DefaultJexlInjectionAdditionalTaintStep extends JexlInjectionAddit } } -/** - * DEPRECATED: Use `JexlInjectionFlow` instead. - * - * A taint-tracking configuration for unsafe user input - * that is used to construct and evaluate a JEXL expression. - * It supports both JEXL 2 and 3. - */ -deprecated class JexlInjectionConfig extends TaintTracking::Configuration { - JexlInjectionConfig() { this = "JexlInjectionConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof JexlEvaluationSink } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(JexlInjectionAdditionalTaintStep c).step(node1, node2) - } -} - /** * A taint-tracking configuration for unsafe user input * that is used to construct and evaluate a JEXL expression. diff --git a/java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll index c7343172016..3c1f4b8e68e 100644 --- a/java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/JndiInjectionQuery.qll @@ -7,28 +7,6 @@ import semmle.code.java.frameworks.SpringLdap import semmle.code.java.security.JndiInjection private import semmle.code.java.security.Sanitizers -/** - * DEPRECATED: Use `JndiInjectionFlow` instead. - * - * A taint-tracking configuration for unvalidated user input that is used in JNDI lookup. - */ -deprecated class JndiInjectionFlowConfig extends TaintTracking::Configuration { - JndiInjectionFlowConfig() { this = "JndiInjectionFlowConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof JndiInjectionSink } - - override predicate isSanitizer(DataFlow::Node node) { - node instanceof SimpleTypeSanitizer or - node instanceof JndiInjectionSanitizer - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(JndiInjectionAdditionalTaintStep c).step(node1, node2) - } -} - /** * A taint-tracking configuration for unvalidated user input that is used in JNDI lookup. */ diff --git a/java/ql/lib/semmle/code/java/security/LogInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/LogInjectionQuery.qll index f66ae7f5808..cebc807cc47 100644 --- a/java/ql/lib/semmle/code/java/security/LogInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/LogInjectionQuery.qll @@ -4,25 +4,6 @@ import java import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.LogInjection -/** - * DEPRECATED: Use `LogInjectionFlow` instead. - * - * A taint-tracking configuration for tracking untrusted user input used in log entries. - */ -deprecated class LogInjectionConfiguration extends TaintTracking::Configuration { - LogInjectionConfiguration() { this = "LogInjectionConfiguration" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof LogInjectionSink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof LogInjectionSanitizer } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(LogInjectionAdditionalTaintStep c).step(node1, node2) - } -} - /** * A taint-tracking configuration for tracking untrusted user input used in log entries. */ diff --git a/java/ql/lib/semmle/code/java/security/MissingJWTSignatureCheckQuery.qll b/java/ql/lib/semmle/code/java/security/MissingJWTSignatureCheckQuery.qll index c316da2f965..eaa4c6320c1 100644 --- a/java/ql/lib/semmle/code/java/security/MissingJWTSignatureCheckQuery.qll +++ b/java/ql/lib/semmle/code/java/security/MissingJWTSignatureCheckQuery.qll @@ -4,26 +4,6 @@ import java import semmle.code.java.dataflow.DataFlow import semmle.code.java.security.JWT -/** - * DEPRECATED: Use `MissingJwtSignatureCheckFlow` instead. - * - * Models flow from signing keys assignments to qualifiers of JWT insecure parsers. - * This is used to determine whether a `JwtParser` performing unsafe parsing has a signing key set. - */ -deprecated class MissingJwtSignatureCheckConf extends DataFlow::Configuration { - MissingJwtSignatureCheckConf() { this = "SigningToExprDataFlow" } - - override predicate isSource(DataFlow::Node source) { - source instanceof JwtParserWithInsecureParseSource - } - - override predicate isSink(DataFlow::Node sink) { sink instanceof JwtParserWithInsecureParseSink } - - override predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { - any(JwtParserWithInsecureParseAdditionalFlowStep c).step(node1, node2) - } -} - /** * Models flow from signing keys assignments to qualifiers of JWT insecure parsers. * This is used to determine whether a `JwtParser` performing unsafe parsing has a signing key set. diff --git a/java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll index c2697861d7c..4bf81804f82 100644 --- a/java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/MvelInjectionQuery.qll @@ -5,28 +5,6 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.MvelInjection -/** - * DEPRECATED: Use `MvelInjectionFlow` instead. - * - * A taint-tracking configuration for unsafe user input - * that is used to construct and evaluate a MVEL expression. - */ -deprecated class MvelInjectionFlowConfig extends TaintTracking::Configuration { - MvelInjectionFlowConfig() { this = "MvelInjectionFlowConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof MvelEvaluationSink } - - override predicate isSanitizer(DataFlow::Node sanitizer) { - sanitizer instanceof MvelInjectionSanitizer - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(MvelInjectionAdditionalTaintStep c).step(node1, node2) - } -} - /** * A taint-tracking configuration for unsafe user input * that is used to construct and evaluate a MVEL expression. diff --git a/java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll index 259f344205e..3acf18c453c 100644 --- a/java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/OgnlInjectionQuery.qll @@ -5,27 +5,6 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.OgnlInjection private import semmle.code.java.security.Sanitizers -/** - * DEPRECATED: Use `OgnlInjectionFlow` instead. - * - * A taint-tracking configuration for unvalidated user input that is used in OGNL EL evaluation. - */ -deprecated class OgnlInjectionFlowConfig extends TaintTracking::Configuration { - OgnlInjectionFlowConfig() { this = "OgnlInjectionFlowConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof OgnlInjectionSink } - - override predicate isSanitizer(DataFlow::Node node) { - node.getType() instanceof PrimitiveType or node.getType() instanceof BoxedType - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(OgnlInjectionAdditionalTaintStep c).step(node1, node2) - } -} - /** * A taint-tracking configuration for unvalidated user input that is used in OGNL EL evaluation. */ diff --git a/java/ql/lib/semmle/code/java/security/PartialPathTraversalQuery.qll b/java/ql/lib/semmle/code/java/security/PartialPathTraversalQuery.qll index 442af520f5d..c4c3e6b093c 100644 --- a/java/ql/lib/semmle/code/java/security/PartialPathTraversalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/PartialPathTraversalQuery.qll @@ -6,23 +6,6 @@ import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources -/** - * DEPRECATED: Use `PartialPathTraversalFromRemoteFlow` instead. - * - * A taint-tracking configuration for unsafe user input - * that is used to validate against path traversal, but is insufficient - * and remains vulnerable to Partial Path Traversal. - */ -deprecated class PartialPathTraversalFromRemoteConfig extends TaintTracking::Configuration { - PartialPathTraversalFromRemoteConfig() { this = "PartialPathTraversalFromRemoteConfig" } - - override predicate isSource(DataFlow::Node node) { node instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node node) { - any(PartialPathTraversalMethodCall ma).getQualifier() = node.asExpr() - } -} - /** * A taint-tracking configuration for unsafe user input * that is used to validate against path traversal, but is insufficient diff --git a/java/ql/lib/semmle/code/java/security/PathCreation.qll b/java/ql/lib/semmle/code/java/security/PathCreation.qll deleted file mode 100644 index 3d40a1d4fdb..00000000000 --- a/java/ql/lib/semmle/code/java/security/PathCreation.qll +++ /dev/null @@ -1,143 +0,0 @@ -/** - * DEPRECATED. - * - * Models the different ways to create paths. Either by using `java.io.File`-related APIs or `java.nio.file.Path`-related APIs. - */ - -import java - -/** DEPRECATED: Models the creation of a path. */ -abstract deprecated class PathCreation extends Expr { - /** - * Gets an input that is used in the creation of this path. - * This excludes inputs of type `File` and `Path`. - */ - abstract Expr getAnInput(); -} - -/** Models the `java.nio.file.Paths.get` method. */ -deprecated private class PathsGet extends PathCreation, MethodCall { - PathsGet() { - exists(Method m | m = this.getMethod() | - m.getDeclaringType() instanceof TypePaths and - m.getName() = "get" - ) - } - - override Expr getAnInput() { result = this.getAnArgument() } -} - -/** Models the `java.nio.file.FileSystem.getPath` method. */ -deprecated private class FileSystemGetPath extends PathCreation, MethodCall { - FileSystemGetPath() { - exists(Method m | m = this.getMethod() | - m.getDeclaringType() instanceof TypeFileSystem and - m.getName() = "getPath" - ) - } - - override Expr getAnInput() { result = this.getAnArgument() } -} - -/** Models the `new java.io.File(...)` constructor. */ -deprecated private class FileCreation extends PathCreation, ClassInstanceExpr { - FileCreation() { this.getConstructedType() instanceof TypeFile } - - override Expr getAnInput() { - result = this.getAnArgument() and - // Relevant arguments include those that are not a `File`. - not result.getType() instanceof TypeFile - } -} - -/** Models the `java.nio.file.Path.resolveSibling` method. */ -deprecated private class PathResolveSiblingCreation extends PathCreation, MethodCall { - PathResolveSiblingCreation() { - exists(Method m | m = this.getMethod() | - m.getDeclaringType() instanceof TypePath and - m.getName() = "resolveSibling" - ) - } - - override Expr getAnInput() { - result = this.getAnArgument() and - // Relevant arguments are those of type `String`. - result.getType() instanceof TypeString - } -} - -/** Models the `java.nio.file.Path.resolve` method. */ -deprecated private class PathResolveCreation extends PathCreation, MethodCall { - PathResolveCreation() { - exists(Method m | m = this.getMethod() | - m.getDeclaringType() instanceof TypePath and - m.getName() = "resolve" - ) - } - - override Expr getAnInput() { - result = this.getAnArgument() and - // Relevant arguments are those of type `String`. - result.getType() instanceof TypeString - } -} - -/** Models the `java.nio.file.Path.of` method. */ -deprecated private class PathOfCreation extends PathCreation, MethodCall { - PathOfCreation() { - exists(Method m | m = this.getMethod() | - m.getDeclaringType() instanceof TypePath and - m.getName() = "of" - ) - } - - override Expr getAnInput() { result = this.getAnArgument() } -} - -/** Models the `new java.io.FileWriter(...)` constructor. */ -deprecated private class FileWriterCreation extends PathCreation, ClassInstanceExpr { - FileWriterCreation() { this.getConstructedType().hasQualifiedName("java.io", "FileWriter") } - - override Expr getAnInput() { - result = this.getAnArgument() and - // Relevant arguments are those of type `String`. - result.getType() instanceof TypeString - } -} - -/** Models the `new java.io.FileReader(...)` constructor. */ -deprecated private class FileReaderCreation extends PathCreation, ClassInstanceExpr { - FileReaderCreation() { this.getConstructedType().hasQualifiedName("java.io", "FileReader") } - - override Expr getAnInput() { - result = this.getAnArgument() and - // Relevant arguments are those of type `String`. - result.getType() instanceof TypeString - } -} - -/** Models the `new java.io.FileInputStream(...)` constructor. */ -deprecated private class FileInputStreamCreation extends PathCreation, ClassInstanceExpr { - FileInputStreamCreation() { - this.getConstructedType().hasQualifiedName("java.io", "FileInputStream") - } - - override Expr getAnInput() { - result = this.getAnArgument() and - // Relevant arguments are those of type `String`. - result.getType() instanceof TypeString - } -} - -/** Models the `new java.io.FileOutputStream(...)` constructor. */ -deprecated private class FileOutputStreamCreation extends PathCreation, ClassInstanceExpr { - FileOutputStreamCreation() { - this.getConstructedType().hasQualifiedName("java.io", "FileOutputStream") - } - - override Expr getAnInput() { - result = this.getAnArgument() and - // Relevant arguments are those of type `String`. - result.getType() instanceof TypeString - } -} diff --git a/java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll b/java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll index a26245ae9cf..e8415cc1978 100644 --- a/java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll +++ b/java/ql/lib/semmle/code/java/security/RequestForgeryConfig.qll @@ -7,31 +7,6 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.RequestForgery -/** - * DEPRECATED: Use `RequestForgeryConfiguration` module instead. - * - * A taint-tracking configuration characterising request-forgery risks. - */ -deprecated class RequestForgeryConfiguration extends TaintTracking::Configuration { - RequestForgeryConfiguration() { this = "Server-Side Request Forgery" } - - override predicate isSource(DataFlow::Node source) { - source instanceof RemoteFlowSource and - // Exclude results of remote HTTP requests: fetching something else based on that result - // is no worse than following a redirect returned by the remote server, and typically - // we're requesting a resource via https which we trust to only send us to safe URLs. - not source.asExpr().(MethodCall).getCallee() instanceof UrlConnectionGetInputStreamMethod - } - - override predicate isSink(DataFlow::Node sink) { sink instanceof RequestForgerySink } - - override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { - any(RequestForgeryAdditionalTaintStep r).propagatesTaint(pred, succ) - } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof RequestForgerySanitizer } -} - /** * A taint-tracking configuration characterising request-forgery risks. */ diff --git a/java/ql/lib/semmle/code/java/security/RsaWithoutOaepQuery.qll b/java/ql/lib/semmle/code/java/security/RsaWithoutOaepQuery.qll index 848a1c2b990..66e4a0537d2 100644 --- a/java/ql/lib/semmle/code/java/security/RsaWithoutOaepQuery.qll +++ b/java/ql/lib/semmle/code/java/security/RsaWithoutOaepQuery.qll @@ -4,28 +4,6 @@ import java import Encryption import semmle.code.java.dataflow.DataFlow -/** - * DEPRECATED: Use `RsaWithoutOaepFlow` instead. - * - * A configuration for finding RSA ciphers initialized without using OAEP padding. - */ -deprecated class RsaWithoutOaepConfig extends DataFlow::Configuration { - RsaWithoutOaepConfig() { this = "RsaWithoutOaepConfig" } - - override predicate isSource(DataFlow::Node src) { - exists(CompileTimeConstantExpr specExpr, string spec | - specExpr.getStringValue() = spec and - specExpr = src.asExpr() and - spec.matches("RSA/%") and - not spec.matches("%OAEP%") - ) - } - - override predicate isSink(DataFlow::Node sink) { - exists(CryptoAlgoSpec cr | sink.asExpr() = cr.getAlgoSpec()) - } -} - /** * A configuration for finding RSA ciphers initialized without using OAEP padding. */ diff --git a/java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll b/java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll index f7232f045b3..201b347e014 100644 --- a/java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll +++ b/java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll @@ -40,29 +40,6 @@ private class TypeType extends RefType { } } -/** - * DEPRECATED: Use `SensitiveLoggerConfiguration` module instead. - * - * A data-flow configuration for identifying potentially-sensitive data flowing to a log output. - */ -deprecated class SensitiveLoggerConfiguration extends TaintTracking::Configuration { - SensitiveLoggerConfiguration() { this = "SensitiveLoggerConfiguration" } - - override predicate isSource(DataFlow::Node source) { source instanceof SensitiveLoggerSource } - - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "log-injection") } - - override predicate isSanitizer(DataFlow::Node sanitizer) { - sanitizer.asExpr() instanceof LiveLiteral or - sanitizer.getType() instanceof PrimitiveType or - sanitizer.getType() instanceof BoxedType or - sanitizer.getType() instanceof NumberType or - sanitizer.getType() instanceof TypeType - } - - override predicate isSanitizerIn(DataFlow::Node node) { this.isSource(node) } -} - /** A data-flow configuration for identifying potentially-sensitive data flowing to a log output. */ module SensitiveLoggerConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof SensitiveLoggerSource } diff --git a/java/ql/lib/semmle/code/java/security/SensitiveResultReceiverQuery.qll b/java/ql/lib/semmle/code/java/security/SensitiveResultReceiverQuery.qll index 8269a42c5c2..e22dcef1211 100644 --- a/java/ql/lib/semmle/code/java/security/SensitiveResultReceiverQuery.qll +++ b/java/ql/lib/semmle/code/java/security/SensitiveResultReceiverQuery.qll @@ -32,25 +32,6 @@ private predicate untrustedResultReceiverSend(DataFlow::Node src, ResultReceiver UntrustedResultReceiverFlow::flow(src, DataFlow::exprNode(call.getReceiver())) } -deprecated private class SensitiveResultReceiverConf extends TaintTracking::Configuration { - SensitiveResultReceiverConf() { this = "SensitiveResultReceiverConf" } - - override predicate isSource(DataFlow::Node node) { node.asExpr() instanceof SensitiveExpr } - - override predicate isSink(DataFlow::Node node) { - exists(ResultReceiverSendCall call | - untrustedResultReceiverSend(_, call) and - node.asExpr() = call.getSentData() - ) - } - - override predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c) { - super.allowImplicitRead(node, c) - or - this.isSink(node) - } -} - /** * A sensitive result receiver sink node. */ @@ -74,21 +55,6 @@ private module SensitiveResultReceiverConfig implements DataFlow::ConfigSig { /** Taint tracking flow for sensitive expressions flowing to untrusted result receivers. */ module SensitiveResultReceiverFlow = TaintTracking::Global; -/** - * DEPRECATED: Use `isSensitiveResultReceiver` instead. - * - * Holds if there is a path from sensitive data at `src` to a result receiver at `sink`, and the receiver was obtained from an untrusted source `recSrc`. - */ -deprecated predicate sensitiveResultReceiver( - DataFlow::PathNode src, DataFlow::PathNode sink, DataFlow::Node recSrc -) { - exists(ResultReceiverSendCall call | - any(SensitiveResultReceiverConf c).hasFlowPath(src, sink) and - sink.getNode().asExpr() = call.getSentData() and - untrustedResultReceiverSend(recSrc, call) - ) -} - /** * Holds if there is a path from sensitive data at `src` to a result receiver at `sink`, and the receiver was obtained from an untrusted source `recSrc`. */ diff --git a/java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll index cbd79c65d25..848aae8da30 100644 --- a/java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/SpelInjectionQuery.qll @@ -6,24 +6,6 @@ private import semmle.code.java.dataflow.TaintTracking private import semmle.code.java.frameworks.spring.SpringExpression private import semmle.code.java.security.SpelInjection -/** - * DEPRECATED: Use `SpelInjectionFlow` instead. - * - * A taint-tracking configuration for unsafe user input - * that is used to construct and evaluate a SpEL expression. - */ -deprecated class SpelInjectionConfig extends TaintTracking::Configuration { - SpelInjectionConfig() { this = "SpelInjectionConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof SpelExpressionEvaluationSink } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(SpelExpressionInjectionAdditionalTaintStep c).step(node1, node2) - } -} - /** * A taint-tracking configuration for unsafe user input * that is used to construct and evaluate a SpEL expression. diff --git a/java/ql/lib/semmle/code/java/security/SqlInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/SqlInjectionQuery.qll index 4e21af71332..c4638538a63 100644 --- a/java/ql/lib/semmle/code/java/security/SqlInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/SqlInjectionQuery.qll @@ -11,29 +11,6 @@ import semmle.code.java.dataflow.FlowSources private import semmle.code.java.security.Sanitizers import semmle.code.java.security.QueryInjection -/** - * DEPRECATED: Use `QueryInjectionFlow` instead. - * - * A taint-tracking configuration for unvalidated user input that is used in SQL queries. - */ -deprecated class QueryInjectionFlowConfig extends TaintTracking::Configuration { - QueryInjectionFlowConfig() { this = "SqlInjectionLib::QueryInjectionFlowConfig" } - - override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof QueryInjectionSink } - - override predicate isSanitizer(DataFlow::Node node) { - node.getType() instanceof PrimitiveType or - node.getType() instanceof BoxedType or - node.getType() instanceof NumberType - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(AdditionalQueryInjectionTaintStep s).step(node1, node2) - } -} - /** * A taint-tracking configuration for unvalidated user input that is used in SQL queries. */ @@ -52,16 +29,6 @@ module QueryInjectionFlowConfig implements DataFlow::ConfigSig { /** Tracks flow of unvalidated user input that is used in SQL queries. */ module QueryInjectionFlow = TaintTracking::Global; -/** - * Implementation of `SqlTainted.ql`. This is extracted to a QLL so that it - * can be excluded from `SqlConcatenated.ql` to avoid overlapping results. - */ -deprecated predicate queryTaintedBy( - QueryInjectionSink query, DataFlow::PathNode source, DataFlow::PathNode sink -) { - any(QueryInjectionFlowConfig c).hasFlowPath(source, sink) and sink.getNode() = query -} - /** * Implementation of `SqlTainted.ql`. This is extracted to a QLL so that it * can be excluded from `SqlConcatenated.ql` to avoid overlapping results. diff --git a/java/ql/lib/semmle/code/java/security/StaticInitializationVectorQuery.qll b/java/ql/lib/semmle/code/java/security/StaticInitializationVectorQuery.qll index 14a8789d4f9..9ba848d1e0d 100644 --- a/java/ql/lib/semmle/code/java/security/StaticInitializationVectorQuery.qll +++ b/java/ql/lib/semmle/code/java/security/StaticInitializationVectorQuery.qll @@ -119,21 +119,6 @@ private class EncryptionInitializationSink extends DataFlow::Node { EncryptionInitializationSink() { sinkNode(this, "encryption-iv") } } -/** - * DEPRECATED: Use `StaticInitializationVectorFlow` instead. - * - * A config that tracks dataflow to initializing a cipher with a static initialization vector. - */ -deprecated class StaticInitializationVectorConfig extends TaintTracking::Configuration { - StaticInitializationVectorConfig() { this = "StaticInitializationVectorConfig" } - - override predicate isSource(DataFlow::Node source) { - source instanceof StaticInitializationVectorSource - } - - override predicate isSink(DataFlow::Node sink) { sink instanceof EncryptionInitializationSink } -} - /** * A config that tracks dataflow to initializing a cipher with a static initialization vector. */ diff --git a/java/ql/lib/semmle/code/java/security/TemplateInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/TemplateInjectionQuery.qll index 07150b554aa..a9595b0f6f1 100644 --- a/java/ql/lib/semmle/code/java/security/TemplateInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/TemplateInjectionQuery.qll @@ -5,42 +5,6 @@ import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.TemplateInjection -/** - * DEPRECATED: Use `TemplateInjectionFlow` instead. - * - * A taint tracking configuration to reason about server-side template injection (SST) vulnerabilities - */ -deprecated class TemplateInjectionFlowConfig extends TaintTracking::Configuration { - TemplateInjectionFlowConfig() { this = "TemplateInjectionFlowConfig" } - - override predicate isSource(DataFlow::Node source, DataFlow::FlowState state) { - source.(TemplateInjectionSource).hasState(state) - } - - override predicate isSink(DataFlow::Node sink, DataFlow::FlowState state) { - sink.(TemplateInjectionSink).hasState(state) - } - - override predicate isSanitizer(DataFlow::Node sanitizer) { - sanitizer instanceof TemplateInjectionSanitizer - } - - override predicate isSanitizer(DataFlow::Node sanitizer, DataFlow::FlowState state) { - sanitizer.(TemplateInjectionSanitizerWithState).hasState(state) - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(TemplateInjectionAdditionalTaintStep a).isAdditionalTaintStep(node1, node2) - } - - override predicate isAdditionalTaintStep( - DataFlow::Node node1, DataFlow::FlowState state1, DataFlow::Node node2, - DataFlow::FlowState state2 - ) { - any(TemplateInjectionAdditionalTaintStep a).isAdditionalTaintStep(node1, state1, node2, state2) - } -} - /** A taint tracking configuration to reason about server-side template injection (SST) vulnerabilities */ module TemplateInjectionFlowConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof TemplateInjectionSource } diff --git a/java/ql/lib/semmle/code/java/security/UnsafeAndroidAccessQuery.qll b/java/ql/lib/semmle/code/java/security/UnsafeAndroidAccessQuery.qll index bf25cd3117e..3239b387d8e 100644 --- a/java/ql/lib/semmle/code/java/security/UnsafeAndroidAccessQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UnsafeAndroidAccessQuery.qll @@ -6,23 +6,6 @@ import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.RequestForgery import semmle.code.java.security.UnsafeAndroidAccess -/** - * DEPRECATED: Use `FetchUntrustedResourceFlow` instead. - * - * A taint configuration tracking flow from untrusted inputs to a resource fetching call. - */ -deprecated class FetchUntrustedResourceConfiguration extends TaintTracking::Configuration { - FetchUntrustedResourceConfiguration() { this = "FetchUntrustedResourceConfiguration" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof UrlResourceSink } - - override predicate isSanitizer(DataFlow::Node sanitizer) { - sanitizer instanceof RequestForgerySanitizer - } -} - /** * A taint configuration tracking flow from untrusted inputs to a resource fetching call. */ diff --git a/java/ql/lib/semmle/code/java/security/UnsafeCertTrustQuery.qll b/java/ql/lib/semmle/code/java/security/UnsafeCertTrustQuery.qll index 39a55118ec4..803e3836ab0 100644 --- a/java/ql/lib/semmle/code/java/security/UnsafeCertTrustQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UnsafeCertTrustQuery.qll @@ -5,23 +5,6 @@ import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.UnsafeCertTrust import semmle.code.java.security.Encryption -/** - * DEPRECATED: Use `SslEndpointIdentificationFlow` instead. - * - * A taint flow configuration for SSL connections created without a proper certificate trust configuration. - */ -deprecated class SslEndpointIdentificationFlowConfig extends TaintTracking::Configuration { - SslEndpointIdentificationFlowConfig() { this = "SslEndpointIdentificationFlowConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof SslConnectionInit } - - override predicate isSink(DataFlow::Node sink) { sink instanceof SslConnectionCreation } - - override predicate isSanitizer(DataFlow::Node sanitizer) { - sanitizer instanceof SslUnsafeCertTrustSanitizer - } -} - /** * A taint flow configuration for SSL connections created without a proper certificate trust configuration. */ diff --git a/java/ql/lib/semmle/code/java/security/UnsafeContentUriResolutionQuery.qll b/java/ql/lib/semmle/code/java/security/UnsafeContentUriResolutionQuery.qll index a43864f8b53..db629143d5c 100644 --- a/java/ql/lib/semmle/code/java/security/UnsafeContentUriResolutionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UnsafeContentUriResolutionQuery.qll @@ -5,27 +5,6 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.UnsafeContentUriResolution -/** - * DEPRECATED: Use `UnsafeContentUriResolutionFlow` instead. - * - * A taint-tracking configuration to find paths from remote sources to content URI resolutions. - */ -deprecated class UnsafeContentResolutionConf extends TaintTracking::Configuration { - UnsafeContentResolutionConf() { this = "UnsafeContentResolutionConf" } - - override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof ContentUriResolutionSink } - - override predicate isSanitizer(DataFlow::Node sanitizer) { - sanitizer instanceof ContentUriResolutionSanitizer - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(ContentUriResolutionAdditionalTaintStep s).step(node1, node2) - } -} - /** * A taint-tracking configuration to find paths from remote sources to content URI resolutions. */ diff --git a/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll b/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll index 734ad4c89fe..739b2713780 100644 --- a/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll @@ -314,25 +314,6 @@ private predicate isUnsafeDeserializationTaintStep(DataFlow::Node pred, DataFlow intentFlowsToParcel(pred, succ) } -/** - * DEPRECATED: Use `UnsafeDeserializationFlow` instead. - * - * Tracks flows from remote user input to a deserialization sink. - */ -deprecated class UnsafeDeserializationConfig extends TaintTracking::Configuration { - UnsafeDeserializationConfig() { this = "UnsafeDeserializationConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof UnsafeDeserializationSink } - - override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { - isUnsafeDeserializationTaintStep(pred, succ) - } - - override predicate isSanitizer(DataFlow::Node node) { isUnsafeDeserializationSanitizer(node) } -} - /** Tracks flows from remote user input to a deserialization sink. */ private module UnsafeDeserializationConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } @@ -428,30 +409,6 @@ private predicate isUnsafeTypeAdditionalTaintStep(DataFlow::Node fromNode, DataF intentFlowsToParcel(fromNode, toNode) } -/** - * DEPRECATED: Use `UnsafeTypeFlow` instead. - * - * Tracks flow from a remote source to a type descriptor (e.g. a `java.lang.Class` instance) - * passed to a deserialization method. - * - * If this is user-controlled, arbitrary code could be executed while instantiating the user-specified type. - */ -deprecated class UnsafeTypeConfig extends TaintTracking2::Configuration { - UnsafeTypeConfig() { this = "UnsafeTypeConfig" } - - override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof UnsafeTypeSink } - - /** - * Holds if `fromNode` to `toNode` is a dataflow step that resolves a class - * or at least looks like resolving a class. - */ - override predicate isAdditionalTaintStep(DataFlow::Node fromNode, DataFlow::Node toNode) { - isUnsafeTypeAdditionalTaintStep(fromNode, toNode) - } -} - /** * Tracks flow from a remote source to a type descriptor (e.g. a `java.lang.Class` instance) * passed to a deserialization method. @@ -480,21 +437,6 @@ module UnsafeTypeConfig implements DataFlow::ConfigSig { */ module UnsafeTypeFlow = TaintTracking::Global; -/** - * DEPRECATED: Use `EnableJacksonDefaultTypingFlow` instead. - * - * Tracks flow from `enableDefaultTyping` calls to a subsequent Jackson deserialization method call. - */ -deprecated class EnableJacksonDefaultTypingConfig extends DataFlow2::Configuration { - EnableJacksonDefaultTypingConfig() { this = "EnableJacksonDefaultTypingConfig" } - - override predicate isSource(DataFlow::Node src) { - any(EnableJacksonDefaultTyping ma).getQualifier() = src.asExpr() - } - - override predicate isSink(DataFlow::Node sink) { sink instanceof ObjectMapperReadQualifier } -} - private module EnableJacksonDefaultTypingConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node src) { any(EnableJacksonDefaultTyping ma).getQualifier() = src.asExpr() @@ -523,32 +465,6 @@ private predicate isObjectMapperBuilderAdditionalFlowStep( ) } -/** - * DEPRECATED: Use `SafeObjectMapperFlow` instead. - * - * Tracks flow from calls that set a type validator to a subsequent Jackson deserialization method call, - * including across builder method calls. - * - * Such a Jackson deserialization method call is safe because validation will likely prevent instantiating unexpected types. - */ -deprecated class SafeObjectMapperConfig extends DataFlow2::Configuration { - SafeObjectMapperConfig() { this = "SafeObjectMapperConfig" } - - override predicate isSource(DataFlow::Node src) { - src instanceof SetPolymorphicTypeValidatorSource - } - - override predicate isSink(DataFlow::Node sink) { sink instanceof ObjectMapperReadQualifier } - - /** - * Holds if `fromNode` to `toNode` is a dataflow step - * that configures or creates an `ObjectMapper` via a builder. - */ - override predicate isAdditionalFlowStep(DataFlow::Node fromNode, DataFlow::Node toNode) { - isObjectMapperBuilderAdditionalFlowStep(fromNode, toNode) - } -} - /** * Tracks flow from calls that set a type validator to a subsequent Jackson deserialization method call, * including across builder method calls. diff --git a/java/ql/lib/semmle/code/java/security/WebviewDebuggingEnabledQuery.qll b/java/ql/lib/semmle/code/java/security/WebviewDebuggingEnabledQuery.qll index f10b0132b5a..8e5b177268d 100644 --- a/java/ql/lib/semmle/code/java/security/WebviewDebuggingEnabledQuery.qll +++ b/java/ql/lib/semmle/code/java/security/WebviewDebuggingEnabledQuery.qll @@ -19,32 +19,6 @@ private predicate isDebugCheck(Expr ex) { ) } -/** - * DEPRECATED: Use `WebviewDebugEnabledFlow` instead. - * - * A configuration to find instances of `setWebContentDebuggingEnabled` called with `true` values. - */ -deprecated class WebviewDebugEnabledConfig extends DataFlow::Configuration { - WebviewDebugEnabledConfig() { this = "WebviewDebugEnabledConfig" } - - override predicate isSource(DataFlow::Node node) { - node.asExpr().(BooleanLiteral).getBooleanValue() = true - } - - override predicate isSink(DataFlow::Node node) { - exists(MethodCall ma | - ma.getMethod().hasQualifiedName("android.webkit", "WebView", "setWebContentsDebuggingEnabled") and - node.asExpr() = ma.getArgument(0) - ) - } - - override predicate isBarrier(DataFlow::Node node) { - exists(Guard debug | isDebugCheck(debug) and debug.controls(node.asExpr().getBasicBlock(), _)) - or - node.getEnclosingCallable().getDeclaringType() instanceof NonSecurityTestClass - } -} - /** * A webview debug sink node. */ diff --git a/java/ql/lib/semmle/code/java/security/WebviewDubuggingEnabledQuery.qll b/java/ql/lib/semmle/code/java/security/WebviewDubuggingEnabledQuery.qll deleted file mode 100644 index f315c55291e..00000000000 --- a/java/ql/lib/semmle/code/java/security/WebviewDubuggingEnabledQuery.qll +++ /dev/null @@ -1,11 +0,0 @@ -/** - * DEPRECATED: Use `semmle.code.java.security.WebviewDebuggingEnabledQuery` instead. - * - * Definitions for the Android Webview Debugging Enabled query - */ - -import java -private import semmle.code.java.security.WebviewDebuggingEnabledQuery as WebviewDebuggingEnabledQuery - -deprecated class WebviewDebugEnabledConfig = - WebviewDebuggingEnabledQuery::WebviewDebugEnabledConfig; diff --git a/java/ql/lib/semmle/code/java/security/XmlParsers.qll b/java/ql/lib/semmle/code/java/security/XmlParsers.qll index 565efb4f59a..4a5b7121e60 100644 --- a/java/ql/lib/semmle/code/java/security/XmlParsers.qll +++ b/java/ql/lib/semmle/code/java/security/XmlParsers.qll @@ -833,27 +833,6 @@ class TransformerFactoryConfig extends TransformerConfig { } } -/** - * DEPRECATED. - * - * A dataflow configuration that identifies `TransformerFactory` and `SAXTransformerFactory` - * instances that have been safely configured. - */ -deprecated class SafeTransformerFactoryFlowConfig extends DataFlow3::Configuration { - SafeTransformerFactoryFlowConfig() { this = "XmlParsers::SafeTransformerFactoryFlowConfig" } - - override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof SafeTransformerFactory } - - override predicate isSink(DataFlow::Node sink) { - exists(MethodCall ma | - sink.asExpr() = ma.getQualifier() and - ma.getMethod().getDeclaringType() instanceof TransformerFactory - ) - } - - override int fieldFlowBranchLimit() { result = 0 } -} - /** * DEPRECATED. * diff --git a/java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll index 028ef4863d3..d437ca860d5 100644 --- a/java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XsltInjectionQuery.qll @@ -7,27 +7,6 @@ import semmle.code.java.security.XmlParsers import semmle.code.java.security.XsltInjection private import semmle.code.java.security.Sanitizers -/** - * DEPRECATED: Use `XsltInjectionFlow` instead. - * - * A taint-tracking configuration for unvalidated user input that is used in XSLT transformation. - */ -deprecated class XsltInjectionFlowConfig extends TaintTracking::Configuration { - XsltInjectionFlowConfig() { this = "XsltInjectionFlowConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof XsltInjectionSink } - - override predicate isSanitizer(DataFlow::Node node) { - node.getType() instanceof PrimitiveType or node.getType() instanceof BoxedType - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - any(XsltInjectionAdditionalTaintStep c).step(node1, node2) - } -} - /** * A taint-tracking configuration for unvalidated user input that is used in XSLT transformation. */ diff --git a/java/ql/lib/semmle/code/java/security/XxeLocalQuery.qll b/java/ql/lib/semmle/code/java/security/XxeLocalQuery.qll index f6bfa8850b2..f485137fc78 100644 --- a/java/ql/lib/semmle/code/java/security/XxeLocalQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XxeLocalQuery.qll @@ -5,25 +5,6 @@ private import semmle.code.java.dataflow.FlowSources private import semmle.code.java.dataflow.TaintTracking private import semmle.code.java.security.XxeQuery -/** - * DEPRECATED: Use `XxeLocalFlow` instead. - * - * A taint-tracking configuration for unvalidated local user input that is used in XML external entity expansion. - */ -deprecated class XxeLocalConfig extends TaintTracking::Configuration { - XxeLocalConfig() { this = "XxeLocalConfig" } - - override predicate isSource(DataFlow::Node src) { src instanceof LocalUserInput } - - override predicate isSink(DataFlow::Node sink) { sink instanceof XxeSink } - - override predicate isSanitizer(DataFlow::Node sanitizer) { sanitizer instanceof XxeSanitizer } - - override predicate isAdditionalTaintStep(DataFlow::Node n1, DataFlow::Node n2) { - any(XxeAdditionalTaintStep s).step(n1, n2) - } -} - /** * A taint-tracking configuration for unvalidated local user input that is used in XML external entity expansion. */ diff --git a/java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll b/java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll index 9236a7185c3..58b1e5bfed1 100644 --- a/java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll +++ b/java/ql/lib/semmle/code/java/security/XxeRemoteQuery.qll @@ -5,25 +5,6 @@ private import semmle.code.java.dataflow.FlowSources private import semmle.code.java.dataflow.TaintTracking private import semmle.code.java.security.XxeQuery -/** - * DEPRECATED: Use `XxeFlow` instead. - * - * A taint-tracking configuration for unvalidated remote user input that is used in XML external entity expansion. - */ -deprecated class XxeConfig extends TaintTracking::Configuration { - XxeConfig() { this = "XxeConfig" } - - override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof XxeSink } - - override predicate isSanitizer(DataFlow::Node sanitizer) { sanitizer instanceof XxeSanitizer } - - override predicate isAdditionalTaintStep(DataFlow::Node n1, DataFlow::Node n2) { - any(XxeAdditionalTaintStep s).step(n1, n2) - } -} - /** * A taint-tracking configuration for unvalidated remote user input that is used in XML external entity expansion. */ diff --git a/java/ql/lib/semmle/code/java/security/ZipSlipQuery.qll b/java/ql/lib/semmle/code/java/security/ZipSlipQuery.qll index 08a58bfa6e9..0055670d895 100644 --- a/java/ql/lib/semmle/code/java/security/ZipSlipQuery.qll +++ b/java/ql/lib/semmle/code/java/security/ZipSlipQuery.qll @@ -5,7 +5,6 @@ import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.PathSanitizer private import semmle.code.java.dataflow.ExternalFlow private import semmle.code.java.dataflow.FlowSources -private import semmle.code.java.security.PathCreation private import semmle.code.java.security.Sanitizers /** diff --git a/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll b/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll index d08374e0318..55c1a043230 100644 --- a/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll +++ b/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll @@ -33,38 +33,6 @@ private class LengthRestrictedMethod extends Method { } } -/** - * DEPRECATED: Use `PolynomialRedosFlow` instead. - * - * A configuration for Polynomial ReDoS queries. - */ -deprecated class PolynomialRedosConfig extends TaintTracking::Configuration { - PolynomialRedosConfig() { this = "PolynomialRedosConfig" } - - override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof PolynomialRedosSink } - - override predicate isSanitizer(DataFlow::Node node) { - node.getType() instanceof PrimitiveType or - node.getType() instanceof BoxedType or - node.asExpr().(MethodCall).getMethod() instanceof LengthRestrictedMethod - } -} - -/** - * DEPRECATED: Use `PolynomialRedosFlow` instead. - * - * Holds if there is flow from `source` to `sink` that is matched against the regexp term `regexp` that is vulnerable to Polynomial ReDoS. - */ -deprecated predicate hasPolynomialReDoSResult( - DataFlow::PathNode source, DataFlow::PathNode sink, - SuperlinearBackTracking::PolynomialBackTrackingTerm regexp -) { - any(PolynomialRedosConfig config).hasFlowPath(source, sink) and - regexp.getRootTerm() = sink.getNode().(PolynomialRedosSink).getRegExp() -} - /** A configuration for Polynomial ReDoS queries. */ module PolynomialRedosConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource } diff --git a/java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll b/java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll index 5d44139e02e..88710061819 100644 --- a/java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll +++ b/java/ql/lib/semmle/code/java/security/regexp/RegexInjectionQuery.qll @@ -5,21 +5,6 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.regexp.RegexInjection -/** - * DEPRECATED: Use `RegexInjectionFlow` instead. - * - * A taint-tracking configuration for untrusted user input used to construct regular expressions. - */ -deprecated class RegexInjectionConfiguration extends TaintTracking::Configuration { - RegexInjectionConfiguration() { this = "RegexInjection" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof RegexInjectionSink } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof RegexInjectionSanitizer } -} - /** * A taint-tracking configuration for untrusted user input used to construct regular expressions. */ diff --git a/java/ql/src/CHANGELOG.md b/java/ql/src/CHANGELOG.md index 464768e3a7f..f40eb15e63e 100644 --- a/java/ql/src/CHANGELOG.md +++ b/java/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.3 + +No user-facing changes. + ## 1.1.2 ### Minor Analysis Improvements diff --git a/java/ql/src/Security/CWE/CWE-022/TaintedPath.ql b/java/ql/src/Security/CWE/CWE-022/TaintedPath.ql index 3963442d648..9410a5f7c87 100644 --- a/java/ql/src/Security/CWE/CWE-022/TaintedPath.ql +++ b/java/ql/src/Security/CWE/CWE-022/TaintedPath.ql @@ -14,7 +14,6 @@ */ import java -import semmle.code.java.security.PathCreation import semmle.code.java.security.TaintedPathQuery import TaintedPathFlow::PathGraph diff --git a/java/ql/src/change-notes/released/1.1.3.md b/java/ql/src/change-notes/released/1.1.3.md new file mode 100644 index 00000000000..e8f1701bd62 --- /dev/null +++ b/java/ql/src/change-notes/released/1.1.3.md @@ -0,0 +1,3 @@ +## 1.1.3 + +No user-facing changes. diff --git a/java/ql/src/codeql-pack.release.yml b/java/ql/src/codeql-pack.release.yml index 53ab127707f..35e710ab1bf 100644 --- a/java/ql/src/codeql-pack.release.yml +++ b/java/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.1.2 +lastReleaseVersion: 1.1.3 diff --git a/java/ql/src/qlpack.yml b/java/ql/src/qlpack.yml index 32442dbf4d6..19a3ede39d2 100644 --- a/java/ql/src/qlpack.yml +++ b/java/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-queries -version: 1.1.3-dev +version: 1.1.4-dev groups: - java - queries diff --git a/java/ql/test/library-tests/pathcreation/PathCreation.expected b/java/ql/test/library-tests/pathcreation/PathCreation.expected deleted file mode 100644 index 3ea0481c5f3..00000000000 --- a/java/ql/test/library-tests/pathcreation/PathCreation.expected +++ /dev/null @@ -1,26 +0,0 @@ -WARNING: type 'PathCreation' has been deprecated and may be removed in future (PathCreation.ql:4,6-18) -| PathCreation.java:13:18:13:32 | new File(...) | PathCreation.java:13:27:13:31 | "dir" | -| PathCreation.java:14:19:14:40 | new File(...) | PathCreation.java:14:28:14:32 | "dir" | -| PathCreation.java:14:19:14:40 | new File(...) | PathCreation.java:14:35:14:39 | "sub" | -| PathCreation.java:18:18:18:49 | new File(...) | PathCreation.java:18:44:18:48 | "sub" | -| PathCreation.java:18:27:18:41 | new File(...) | PathCreation.java:18:36:18:40 | "dir" | -| PathCreation.java:22:18:22:41 | new File(...) | PathCreation.java:22:27:22:40 | new URI(...) | -| PathCreation.java:26:18:26:31 | of(...) | PathCreation.java:26:26:26:30 | "dir" | -| PathCreation.java:27:19:27:39 | of(...) | PathCreation.java:27:27:27:31 | "dir" | -| PathCreation.java:27:19:27:39 | of(...) | PathCreation.java:27:34:27:38 | "sub" | -| PathCreation.java:31:18:31:40 | of(...) | PathCreation.java:31:26:31:39 | new URI(...) | -| PathCreation.java:35:18:35:33 | get(...) | PathCreation.java:35:28:35:32 | "dir" | -| PathCreation.java:36:19:36:41 | get(...) | PathCreation.java:36:29:36:33 | "dir" | -| PathCreation.java:36:19:36:41 | get(...) | PathCreation.java:36:36:36:40 | "sub" | -| PathCreation.java:40:18:40:42 | get(...) | PathCreation.java:40:28:40:41 | new URI(...) | -| PathCreation.java:44:18:44:56 | getPath(...) | PathCreation.java:44:51:44:55 | "dir" | -| PathCreation.java:45:19:45:64 | getPath(...) | PathCreation.java:45:52:45:56 | "dir" | -| PathCreation.java:45:19:45:64 | getPath(...) | PathCreation.java:45:59:45:63 | "sub" | -| PathCreation.java:49:18:49:31 | of(...) | PathCreation.java:49:26:49:30 | "dir" | -| PathCreation.java:49:18:49:53 | resolveSibling(...) | PathCreation.java:49:48:49:52 | "sub" | -| PathCreation.java:53:18:53:31 | of(...) | PathCreation.java:53:26:53:30 | "dir" | -| PathCreation.java:53:18:53:46 | resolve(...) | PathCreation.java:53:41:53:45 | "sub" | -| PathCreation.java:57:25:57:45 | new FileWriter(...) | PathCreation.java:57:40:57:44 | "dir" | -| PathCreation.java:61:25:61:45 | new FileReader(...) | PathCreation.java:61:40:61:44 | "dir" | -| PathCreation.java:65:32:65:58 | new FileOutputStream(...) | PathCreation.java:65:53:65:57 | "dir" | -| PathCreation.java:69:31:69:56 | new FileInputStream(...) | PathCreation.java:69:51:69:55 | "dir" | diff --git a/java/ql/test/library-tests/pathcreation/PathCreation.java b/java/ql/test/library-tests/pathcreation/PathCreation.java deleted file mode 100644 index fcd1eed3e28..00000000000 --- a/java/ql/test/library-tests/pathcreation/PathCreation.java +++ /dev/null @@ -1,71 +0,0 @@ -import java.io.File; -import java.io.FileWriter; -import java.io.FileReader; -import java.io.FileOutputStream; -import java.io.FileInputStream; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.FileSystems; -import java.net.URI; - -class PathCreation { - public void testNewFileWithString() { - File f = new File("dir"); - File f2 = new File("dir", "sub"); - } - - public void testNewFileWithFileString() { - File f = new File(new File("dir"), "sub"); - } - - public void testNewFileWithURI() throws java.net.URISyntaxException { - File f = new File(new URI("dir")); - } - - public void testPathOfWithString() { - Path p = Path.of("dir"); - Path p2 = Path.of("dir", "sub"); - } - - public void testPathOfWithURI() throws java.net.URISyntaxException { - Path p = Path.of(new URI("dir")); - } - - public void testPathsGetWithString() { - Path p = Paths.get("dir"); - Path p2 = Paths.get("dir", "sub"); - } - - public void testPathsGetWithURI() throws java.net.URISyntaxException { - Path p = Paths.get(new URI("dir")); - } - - public void testFileSystemGetPathWithString() { - Path p = FileSystems.getDefault().getPath("dir"); - Path p2 = FileSystems.getDefault().getPath("dir", "sub"); - } - - public void testPathResolveSiblingWithString() { - Path p = Path.of("dir").resolveSibling("sub"); - } - - public void testPathResolveWithString() { - Path p = Path.of("dir").resolve("sub"); - } - - public void testNewFileWriterWithString() throws java.io.IOException { - FileWriter fw = new FileWriter("dir"); - } - - public void testNewFileReaderWithString() throws java.io.FileNotFoundException { - FileReader fr = new FileReader("dir"); - } - - public void testNewFileOutputStreamWithString() throws java.io.FileNotFoundException { - FileOutputStream fos = new FileOutputStream("dir"); - } - - public void testNewFileInputStreamWithString() throws java.io.FileNotFoundException { - FileInputStream fis = new FileInputStream("dir"); - } -} diff --git a/java/ql/test/library-tests/pathcreation/PathCreation.ql b/java/ql/test/library-tests/pathcreation/PathCreation.ql deleted file mode 100644 index fb27c538319..00000000000 --- a/java/ql/test/library-tests/pathcreation/PathCreation.ql +++ /dev/null @@ -1,5 +0,0 @@ -import java -import semmle.code.java.security.PathCreation - -from PathCreation path -select path, path.getAnInput() diff --git a/javascript/ql/lib/CHANGELOG.md b/javascript/ql/lib/CHANGELOG.md index 134bbe39a69..301a52e0d9d 100644 --- a/javascript/ql/lib/CHANGELOG.md +++ b/javascript/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.3 + +No user-facing changes. + ## 1.1.2 No user-facing changes. diff --git a/javascript/ql/lib/change-notes/2024-09-03-outdated-deprecations.md b/javascript/ql/lib/change-notes/2024-09-03-outdated-deprecations.md new file mode 100644 index 00000000000..cb356514160 --- /dev/null +++ b/javascript/ql/lib/change-notes/2024-09-03-outdated-deprecations.md @@ -0,0 +1,10 @@ +--- +category: breaking +--- +* Deleted the deprecated `isHTMLElement` and `getDOMName` predicates from the JSX library, use `isHtmlElement` and `getDomName` respectively instead. +* Deleted the deprecated `getPackageJSON` predicate from the `SourceMappingComment` class, use `SourceMappingComment` instead. +* Deleted many deprecated directives from the `Stmt.qll` file, use the `Directive::` module instead. +* Deleted the deprecated `YAMLNode`, `YAMLValue`, and `YAMLScalar` classes from the YAML libraries, use `YamlNode`, `YamlValue`, and `YamlScalar` respectively instead. +* Deleted the deprecated `getARouteHandlerExpr` predicate from `Connect.qll`, use `getARouteHandlerNode` instead. +* Deleted the deprecated `getGWTVersion` predicate from `GWT.qll`, use `getGwtVersion` instead. +* Deleted the deprecated `getOwnOptionsObject` predicate from `Vue.qll`, use `getOwnOptions().getASink()` instead. diff --git a/javascript/ql/lib/change-notes/released/1.1.3.md b/javascript/ql/lib/change-notes/released/1.1.3.md new file mode 100644 index 00000000000..e8f1701bd62 --- /dev/null +++ b/javascript/ql/lib/change-notes/released/1.1.3.md @@ -0,0 +1,3 @@ +## 1.1.3 + +No user-facing changes. diff --git a/javascript/ql/lib/codeql-pack.release.yml b/javascript/ql/lib/codeql-pack.release.yml index 53ab127707f..35e710ab1bf 100644 --- a/javascript/ql/lib/codeql-pack.release.yml +++ b/javascript/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.1.2 +lastReleaseVersion: 1.1.3 diff --git a/javascript/ql/lib/qlpack.yml b/javascript/ql/lib/qlpack.yml index 0a9adfd363a..66933738bce 100644 --- a/javascript/ql/lib/qlpack.yml +++ b/javascript/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-all -version: 1.1.3-dev +version: 1.1.4-dev groups: javascript dbscheme: semmlecode.javascript.dbscheme extractor: javascript diff --git a/javascript/ql/lib/semmle/javascript/JSX.qll b/javascript/ql/lib/semmle/javascript/JSX.qll index 6fd7c775d4e..ed8a7b097a6 100644 --- a/javascript/ql/lib/semmle/javascript/JSX.qll +++ b/javascript/ql/lib/semmle/javascript/JSX.qll @@ -73,9 +73,6 @@ class JsxElement extends JsxNode { * That is, the name starts with a lowercase letter. */ predicate isHtmlElement() { this.getName().regexpMatch("[a-z].*") } - - /** DEPRECATED: Alias for isHtmlElement */ - deprecated predicate isHTMLElement() { this.isHtmlElement() } } /** @@ -256,7 +253,4 @@ class JsxPragma extends JSDocTag { * the result is `React.DOM`. */ string getDomName() { result = this.getDescription().trim() } - - /** DEPRECATED: Alias for getDomName */ - deprecated string getDOMName() { result = this.getDomName() } } diff --git a/javascript/ql/lib/semmle/javascript/NodeModuleResolutionImpl.qll b/javascript/ql/lib/semmle/javascript/NodeModuleResolutionImpl.qll index 7231143ed55..03b5bf93fb0 100644 --- a/javascript/ql/lib/semmle/javascript/NodeModuleResolutionImpl.qll +++ b/javascript/ql/lib/semmle/javascript/NodeModuleResolutionImpl.qll @@ -197,9 +197,6 @@ class MainModulePath extends PathExpr, @json_string { not exists(getExportRelativePath(this)) and result = "." } - /** DEPRECATED: Alias for getPackageJson */ - deprecated PackageJson getPackageJSON() { result = this.getPackageJson() } - override string getValue() { result = this.(JsonString).getValue() } override Folder getAdditionalSearchRoot(int priority) { @@ -258,9 +255,6 @@ private class FilesPath extends PathExpr, @json_string { /** Gets the `package.json` file in which this path occurs. */ PackageJson getPackageJson() { result = pkg } - /** DEPRECATED: Alias for getPackageJson */ - deprecated PackageJson getPackageJSON() { result = this.getPackageJson() } - override string getValue() { result = this.(JsonString).getValue() } override Folder getAdditionalSearchRoot(int priority) { diff --git a/javascript/ql/lib/semmle/javascript/SourceMaps.qll b/javascript/ql/lib/semmle/javascript/SourceMaps.qll index 17dbbd8ccdf..21fa7112132 100644 --- a/javascript/ql/lib/semmle/javascript/SourceMaps.qll +++ b/javascript/ql/lib/semmle/javascript/SourceMaps.qll @@ -23,7 +23,4 @@ class SourceMappingComment extends Comment { /** Gets the URL of the source map referenced by this comment. */ string getSourceMappingUrl() { result = url } - - /** DEPRECATED: Alias for getSourceMappingUrl */ - deprecated string getSourceMappingURL() { result = this.getSourceMappingUrl() } } diff --git a/javascript/ql/lib/semmle/javascript/Stmt.qll b/javascript/ql/lib/semmle/javascript/Stmt.qll index 9adfece36a0..93eb1d1dea0 100644 --- a/javascript/ql/lib/semmle/javascript/Stmt.qll +++ b/javascript/ql/lib/semmle/javascript/Stmt.qll @@ -434,36 +434,6 @@ module Directive { } } -/** DEPRECATED. Use `Directive::KnownDirective` instead. */ -deprecated class KnownDirective = Directive::KnownDirective; - -/** DEPRECATED. Use `Directive::StrictModeDecl` instead. */ -deprecated class StrictModeDecl = Directive::StrictModeDecl; - -/** DEPRECATED. Use `Directive::AsmJSDirective` instead. */ -deprecated class AsmJSDirective = Directive::AsmJSDirective; - -/** DEPRECATED. Use `Directive::BabelDirective` instead. */ -deprecated class BabelDirective = Directive::BabelDirective; - -/** DEPRECATED. Use `Directive::SixToFiveDirective` instead. */ -deprecated class SixToFiveDirective = Directive::SixToFiveDirective; - -/** DEPRECATED. Use `Directive::SystemJSFormatDirective` instead. */ -deprecated class SystemJSFormatDirective = Directive::SystemJSFormatDirective; - -/** DEPRECATED. Use `Directive::NgInjectDirective` instead. */ -deprecated class NgInjectDirective = Directive::NgInjectDirective; - -/** DEPRECATED. Use `Directive::YuiDirective` instead. */ -deprecated class YuiDirective = Directive::YuiDirective; - -/** DEPRECATED. Use `Directive::SystemJSDepsDirective` instead. */ -deprecated class SystemJSDepsDirective = Directive::SystemJSDepsDirective; - -/** DEPRECATED. Use `Directive::BundleDirective` instead. */ -deprecated class BundleDirective = Directive::BundleDirective; - /** * An `if` statement. * diff --git a/javascript/ql/lib/semmle/javascript/YAML.qll b/javascript/ql/lib/semmle/javascript/YAML.qll index 1ab562b9524..24486b729c0 100644 --- a/javascript/ql/lib/semmle/javascript/YAML.qll +++ b/javascript/ql/lib/semmle/javascript/YAML.qll @@ -54,12 +54,3 @@ private class MyYmlNode extends Locatable instanceof YamlNode { override string toString() { result = YamlNode.super.toString() } } - -/** DEPRECATED: Alias for YamlNode */ -deprecated class YAMLNode = YamlNode; - -/** DEPRECATED: Alias for YamlValue */ -deprecated class YAMLValue = YamlValue; - -/** DEPRECATED: Alias for YamlScalar */ -deprecated class YAMLScalar = YamlScalar; diff --git a/javascript/ql/lib/semmle/javascript/frameworks/Connect.qll b/javascript/ql/lib/semmle/javascript/frameworks/Connect.qll index dbcbc0635db..f6ac5854f4d 100644 --- a/javascript/ql/lib/semmle/javascript/frameworks/Connect.qll +++ b/javascript/ql/lib/semmle/javascript/frameworks/Connect.qll @@ -88,12 +88,6 @@ module Connect { override DataFlow::Node getServer() { result = server } - /** - * DEPRECATED: Use `getARouteHandlerNode` instead. - * Gets an argument that represents a route handler being registered. - */ - deprecated Expr getARouteHandlerExpr() { result = this.getARouteHandlerNode().asExpr() } - /** * Gets an argument that represents a route handler being registered. */ diff --git a/javascript/ql/lib/semmle/javascript/frameworks/GWT.qll b/javascript/ql/lib/semmle/javascript/frameworks/GWT.qll index 345873719a6..7fa72c9a9f0 100644 --- a/javascript/ql/lib/semmle/javascript/frameworks/GWT.qll +++ b/javascript/ql/lib/semmle/javascript/frameworks/GWT.qll @@ -28,9 +28,6 @@ class GwtHeader extends InlineScript { result = e.getStringValue() ) } - - /** DEPRECATED: Alias for getGwtVersion */ - deprecated string getGWTVersion() { result = this.getGwtVersion() } } /** diff --git a/javascript/ql/lib/semmle/javascript/frameworks/Vue.qll b/javascript/ql/lib/semmle/javascript/frameworks/Vue.qll index 096877900c9..ebfe042f4d0 100644 --- a/javascript/ql/lib/semmle/javascript/frameworks/Vue.qll +++ b/javascript/ql/lib/semmle/javascript/frameworks/Vue.qll @@ -183,14 +183,6 @@ module Vue { result = this.getAsClassComponent().getDecoratorOptions() } - /** - * DEPRECATED. Use `getOwnOptions().getASink()`. - * - * Gets the options passed to the Vue object, such as the object literal `{...}` in `new Vue{{...})` - * or the default export of a single-file component. - */ - deprecated DataFlow::Node getOwnOptionsObject() { result = this.getOwnOptions().asSink() } - /** * Gets the class implementing this Vue component, if any. * diff --git a/javascript/ql/src/CHANGELOG.md b/javascript/ql/src/CHANGELOG.md index af1e040cc44..a5f03a2f00e 100644 --- a/javascript/ql/src/CHANGELOG.md +++ b/javascript/ql/src/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.1.2 + +### Minor Analysis Improvements + +* Message events in the browser are now properly classified as client-side taint sources. Previously they were + incorrectly classified as server-side taint sources, which resulted in some alerts being reported by + the wrong query, such as server-side URL redirection instead of client-side URL redirection. + ## 1.1.1 No user-facing changes. diff --git a/javascript/ql/src/change-notes/2024-08-16-post-message-source-client-side.md b/javascript/ql/src/change-notes/released/1.1.2.md similarity index 87% rename from javascript/ql/src/change-notes/2024-08-16-post-message-source-client-side.md rename to javascript/ql/src/change-notes/released/1.1.2.md index 0866061c3bd..1f410e20195 100644 --- a/javascript/ql/src/change-notes/2024-08-16-post-message-source-client-side.md +++ b/javascript/ql/src/change-notes/released/1.1.2.md @@ -1,6 +1,7 @@ ---- -category: minorAnalysis ---- +## 1.1.2 + +### Minor Analysis Improvements + * Message events in the browser are now properly classified as client-side taint sources. Previously they were incorrectly classified as server-side taint sources, which resulted in some alerts being reported by the wrong query, such as server-side URL redirection instead of client-side URL redirection. diff --git a/javascript/ql/src/codeql-pack.release.yml b/javascript/ql/src/codeql-pack.release.yml index 1a19084be3f..53ab127707f 100644 --- a/javascript/ql/src/codeql-pack.release.yml +++ b/javascript/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.1.1 +lastReleaseVersion: 1.1.2 diff --git a/javascript/ql/src/qlpack.yml b/javascript/ql/src/qlpack.yml index 9932097414b..30fd61f190b 100644 --- a/javascript/ql/src/qlpack.yml +++ b/javascript/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-queries -version: 1.1.2-dev +version: 1.1.3-dev groups: - javascript - queries diff --git a/javascript/ql/test/tutorials/Validating RAML-based APIs/Osprey.qll b/javascript/ql/test/tutorials/Validating RAML-based APIs/Osprey.qll index 140bf59c4e6..c799d4f135f 100644 --- a/javascript/ql/test/tutorials/Validating RAML-based APIs/Osprey.qll +++ b/javascript/ql/test/tutorials/Validating RAML-based APIs/Osprey.qll @@ -47,9 +47,6 @@ class OspreyMethodDefinition extends MethodCallExpr { /** Get the API to which this method belongs. */ OspreyApi getApi() { this.getReceiver() = result.getAnAccess() } - /** DEPRECATED: Alias for getApi */ - deprecated OspreyApi getAPI() { result = this.getApi() } - /** Get the verb which this method implements. */ string getVerb() { result = this.getMethodName() } diff --git a/misc/bazel/rust.bzl b/misc/bazel/rust.bzl index b858f6b0a80..97afee4ba1c 100644 --- a/misc/bazel/rust.bzl +++ b/misc/bazel/rust.bzl @@ -8,7 +8,7 @@ def codeql_rust_binary( visibility = None, symbols_test = True, **kwargs): - rust_label_name = name + "_single_arch" + rust_label_name = "single_arch/" + name universal_binary( name = name, dep = ":" + rust_label_name, diff --git a/misc/bazel/semmle_code_stub/buildutils-internal/BUILD.bazel b/misc/bazel/semmle_code_stub/buildutils-internal/BUILD.bazel new file mode 100644 index 00000000000..e69de29bb2d diff --git a/misc/bazel/semmle_code_stub/buildutils-internal/glibc_symbols_check.bzl b/misc/bazel/semmle_code_stub/buildutils-internal/glibc_symbols_check.bzl new file mode 100644 index 00000000000..a9091008ba8 --- /dev/null +++ b/misc/bazel/semmle_code_stub/buildutils-internal/glibc_symbols_check.bzl @@ -0,0 +1,4 @@ +# This check only makes sense when building from the internal repository + +def glibc_symbols_check(**kwargs): + pass diff --git a/misc/bazel/semmle_code_stub/buildutils-internal/lipo.bzl b/misc/bazel/semmle_code_stub/buildutils-internal/lipo.bzl new file mode 100644 index 00000000000..733e15703de --- /dev/null +++ b/misc/bazel/semmle_code_stub/buildutils-internal/lipo.bzl @@ -0,0 +1,5 @@ +# we only need to build universal binaries when building releases from the internal repo +# when building from the codeql repo, we can stub this rule with an alias + +def universal_binary(*, name, dep, **kwargs): + native.alias(name = name, actual = dep, **kwargs) diff --git a/misc/suite-helpers/CHANGELOG.md b/misc/suite-helpers/CHANGELOG.md index 5e4196ac337..66b29a94c27 100644 --- a/misc/suite-helpers/CHANGELOG.md +++ b/misc/suite-helpers/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/misc/suite-helpers/change-notes/released/1.0.6.md b/misc/suite-helpers/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/misc/suite-helpers/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/misc/suite-helpers/codeql-pack.release.yml b/misc/suite-helpers/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/misc/suite-helpers/codeql-pack.release.yml +++ b/misc/suite-helpers/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/misc/suite-helpers/qlpack.yml b/misc/suite-helpers/qlpack.yml index baedc3f13a1..0e10bf7cc48 100644 --- a/misc/suite-helpers/qlpack.yml +++ b/misc/suite-helpers/qlpack.yml @@ -1,4 +1,4 @@ name: codeql/suite-helpers -version: 1.0.6-dev +version: 1.0.7-dev groups: shared warnOnImplicitThis: true diff --git a/python/ql/lib/CHANGELOG.md b/python/ql/lib/CHANGELOG.md index 87cbf5bfda1..588534dbe81 100644 --- a/python/ql/lib/CHANGELOG.md +++ b/python/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 ### Minor Analysis Improvements diff --git a/python/ql/lib/change-notes/2024-09-03-outdated-deprecations.md b/python/ql/lib/change-notes/2024-09-03-outdated-deprecations.md new file mode 100644 index 00000000000..cb8f4c3fbbc --- /dev/null +++ b/python/ql/lib/change-notes/2024-09-03-outdated-deprecations.md @@ -0,0 +1,9 @@ +--- +category: breaking +--- +* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration` instead. +* Deleted the deprecated `semmle.python.RegexTreeView` module, use `semmle.python.regexp.RegexTreeView` instead. +* Deleted the deprecated `RegexString` class from `regex.qll`. +* Deleted the deprecated `Regex` class, use `RegExp` instead. +* Deleted the deprecated `semmle/python/security/SQL.qll` file. +* Deleted the deprecated `useSSL` predicates from the LDAP libraries, use `useSsl` instead. \ No newline at end of file diff --git a/python/ql/lib/change-notes/released/1.0.6.md b/python/ql/lib/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/python/ql/lib/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/python/ql/lib/codeql-pack.release.yml b/python/ql/lib/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/python/ql/lib/codeql-pack.release.yml +++ b/python/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/python/ql/lib/qlpack.yml b/python/ql/lib/qlpack.yml index 81d09c13b5d..a5976074c0e 100644 --- a/python/ql/lib/qlpack.yml +++ b/python/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-all -version: 1.0.6-dev +version: 1.0.7-dev groups: python dbscheme: semmlecode.python.dbscheme extractor: python diff --git a/python/ql/lib/semmle/python/RegexTreeView.qll b/python/ql/lib/semmle/python/RegexTreeView.qll deleted file mode 100644 index 84cfaa3a4c7..00000000000 --- a/python/ql/lib/semmle/python/RegexTreeView.qll +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Deprecated. Use `semmle.python.regexp.RegexTreeView` instead. - */ - -deprecated import regexp.RegexTreeView as Dep -import Dep diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll index 3b1439511d1..359fa71744b 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl1.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll index 3b1439511d1..359fa71744b 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl2.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll index 3b1439511d1..359fa71744b 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl3.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll index 3b1439511d1..359fa71744b 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowImpl4.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/python/ql/lib/semmle/python/dataflow/old/TaintTracking.qll b/python/ql/lib/semmle/python/dataflow/old/TaintTracking.qll index d0293522404..0ce4bc27790 100644 --- a/python/ql/lib/semmle/python/dataflow/old/TaintTracking.qll +++ b/python/ql/lib/semmle/python/dataflow/old/TaintTracking.qll @@ -664,14 +664,6 @@ module DataFlow { } } -deprecated private class DataFlowType extends TaintKind { - // this only exists to avoid an empty recursion error in the type checker - DataFlowType() { - this = "Data flow" and - 1 = 2 - } -} - pragma[noinline] private predicate dict_construct(ControlFlowNode itemnode, ControlFlowNode dictnode) { dictnode.(DictNode).getAValue() = itemnode diff --git a/python/ql/lib/semmle/python/regex.qll b/python/ql/lib/semmle/python/regex.qll index 0c96e504946..4a5a35d5b63 100644 --- a/python/ql/lib/semmle/python/regex.qll +++ b/python/ql/lib/semmle/python/regex.qll @@ -14,8 +14,3 @@ RegExpTerm getTermForExecution(Concepts::RegexExecution exec) { result.isRootTerm() ) } - -/** A StringLiteral used as a regular expression */ -deprecated class RegexString extends Regex { - RegexString() { this = RegExpTracking::regExpSource(_).asExpr() } -} diff --git a/python/ql/lib/semmle/python/regexp/internal/ParseRegExp.qll b/python/ql/lib/semmle/python/regexp/internal/ParseRegExp.qll index 6ac12e00e81..7e23554e058 100644 --- a/python/ql/lib/semmle/python/regexp/internal/ParseRegExp.qll +++ b/python/ql/lib/semmle/python/regexp/internal/ParseRegExp.qll @@ -100,11 +100,6 @@ private module FindRegexMode { private string mode_from_node(DataFlow::Node node) { node = re_flag_tracker(result) } } -/** - * DEPRECATED: Use `RegExp` instead. - */ -deprecated class Regex = RegExp; - /** A StringLiteral used as a regular expression */ class RegExp extends Expr instanceof StringLiteral { DataFlow::Node use; diff --git a/python/ql/lib/semmle/python/security/SQL.qll b/python/ql/lib/semmle/python/security/SQL.qll deleted file mode 100644 index 6485402b78a..00000000000 --- a/python/ql/lib/semmle/python/security/SQL.qll +++ /dev/null @@ -1,4 +0,0 @@ -import python -import semmle.python.dataflow.TaintTracking - -abstract deprecated class SqlInjectionSink extends TaintSink { } diff --git a/python/ql/src/CHANGELOG.md b/python/ql/src/CHANGELOG.md index 31897112925..88f9c1e5fa0 100644 --- a/python/ql/src/CHANGELOG.md +++ b/python/ql/src/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.2.0 + +### New Queries + +* The `py/cookie-injection` query, originally contributed to the experimental query pack by @jorgectf, has been promoted to the main query pack. This query finds instances of cookies being set without the `Secure`, `HttpOnly`, or `SameSite` attributes set to secure values. + ## 1.1.0 ### New Queries diff --git a/python/ql/src/change-notes/2024-07-23-insecure-cookie-promotion.md b/python/ql/src/change-notes/released/1.2.0.md similarity index 85% rename from python/ql/src/change-notes/2024-07-23-insecure-cookie-promotion.md rename to python/ql/src/change-notes/released/1.2.0.md index 370fe162290..10a58295368 100644 --- a/python/ql/src/change-notes/2024-07-23-insecure-cookie-promotion.md +++ b/python/ql/src/change-notes/released/1.2.0.md @@ -1,4 +1,5 @@ ---- -category: newQuery ---- -* The `py/cookie-injection` query, originally contributed to the experimental query pack by @jorgectf, has been promoted to the main query pack. This query finds instances of cookies being set without the `Secure`, `HttpOnly`, or `SameSite` attributes set to secure values. \ No newline at end of file +## 1.2.0 + +### New Queries + +* The `py/cookie-injection` query, originally contributed to the experimental query pack by @jorgectf, has been promoted to the main query pack. This query finds instances of cookies being set without the `Secure`, `HttpOnly`, or `SameSite` attributes set to secure values. diff --git a/python/ql/src/codeql-pack.release.yml b/python/ql/src/codeql-pack.release.yml index 2ac15439f56..75430e73d1c 100644 --- a/python/ql/src/codeql-pack.release.yml +++ b/python/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.1.0 +lastReleaseVersion: 1.2.0 diff --git a/python/ql/src/experimental/Security/CWE-346/CorsBad.py b/python/ql/src/experimental/Security/CWE-346/CorsBad.py new file mode 100644 index 00000000000..74bd721b8ca --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-346/CorsBad.py @@ -0,0 +1,9 @@ +import cherrypy + +def bad(): + request = cherrypy.request + validCors = "domain.com" + if request.method in ['POST', 'PUT', 'PATCH', 'DELETE']: + origin = request.headers.get('Origin', None) + if origin.startswith(validCors): + print("Origin Valid") \ No newline at end of file diff --git a/python/ql/src/experimental/Security/CWE-346/CorsBypass.qhelp b/python/ql/src/experimental/Security/CWE-346/CorsBypass.qhelp new file mode 100644 index 00000000000..5082fcc23aa --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-346/CorsBypass.qhelp @@ -0,0 +1,28 @@ + + + +

Cross-origin resource sharing policy may be bypassed due to incorrect checks like the string.startswith call.

+
+ +

Use a more stronger check to test for CORS policy bypass.

+
+ + +

Most Python frameworks provide a mechanism for testing origins and performing CORS checks. + For example, consider the code snippet below, origin is compared using a + startswith call against a list of whitelisted origins. This check can be bypassed + easily by origin like domain.com.baddomain.com +

+ +

This can be prevented by comparing the origin in a manner shown below. +

+ + +
+ + +
  • PortsSwigger : Cross-origin resource + sharing (CORS)
  • +
  • Related CVE: CVE-2022-3457.
  • +
    +
    \ No newline at end of file diff --git a/python/ql/src/experimental/Security/CWE-346/CorsBypass.ql b/python/ql/src/experimental/Security/CWE-346/CorsBypass.ql new file mode 100644 index 00000000000..4b79b97ff4a --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-346/CorsBypass.ql @@ -0,0 +1,97 @@ +/** + * @name Cross Origin Resource Sharing(CORS) Policy Bypass + * @description Checking user supplied origin headers using weak comparators like 'string.startswith' may lead to CORS policy bypass. + * @kind path-problem + * @problem.severity warning + * @id py/cors-bypass + * @tags security + * externa/cwe/CWE-346 + */ + +import python +import semmle.python.ApiGraphs +import semmle.python.dataflow.new.TaintTracking +import semmle.python.Flow +import semmle.python.dataflow.new.RemoteFlowSources + +/** + * Returns true if the control flow node may be useful in the current context. + * + * Ideally for more completeness, we should alert on every `startswith` call and every remote flow source which gets partailly checked. But, as this can lead to lots of FPs, we apply heuristics to filter some calls. This predicate provides logic for this filteration. + */ +private predicate maybeInteresting(ControlFlowNode c) { + // Check if the name of the variable which calls the function matches the heuristic. + // This would typically occur at the sink. + // This should deal with cases like + // `origin.startswith("bla")` + heuristics(c.(CallNode).getFunction().(AttrNode).getObject().(NameNode).getId()) + or + // Check if the name of the variable passed as an argument to the functions matches the heuristic. This would typically occur at the sink. + // This should deal with cases like + // `bla.startswith(origin)` + heuristics(c.(CallNode).getArg(0).(NameNode).getId()) + or + // Check if the value gets written to any interesting variable. This would typically occur at the source. + // This should deal with cases like + // `origin = request.headers.get('My-custom-header')` + exists(Variable v | heuristics(v.getId()) | c.getASuccessor*().getNode() = v.getAStore()) +} + +private class StringStartswithCall extends ControlFlowNode { + StringStartswithCall() { this.(CallNode).getFunction().(AttrNode).getName() = "startswith" } +} + +bindingset[s] +predicate heuristics(string s) { s.matches(["%origin%", "%cors%"]) } + +/** + * A member of the `cherrypy.request` class taken as a `RemoteFlowSource`. + */ +class CherryPyRequest extends RemoteFlowSource::Range { + CherryPyRequest() { + this = + API::moduleImport("cherrypy") + .getMember("request") + .getMember([ + "charset", "content_type", "filename", "fp", "name", "params", "headers", "length", + ]) + .asSource() + } + + override string getSourceType() { result = "cherrypy.request" } +} + +module CorsBypassConfig implements DataFlow::ConfigSig { + predicate isSource(DataFlow::Node node) { node instanceof RemoteFlowSource } + + predicate isSink(DataFlow::Node node) { + exists(StringStartswithCall s | + node.asCfgNode() = s.(CallNode).getArg(0) or + node.asCfgNode() = s.(CallNode).getFunction().(AttrNode).getObject() + ) + } + + predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) { + exists(API::CallNode c, API::Node n | + n = API::moduleImport("cherrypy").getMember("request").getMember("headers") and + c = n.getMember("get").getACall() + | + c.getReturn().asSource() = node2 and n.asSource() = node1 + ) + } +} + +module CorsFlow = TaintTracking::Global; + +import CorsFlow::PathGraph + +from CorsFlow::PathNode source, CorsFlow::PathNode sink +where + CorsFlow::flowPath(source, sink) and + ( + maybeInteresting(source.getNode().asCfgNode()) + or + maybeInteresting(sink.getNode().asCfgNode()) + ) +select sink, source, sink, + "Potentially incorrect string comparison which could lead to a CORS bypass." diff --git a/python/ql/src/experimental/Security/CWE-346/CorsGood.py b/python/ql/src/experimental/Security/CWE-346/CorsGood.py new file mode 100644 index 00000000000..7cd4039c0c3 --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-346/CorsGood.py @@ -0,0 +1,9 @@ +import cherrypy + +def good(): + request = cherrypy.request + validOrigin = "domain.com" + if request.method in ['POST', 'PUT', 'PATCH', 'DELETE']: + origin = request.headers.get('Origin', None) + if origin == validOrigin: + print("Origin Valid") \ No newline at end of file diff --git a/python/ql/src/experimental/semmle/python/Concepts.qll b/python/ql/src/experimental/semmle/python/Concepts.qll index d9bb9797c63..0e4bd6441e9 100644 --- a/python/ql/src/experimental/semmle/python/Concepts.qll +++ b/python/ql/src/experimental/semmle/python/Concepts.qll @@ -188,9 +188,6 @@ module LdapBind { * Holds if the binding process use SSL. */ abstract predicate useSsl(); - - /** DEPRECATED: Alias for useSsl */ - deprecated predicate useSSL() { this.useSsl() } } } @@ -215,9 +212,6 @@ class LdapBind extends DataFlow::Node instanceof LdapBind::Range { * Holds if the binding process use SSL. */ predicate useSsl() { super.useSsl() } - - /** DEPRECATED: Alias for useSsl */ - deprecated predicate useSSL() { this.useSsl() } } /** Provides classes for modeling SQL sanitization libraries. */ diff --git a/python/ql/src/qlpack.yml b/python/ql/src/qlpack.yml index d244f5dd13d..5352607aa77 100644 --- a/python/ql/src/qlpack.yml +++ b/python/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-queries -version: 1.1.1-dev +version: 1.2.1-dev groups: - python - queries diff --git a/python/ql/test/experimental/query-tests/Security/CWE-346/Cors.py b/python/ql/test/experimental/query-tests/Security/CWE-346/Cors.py new file mode 100644 index 00000000000..cc12e1273fb --- /dev/null +++ b/python/ql/test/experimental/query-tests/Security/CWE-346/Cors.py @@ -0,0 +1,17 @@ +import cherrypy + +def bad(): + request = cherrypy.request + validCors = "domain.com" + if request.method in ['POST', 'PUT', 'PATCH', 'DELETE']: + origin = request.headers.get('Origin', None) + if origin.startswith(validCors): + print("Origin Valid") + +def good(): + request = cherrypy.request + validOrigin = "domain.com" + if request.method in ['POST', 'PUT', 'PATCH', 'DELETE']: + origin = request.headers.get('Origin', None) + if origin == validOrigin: + print("Origin Valid") \ No newline at end of file diff --git a/python/ql/test/experimental/query-tests/Security/CWE-346/CorsBypass.expected b/python/ql/test/experimental/query-tests/Security/CWE-346/CorsBypass.expected new file mode 100644 index 00000000000..32d807c6f6e --- /dev/null +++ b/python/ql/test/experimental/query-tests/Security/CWE-346/CorsBypass.expected @@ -0,0 +1,13 @@ +edges +| Cors.py:7:9:7:14 | ControlFlowNode for origin | Cors.py:8:12:8:17 | ControlFlowNode for origin | provenance | | +| Cors.py:7:18:7:32 | ControlFlowNode for Attribute | Cors.py:7:18:7:52 | ControlFlowNode for Attribute() | provenance | Config | +| Cors.py:7:18:7:32 | ControlFlowNode for Attribute | Cors.py:7:18:7:52 | ControlFlowNode for Attribute() | provenance | dict.get | +| Cors.py:7:18:7:52 | ControlFlowNode for Attribute() | Cors.py:7:9:7:14 | ControlFlowNode for origin | provenance | | +nodes +| Cors.py:7:9:7:14 | ControlFlowNode for origin | semmle.label | ControlFlowNode for origin | +| Cors.py:7:18:7:32 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| Cors.py:7:18:7:52 | ControlFlowNode for Attribute() | semmle.label | ControlFlowNode for Attribute() | +| Cors.py:8:12:8:17 | ControlFlowNode for origin | semmle.label | ControlFlowNode for origin | +subpaths +#select +| Cors.py:8:12:8:17 | ControlFlowNode for origin | Cors.py:7:18:7:32 | ControlFlowNode for Attribute | Cors.py:8:12:8:17 | ControlFlowNode for origin | Potentially incorrect string comparison which could lead to a CORS bypass. | diff --git a/python/ql/test/experimental/query-tests/Security/CWE-346/CorsBypass.qlref b/python/ql/test/experimental/query-tests/Security/CWE-346/CorsBypass.qlref new file mode 100644 index 00000000000..b652fd93088 --- /dev/null +++ b/python/ql/test/experimental/query-tests/Security/CWE-346/CorsBypass.qlref @@ -0,0 +1 @@ +experimental/Security/CWE-346/CorsBypass.ql \ No newline at end of file diff --git a/ql/Cargo.lock b/ql/Cargo.lock index ed04a4a8553..67a3f78fb41 100644 --- a/ql/Cargo.lock +++ b/ql/Cargo.lock @@ -121,9 +121,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.98" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -700,14 +703,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick 1.0.1", "memchr", "regex-automata 0.4.4", - "regex-syntax 0.8.2", + "regex-syntax 0.8.4", ] [[package]] @@ -727,7 +730,7 @@ checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" dependencies = [ "aho-corasick 1.0.1", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.4", ] [[package]] @@ -738,9 +741,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rustix" @@ -814,6 +817,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "smallvec" version = "1.10.0" @@ -930,12 +939,14 @@ dependencies = [ [[package]] name = "tree-sitter" -version = "0.22.6" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df7cc499ceadd4dcdf7ec6d4cbc34ece92c3fa07821e287aedecd4416c516dca" +checksum = "20f4cd3642c47a85052a887d86704f4eac272969f61b686bdd3f772122aabaff" dependencies = [ "cc", "regex", + "regex-syntax 0.8.4", + "tree-sitter-language", ] [[package]] @@ -944,33 +955,40 @@ version = "0.0.1" dependencies = [ "cc", "tree-sitter", + "tree-sitter-language", ] [[package]] name = "tree-sitter-json" -version = "0.21.0" -source = "git+https://github.com/tree-sitter/tree-sitter-json.git?rev=94f5c527b2965465956c2000ed6134dd24daf2a7#94f5c527b2965465956c2000ed6134dd24daf2a7" +version = "0.23.0" +source = "git+https://github.com/tree-sitter/tree-sitter-json.git?rev=8bfdb43f47ad805bb1ce093203cfcbaa8ed2c571#8bfdb43f47ad805bb1ce093203cfcbaa8ed2c571" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] +[[package]] +name = "tree-sitter-language" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2545046bd1473dac6c626659cc2567c6c0ff302fc8b84a56c4243378276f7f57" + [[package]] name = "tree-sitter-ql" -version = "0.22.5" -source = "git+https://github.com/tree-sitter/tree-sitter-ql.git?rev=fa5c3821dd2161f5c8528a8cbdb258daa6dc4de6#fa5c3821dd2161f5c8528a8cbdb258daa6dc4de6" +version = "0.23.0" +source = "git+https://github.com/tree-sitter/tree-sitter-ql.git?rev=c73c31c89cb0019ef56fe8bc1723e7c36e0be607#c73c31c89cb0019ef56fe8bc1723e7c36e0be607" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] [[package]] name = "tree-sitter-ql-dbscheme" -version = "0.0.1" -source = "git+https://github.com/tree-sitter/tree-sitter-ql-dbscheme.git?rev=5f770f57fa415607ff50e3d237d47c8f11440eb3#5f770f57fa415607ff50e3d237d47c8f11440eb3" +version = "0.23.0" +source = "git+https://github.com/tree-sitter/tree-sitter-ql-dbscheme.git?rev=1980b4b6998a1138d326f863e6168f0f2c0c544d#1980b4b6998a1138d326f863e6168f0f2c0c544d" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] [[package]] diff --git a/ql/buramu/Cargo.toml b/ql/buramu/Cargo.toml index 741a9bc4337..03fdb49116a 100644 --- a/ql/buramu/Cargo.toml +++ b/ql/buramu/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "buramu" version = "0.1.0" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/ql/buramu/tree-sitter-blame/Cargo.toml b/ql/buramu/tree-sitter-blame/Cargo.toml index 9ff12014224..f48145488a3 100644 --- a/ql/buramu/tree-sitter-blame/Cargo.toml +++ b/ql/buramu/tree-sitter-blame/Cargo.toml @@ -5,7 +5,7 @@ version = "0.0.1" keywords = ["incremental", "parsing", "blame"] categories = ["parsing", "text-editors"] repository = "https://github.com/tree-sitter/tree-sitter-blame" -edition = "2018" +edition = "2021" license = "MIT" build = "bindings/rust/build.rs" @@ -20,10 +20,8 @@ include = [ path = "bindings/rust/lib.rs" [dependencies] -tree-sitter = ">= 0.22.6" +tree-sitter-language = "0.1.0" +tree-sitter = ">= 0.23" [build-dependencies] cc = "1.0" - -[patch.crates-io] -tree-sitter = {git = "https://github.com/redsun82/tree-sitter.git", rev = "1f5c1112ceaa8fc6aff61d1852690407670d2a96"} diff --git a/ql/buramu/tree-sitter-blame/binding.gyp b/ql/buramu/tree-sitter-blame/binding.gyp index d6cc395af07..27f3613f039 100644 --- a/ql/buramu/tree-sitter-blame/binding.gyp +++ b/ql/buramu/tree-sitter-blame/binding.gyp @@ -2,18 +2,29 @@ "targets": [ { "target_name": "tree_sitter_blame_binding", + "dependencies": [ + " -#include "nan.h" +#include -using namespace v8; +typedef struct TSLanguage TSLanguage; -extern "C" TSLanguage * tree_sitter_blame(); +extern "C" TSLanguage *tree_sitter_blame(); -namespace { +// "tree-sitter", "language" hashed with BLAKE2 +const napi_type_tag LANGUAGE_TYPE_TAG = { + 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16 +}; -NAN_METHOD(New) {} - -void Init(Local exports, Local module) { - Local tpl = Nan::New(New); - tpl->SetClassName(Nan::New("Language").ToLocalChecked()); - tpl->InstanceTemplate()->SetInternalFieldCount(1); - - Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); - Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); - Nan::SetInternalFieldPointer(instance, 0, tree_sitter_blame()); - - Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("blame").ToLocalChecked()); - Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); +Napi::Object Init(Napi::Env env, Napi::Object exports) { + exports["name"] = Napi::String::New(env, "blame"); + auto language = Napi::External::New(env, tree_sitter_blame()); + language.TypeTag(&LANGUAGE_TYPE_TAG); + exports["language"] = language; + return exports; } -NODE_MODULE(tree_sitter_blame_binding, Init) - -} // namespace +NODE_API_MODULE(tree_sitter_blame_binding, Init) diff --git a/ql/buramu/tree-sitter-blame/bindings/node/index.js b/ql/buramu/tree-sitter-blame/bindings/node/index.js index 23af3bb321c..6657bcf42de 100644 --- a/ql/buramu/tree-sitter-blame/bindings/node/index.js +++ b/ql/buramu/tree-sitter-blame/bindings/node/index.js @@ -1,18 +1,6 @@ -try { - module.exports = require("../../build/Release/tree_sitter_blame_binding"); -} catch (error1) { - if (error1.code !== 'MODULE_NOT_FOUND') { - throw error1; - } - try { - module.exports = require("../../build/Debug/tree_sitter_blame_binding"); - } catch (error2) { - if (error2.code !== 'MODULE_NOT_FOUND') { - throw error2; - } - throw error1 - } -} +const root = require("path").join(__dirname, "..", ".."); + +module.exports = require("node-gyp-build")(root); try { module.exports.nodeTypeInfo = require("../../src/node-types.json"); diff --git a/ql/buramu/tree-sitter-blame/bindings/rust/build.rs b/ql/buramu/tree-sitter-blame/bindings/rust/build.rs index c6061f09953..4cc26f5e0f8 100644 --- a/ql/buramu/tree-sitter-blame/bindings/rust/build.rs +++ b/ql/buramu/tree-sitter-blame/bindings/rust/build.rs @@ -7,6 +7,9 @@ fn main() { .flag_if_supported("-Wno-unused-parameter") .flag_if_supported("-Wno-unused-but-set-variable") .flag_if_supported("-Wno-trigraphs"); + #[cfg(target_env = "msvc")] + c_config.flag("-utf-8"); + let parser_path = src_dir.join("parser.c"); c_config.file(&parser_path); diff --git a/ql/buramu/tree-sitter-blame/bindings/rust/lib.rs b/ql/buramu/tree-sitter-blame/bindings/rust/lib.rs index 268243b164f..6a0362de7d7 100644 --- a/ql/buramu/tree-sitter-blame/bindings/rust/lib.rs +++ b/ql/buramu/tree-sitter-blame/bindings/rust/lib.rs @@ -1,13 +1,18 @@ -//! This crate provides blame language support for the [tree-sitter][] parsing library. +//! This crate provides Blame language support for the [tree-sitter][] parsing library. //! //! Typically, you will use the [language][language func] function to add this language to a //! tree-sitter [Parser][], and then use the parser to parse some code: //! -//! ``` -//! let code = ""; +//! ```ignore +//! let code = r#" +//! "#; //! let mut parser = tree_sitter::Parser::new(); -//! parser.set_language(tree_sitter_blame::language()).expect("Error loading blame grammar"); +//! let language = tree_sitter_blame::LANGUAGE; +//! parser +//! .set_language(&language.into()) +//! .expect("Error loading Blame parser"); // fails for some reason, so code block is ignored for now //! let tree = parser.parse(code, None).unwrap(); +//! assert!(!tree.root_node().has_error()); //! ``` //! //! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html @@ -15,30 +20,26 @@ //! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html //! [tree-sitter]: https://tree-sitter.github.io/ -use tree_sitter::Language; +use tree_sitter_language::LanguageFn; extern "C" { - fn tree_sitter_blame() -> Language; + fn tree_sitter_blame() -> *const (); } -/// Get the tree-sitter [Language][] for this grammar. -/// -/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html -pub fn language() -> Language { - unsafe { tree_sitter_blame() } -} +/// The tree-sitter [`LanguageFn`] for this grammar. +pub const LANGUAGE: LanguageFn = unsafe { LanguageFn::from_raw(tree_sitter_blame) }; /// The content of the [`node-types.json`][] file for this grammar. /// /// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types -pub const NODE_TYPES: &'static str = include_str!("../../src/node-types.json"); +pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); -// Uncomment these to include any queries that this grammar contains +// NOTE: uncomment these to include any queries that this grammar contains: -// pub const HIGHLIGHTS_QUERY: &'static str = include_str!("../../queries/highlights.scm"); -// pub const INJECTIONS_QUERY: &'static str = include_str!("../../queries/injections.scm"); -// pub const LOCALS_QUERY: &'static str = include_str!("../../queries/locals.scm"); -// pub const TAGS_QUERY: &'static str = include_str!("../../queries/tags.scm"); +// pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm"); +// pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm"); +// pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm"); +// pub const TAGS_QUERY: &str = include_str!("../../queries/tags.scm"); #[cfg(test)] mod tests { @@ -46,7 +47,7 @@ mod tests { fn test_can_load_grammar() { let mut parser = tree_sitter::Parser::new(); parser - .set_language(super::language()) - .expect("Error loading blame language"); + .set_language(&super::LANGUAGE.into()) + .expect("Error loading Blame parser"); } } diff --git a/ql/buramu/tree-sitter-blame/package.json b/ql/buramu/tree-sitter-blame/package.json index f9517c74da5..ace46ffbf7c 100644 --- a/ql/buramu/tree-sitter-blame/package.json +++ b/ql/buramu/tree-sitter-blame/package.json @@ -3,17 +3,46 @@ "version": "0.0.1", "description": "blame grammar for tree-sitter", "main": "bindings/node", + "types": "bindings/node", "keywords": [ "parsing", "incremental" ], + "files": [ + "grammar.js", + "binding.gyp", + "prebuilds/**", + "bindings/node/*", + "queries/*", + "src/**", + "*.wasm" + ], "dependencies": { - "nan": "^2.12.1" + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.8.1" + }, + "peerDependencies": { + "tree-sitter": "^0.23.0" + }, + "peerDependenciesMeta": { + "tree_sitter": { + "optional": true + } }, "devDependencies": { - "tree-sitter-cli": "^0.20.7" + "tree-sitter-cli": "^0.23.0", + "prebuildify": "^6.0.1" }, "scripts": { - "test": "tree-sitter test" - } -} + "install": "node-gyp-build", + "prestart": "tree-sitter build --wasm", + "start": "tree-sitter playground", + "test": "node --test bindings/node/*_test.js" + }, + "tree-sitter": [ + { + "scope": "source.blame", + "injection-regex": "^blame$" + } + ] +} \ No newline at end of file diff --git a/ql/buramu/tree-sitter-blame/src/grammar.json b/ql/buramu/tree-sitter-blame/src/grammar.json index 9001554fd16..d1a31f01200 100644 --- a/ql/buramu/tree-sitter-blame/src/grammar.json +++ b/ql/buramu/tree-sitter-blame/src/grammar.json @@ -123,4 +123,3 @@ "inline": [], "supertypes": [] } - diff --git a/ql/buramu/tree-sitter-blame/src/parser.c b/ql/buramu/tree-sitter-blame/src/parser.c index 4803597f566..364bc16c8b3 100644 --- a/ql/buramu/tree-sitter-blame/src/parser.c +++ b/ql/buramu/tree-sitter-blame/src/parser.c @@ -1,7 +1,6 @@ -#include +#include "tree_sitter/parser.h" #if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif @@ -16,7 +15,7 @@ #define MAX_ALIAS_SEQUENCE_LENGTH 4 #define PRODUCTION_ID_COUNT 14 -enum { +enum ts_symbol_identifiers { anon_sym_today_COLON = 1, anon_sym_file_COLON = 2, anon_sym_LF = 3, @@ -132,7 +131,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { }, }; -enum { +enum ts_field_identifiers { field_blame_entry = 1, field_date = 2, field_file_entry = 3, @@ -242,26 +241,21 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == 'f') ADVANCE(18); if (lookahead == 'l') ADVANCE(10); if (lookahead == 't') ADVANCE(23); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(0) + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(0); if (('0' <= lookahead && lookahead <= '9')) ADVANCE(48); END_STATE(); case 1: if (lookahead == '\n') ADVANCE(40); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') SKIP(1) + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(1); END_STATE(); case 2: if (lookahead == ' ') ADVANCE(39); END_STATE(); case 3: if (lookahead == ' ') ADVANCE(43); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r') SKIP(3) + if (('\t' <= lookahead && lookahead <= '\r')) SKIP(3); if (('-' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || @@ -340,10 +334,8 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == 'y') ADVANCE(7); END_STATE(); case 28: - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(28) + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(28); if (('0' <= lookahead && lookahead <= '9')) ADVANCE(35); END_STATE(); case 29: @@ -371,10 +363,8 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (eof) ADVANCE(37); if (lookahead == 'f') ADVANCE(18); if (lookahead == 'l') ADVANCE(10); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(36) + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(36); if (('0' <= lookahead && lookahead <= '9')) ADVANCE(49); END_STATE(); case 37: @@ -623,25 +613,25 @@ static const TSParseActionEntry ts_parse_actions[] = { [0] = {.entry = {.count = 0, .reusable = false}}, [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), - [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_file_entry, 3, .production_id = 6), + [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_file_entry, 3, 0, 6), [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [9] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_file_entry, 4, .production_id = 8), - [11] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_blame_entry, 2, .production_id = 9), + [9] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_file_entry, 4, 0, 8), + [11] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_blame_entry, 2, 0, 9), [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [15] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_file_entry_repeat1, 2, .production_id = 10), - [17] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_entry_repeat1, 2, .production_id = 10), SHIFT_REPEAT(19), - [20] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_blame_entry, 3, .production_id = 12), - [22] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_blame_entry_repeat1, 2, .production_id = 13), - [24] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_blame_entry_repeat1, 2, .production_id = 13), SHIFT_REPEAT(11), - [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_blame_info, 1, .production_id = 1), + [15] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_file_entry_repeat1, 2, 0, 10), + [17] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_entry_repeat1, 2, 0, 10), SHIFT_REPEAT(19), + [20] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_blame_entry, 3, 0, 12), + [22] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_blame_entry_repeat1, 2, 0, 13), + [24] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_blame_entry_repeat1, 2, 0, 13), SHIFT_REPEAT(11), + [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_blame_info, 1, 0, 1), [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), - [31] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_blame_info, 2, .production_id = 4), - [33] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_blame_info_repeat1, 2, .production_id = 5), - [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_blame_info_repeat1, 2, .production_id = 5), SHIFT_REPEAT(17), - [38] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_blame_entry_repeat1, 1, .production_id = 11), - [40] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_file_entry_repeat1, 1, .production_id = 7), - [42] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__today, 2, .production_id = 2), - [44] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_blame_info_repeat1, 1, .production_id = 3), + [31] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_blame_info, 2, 0, 4), + [33] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_blame_info_repeat1, 2, 0, 5), + [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_blame_info_repeat1, 2, 0, 5), SHIFT_REPEAT(17), + [38] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_blame_entry_repeat1, 1, 0, 11), + [40] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_file_entry_repeat1, 1, 0, 7), + [42] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__today, 2, 0, 2), + [44] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_blame_info_repeat1, 1, 0, 3), [46] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), [48] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), [50] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), @@ -652,11 +642,15 @@ static const TSParseActionEntry ts_parse_actions[] = { #ifdef __cplusplus extern "C" { #endif -#ifdef _WIN32 -#define extern __declspec(dllexport) +#ifdef TREE_SITTER_HIDE_SYMBOLS +#define TS_PUBLIC +#elif defined(_WIN32) +#define TS_PUBLIC __declspec(dllexport) +#else +#define TS_PUBLIC __attribute__((visibility("default"))) #endif -extern const TSLanguage *tree_sitter_blame(void) { +TS_PUBLIC const TSLanguage *tree_sitter_blame(void) { static const TSLanguage language = { .version = LANGUAGE_VERSION, .symbol_count = SYMBOL_COUNT, diff --git a/ql/buramu/tree-sitter-blame/src/tree_sitter/parser.h b/ql/buramu/tree-sitter-blame/src/tree_sitter/parser.h index 2b14ac1046b..799f599bd4e 100644 --- a/ql/buramu/tree-sitter-blame/src/tree_sitter/parser.h +++ b/ql/buramu/tree-sitter-blame/src/tree_sitter/parser.h @@ -13,9 +13,8 @@ extern "C" { #define ts_builtin_sym_end 0 #define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 -typedef uint16_t TSStateId; - #ifndef TREE_SITTER_API_H_ +typedef uint16_t TSStateId; typedef uint16_t TSSymbol; typedef uint16_t TSFieldId; typedef struct TSLanguage TSLanguage; @@ -48,6 +47,7 @@ struct TSLexer { uint32_t (*get_column)(TSLexer *); bool (*is_at_included_range_start)(const TSLexer *); bool (*eof)(const TSLexer *); + void (*log)(const TSLexer *, const char *, ...); }; typedef enum { @@ -87,6 +87,11 @@ typedef union { } entry; } TSParseActionEntry; +typedef struct { + int32_t start; + int32_t end; +} TSCharacterRange; + struct TSLanguage { uint32_t version; uint32_t symbol_count; @@ -126,13 +131,38 @@ struct TSLanguage { const TSStateId *primary_state_ids; }; +static inline bool set_contains(TSCharacterRange *ranges, uint32_t len, int32_t lookahead) { + uint32_t index = 0; + uint32_t size = len - index; + while (size > 1) { + uint32_t half_size = size / 2; + uint32_t mid_index = index + half_size; + TSCharacterRange *range = &ranges[mid_index]; + if (lookahead >= range->start && lookahead <= range->end) { + return true; + } else if (lookahead > range->end) { + index = mid_index; + } + size -= half_size; + } + TSCharacterRange *range = &ranges[index]; + return (lookahead >= range->start && lookahead <= range->end); +} + /* * Lexer Macros */ +#ifdef _MSC_VER +#define UNUSED __pragma(warning(suppress : 4101)) +#else +#define UNUSED __attribute__((unused)) +#endif + #define START_LEXER() \ bool result = false; \ bool skip = false; \ + UNUSED \ bool eof = false; \ int32_t lookahead; \ goto start; \ @@ -148,6 +178,17 @@ struct TSLanguage { goto next_state; \ } +#define ADVANCE_MAP(...) \ + { \ + static const uint16_t map[] = { __VA_ARGS__ }; \ + for (uint32_t i = 0; i < sizeof(map) / sizeof(map[0]); i += 2) { \ + if (map[i] == lookahead) { \ + state = map[i + 1]; \ + goto next_state; \ + } \ + } \ + } + #define SKIP(state_value) \ { \ skip = true; \ @@ -166,7 +207,7 @@ struct TSLanguage { * Parse Table Macros */ -#define SMALL_STATE(id) id - LARGE_STATE_COUNT +#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT) #define STATE(id) id @@ -176,7 +217,7 @@ struct TSLanguage { {{ \ .shift = { \ .type = TSParseActionTypeShift, \ - .state = state_value \ + .state = (state_value) \ } \ }} @@ -184,7 +225,7 @@ struct TSLanguage { {{ \ .shift = { \ .type = TSParseActionTypeShift, \ - .state = state_value, \ + .state = (state_value), \ .repetition = true \ } \ }} @@ -197,14 +238,15 @@ struct TSLanguage { } \ }} -#define REDUCE(symbol_val, child_count_val, ...) \ - {{ \ - .reduce = { \ - .type = TSParseActionTypeReduce, \ - .symbol = symbol_val, \ - .child_count = child_count_val, \ - __VA_ARGS__ \ - }, \ +#define REDUCE(symbol_name, children, precedence, prod_id) \ + {{ \ + .reduce = { \ + .type = TSParseActionTypeReduce, \ + .symbol = symbol_name, \ + .child_count = children, \ + .dynamic_precedence = precedence, \ + .production_id = prod_id \ + }, \ }} #define RECOVER() \ diff --git a/ql/extractor/Cargo.toml b/ql/extractor/Cargo.toml index 6f0e6e11f08..637a4bf5f3b 100644 --- a/ql/extractor/Cargo.toml +++ b/ql/extractor/Cargo.toml @@ -7,17 +7,14 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tree-sitter = ">= 0.22.6" -tree-sitter-ql = { git = "https://github.com/tree-sitter/tree-sitter-ql.git", rev = "fa5c3821dd2161f5c8528a8cbdb258daa6dc4de6"} -tree-sitter-ql-dbscheme = { git = "https://github.com/tree-sitter/tree-sitter-ql-dbscheme.git", rev = "5f770f57fa415607ff50e3d237d47c8f11440eb3"} +tree-sitter = ">= 0.23.0" +tree-sitter-ql = { git = "https://github.com/tree-sitter/tree-sitter-ql.git", rev = "c73c31c89cb0019ef56fe8bc1723e7c36e0be607"} +tree-sitter-ql-dbscheme = { git = "https://github.com/tree-sitter/tree-sitter-ql-dbscheme.git", rev = "1980b4b6998a1138d326f863e6168f0f2c0c544d"} tree-sitter-blame = {path = "../buramu/tree-sitter-blame"} -tree-sitter-json = {git = "https://github.com/tree-sitter/tree-sitter-json.git", rev = "94f5c527b2965465956c2000ed6134dd24daf2a7"} +tree-sitter-json = {git = "https://github.com/tree-sitter/tree-sitter-json.git", rev = "8bfdb43f47ad805bb1ce093203cfcbaa8ed2c571"} clap = { version = "4.2", features = ["derive"] } tracing = "0.1" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } rayon = "1.9.0" regex = "1.10.4" codeql-extractor = { path = "../../shared/tree-sitter-extractor" } - -[patch.crates-io] -tree-sitter = {git = "https://github.com/redsun82/tree-sitter.git", rev = "1f5c1112ceaa8fc6aff61d1852690407670d2a96"} diff --git a/ql/extractor/src/extractor.rs b/ql/extractor/src/extractor.rs index b50cae32a01..8383d8424ee 100644 --- a/ql/extractor/src/extractor.rs +++ b/ql/extractor/src/extractor.rs @@ -27,25 +27,25 @@ pub fn run(options: Options) -> std::io::Result<()> { languages: vec![ simple::LanguageSpec { prefix: "ql", - ts_language: tree_sitter_ql::language(), + ts_language: tree_sitter_ql::LANGUAGE.into(), node_types: tree_sitter_ql::NODE_TYPES, file_globs: vec!["*.ql".into(), "*.qll".into()], }, simple::LanguageSpec { prefix: "dbscheme", - ts_language: tree_sitter_ql_dbscheme::language(), + ts_language: tree_sitter_ql_dbscheme::LANGUAGE.into(), node_types: tree_sitter_ql_dbscheme::NODE_TYPES, file_globs: vec!["*.dbscheme".into()], }, simple::LanguageSpec { prefix: "json", - ts_language: tree_sitter_json::language(), + ts_language: tree_sitter_json::LANGUAGE.into(), node_types: tree_sitter_json::NODE_TYPES, file_globs: vec!["*.json".into(), "*.jsonl".into(), "*.jsonc".into()], }, simple::LanguageSpec { prefix: "blame", - ts_language: tree_sitter_blame::language(), + ts_language: tree_sitter_blame::LANGUAGE.into(), node_types: tree_sitter_blame::NODE_TYPES, file_globs: vec!["*.blame".into()], }, diff --git a/ruby/extractor/Cargo.lock b/ruby/extractor/Cargo.lock index 95f32d9b610..d32d1bd6981 100644 --- a/ruby/extractor/Cargo.lock +++ b/ruby/extractor/Cargo.lock @@ -105,9 +105,12 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "cc" -version = "1.0.98" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -356,7 +359,7 @@ dependencies = [ "bstr", "log", "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -580,14 +583,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -607,7 +610,7 @@ checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -618,9 +621,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "ryu" @@ -668,6 +671,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "smallvec" version = "1.13.2" @@ -764,47 +773,56 @@ dependencies = [ [[package]] name = "tree-sitter" -version = "0.22.6" -source = "git+https://github.com/redsun82/tree-sitter.git?rev=1f5c1112ceaa8fc6aff61d1852690407670d2a96#1f5c1112ceaa8fc6aff61d1852690407670d2a96" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20f4cd3642c47a85052a887d86704f4eac272969f61b686bdd3f772122aabaff" dependencies = [ "cc", "regex", + "regex-syntax 0.8.4", + "tree-sitter-language", ] [[package]] name = "tree-sitter-embedded-template" -version = "0.21.0" -source = "git+https://github.com/tree-sitter/tree-sitter-embedded-template.git?rev=38d5004a797298dc42c85e7706c5ceac46a3f29f#38d5004a797298dc42c85e7706c5ceac46a3f29f" +version = "0.23.0" +source = "git+https://github.com/tree-sitter/tree-sitter-embedded-template.git?rev=62b0a6e45900a7dff7c37da95fec20a09968ba52#62b0a6e45900a7dff7c37da95fec20a09968ba52" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] [[package]] name = "tree-sitter-json" -version = "0.21.0" -source = "git+https://github.com/tree-sitter/tree-sitter-json#94f5c527b2965465956c2000ed6134dd24daf2a7" +version = "0.23.0" +source = "git+https://github.com/tree-sitter/tree-sitter-json#8bfdb43f47ad805bb1ce093203cfcbaa8ed2c571" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] +[[package]] +name = "tree-sitter-language" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2545046bd1473dac6c626659cc2567c6c0ff302fc8b84a56c4243378276f7f57" + [[package]] name = "tree-sitter-ql" -version = "0.22.5" -source = "git+https://github.com/tree-sitter/tree-sitter-ql#42becd6f8f7bae82c818fa3abb1b6ff34b552310" +version = "0.23.0" +source = "git+https://github.com/tree-sitter/tree-sitter-ql#c73c31c89cb0019ef56fe8bc1723e7c36e0be607" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] [[package]] name = "tree-sitter-ruby" -version = "0.21.0" -source = "git+https://github.com/tree-sitter/tree-sitter-ruby.git?rev=0ffe457fb6aabf064f173fd30ea356845cef2513#0ffe457fb6aabf064f173fd30ea356845cef2513" +version = "0.23.0" +source = "git+https://github.com/tree-sitter/tree-sitter-ruby.git?rev=a66579f70d6f50ffd81a16fc3d3358e2ac173c88#a66579f70d6f50ffd81a16fc3d3358e2ac173c88" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] [[package]] diff --git a/ruby/extractor/Cargo.toml b/ruby/extractor/Cargo.toml index 39310785ec3..89e0d3cf9db 100644 --- a/ruby/extractor/Cargo.toml +++ b/ruby/extractor/Cargo.toml @@ -7,20 +7,17 @@ authors = ["GitHub"] edition = "2021" [dependencies] -tree-sitter = ">= 0.22.6" -tree-sitter-embedded-template = { git = "https://github.com/tree-sitter/tree-sitter-embedded-template.git", rev = "38d5004a797298dc42c85e7706c5ceac46a3f29f" } -tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "0ffe457fb6aabf064f173fd30ea356845cef2513" } +tree-sitter = ">= 0.23.0" +tree-sitter-embedded-template = { git = "https://github.com/tree-sitter/tree-sitter-embedded-template.git", rev = "62b0a6e45900a7dff7c37da95fec20a09968ba52" } +tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "a66579f70d6f50ffd81a16fc3d3358e2ac173c88" } clap = { version = "4.2", features = ["derive"] } tracing = "0.1" tracing-subscriber = { version = "0.3.3", features = ["env-filter"] } rayon = "1.5.0" regex = "1.7.1" encoding = "0.2" -lazy_static = "1.4.0" +lazy_static = "1.4.0" # Ideally, we'd like to pull this in via a relative path. # However, our bazel/rust tooling chokes on this, c.f. https://github.com/bazelbuild/rules_rust/issues/1525 # Therefore, we have a pretty bad hack in place instead, see README.md in the codeql-extractor-fake-crate directory. codeql-extractor = { path = "codeql-extractor-fake-crate" } - -[patch.crates-io] -tree-sitter = { git = "https://github.com/redsun82/tree-sitter.git", rev = "1f5c1112ceaa8fc6aff61d1852690407670d2a96" } diff --git a/ruby/extractor/codeql-extractor-fake-crate/Cargo.toml b/ruby/extractor/codeql-extractor-fake-crate/Cargo.toml index d51d64a3349..d7d1e0f37ab 100644 --- a/ruby/extractor/codeql-extractor-fake-crate/Cargo.toml +++ b/ruby/extractor/codeql-extractor-fake-crate/Cargo.toml @@ -7,7 +7,7 @@ authors = ["GitHub"] [dependencies] flate2 = "1.0" globset = "0.4" -tree-sitter = ">= 0.22.6" +tree-sitter = ">= 0.23.0" tracing = "0.1" tracing-subscriber = { version = "0.3.3", features = ["env-filter"] } rayon = "1.5.0" @@ -24,5 +24,3 @@ tree-sitter-ql = { git = "https://github.com/tree-sitter/tree-sitter-ql" } tree-sitter-json = {git = "https://github.com/tree-sitter/tree-sitter-json" } rand = "0.8.5" -[patch.crates-io] -tree-sitter = {git = "https://github.com/redsun82/tree-sitter.git", rev = "1f5c1112ceaa8fc6aff61d1852690407670d2a96"} diff --git a/ruby/extractor/src/extractor.rs b/ruby/extractor/src/extractor.rs index b32e2d58194..f1c272f1792 100644 --- a/ruby/extractor/src/extractor.rs +++ b/ruby/extractor/src/extractor.rs @@ -78,8 +78,8 @@ pub fn run(options: Options) -> std::io::Result<()> { let file_list = fs::File::open(file_paths::path_from_string(&options.file_list))?; - let language = tree_sitter_ruby::language(); - let erb = tree_sitter_embedded_template::language(); + let language: Language = tree_sitter_ruby::LANGUAGE.into(); + let erb: Language = tree_sitter_embedded_template::LANGUAGE.into(); // Look up tree-sitter kind ids now, to avoid string comparisons when scanning ERB files. let erb_directive_id = erb.id_for_node_kind("directive", true); let erb_output_directive_id = erb.id_for_node_kind("output_directive", true); diff --git a/ruby/ql/lib/CHANGELOG.md b/ruby/ql/lib/CHANGELOG.md index 4d575d4ef0f..d0d039c5bc6 100644 --- a/ruby/ql/lib/CHANGELOG.md +++ b/ruby/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/ruby/ql/lib/change-notes/2024-09-03-outdated-deprecations.md b/ruby/ql/lib/change-notes/2024-09-03-outdated-deprecations.md new file mode 100644 index 00000000000..7f7c3258fb8 --- /dev/null +++ b/ruby/ql/lib/change-notes/2024-09-03-outdated-deprecations.md @@ -0,0 +1,8 @@ +--- +category: breaking +--- +* Deleted the deprecated `getURL` predicate the `Http::Request` class, use `getAUrlPart` instead. +* Deleted the deprecated `getNode` predicate from the `CfgNode` class, use `getAstNode` instead. +* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration` instead. +* Deleted many deprecated dataflow configurations based on `DataFlow::Configuration`. +* Deleted many deprecated taint-tracking configurations based on `TaintTracking::Configuration`. diff --git a/ruby/ql/lib/change-notes/released/1.0.6.md b/ruby/ql/lib/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/ruby/ql/lib/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/ruby/ql/lib/codeql-pack.release.yml b/ruby/ql/lib/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/ruby/ql/lib/codeql-pack.release.yml +++ b/ruby/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/ruby/ql/lib/codeql/ruby/Concepts.qll b/ruby/ql/lib/codeql/ruby/Concepts.qll index 68a9eee8ff1..bd6faaacd69 100644 --- a/ruby/ql/lib/codeql/ruby/Concepts.qll +++ b/ruby/ql/lib/codeql/ruby/Concepts.qll @@ -693,14 +693,6 @@ module Http { class Request extends SC::Request instanceof Request::Range { /** Gets a node which returns the body of the response */ DataFlow::Node getResponseBody() { result = super.getResponseBody() } - - /** - * DEPRECATED: Use `getAUrlPart` instead. - * - * Gets a node that contributes to the URL of the request. - * Depending on the framework, a request may have multiple nodes which contribute to the URL. - */ - deprecated DataFlow::Node getURL() { result = Request::Range.super.getAUrlPart() } } /** Provides a class for modeling new HTTP requests. */ diff --git a/ruby/ql/lib/codeql/ruby/controlflow/ControlFlowGraph.qll b/ruby/ql/lib/codeql/ruby/controlflow/ControlFlowGraph.qll index 67f0f655794..dee31d8e901 100644 --- a/ruby/ql/lib/codeql/ruby/controlflow/ControlFlowGraph.qll +++ b/ruby/ql/lib/codeql/ruby/controlflow/ControlFlowGraph.qll @@ -40,9 +40,6 @@ class CfgNode extends CfgImpl::Node { /** Gets the file of this control flow node. */ final File getFile() { result = this.getLocation().getFile() } - /** DEPRECATED: Use `getAstNode` instead. */ - deprecated AstNode getNode() { result = this.getAstNode() } - /** Gets a successor node of a given type, if any. */ final CfgNode getASuccessor(SuccessorType t) { result = super.getASuccessor(t) } diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll index 3b1439511d1..359fa71744b 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl1.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll index 3b1439511d1..359fa71744b 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImpl2.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPublic.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPublic.qll index ee3105c3be7..c56501bad3e 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPublic.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPublic.qll @@ -1323,11 +1323,6 @@ class CallableNode extends StmtSequenceNode { * Gets a data flow node whose value is about to be returned by this callable. */ Node getAReturnNode() { result = getAReturnNode(callable) } - - /** - * DEPRECATED. Use `getAReturnNode` instead. - */ - deprecated Node getAReturningNode() { result = this.getAReturnNode() } } /** diff --git a/ruby/ql/lib/codeql/ruby/frameworks/Rack.qll b/ruby/ql/lib/codeql/ruby/frameworks/Rack.qll index 928a9f60a5f..27d30950ad7 100644 --- a/ruby/ql/lib/codeql/ruby/frameworks/Rack.qll +++ b/ruby/ql/lib/codeql/ruby/frameworks/Rack.qll @@ -10,7 +10,4 @@ module Rack { import rack.internal.Request import rack.internal.Response::Public as Response import rack.internal.Utils - - /** DEPRECATED: Alias for App::AppCandidate */ - deprecated class AppCandidate = App::AppCandidate; } diff --git a/ruby/ql/lib/codeql/ruby/frameworks/rack/internal/App.qll b/ruby/ql/lib/codeql/ruby/frameworks/rack/internal/App.qll index 94c4a6fb037..fbb33ecd64b 100644 --- a/ruby/ql/lib/codeql/ruby/frameworks/rack/internal/App.qll +++ b/ruby/ql/lib/codeql/ruby/frameworks/rack/internal/App.qll @@ -39,31 +39,6 @@ private RP::PotentialResponseNode trackRackResponse(PotentialRequestHandler call * Provides modeling for Rack applications. */ module App { - /** - * DEPRECATED: Use `RequestHandler` instead. - * A class that may be a rack application. - * This is a class that has a `call` method that takes a single argument - * (traditionally called `env`) and returns a rack-compatible response. - */ - deprecated class AppCandidate extends DataFlow::ClassNode { - private RequestHandler call; - private RP::PotentialResponseNode resp; - - AppCandidate() { - call = this.getInstanceMethod("call") and - call.getNumberOfParameters() = 1 and - resp = trackRackResponse(call) - } - - /** - * Gets the environment of the request, which is the lone parameter to the `call` method. - */ - DataFlow::ParameterNode getEnv() { result = call.getParameter(0) } - - /** Gets the response returned from a request to this application. */ - RP::PotentialResponseNode getResponse() { result = resp } - } - /** * A callable node that looks like it implements the rack specification. */ diff --git a/ruby/ql/lib/codeql/ruby/security/InsecureDownloadQuery.qll b/ruby/ql/lib/codeql/ruby/security/InsecureDownloadQuery.qll index 69fae550194..9e813209b53 100644 --- a/ruby/ql/lib/codeql/ruby/security/InsecureDownloadQuery.qll +++ b/ruby/ql/lib/codeql/ruby/security/InsecureDownloadQuery.qll @@ -10,28 +10,6 @@ private import codeql.ruby.AST private import codeql.ruby.DataFlow import InsecureDownloadCustomizations::InsecureDownload -/** - * A taint tracking configuration for download of sensitive file through insecure connection. - * - * DEPRECATED: Use `InsecureDownloadFlow`. - */ -deprecated class Configuration extends DataFlow::Configuration { - Configuration() { this = "InsecureDownload" } - - override predicate isSource(DataFlow::Node source, DataFlow::FlowState label) { - source.(Source).getALabel() = label - } - - override predicate isSink(DataFlow::Node sink, DataFlow::FlowState label) { - sink.(Sink).getALabel() = label - } - - override predicate isBarrier(DataFlow::Node node) { - super.isBarrier(node) or - node instanceof Sanitizer - } -} - private module InsecureDownloadConfig implements DataFlow::StateConfigSig { class FlowState = Label::State; diff --git a/ruby/ql/lib/codeql/ruby/security/StoredXSSQuery.qll b/ruby/ql/lib/codeql/ruby/security/StoredXSSQuery.qll index 7254d12b8fe..b6520fedf4f 100644 --- a/ruby/ql/lib/codeql/ruby/security/StoredXSSQuery.qll +++ b/ruby/ql/lib/codeql/ruby/security/StoredXSSQuery.qll @@ -17,29 +17,6 @@ import codeql.ruby.TaintTracking */ deprecated module StoredXss { import XSS::StoredXss - - /** - * DEPRECATED. - * - * A taint-tracking configuration for reasoning about Stored XSS. - */ - deprecated class Configuration extends TaintTracking::Configuration { - Configuration() { this = "StoredXss" } - - override predicate isSource(DataFlow::Node source) { source instanceof Source } - - override predicate isSink(DataFlow::Node sink) { sink instanceof Sink } - - override predicate isSanitizer(DataFlow::Node node) { - super.isSanitizer(node) or - node instanceof Sanitizer - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - isAdditionalXssTaintStep(node1, node2) - } - } - import TaintTracking::Global } diff --git a/ruby/ql/lib/codeql/ruby/security/internal/CleartextSources.qll b/ruby/ql/lib/codeql/ruby/security/internal/CleartextSources.qll index dc31b7f49ee..3338bbf65f7 100644 --- a/ruby/ql/lib/codeql/ruby/security/internal/CleartextSources.qll +++ b/ruby/ql/lib/codeql/ruby/security/internal/CleartextSources.qll @@ -289,17 +289,4 @@ module CleartextSources { override string describe() { result = "a call to " + name } } - - /** Holds if `nodeFrom` taints `nodeTo`. */ - deprecated predicate isAdditionalTaintStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { - exists(string name, ElementReference ref, LocalVariable hashVar | - // from `hsh[password] = "changeme"` to a `hsh[password]` read - nodeFrom.(HashKeyWriteSensitiveSource).getName() = name and - nodeTo.asExpr().getExpr() = ref and - ref.getArgument(0).getConstantValue().getStringlikeValue() = name and - nodeFrom.(HashKeyWriteSensitiveSource).getVariable() = hashVar and - ref.getReceiver().(VariableReadAccess).getVariable() = hashVar and - nodeFrom.asExpr().getASuccessor*() = nodeTo.asExpr() - ) - } } diff --git a/ruby/ql/lib/qlpack.yml b/ruby/ql/lib/qlpack.yml index ecda3a78e65..e4004ff3d55 100644 --- a/ruby/ql/lib/qlpack.yml +++ b/ruby/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-all -version: 1.0.6-dev +version: 1.0.7-dev groups: ruby extractor: ruby dbscheme: ruby.dbscheme diff --git a/ruby/ql/src/CHANGELOG.md b/ruby/ql/src/CHANGELOG.md index 37101f41c70..fc4544acada 100644 --- a/ruby/ql/src/CHANGELOG.md +++ b/ruby/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.1 + +No user-facing changes. + ## 1.1.0 ### New Queries diff --git a/ruby/ql/src/change-notes/released/1.1.1.md b/ruby/ql/src/change-notes/released/1.1.1.md new file mode 100644 index 00000000000..7fb56d36610 --- /dev/null +++ b/ruby/ql/src/change-notes/released/1.1.1.md @@ -0,0 +1,3 @@ +## 1.1.1 + +No user-facing changes. diff --git a/ruby/ql/src/codeql-pack.release.yml b/ruby/ql/src/codeql-pack.release.yml index 2ac15439f56..1a19084be3f 100644 --- a/ruby/ql/src/codeql-pack.release.yml +++ b/ruby/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.1.0 +lastReleaseVersion: 1.1.1 diff --git a/ruby/ql/src/qlpack.yml b/ruby/ql/src/qlpack.yml index ada2d7236d0..ffbc8ea2abd 100644 --- a/ruby/ql/src/qlpack.yml +++ b/ruby/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-queries -version: 1.1.1-dev +version: 1.1.2-dev groups: - ruby - queries diff --git a/shared/controlflow/CHANGELOG.md b/shared/controlflow/CHANGELOG.md index f62d99b8a59..38127a99b3f 100644 --- a/shared/controlflow/CHANGELOG.md +++ b/shared/controlflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/controlflow/change-notes/released/1.0.6.md b/shared/controlflow/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/controlflow/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/controlflow/codeql-pack.release.yml b/shared/controlflow/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/controlflow/codeql-pack.release.yml +++ b/shared/controlflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/controlflow/qlpack.yml b/shared/controlflow/qlpack.yml index b610d434e33..5bfb02b0179 100644 --- a/shared/controlflow/qlpack.yml +++ b/shared/controlflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/controlflow -version: 1.0.6-dev +version: 1.0.7-dev groups: shared library: true dependencies: diff --git a/shared/dataflow/CHANGELOG.md b/shared/dataflow/CHANGELOG.md index 0a94e1b80ec..84b64cbc6ea 100644 --- a/shared/dataflow/CHANGELOG.md +++ b/shared/dataflow/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.1.0 + +### Deprecated APIs + +* The source/sink grouping feature of the data flow library has been removed. It was introduced primarily for debugging, but has not proven useful. + ## 1.0.5 No user-facing changes. diff --git a/shared/dataflow/change-notes/2024-08-20-remove-srcsink-grouping.md b/shared/dataflow/change-notes/released/1.1.0.md similarity index 82% rename from shared/dataflow/change-notes/2024-08-20-remove-srcsink-grouping.md rename to shared/dataflow/change-notes/released/1.1.0.md index ba3e86b720f..44897538158 100644 --- a/shared/dataflow/change-notes/2024-08-20-remove-srcsink-grouping.md +++ b/shared/dataflow/change-notes/released/1.1.0.md @@ -1,4 +1,5 @@ ---- -category: deprecated ---- +## 1.1.0 + +### Deprecated APIs + * The source/sink grouping feature of the data flow library has been removed. It was introduced primarily for debugging, but has not proven useful. diff --git a/shared/dataflow/codeql-pack.release.yml b/shared/dataflow/codeql-pack.release.yml index 42da17b3841..2ac15439f56 100644 --- a/shared/dataflow/codeql-pack.release.yml +++ b/shared/dataflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.1.0 diff --git a/shared/dataflow/codeql/dataflow/DataFlow.qll b/shared/dataflow/codeql/dataflow/DataFlow.qll index 7841c72811b..6e4921521b1 100644 --- a/shared/dataflow/codeql/dataflow/DataFlow.qll +++ b/shared/dataflow/codeql/dataflow/DataFlow.qll @@ -298,7 +298,7 @@ signature module InputSig { /** Extra data-flow steps needed for lambda flow analysis. */ predicate additionalLambdaFlowStep(Node nodeFrom, Node nodeTo, boolean preservesValue); - predicate knownSourceModel(Node sink, string model); + predicate knownSourceModel(Node source, string model); predicate knownSinkModel(Node sink, string model); diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll index 48d6ba61e2f..c8b56db0b34 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll @@ -545,6 +545,8 @@ module MakeImpl Lang> { private module Stage1 implements StageSig { class Ap = Unit; + class ApNil = Ap; + private class Cc = boolean; /* Begin: Stage 1 logic. */ @@ -1297,6 +1299,8 @@ module MakeImpl Lang> { private signature module StageSig { class Ap; + class ApNil extends Ap; + predicate revFlow(NodeEx node); predicate revFlowAp(NodeEx node, Ap ap); @@ -1560,20 +1564,17 @@ module MakeImpl Lang> { apa = getApprox(ap) ) or - // flow into a callable - exists(boolean allowsFlowThrough | - fwdFlowIn(node, apa, state, cc, t, ap, allowsFlowThrough) and - if allowsFlowThrough = true - then ( - summaryCtx = TSummaryCtxSome(node, state, t, ap) - ) else ( - summaryCtx = TSummaryCtxNone() and - // When the call contexts of source and sink needs to match then there's - // never any reason to enter a callable except to find a summary. See also - // the comment in `PathNodeMid::isAtSink`. - not Config::getAFeature() instanceof FeatureEqualSourceSinkCallContext - ) - ) + // flow into a callable without summary context + fwdFlowInNoFlowThrough(node, apa, state, cc, t, ap) and + summaryCtx = TSummaryCtxNone() and + // When the call contexts of source and sink needs to match then there's + // never any reason to enter a callable except to find a summary. See also + // the comment in `PathNodeMid::isAtSink`. + not Config::getAFeature() instanceof FeatureEqualSourceSinkCallContext + or + // flow into a callable with summary context (non-linear recursion) + fwdFlowInFlowThrough(node, apa, state, cc, t, ap) and + summaryCtx = TSummaryCtxSome(node, state, t, ap) or // flow out of a callable fwdFlowOut(_, _, node, state, cc, summaryCtx, t, ap, apa) @@ -1593,7 +1594,7 @@ module MakeImpl Lang> { private newtype TSummaryCtx = TSummaryCtxNone() or TSummaryCtxSome(ParamNodeEx p, FlowState state, Typ t, Ap ap) { - fwdFlowIn(p, _, state, _, t, ap, true) + fwdFlowInFlowThrough(p, _, state, _, t, ap) } /** @@ -1721,12 +1722,7 @@ module MakeImpl Lang> { if ap instanceof ApNil then emptyAp = true else emptyAp = false } - private signature module FwdFlowInInputSig { - default predicate callRestriction(DataFlowCall call) { any() } - - bindingset[p, apa] - default predicate parameterRestriction(ParamNodeEx p, ApApprox apa) { any() } - } + private signature predicate flowThroughSig(); /** * Exposes the inlined predicate `fwdFlowIn`, which is used to calculate both @@ -1736,19 +1732,40 @@ module MakeImpl Lang> { * need to record the argument that flows into the parameter. * * For flow through, we do need to record the argument, however, we can restrict - * this to arguments that may actually flow through, using `callRestriction` and - * `parameterRestriction`, which reduces the argument-to-parameter fan-in - * significantly. + * this to arguments that may actually flow through, which reduces the + * argument-to-parameter fan-in significantly. */ - private module FwdFlowIn { + private module FwdFlowIn { pragma[nomagic] private predicate callEdgeArgParamRestricted( - DataFlowCall call, DataFlowCallable c, ArgNodeEx arg, ParamNodeEx p, - boolean allowsFieldFlow, ApApprox apa + DataFlowCall call, DataFlowCallable c, ArgNodeEx arg, ParamNodeEx p, boolean emptyAp, + ApApprox apa ) { - PrevStage::callEdgeArgParam(call, c, arg, p, allowsFieldFlow, apa) and - I::callRestriction(call) and - I::parameterRestriction(p, apa) + exists(boolean allowsFieldFlow | + PrevStage::callEdgeArgParam(call, c, arg, p, allowsFieldFlow, apa) + | + if + PrevStage::callMayFlowThroughRev(call) and + PrevStage::parameterMayFlowThrough(p, apa) + then + emptyAp = true and + apa instanceof PrevStage::ApNil and + flowThrough() + or + emptyAp = false and + allowsFieldFlow = true and + if allowsFieldFlowThrough(call, c) then flowThrough() else not flowThrough() + else ( + not flowThrough() and + ( + emptyAp = true and + apa instanceof PrevStage::ApNil + or + emptyAp = false and + allowsFieldFlow = true + ) + ) + ) } pragma[nomagic] @@ -1780,10 +1797,10 @@ module MakeImpl Lang> { bindingset[call] pragma[inline_late] private predicate callEdgeArgParamRestrictedInlineLate( - DataFlowCall call, DataFlowCallable c, ArgNodeEx arg, ParamNodeEx p, - boolean allowsFieldFlow, ApApprox apa + DataFlowCall call, DataFlowCallable c, ArgNodeEx arg, ParamNodeEx p, boolean emptyAp, + ApApprox apa ) { - callEdgeArgParamRestricted(call, c, arg, p, allowsFieldFlow, apa) + callEdgeArgParamRestricted(call, c, arg, p, emptyAp, apa) } bindingset[call, ctx] @@ -1807,44 +1824,35 @@ module MakeImpl Lang> { private predicate fwdFlowInCand( DataFlowCall call, ArgNodeEx arg, FlowState state, Cc outercc, DataFlowCallable inner, ParamNodeEx p, SummaryCtx summaryCtx, Typ t, Ap ap, boolean emptyAp, ApApprox apa, - boolean cc, boolean allowsFlowThrough + boolean cc ) { - exists(boolean allowsFieldFlow | - fwdFlowIntoArg(arg, state, outercc, summaryCtx, t, ap, emptyAp, apa, cc) and - ( - inner = viableImplCallContextReducedInlineLate(call, arg, outercc) - or - viableImplArgNotCallContextReduced(call, arg, outercc) - ) and - not outBarrier(arg, state) and - not inBarrier(p, state) and - callEdgeArgParamRestrictedInlineLate(call, inner, arg, p, allowsFieldFlow, apa) and - (if allowsFieldFlow = false then emptyAp = true else any()) and - if allowsFieldFlowThrough(call, inner) - then allowsFlowThrough = true - else allowsFlowThrough = emptyAp - ) + fwdFlowIntoArg(arg, state, outercc, summaryCtx, t, ap, emptyAp, apa, cc) and + ( + inner = viableImplCallContextReducedInlineLate(call, arg, outercc) + or + viableImplArgNotCallContextReduced(call, arg, outercc) + ) and + not outBarrier(arg, state) and + not inBarrier(p, state) and + callEdgeArgParamRestrictedInlineLate(call, inner, arg, p, emptyAp, apa) } pragma[inline] private predicate fwdFlowInCandTypeFlowDisabled( DataFlowCall call, ArgNodeEx arg, FlowState state, Cc outercc, DataFlowCallable inner, - ParamNodeEx p, SummaryCtx summaryCtx, Typ t, Ap ap, ApApprox apa, boolean cc, - boolean allowsFlowThrough + ParamNodeEx p, SummaryCtx summaryCtx, Typ t, Ap ap, ApApprox apa, boolean cc ) { not enableTypeFlow() and - fwdFlowInCand(call, arg, state, outercc, inner, p, summaryCtx, t, ap, _, apa, cc, - allowsFlowThrough) + fwdFlowInCand(call, arg, state, outercc, inner, p, summaryCtx, t, ap, _, apa, cc) } pragma[nomagic] private predicate fwdFlowInCandTypeFlowEnabled( DataFlowCall call, ArgNodeEx arg, Cc outercc, DataFlowCallable inner, ParamNodeEx p, - boolean emptyAp, ApApprox apa, boolean cc, boolean allowsFlowThrough + boolean emptyAp, ApApprox apa, boolean cc ) { enableTypeFlow() and - fwdFlowInCand(call, arg, _, outercc, inner, p, _, _, _, emptyAp, apa, cc, - allowsFlowThrough) + fwdFlowInCand(call, arg, _, outercc, inner, p, _, _, _, emptyAp, apa, cc) } pragma[nomagic] @@ -1859,10 +1867,9 @@ module MakeImpl Lang> { pragma[nomagic] private predicate fwdFlowInValidEdgeTypeFlowEnabled( DataFlowCall call, ArgNodeEx arg, Cc outercc, DataFlowCallable inner, ParamNodeEx p, - CcCall innercc, boolean emptyAp, ApApprox apa, boolean cc, boolean allowsFlowThrough + CcCall innercc, boolean emptyAp, ApApprox apa, boolean cc ) { - fwdFlowInCandTypeFlowEnabled(call, arg, outercc, inner, p, emptyAp, apa, cc, - allowsFlowThrough) and + fwdFlowInCandTypeFlowEnabled(call, arg, outercc, inner, p, emptyAp, apa, cc) and FwdTypeFlow::typeFlowValidEdgeIn(call, inner, cc) and innercc = getCallContextCall(call, inner) } @@ -1871,36 +1878,42 @@ module MakeImpl Lang> { predicate fwdFlowIn( DataFlowCall call, ArgNodeEx arg, DataFlowCallable inner, ParamNodeEx p, FlowState state, Cc outercc, CcCall innercc, SummaryCtx summaryCtx, Typ t, Ap ap, - ApApprox apa, boolean cc, boolean allowsFlowThrough + ApApprox apa, boolean cc ) { // type flow disabled: linear recursion fwdFlowInCandTypeFlowDisabled(call, arg, state, outercc, inner, p, summaryCtx, t, ap, - apa, cc, allowsFlowThrough) and + apa, cc) and fwdFlowInValidEdgeTypeFlowDisabled(call, inner, innercc, pragma[only_bind_into](cc)) or // type flow enabled: non-linear recursion exists(boolean emptyAp | fwdFlowIntoArg(arg, state, outercc, summaryCtx, t, ap, emptyAp, apa, cc) and fwdFlowInValidEdgeTypeFlowEnabled(call, arg, outercc, inner, p, innercc, emptyAp, apa, - cc, allowsFlowThrough) + cc) ) } } - private module FwdFlowInNoRestriction implements FwdFlowInInputSig { } + private predicate bottom() { none() } + + private module FwdFlowInNoThrough = FwdFlowIn; pragma[nomagic] - private predicate fwdFlowIn( - ParamNodeEx p, ApApprox apa, FlowState state, CcCall innercc, Typ t, Ap ap, - boolean allowsFlowThrough + private predicate fwdFlowInNoFlowThrough( + ParamNodeEx p, ApApprox apa, FlowState state, CcCall innercc, Typ t, Ap ap ) { - exists(boolean allowsFlowThrough0 | - FwdFlowIn::fwdFlowIn(_, _, _, p, state, _, innercc, _, t, ap, - apa, _, allowsFlowThrough0) and - if PrevStage::parameterMayFlowThrough(p, apa) - then allowsFlowThrough = allowsFlowThrough0 - else allowsFlowThrough = false - ) + FwdFlowInNoThrough::fwdFlowIn(_, _, _, p, state, _, innercc, _, t, ap, apa, _) + } + + private predicate top() { any() } + + private module FwdFlowInThrough = FwdFlowIn; + + pragma[nomagic] + private predicate fwdFlowInFlowThrough( + ParamNodeEx p, ApApprox apa, FlowState state, CcCall innercc, Typ t, Ap ap + ) { + FwdFlowInThrough::fwdFlowIn(_, _, _, p, state, _, innercc, _, t, ap, apa, _) } pragma[nomagic] @@ -2000,8 +2013,9 @@ module MakeImpl Lang> { DataFlowCall call, DataFlowCallable c, ParamNodeEx p, FlowState state, CcCall innercc, Typ t, Ap ap, boolean cc ) { - FwdFlowIn::fwdFlowIn(call, _, c, p, state, _, innercc, _, t, ap, - _, cc, _) + FwdFlowInNoThrough::fwdFlowIn(call, _, c, p, state, _, innercc, _, t, ap, _, cc) + or + FwdFlowInThrough::fwdFlowIn(call, _, c, p, state, _, innercc, _, t, ap, _, cc) } pragma[nomagic] @@ -2104,19 +2118,12 @@ module MakeImpl Lang> { fwdFlowThrough0(call, _, cc, state, ccc, summaryCtx, t, ap, apa, ret, _, innerArgApa) } - private module FwdFlowThroughRestriction implements FwdFlowInInputSig { - predicate callRestriction = PrevStage::callMayFlowThroughRev/1; - - predicate parameterRestriction = PrevStage::parameterMayFlowThrough/2; - } - pragma[nomagic] private predicate fwdFlowIsEntered0( DataFlowCall call, ArgNodeEx arg, Cc cc, CcCall innerCc, SummaryCtx summaryCtx, ParamNodeEx p, FlowState state, Typ t, Ap ap ) { - FwdFlowIn::fwdFlowIn(call, arg, _, p, state, cc, innerCc, - summaryCtx, t, ap, _, _, true) + FwdFlowInThrough::fwdFlowIn(call, arg, _, p, state, cc, innerCc, summaryCtx, t, ap, _, _) } /** @@ -3067,15 +3074,15 @@ module MakeImpl Lang> { pragma[nomagic] private predicate fwdFlowInStep( ArgNodeEx arg, ParamNodeEx p, FlowState state, Cc outercc, CcCall innercc, - SummaryCtx summaryCtx, Typ t, Ap ap, boolean allowsFlowThrough + SummaryCtx outerSummaryCtx, SummaryCtx innerSummaryCtx, Typ t, Ap ap ) { - exists(ApApprox apa, boolean allowsFlowThrough0 | - FwdFlowIn::fwdFlowIn(_, arg, _, p, state, outercc, innercc, - summaryCtx, t, ap, apa, _, allowsFlowThrough0) and - if PrevStage::parameterMayFlowThrough(p, apa) - then allowsFlowThrough = allowsFlowThrough0 - else allowsFlowThrough = false - ) + FwdFlowInNoThrough::fwdFlowIn(_, arg, _, p, state, outercc, innercc, outerSummaryCtx, t, + ap, _, _) and + innerSummaryCtx = TSummaryCtxNone() + or + FwdFlowInThrough::fwdFlowIn(_, arg, _, p, state, outercc, innercc, outerSummaryCtx, t, + ap, _, _) and + innerSummaryCtx = TSummaryCtxSome(p, state, t, ap) } pragma[nomagic] @@ -3239,15 +3246,10 @@ module MakeImpl Lang> { ) or // flow into a callable - exists( - ArgNodeEx arg, boolean allowsFlowThrough, Cc outercc, SummaryCtx outerSummaryCtx - | + exists(ArgNodeEx arg, Cc outercc, SummaryCtx outerSummaryCtx | pn1 = TPathNodeMid(arg, state, outercc, outerSummaryCtx, t, ap) and - fwdFlowInStep(arg, node, state, outercc, cc, outerSummaryCtx, t, ap, allowsFlowThrough) and - label = "" and - if allowsFlowThrough = true - then summaryCtx = TSummaryCtxSome(node, state, t, ap) - else summaryCtx = TSummaryCtxNone() + fwdFlowInStep(arg, node, state, outercc, cc, outerSummaryCtx, summaryCtx, t, ap) and + label = "" ) or // flow out of a callable diff --git a/shared/dataflow/qlpack.yml b/shared/dataflow/qlpack.yml index 6bc83bb5164..63fa78dc872 100644 --- a/shared/dataflow/qlpack.yml +++ b/shared/dataflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/dataflow -version: 1.0.6-dev +version: 1.1.1-dev groups: shared library: true dependencies: diff --git a/shared/mad/CHANGELOG.md b/shared/mad/CHANGELOG.md index 0bf218b9656..0a7df5106a1 100644 --- a/shared/mad/CHANGELOG.md +++ b/shared/mad/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/mad/change-notes/released/1.0.6.md b/shared/mad/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/mad/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/mad/codeql-pack.release.yml b/shared/mad/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/mad/codeql-pack.release.yml +++ b/shared/mad/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/mad/qlpack.yml b/shared/mad/qlpack.yml index 8568e62a12b..6654580da12 100644 --- a/shared/mad/qlpack.yml +++ b/shared/mad/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/mad -version: 1.0.6-dev +version: 1.0.7-dev groups: shared library: true dependencies: diff --git a/shared/rangeanalysis/CHANGELOG.md b/shared/rangeanalysis/CHANGELOG.md index f445578246d..efa13cf50bc 100644 --- a/shared/rangeanalysis/CHANGELOG.md +++ b/shared/rangeanalysis/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/rangeanalysis/change-notes/released/1.0.6.md b/shared/rangeanalysis/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/rangeanalysis/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/rangeanalysis/codeql-pack.release.yml b/shared/rangeanalysis/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/rangeanalysis/codeql-pack.release.yml +++ b/shared/rangeanalysis/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/rangeanalysis/qlpack.yml b/shared/rangeanalysis/qlpack.yml index 4a9285c82ec..1015269eeb4 100644 --- a/shared/rangeanalysis/qlpack.yml +++ b/shared/rangeanalysis/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rangeanalysis -version: 1.0.6-dev +version: 1.0.7-dev groups: shared library: true dependencies: diff --git a/shared/regex/CHANGELOG.md b/shared/regex/CHANGELOG.md index 78f8369e739..92db438ed2f 100644 --- a/shared/regex/CHANGELOG.md +++ b/shared/regex/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/regex/change-notes/released/1.0.6.md b/shared/regex/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/regex/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/regex/codeql-pack.release.yml b/shared/regex/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/regex/codeql-pack.release.yml +++ b/shared/regex/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/regex/qlpack.yml b/shared/regex/qlpack.yml index 39a0ce40768..6bb3b9c3551 100644 --- a/shared/regex/qlpack.yml +++ b/shared/regex/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/regex -version: 1.0.6-dev +version: 1.0.7-dev groups: shared library: true dependencies: diff --git a/shared/ssa/CHANGELOG.md b/shared/ssa/CHANGELOG.md index f41fc9a7fe7..27b5d839dc1 100644 --- a/shared/ssa/CHANGELOG.md +++ b/shared/ssa/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/ssa/change-notes/released/1.0.6.md b/shared/ssa/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/ssa/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/ssa/codeql-pack.release.yml b/shared/ssa/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/ssa/codeql-pack.release.yml +++ b/shared/ssa/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/ssa/qlpack.yml b/shared/ssa/qlpack.yml index ef726856cfb..0f48f8dfb6d 100644 --- a/shared/ssa/qlpack.yml +++ b/shared/ssa/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ssa -version: 1.0.6-dev +version: 1.0.7-dev groups: shared library: true dependencies: diff --git a/shared/threat-models/CHANGELOG.md b/shared/threat-models/CHANGELOG.md index 2e7162889c3..6976ee14e27 100644 --- a/shared/threat-models/CHANGELOG.md +++ b/shared/threat-models/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/threat-models/change-notes/released/1.0.6.md b/shared/threat-models/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/threat-models/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/threat-models/codeql-pack.release.yml b/shared/threat-models/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/threat-models/codeql-pack.release.yml +++ b/shared/threat-models/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/threat-models/qlpack.yml b/shared/threat-models/qlpack.yml index aa7f4f989fd..fc01f5d5556 100644 --- a/shared/threat-models/qlpack.yml +++ b/shared/threat-models/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/threat-models -version: 1.0.6-dev +version: 1.0.7-dev library: true groups: shared dataExtensions: diff --git a/shared/tree-sitter-extractor/Cargo.toml b/shared/tree-sitter-extractor/Cargo.toml index d51d64a3349..d7d1e0f37ab 100644 --- a/shared/tree-sitter-extractor/Cargo.toml +++ b/shared/tree-sitter-extractor/Cargo.toml @@ -7,7 +7,7 @@ authors = ["GitHub"] [dependencies] flate2 = "1.0" globset = "0.4" -tree-sitter = ">= 0.22.6" +tree-sitter = ">= 0.23.0" tracing = "0.1" tracing-subscriber = { version = "0.3.3", features = ["env-filter"] } rayon = "1.5.0" @@ -24,5 +24,3 @@ tree-sitter-ql = { git = "https://github.com/tree-sitter/tree-sitter-ql" } tree-sitter-json = {git = "https://github.com/tree-sitter/tree-sitter-json" } rand = "0.8.5" -[patch.crates-io] -tree-sitter = {git = "https://github.com/redsun82/tree-sitter.git", rev = "1f5c1112ceaa8fc6aff61d1852690407670d2a96"} diff --git a/shared/tree-sitter-extractor/tests/integration_test.rs b/shared/tree-sitter-extractor/tests/integration_test.rs index 29058016764..cc453eeef74 100644 --- a/shared/tree-sitter-extractor/tests/integration_test.rs +++ b/shared/tree-sitter-extractor/tests/integration_test.rs @@ -13,7 +13,7 @@ use common::{create_source_dir, expect_trap_file, SourceArchive}; fn simple_extractor() { let language = simple::LanguageSpec { prefix: "ql", - ts_language: tree_sitter_ql::language(), + ts_language: tree_sitter_ql::LANGUAGE.into(), node_types: tree_sitter_ql::NODE_TYPES, file_globs: vec!["*.qll".into()], }; diff --git a/shared/tree-sitter-extractor/tests/multiple_languages.rs b/shared/tree-sitter-extractor/tests/multiple_languages.rs index 12a505f0170..f14100f6e0c 100644 --- a/shared/tree-sitter-extractor/tests/multiple_languages.rs +++ b/shared/tree-sitter-extractor/tests/multiple_languages.rs @@ -12,13 +12,13 @@ use common::{create_source_dir, expect_trap_file, SourceArchive}; fn multiple_language_extractor() { let lang_ql = simple::LanguageSpec { prefix: "ql", - ts_language: tree_sitter_ql::language(), + ts_language: tree_sitter_ql::LANGUAGE.into(), node_types: tree_sitter_ql::NODE_TYPES, file_globs: vec!["*.qll".into()], }; let lang_json = simple::LanguageSpec { prefix: "json", - ts_language: tree_sitter_json::language(), + ts_language: tree_sitter_json::LANGUAGE.into(), node_types: tree_sitter_json::NODE_TYPES, file_globs: vec!["*.json".into(), "*Jsonfile".into()], }; diff --git a/shared/tutorial/CHANGELOG.md b/shared/tutorial/CHANGELOG.md index f20cfe347d7..a1da8419af7 100644 --- a/shared/tutorial/CHANGELOG.md +++ b/shared/tutorial/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/tutorial/change-notes/released/1.0.6.md b/shared/tutorial/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/tutorial/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/tutorial/codeql-pack.release.yml b/shared/tutorial/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/tutorial/codeql-pack.release.yml +++ b/shared/tutorial/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/tutorial/qlpack.yml b/shared/tutorial/qlpack.yml index e0516acd41d..bbba5576202 100644 --- a/shared/tutorial/qlpack.yml +++ b/shared/tutorial/qlpack.yml @@ -1,7 +1,7 @@ name: codeql/tutorial description: Library for the CodeQL detective tutorials, helping new users learn to write CodeQL queries. -version: 1.0.6-dev +version: 1.0.7-dev groups: shared library: true warnOnImplicitThis: true diff --git a/shared/typeflow/CHANGELOG.md b/shared/typeflow/CHANGELOG.md index 7ba137cbf53..9eedb855a5a 100644 --- a/shared/typeflow/CHANGELOG.md +++ b/shared/typeflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/typeflow/change-notes/released/1.0.6.md b/shared/typeflow/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/typeflow/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/typeflow/codeql-pack.release.yml b/shared/typeflow/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/typeflow/codeql-pack.release.yml +++ b/shared/typeflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/typeflow/qlpack.yml b/shared/typeflow/qlpack.yml index 0681ba51825..99dd1a1057e 100644 --- a/shared/typeflow/qlpack.yml +++ b/shared/typeflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeflow -version: 1.0.6-dev +version: 1.0.7-dev groups: shared library: true dependencies: diff --git a/shared/typetracking/CHANGELOG.md b/shared/typetracking/CHANGELOG.md index 77d9b6f4fcf..712c3146f53 100644 --- a/shared/typetracking/CHANGELOG.md +++ b/shared/typetracking/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/typetracking/change-notes/released/1.0.6.md b/shared/typetracking/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/typetracking/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/typetracking/codeql-pack.release.yml b/shared/typetracking/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/typetracking/codeql-pack.release.yml +++ b/shared/typetracking/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/typetracking/qlpack.yml b/shared/typetracking/qlpack.yml index da304ceb020..aeb3a45bff3 100644 --- a/shared/typetracking/qlpack.yml +++ b/shared/typetracking/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typetracking -version: 1.0.6-dev +version: 1.0.7-dev groups: shared library: true dependencies: diff --git a/shared/typos/CHANGELOG.md b/shared/typos/CHANGELOG.md index f8ac1347b0f..968e737bdc4 100644 --- a/shared/typos/CHANGELOG.md +++ b/shared/typos/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/typos/change-notes/released/1.0.6.md b/shared/typos/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/typos/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/typos/codeql-pack.release.yml b/shared/typos/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/typos/codeql-pack.release.yml +++ b/shared/typos/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/typos/qlpack.yml b/shared/typos/qlpack.yml index bc581f54edf..ded7cbb17ea 100644 --- a/shared/typos/qlpack.yml +++ b/shared/typos/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typos -version: 1.0.6-dev +version: 1.0.7-dev groups: shared library: true warnOnImplicitThis: true diff --git a/shared/util/CHANGELOG.md b/shared/util/CHANGELOG.md index e44386743ad..d316357e039 100644 --- a/shared/util/CHANGELOG.md +++ b/shared/util/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/util/change-notes/released/1.0.6.md b/shared/util/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/util/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/util/codeql-pack.release.yml b/shared/util/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/util/codeql-pack.release.yml +++ b/shared/util/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/util/qlpack.yml b/shared/util/qlpack.yml index 38a2417c1c2..5914dae3575 100644 --- a/shared/util/qlpack.yml +++ b/shared/util/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/util -version: 1.0.6-dev +version: 1.0.7-dev groups: shared library: true dependencies: null diff --git a/shared/xml/CHANGELOG.md b/shared/xml/CHANGELOG.md index 1b292c16876..ba782d71646 100644 --- a/shared/xml/CHANGELOG.md +++ b/shared/xml/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/xml/change-notes/released/1.0.6.md b/shared/xml/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/xml/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/xml/codeql-pack.release.yml b/shared/xml/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/xml/codeql-pack.release.yml +++ b/shared/xml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/xml/qlpack.yml b/shared/xml/qlpack.yml index 6c62493a3c8..6f272d210d2 100644 --- a/shared/xml/qlpack.yml +++ b/shared/xml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/xml -version: 1.0.6-dev +version: 1.0.7-dev groups: shared library: true dependencies: diff --git a/shared/yaml/CHANGELOG.md b/shared/yaml/CHANGELOG.md index 064f83a6efd..e9239e16de7 100644 --- a/shared/yaml/CHANGELOG.md +++ b/shared/yaml/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +No user-facing changes. + ## 1.0.5 No user-facing changes. diff --git a/shared/yaml/change-notes/released/1.0.6.md b/shared/yaml/change-notes/released/1.0.6.md new file mode 100644 index 00000000000..e5e80a3b3f1 --- /dev/null +++ b/shared/yaml/change-notes/released/1.0.6.md @@ -0,0 +1,3 @@ +## 1.0.6 + +No user-facing changes. diff --git a/shared/yaml/codeql-pack.release.yml b/shared/yaml/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/shared/yaml/codeql-pack.release.yml +++ b/shared/yaml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/shared/yaml/qlpack.yml b/shared/yaml/qlpack.yml index 5fc9dd318df..e7dc99d9b83 100644 --- a/shared/yaml/qlpack.yml +++ b/shared/yaml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/yaml -version: 1.0.6-dev +version: 1.0.7-dev groups: shared library: true warnOnImplicitThis: true diff --git a/swift/ql/lib/CHANGELOG.md b/swift/ql/lib/CHANGELOG.md index b8e0122e0a0..f1e051b1bcb 100644 --- a/swift/ql/lib/CHANGELOG.md +++ b/swift/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.2 + +No user-facing changes. + ## 1.1.1 ### Minor Analysis Improvements diff --git a/swift/ql/lib/change-notes/2024-09-03-outdated-deprecations.md b/swift/ql/lib/change-notes/2024-09-03-outdated-deprecations.md new file mode 100644 index 00000000000..2970b481c50 --- /dev/null +++ b/swift/ql/lib/change-notes/2024-09-03-outdated-deprecations.md @@ -0,0 +1,5 @@ +--- +category: breaking +--- +* Deleted the deprecated `explorationLimit` predicate from `DataFlow::Configuration`, use `FlowExploration` instead. +* Deleted the deprecated `getDerivedTypeDecl` predicate from the `TypeDecl` class, use `getADerivedTypeDecl` or `getABaseTypeDecl` instead. \ No newline at end of file diff --git a/swift/ql/lib/change-notes/released/1.1.2.md b/swift/ql/lib/change-notes/released/1.1.2.md new file mode 100644 index 00000000000..ce8d2c1a4f3 --- /dev/null +++ b/swift/ql/lib/change-notes/released/1.1.2.md @@ -0,0 +1,3 @@ +## 1.1.2 + +No user-facing changes. diff --git a/swift/ql/lib/codeql-pack.release.yml b/swift/ql/lib/codeql-pack.release.yml index 1a19084be3f..53ab127707f 100644 --- a/swift/ql/lib/codeql-pack.release.yml +++ b/swift/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.1.1 +lastReleaseVersion: 1.1.2 diff --git a/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll b/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll index 3b1439511d1..359fa71744b 100644 --- a/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll +++ b/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowImpl1.qll @@ -168,14 +168,6 @@ abstract deprecated class Configuration extends string { */ predicate hasFlowToExpr(DataFlowExpr sink) { this.hasFlowTo(exprNode(sink)) } - /** - * DEPRECATED: Use `FlowExploration` instead. - * - * Gets the exploration limit for `hasPartialFlow` and `hasPartialFlowRev` - * measured in approximate number of interprocedural steps. - */ - deprecated int explorationLimit() { none() } - /** * Holds if hidden nodes should be included in the data flow graph. * diff --git a/swift/ql/lib/codeql/swift/elements/decl/TypeDecl.qll b/swift/ql/lib/codeql/swift/elements/decl/TypeDecl.qll index 9055f29d6ca..15c6bd1609c 100644 --- a/swift/ql/lib/codeql/swift/elements/decl/TypeDecl.qll +++ b/swift/ql/lib/codeql/swift/elements/decl/TypeDecl.qll @@ -75,13 +75,6 @@ class TypeDecl extends Generated::TypeDecl { */ TypeDecl getABaseTypeDecl() { result = this.getABaseType().(AnyGenericType).getDeclaration() } - /** - * Gets a declaration that has this type as its `index`th base type. - * - * DEPRECATED: The index is not very meaningful here. Use `getADerivedTypeDecl` or `getABaseTypeDecl`. - */ - deprecated TypeDecl getDerivedTypeDecl(int i) { result.getBaseTypeDecl(i) = this } - /** * Gets the declaration of any type derived from this type declaration. Expands protocols * added in extensions and expands type aliases. For example in the following code, `B` diff --git a/swift/ql/lib/qlpack.yml b/swift/ql/lib/qlpack.yml index 49920fff303..cc38a4ce8e5 100644 --- a/swift/ql/lib/qlpack.yml +++ b/swift/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-all -version: 1.1.2-dev +version: 1.1.3-dev groups: swift extractor: swift dbscheme: swift.dbscheme diff --git a/swift/ql/src/CHANGELOG.md b/swift/ql/src/CHANGELOG.md index e33d96f63f5..8ced5909fd0 100644 --- a/swift/ql/src/CHANGELOG.md +++ b/swift/ql/src/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.0.6 + +### Minor Analysis Improvements + +* False positive results from the `swift/cleartext-transmission` ("Cleartext transmission of sensitive information") query involving `tel:`, `mailto:` and similar URLs have been fixed. + ## 1.0.5 ### Minor Analysis Improvements diff --git a/swift/ql/src/change-notes/2024-08-12-cleartext-transmission.md b/swift/ql/src/change-notes/released/1.0.6.md similarity index 81% rename from swift/ql/src/change-notes/2024-08-12-cleartext-transmission.md rename to swift/ql/src/change-notes/released/1.0.6.md index d8f3f3d16d5..93df2cccfdb 100644 --- a/swift/ql/src/change-notes/2024-08-12-cleartext-transmission.md +++ b/swift/ql/src/change-notes/released/1.0.6.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- +## 1.0.6 + +### Minor Analysis Improvements + * False positive results from the `swift/cleartext-transmission` ("Cleartext transmission of sensitive information") query involving `tel:`, `mailto:` and similar URLs have been fixed. diff --git a/swift/ql/src/codeql-pack.release.yml b/swift/ql/src/codeql-pack.release.yml index 42da17b3841..8033d980afa 100644 --- a/swift/ql/src/codeql-pack.release.yml +++ b/swift/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.5 +lastReleaseVersion: 1.0.6 diff --git a/swift/ql/src/qlpack.yml b/swift/ql/src/qlpack.yml index 5941fbe1954..fcfbd491b37 100644 --- a/swift/ql/src/qlpack.yml +++ b/swift/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-queries -version: 1.0.6-dev +version: 1.0.7-dev groups: - swift - queries diff --git a/swift/ql/src/queries/Security/CWE-020/IncompleteHostnameRegex.qhelp b/swift/ql/src/queries/Security/CWE-020/IncompleteHostnameRegex.qhelp index ef374fc9752..347a0ee0e29 100644 --- a/swift/ql/src/queries/Security/CWE-020/IncompleteHostnameRegex.qhelp +++ b/swift/ql/src/queries/Security/CWE-020/IncompleteHostnameRegex.qhelp @@ -46,7 +46,7 @@

    - +

    @@ -63,7 +63,7 @@

    - + diff --git a/swift/ql/src/queries/Security/CWE-116/BadTagFilter.qhelp b/swift/ql/src/queries/Security/CWE-116/BadTagFilter.qhelp index b406faf8e17..c312fb1a6f5 100644 --- a/swift/ql/src/queries/Security/CWE-116/BadTagFilter.qhelp +++ b/swift/ql/src/queries/Security/CWE-116/BadTagFilter.qhelp @@ -28,7 +28,7 @@ likely to handle corner cases correctly than a custom implementation. The following example attempts to filters out all <script> tags.

    - +

    The above sanitizer does not filter out all <script> tags. diff --git a/swift/ql/src/queries/Security/CWE-1333/ReDoS.qhelp b/swift/ql/src/queries/Security/CWE-1333/ReDoS.qhelp index ddbb2835bc2..e641d9b4e61 100644 --- a/swift/ql/src/queries/Security/CWE-1333/ReDoS.qhelp +++ b/swift/ql/src/queries/Security/CWE-1333/ReDoS.qhelp @@ -3,7 +3,7 @@

    Consider the following regular expression:

    - + /^_(__|.)+_$/

    Its sub-expression "(__|.)+" can match the string @@ -19,7 +19,7 @@ the ambiguity between the two branches of the alternative inside the repetition:

    - + /^_(__|[^_])+_$/ diff --git a/swift/third_party/load.bzl b/swift/third_party/load.bzl index 8a16963f513..f9f46e5f410 100644 --- a/swift/third_party/load.bzl +++ b/swift/third_party/load.bzl @@ -1,11 +1,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") -_swift_prebuilt_version = "swift-5.10-RELEASE.322" +_swift_prebuilt_version = "swift-5.10.1-RELEASE.323" _swift_sha_map = { - "Linux-X64": "634497779e930a808489e5d472753b604c07085abf411356cae7921bde14130f", - "macOS-ARM64": "293df92da9a3cc79c595a28b1b4ec881a5fdb248ea7eac34c89943e94deff700", - "macOS-X64": "813c1746777701d30e716c130b0bb087a9c5b7ab025fd99afc695ec52cd432ad", + "Linux-X64": "29c7c53ab2f438e85daecdb4567173c78ac32afc45753d7277d744aed515229d", + "macOS-ARM64": "e697f423c8abcb8a942246489fd4f8ce71472119510b64b2073eaeaec86b771e", + "macOS-X64": "faef29334e8615e8a71263c7453ebc7e566d6f2928d827675f6faae233c544a6", } _swift_arch_map = {