diff --git a/.github/workflows/compile-queries.yml b/.github/workflows/compile-queries.yml
index 292ae3b8b230..38452f97d36b 100644
--- a/.github/workflows/compile-queries.yml
+++ b/.github/workflows/compile-queries.yml
@@ -29,8 +29,6 @@ jobs:
key: all-queries
- name: check formatting
run: find shared */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only
- - name: Omit DatabaseQualityDiagnostics.ql from compile checking # Remove me once CodeQL 2.18.0 is released!
- run: mv java/ql/src/Telemetry/DatabaseQualityDiagnostics.ql{,.hidden}
- name: compile queries - check-only
# run with --check-only if running in a PR (github.sha != main)
if : ${{ github.event_name == 'pull_request' }}
@@ -41,6 +39,3 @@ jobs:
if : ${{ github.event_name != 'pull_request' }}
shell: bash
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" --compilation-cache-size=500
- - name: Restore DatabaseQualityDiagnostics.ql after compile checking # Remove me once CodeQL 2.18.0 is released
- run: mv java/ql/src/Telemetry/DatabaseQualityDiagnostics.ql{.hidden,}
-
diff --git a/MODULE.bazel b/MODULE.bazel
index b0957b89a75c..65fc8120b5a5 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -112,6 +112,7 @@ use_repo(
"kotlin-compiler-1.9.0-Beta",
"kotlin-compiler-1.9.20-Beta",
"kotlin-compiler-2.0.0-RC1",
+ "kotlin-compiler-2.0.20-Beta2",
"kotlin-compiler-embeddable-1.5.0",
"kotlin-compiler-embeddable-1.5.10",
"kotlin-compiler-embeddable-1.5.20",
@@ -124,6 +125,7 @@ use_repo(
"kotlin-compiler-embeddable-1.9.0-Beta",
"kotlin-compiler-embeddable-1.9.20-Beta",
"kotlin-compiler-embeddable-2.0.0-RC1",
+ "kotlin-compiler-embeddable-2.0.20-Beta2",
"kotlin-stdlib-1.5.0",
"kotlin-stdlib-1.5.10",
"kotlin-stdlib-1.5.20",
@@ -136,11 +138,16 @@ use_repo(
"kotlin-stdlib-1.9.0-Beta",
"kotlin-stdlib-1.9.20-Beta",
"kotlin-stdlib-2.0.0-RC1",
+ "kotlin-stdlib-2.0.20-Beta2",
)
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.22.2")
+go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
+go_deps.from_file(go_mod = "//go/extractor:go.mod")
+use_repo(go_deps, "org_golang_x_mod", "org_golang_x_tools")
+
lfs_files = use_repo_rule("//misc/bazel:lfs.bzl", "lfs_files")
lfs_files(
diff --git a/cpp/downgrades/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/exprs.ql b/cpp/downgrades/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/exprs.ql
new file mode 100644
index 000000000000..d1b8af0b6664
--- /dev/null
+++ b/cpp/downgrades/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/exprs.ql
@@ -0,0 +1,17 @@
+class Expr extends @expr {
+ string toString() { none() }
+}
+
+class Location extends @location_expr {
+ string toString() { none() }
+}
+
+predicate isExprWithNewBuiltin(Expr expr) {
+ exists(int kind | exprs(expr, kind, _) | 364 <= kind and kind <= 384)
+}
+
+from Expr expr, int kind, int kind_new, Location location
+where
+ exprs(expr, kind, location) and
+ if isExprWithNewBuiltin(expr) then kind_new = 1 else kind_new = kind
+select expr, kind_new, location
diff --git a/cpp/downgrades/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/old.dbscheme b/cpp/downgrades/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/old.dbscheme
new file mode 100644
index 000000000000..3d35dd6b50ed
--- /dev/null
+++ b/cpp/downgrades/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/old.dbscheme
@@ -0,0 +1,2289 @@
+
+/**
+ * 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)
+
+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
+);
+
+usings(
+ unique int id: @using,
+ int element_id: @element ref,
+ int location: @location_default 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
+);
+
+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
+
+/*
+ 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
+);
+
+/*
+ case @deallocator.form of
+ 0 = plain
+ | 1 = size
+ | 2 = alignment
+ | 3 = size_and_alignment
+ ;
+*/
+
+/**
+ * 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
+;
+
+@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
+ ;
+
+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;
+
+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/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/semmlecode.cpp.dbscheme b/cpp/downgrades/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/semmlecode.cpp.dbscheme
new file mode 100644
index 000000000000..abfce5c170f9
--- /dev/null
+++ b/cpp/downgrades/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/semmlecode.cpp.dbscheme
@@ -0,0 +1,2251 @@
+
+/**
+ * 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)
+
+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
+);
+
+usings(
+ unique int id: @using,
+ int element_id: @element ref,
+ int location: @location_default 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
+);
+
+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
+
+/*
+ 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
+);
+
+/*
+ case @deallocator.form of
+ 0 = plain
+ | 1 = size
+ | 2 = alignment
+ | 3 = size_and_alignment
+ ;
+*/
+
+/**
+ * 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
+;
+
+@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
+ ;
+
+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;
+
+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/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/upgrade.properties b/cpp/downgrades/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/upgrade.properties
new file mode 100644
index 000000000000..d697a16a42fd
--- /dev/null
+++ b/cpp/downgrades/3d35dd6b50edfc540c14c6757e0c7b3c5b7b04dd/upgrade.properties
@@ -0,0 +1,3 @@
+description: Add new builtin operations
+compatibility: partial
+exprs.rel: run exprs.qlo
diff --git a/cpp/ql/lib/CHANGELOG.md b/cpp/ql/lib/CHANGELOG.md
index 61cbcd1318ac..9f01040830c1 100644
--- a/cpp/ql/lib/CHANGELOG.md
+++ b/cpp/ql/lib/CHANGELOG.md
@@ -1,3 +1,11 @@
+## 1.3.0
+
+### New Features
+
+* Models-as-data alert provenance information has been extended to the C/C++ language. Any qltests that include the edges relation in their output (for example, `.qlref`s that reference path-problem queries) will need to be have their expected output updated accordingly.
+* Added subclasses of `BuiltInOperations` for `__builtin_has_attribute`, `__builtin_is_corresponding_member`, `__builtin_is_pointer_interconvertible_with_class`, `__is_assignable_no_precondition_check`, `__is_bounded_array`, `__is_convertible`, `__is_corresponding_member`, `__is_nothrow_convertible`, `__is_pointer_interconvertible_with_class`, `__is_referenceable`, `__is_same_as`, `__is_trivially_copy_assignable`, `__is_unbounded_array`, `__is_valid_winrt_type`, `_is_win_class`, `__is_win_interface`, `__reference_binds_to_temporary`, `__reference_constructs_from_temporary`, and `__reference_converts_from_temporary`.
+* The class `NewArrayExpr` adds a predicate `getArraySize()` to allow a more convenient way to access the static size of the array when the extent is missing.
+
## 1.2.0
### New Features
diff --git a/cpp/ql/lib/change-notes/released/1.3.0.md b/cpp/ql/lib/change-notes/released/1.3.0.md
new file mode 100644
index 000000000000..3c3010da96d3
--- /dev/null
+++ b/cpp/ql/lib/change-notes/released/1.3.0.md
@@ -0,0 +1,7 @@
+## 1.3.0
+
+### New Features
+
+* Models-as-data alert provenance information has been extended to the C/C++ language. Any qltests that include the edges relation in their output (for example, `.qlref`s that reference path-problem queries) will need to be have their expected output updated accordingly.
+* Added subclasses of `BuiltInOperations` for `__builtin_has_attribute`, `__builtin_is_corresponding_member`, `__builtin_is_pointer_interconvertible_with_class`, `__is_assignable_no_precondition_check`, `__is_bounded_array`, `__is_convertible`, `__is_corresponding_member`, `__is_nothrow_convertible`, `__is_pointer_interconvertible_with_class`, `__is_referenceable`, `__is_same_as`, `__is_trivially_copy_assignable`, `__is_unbounded_array`, `__is_valid_winrt_type`, `_is_win_class`, `__is_win_interface`, `__reference_binds_to_temporary`, `__reference_constructs_from_temporary`, and `__reference_converts_from_temporary`.
+* The class `NewArrayExpr` adds a predicate `getArraySize()` to allow a more convenient way to access the static size of the array when the extent is missing.
diff --git a/cpp/ql/lib/codeql-pack.release.yml b/cpp/ql/lib/codeql-pack.release.yml
index 75430e73d1c4..ec16350ed6fd 100644
--- a/cpp/ql/lib/codeql-pack.release.yml
+++ b/cpp/ql/lib/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 1.2.0
+lastReleaseVersion: 1.3.0
diff --git a/cpp/ql/lib/qlpack.yml b/cpp/ql/lib/qlpack.yml
index ed373ae9678a..aee0698f32a7 100644
--- a/cpp/ql/lib/qlpack.yml
+++ b/cpp/ql/lib/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/cpp-all
-version: 1.2.0
+version: 1.3.0
groups: cpp
dbscheme: semmlecode.cpp.dbscheme
extractor: cpp
diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll
index 3d9a648ea6ce..73456e457170 100644
--- a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll
+++ b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll
@@ -146,7 +146,7 @@ predicate summaryModel(string row) { any(SummaryModelCsv s).row(row) }
/** Holds if a source model exists for the given parameters. */
predicate sourceModel(
string namespace, string type, boolean subtypes, string name, string signature, string ext,
- string output, string kind, string provenance
+ string output, string kind, string provenance, string model
) {
exists(string row |
sourceModel(row) and
@@ -160,16 +160,20 @@ predicate sourceModel(
row.splitAt(";", 6) = output and
row.splitAt(";", 7) = kind
) and
- provenance = "manual"
+ provenance = "manual" and
+ model = ""
or
- Extensions::sourceModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance,
- _)
+ exists(QlBuiltins::ExtensionId madId |
+ Extensions::sourceModel(namespace, type, subtypes, name, signature, ext, output, kind,
+ provenance, madId) and
+ model = "MaD:" + madId.toString()
+ )
}
/** Holds if a sink model exists for the given parameters. */
predicate sinkModel(
string namespace, string type, boolean subtypes, string name, string signature, string ext,
- string input, string kind, string provenance
+ string input, string kind, string provenance, string model
) {
exists(string row |
sinkModel(row) and
@@ -183,9 +187,14 @@ predicate sinkModel(
row.splitAt(";", 6) = input and
row.splitAt(";", 7) = kind
) and
- provenance = "manual"
+ provenance = "manual" and
+ model = ""
or
- Extensions::sinkModel(namespace, type, subtypes, name, signature, ext, input, kind, provenance, _)
+ exists(QlBuiltins::ExtensionId madId |
+ Extensions::sinkModel(namespace, type, subtypes, name, signature, ext, input, kind, provenance,
+ madId) and
+ model = "MaD:" + madId.toString()
+ )
}
/**
@@ -195,7 +204,7 @@ predicate sinkModel(
*/
private predicate summaryModel0(
string namespace, string type, boolean subtypes, string name, string signature, string ext,
- string input, string output, string kind, string provenance
+ string input, string output, string kind, string provenance, string model
) {
exists(string row |
summaryModel(row) and
@@ -210,10 +219,14 @@ private predicate summaryModel0(
row.splitAt(";", 7) = output and
row.splitAt(";", 8) = kind
) and
- provenance = "manual"
+ provenance = "manual" and
+ model = ""
or
- Extensions::summaryModel(namespace, type, subtypes, name, signature, ext, input, output, kind,
- provenance, _)
+ exists(QlBuiltins::ExtensionId madId |
+ Extensions::summaryModel(namespace, type, subtypes, name, signature, ext, input, output, kind,
+ provenance, madId) and
+ model = "MaD:" + madId.toString()
+ )
}
/**
@@ -234,19 +247,20 @@ private predicate expandInputAndOutput(
*/
predicate summaryModel(
string namespace, string type, boolean subtypes, string name, string signature, string ext,
- string input, string output, string kind, string provenance
+ string input, string output, string kind, string provenance, string model
) {
exists(string input0, string output0 |
- summaryModel0(namespace, type, subtypes, name, signature, ext, input0, output0, kind, provenance) and
+ summaryModel0(namespace, type, subtypes, name, signature, ext, input0, output0, kind,
+ provenance, model) and
expandInputAndOutput(input0, input, output0, output,
[0 .. Private::getMaxElementContentIndirectionIndex() - 1])
)
}
private predicate relevantNamespace(string namespace) {
- sourceModel(namespace, _, _, _, _, _, _, _, _) or
- sinkModel(namespace, _, _, _, _, _, _, _, _) or
- summaryModel(namespace, _, _, _, _, _, _, _, _, _)
+ sourceModel(namespace, _, _, _, _, _, _, _, _, _) or
+ sinkModel(namespace, _, _, _, _, _, _, _, _, _) or
+ summaryModel(namespace, _, _, _, _, _, _, _, _, _, _)
}
private predicate namespaceLink(string shortns, string longns) {
@@ -276,17 +290,17 @@ predicate modelCoverage(string namespace, int namespaces, string kind, string pa
part = "source" and
n =
strictcount(string subns, string type, boolean subtypes, string name, string signature,
- string ext, string output, string provenance |
+ string ext, string output, string provenance, string model |
canonicalNamespaceLink(namespace, subns) and
- sourceModel(subns, type, subtypes, name, signature, ext, output, kind, provenance)
+ sourceModel(subns, type, subtypes, name, signature, ext, output, kind, provenance, model)
)
or
part = "sink" and
n =
strictcount(string subns, string type, boolean subtypes, string name, string signature,
- string ext, string input, string provenance |
+ string ext, string input, string provenance, string model |
canonicalNamespaceLink(namespace, subns) and
- sinkModel(subns, type, subtypes, name, signature, ext, input, kind, provenance)
+ sinkModel(subns, type, subtypes, name, signature, ext, input, kind, provenance, model)
)
or
part = "summary" and
@@ -294,7 +308,7 @@ predicate modelCoverage(string namespace, int namespaces, string kind, string pa
strictcount(string subns, string type, boolean subtypes, string name, string signature,
string ext, string input, string output, string provenance |
canonicalNamespaceLink(namespace, subns) and
- summaryModel(subns, type, subtypes, name, signature, ext, input, output, kind, provenance)
+ summaryModel(subns, type, subtypes, name, signature, ext, input, output, kind, provenance, _)
)
)
}
@@ -303,9 +317,9 @@ predicate modelCoverage(string namespace, int namespaces, string kind, string pa
module CsvValidation {
private string getInvalidModelInput() {
exists(string pred, AccessPath input, string part |
- sinkModel(_, _, _, _, _, _, input, _, _) and pred = "sink"
+ sinkModel(_, _, _, _, _, _, input, _, _, _) and pred = "sink"
or
- summaryModel(_, _, _, _, _, _, input, _, _, _) and pred = "summary"
+ summaryModel(_, _, _, _, _, _, input, _, _, _, _) and pred = "summary"
|
(
invalidSpecComponent(input, part) and
@@ -322,9 +336,9 @@ module CsvValidation {
private string getInvalidModelOutput() {
exists(string pred, string output, string part |
- sourceModel(_, _, _, _, _, _, output, _, _) and pred = "source"
+ sourceModel(_, _, _, _, _, _, output, _, _, _) and pred = "source"
or
- summaryModel(_, _, _, _, _, _, _, output, _, _) and pred = "summary"
+ summaryModel(_, _, _, _, _, _, _, output, _, _, _) and pred = "summary"
|
invalidSpecComponent(output, part) and
not part = "" and
@@ -334,11 +348,11 @@ module CsvValidation {
}
private module KindValConfig implements SharedModelVal::KindValidationConfigSig {
- predicate summaryKind(string kind) { summaryModel(_, _, _, _, _, _, _, _, kind, _) }
+ predicate summaryKind(string kind) { summaryModel(_, _, _, _, _, _, _, _, kind, _, _) }
- predicate sinkKind(string kind) { sinkModel(_, _, _, _, _, _, _, kind, _) }
+ predicate sinkKind(string kind) { sinkModel(_, _, _, _, _, _, _, kind, _, _) }
- predicate sourceKind(string kind) { sourceModel(_, _, _, _, _, _, _, kind, _) }
+ predicate sourceKind(string kind) { sourceModel(_, _, _, _, _, _, _, kind, _, _) }
}
private module KindVal = SharedModelVal::KindValidation;
@@ -379,11 +393,11 @@ module CsvValidation {
private string getInvalidModelSignature() {
exists(string pred, string namespace, string type, string name, string signature, string ext |
- sourceModel(namespace, type, _, name, signature, ext, _, _, _) and pred = "source"
+ sourceModel(namespace, type, _, name, signature, ext, _, _, _, _) and pred = "source"
or
- sinkModel(namespace, type, _, name, signature, ext, _, _, _) and pred = "sink"
+ sinkModel(namespace, type, _, name, signature, ext, _, _, _, _) and pred = "sink"
or
- summaryModel(namespace, type, _, name, signature, ext, _, _, _, _) and pred = "summary"
+ summaryModel(namespace, type, _, name, signature, ext, _, _, _, _, _) and pred = "summary"
|
not namespace.regexpMatch("[a-zA-Z0-9_\\.:]*") and
result = "Dubious namespace \"" + namespace + "\" in " + pred + " model."
@@ -415,9 +429,9 @@ module CsvValidation {
private predicate elementSpec(
string namespace, string type, boolean subtypes, string name, string signature, string ext
) {
- sourceModel(namespace, type, subtypes, name, signature, ext, _, _, _) or
- sinkModel(namespace, type, subtypes, name, signature, ext, _, _, _) or
- summaryModel(namespace, type, subtypes, name, signature, ext, _, _, _, _)
+ sourceModel(namespace, type, subtypes, name, signature, ext, _, _, _, _) or
+ sinkModel(namespace, type, subtypes, name, signature, ext, _, _, _, _) or
+ summaryModel(namespace, type, subtypes, name, signature, ext, _, _, _, _, _)
}
/** Gets the fully templated version of `f`. */
@@ -867,9 +881,9 @@ private module Cached {
* model.
*/
cached
- predicate sourceNode(DataFlow::Node node, string kind) {
+ predicate sourceNode(DataFlow::Node node, string kind, string model) {
exists(SourceSinkInterpretationInput::InterpretNode n |
- isSourceNode(n, kind, _) and n.asNode() = node // TODO
+ isSourceNode(n, kind, model) and n.asNode() = node
)
}
@@ -878,40 +892,57 @@ private module Cached {
* model.
*/
cached
- predicate sinkNode(DataFlow::Node node, string kind) {
+ predicate sinkNode(DataFlow::Node node, string kind, string model) {
exists(SourceSinkInterpretationInput::InterpretNode n |
- isSinkNode(n, kind, _) and n.asNode() = node // TODO
+ isSinkNode(n, kind, model) and n.asNode() = node
)
}
}
import Cached
+/**
+ * Holds if `node` is specified as a source with the given kind in a MaD flow
+ * model.
+ */
+predicate sourceNode(DataFlow::Node node, string kind) { sourceNode(node, kind, _) }
+
+/**
+ * Holds if `node` is specified as a sink with the given kind in a MaD flow
+ * model.
+ */
+predicate sinkNode(DataFlow::Node node, string kind) { sinkNode(node, kind, _) }
+
private predicate interpretSummary(
- Function f, string input, string output, string kind, string provenance
+ Function f, string input, string output, string kind, string provenance, string model
) {
exists(
string namespace, string type, boolean subtypes, string name, string signature, string ext
|
- summaryModel(namespace, type, subtypes, name, signature, ext, input, output, kind, provenance) and
+ summaryModel(namespace, type, subtypes, name, signature, ext, input, output, kind, provenance,
+ model) and
f = interpretElement(namespace, type, subtypes, name, signature, ext)
)
}
// adapter class for converting Mad summaries to `SummarizedCallable`s
private class SummarizedCallableAdapter extends SummarizedCallable {
- SummarizedCallableAdapter() { interpretSummary(this, _, _, _, _) }
+ SummarizedCallableAdapter() { interpretSummary(this, _, _, _, _, _) }
- private predicate relevantSummaryElementManual(string input, string output, string kind) {
+ private predicate relevantSummaryElementManual(
+ string input, string output, string kind, string model
+ ) {
exists(Provenance provenance |
- interpretSummary(this, input, output, kind, provenance) and
+ interpretSummary(this, input, output, kind, provenance, model) and
provenance.isManual()
)
}
- private predicate relevantSummaryElementGenerated(string input, string output, string kind) {
+ private predicate relevantSummaryElementGenerated(
+ string input, string output, string kind, string model
+ ) {
exists(Provenance provenance |
- interpretSummary(this, input, output, kind, provenance) and
+ interpretSummary(this, input, output, kind, provenance, model) and
provenance.isGenerated()
)
}
@@ -920,18 +951,17 @@ private class SummarizedCallableAdapter extends SummarizedCallable {
string input, string output, boolean preservesValue, string model
) {
exists(string kind |
- this.relevantSummaryElementManual(input, output, kind)
+ this.relevantSummaryElementManual(input, output, kind, model)
or
- not this.relevantSummaryElementManual(_, _, _) and
- this.relevantSummaryElementGenerated(input, output, kind)
+ not this.relevantSummaryElementManual(_, _, _, _) and
+ this.relevantSummaryElementGenerated(input, output, kind, model)
|
if kind = "value" then preservesValue = true else preservesValue = false
- ) and
- model = "" // TODO
+ )
}
override predicate hasProvenance(Provenance provenance) {
- interpretSummary(this, _, _, _, provenance)
+ interpretSummary(this, _, _, _, provenance, _)
}
}
diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll
index 11091b3c3585..f19678bfd073 100644
--- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll
+++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll
@@ -239,17 +239,7 @@ class CastNode extends Node {
CastNode() { none() } // stub implementation
}
-class DataFlowCallable extends Function {
- /** Gets a best-effort total ordering. */
- int totalorder() {
- this =
- rank[result](DataFlowCallable c, string file, int startline, int startcolumn |
- c.getLocation().hasLocationInfo(file, startline, startcolumn, _, _)
- |
- c order by file, startline, startcolumn
- )
- }
-}
+class DataFlowCallable extends Function { }
class DataFlowExpr = Expr;
@@ -287,24 +277,12 @@ class DataFlowCall extends Expr instanceof Call {
DataFlowCallable getARuntimeTarget(){ result = super.getTarget() }
/** Gets the enclosing callable of this call. */
DataFlowCallable getEnclosingCallable() { result = this.getEnclosingFunction() }
-
- /** Gets a best-effort total ordering. */
- int totalorder() {
- this =
- rank[result](DataFlowCall c, int startline, int startcolumn |
- c.getLocation().hasLocationInfo(_, startline, startcolumn, _, _)
- |
- c order by startline, startcolumn
- )
- }
}
class NodeRegion instanceof Unit {
string toString() { result = "NodeRegion" }
predicate contains(Node n) { none() }
-
- int totalOrder() { result = 1 }
}
predicate isUnreachableInCall(NodeRegion nr, DataFlowCall call) { none() } // stub implementation
diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowSummaryImpl.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowSummaryImpl.qll
index dc8e8aaa3143..424f3651bf88 100644
--- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowSummaryImpl.qll
+++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/FlowSummaryImpl.qll
@@ -112,9 +112,8 @@ module SourceSinkInterpretationInput implements
exists(
string namespace, string type, boolean subtypes, string name, string signature, string ext
|
- sourceModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance) and
- e = interpretElement(namespace, type, subtypes, name, signature, ext) and
- model = "" // TODO
+ sourceModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance, model) and
+ e = interpretElement(namespace, type, subtypes, name, signature, ext)
)
}
@@ -128,9 +127,8 @@ module SourceSinkInterpretationInput implements
exists(
string package, string type, boolean subtypes, string name, string signature, string ext
|
- sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance) and
- e = interpretElement(package, type, subtypes, name, signature, ext) and
- model = "" // TODO
+ sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance, model) and
+ e = interpretElement(package, type, subtypes, name, signature, ext)
)
}
diff --git a/cpp/ql/lib/semmle/code/cpp/exprs/BuiltInOperations.qll b/cpp/ql/lib/semmle/code/cpp/exprs/BuiltInOperations.qll
index ba924d58da5b..dcf72604ca92 100644
--- a/cpp/ql/lib/semmle/code/cpp/exprs/BuiltInOperations.qll
+++ b/cpp/ql/lib/semmle/code/cpp/exprs/BuiltInOperations.qll
@@ -383,6 +383,37 @@ class BuiltInOperationIsConvertibleTo extends BuiltInOperation, @isconvtoexpr {
override string getAPrimaryQlClass() { result = "BuiltInOperationIsConvertibleTo" }
}
+/**
+ * A C++ `__is_convertible` built-in operation (used by some implementations
+ * of the `` header).
+ *
+ * Returns `true` if the first type can be converted to the second type.
+ * ```
+ * bool v = __is_convertible(MyType, OtherType);
+ * ```
+ */
+class BuiltInOperationIsConvertible extends BuiltInOperation, @isconvertible {
+ override string toString() { result = "__is_convertible" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationIsConvertible" }
+}
+
+/**
+ * A C++ `__is_nothrow_convertible` built-in operation (used by some implementations
+ * of the `` header).
+ *
+ * Returns `true` if the first type can be converted to the second type and the
+ * conversion operator has an empty exception specification.
+ * ```
+ * bool v = __is_nothrow_convertible(MyType, OtherType);
+ * ```
+ */
+class BuiltInOperationIsNothrowConvertible extends BuiltInOperation, @isnothrowconvertible {
+ override string toString() { result = "__is_nothrow_convertible" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationIsNothrowConvertible" }
+}
+
/**
* A C++ `__is_empty` built-in operation (used by some implementations of the
* `` header).
@@ -647,8 +678,7 @@ class BuiltInOperationIsTriviallyAssignable extends BuiltInOperation, @istrivial
* The `__is_nothrow_assignable` built-in operation (used by some
* implementations of the `` header).
*
- * Returns true if there exists a `C::operator =(const D& d) nothrow`
- * assignment operator (i.e, with an empty exception specification).
+ * Returns true if there exists an assignment operator with an empty exception specification.
* ```
* bool v = __is_nothrow_assignable(MyType1, MyType2);
* ```
@@ -663,8 +693,7 @@ class BuiltInOperationIsNothrowAssignable extends BuiltInOperation, @isnothrowas
* The `__is_assignable` built-in operation (used by some implementations
* of the `` header).
*
- * Returns true if there exists a `C::operator =(const D& d)` assignment
- * operator.
+ * Returns true if there exists an assignment operator.
* ```
* bool v = __is_assignable(MyType1, MyType2);
* ```
@@ -675,6 +704,25 @@ class BuiltInOperationIsAssignable extends BuiltInOperation, @isassignable {
override string getAPrimaryQlClass() { result = "BuiltInOperationIsAssignable" }
}
+/**
+ * The `__is_assignable_no_precondition_check` built-in operation (used by some
+ * implementations of the `` header).
+ *
+ * Returns true if there exists an assignment operator.
+ * ```
+ * bool v = __is_assignable_no_precondition_check(MyType1, MyType2);
+ * ```
+ */
+class BuiltInOperationIsAssignableNoPreconditionCheck extends BuiltInOperation,
+ @isassignablenopreconditioncheck
+{
+ override string toString() { result = "__is_assignable_no_precondition_check" }
+
+ override string getAPrimaryQlClass() {
+ result = "BuiltInOperationIsAssignableNoPreconditionCheck"
+ }
+}
+
/**
* The `__is_standard_layout` built-in operation (used by some implementations
* of the `` header).
@@ -708,6 +756,20 @@ class BuiltInOperationIsTriviallyCopyable extends BuiltInOperation, @istrivially
override string getAPrimaryQlClass() { result = "BuiltInOperationIsTriviallyCopyable" }
}
+/**
+ * The `__is_trivially_copy_assignable` built-in operation (used by some
+ * implementations of the `` header).
+ *
+ * Returns `true` if instances of this type can be copied using a trivial
+ * copy operator.
+ */
+class BuiltInOperationIsTriviallyCopyAssignable extends BuiltInOperation, @istriviallycopyassignable
+{
+ override string toString() { result = "__is_trivially_copy_assignable" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationIsTriviallyCopyAssignable" }
+}
+
/**
* The `__is_literal_type` built-in operation (used by some implementations of
* the `` header).
@@ -1062,6 +1124,24 @@ class BuiltInOperationIsSame extends BuiltInOperation, @issame {
override string getAPrimaryQlClass() { result = "BuiltInOperationIsSame" }
}
+/**
+ * A C++ `__is_same_as` built-in operation (used by some implementations of the
+ * `` header).
+ *
+ * Returns `true` if two types are the same.
+ * ```
+ * template
+ * struct is_same
+ * : public integral_constant
+ * { };
+ * ```
+ */
+class BuiltInOperationIsSameAs extends BuiltInOperation, @issameas {
+ override string toString() { result = "__is_same_as" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationIsSameAs" }
+}
+
/**
* A C++ `__is_function` built-in operation (used by some implementations of the
* `` header).
@@ -1120,6 +1200,87 @@ class BuiltInOperationIsPointerInterconvertibleBaseOf extends BuiltInOperation,
}
}
+/**
+ * A C++ `__is_pointer_interconvertible_with_class` built-in operation (used
+ * by some implementations of the `` header).
+ *
+ * Returns `true` if a member pointer is pointer-interconvertible with a
+ * class type.
+ * ```
+ * template
+ * constexpr bool is_pointer_interconvertible_with_class(_Up _Tp::*mp) noexcept
+ * = __is_pointer_interconvertible_with_class(_Tp, mp);
+ * ```
+ */
+class BuiltInOperationIsPointerInterconvertibleWithClass extends BuiltInOperation,
+ @ispointerinterconvertiblewithclass
+{
+ override string toString() { result = "__is_pointer_interconvertible_with_class" }
+
+ override string getAPrimaryQlClass() {
+ result = "BuiltInOperationIsPointerInterconvertibleWithClass"
+ }
+}
+
+/**
+ * A C++ `__builtin_is_pointer_interconvertible_with_class` built-in operation (used
+ * by some implementations of the `` header).
+ *
+ * Returns `true` if a member pointer is pointer-interconvertible with a class type.
+ * ```
+ * template
+ * constexpr bool is_pointer_interconvertible_with_class(_Up _Tp::*mp) noexcept
+ * = __builtin_is_pointer_interconvertible_with_class(mp);
+ * ```
+ */
+class BuiltInOperationBuiltInIsPointerInterconvertible extends BuiltInOperation,
+ @builtinispointerinterconvertiblewithclass
+{
+ override string toString() { result = "__builtin_is_pointer_interconvertible_with_class" }
+
+ override string getAPrimaryQlClass() {
+ result = "BuiltInOperationBuiltInIsPointerInterconvertible"
+ }
+}
+
+/**
+ * A C++ `__is_corresponding_member` built-in operation (used
+ * by some implementations of the `` header).
+ *
+ * Returns `true` if two member pointers refer to corresponding
+ * members in the initial sequences of two class types.
+ * ```
+ * template
+ * constexpr bool is_corresponding_member(_Up1 _Tp1::*mp1, _Up2 _Tp2::*mp2 ) noexcept
+ * = __is_corresponding_member(_Tp1, _Tp2, mp1, mp2);
+ * ```
+ */
+class BuiltInOperationIsCorrespondingMember extends BuiltInOperation, @iscorrespondingmember {
+ override string toString() { result = "__is_corresponding_member" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationIsCorrespondingMember" }
+}
+
+/**
+ * A C++ `__builtin_is_corresponding_member` built-in operation (used
+ * by some implementations of the `` header).
+ *
+ * Returns `true` if two member pointers refer to corresponding
+ * members in the initial sequences of two class types.
+ * ```
+ * template
+ * constexpr bool is_corresponding_member(_Up1 _Tp1::*mp1, _Up2 _Tp2::*mp2 ) noexcept
+ * = __builtin_is_corresponding_member(mp1, mp2);
+ * ```
+ */
+class BuiltInOperationBuiltInIsCorrespondingMember extends BuiltInOperation,
+ @builtiniscorrespondingmember
+{
+ override string toString() { result = "__builtin_is_corresponding_member" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationBuiltInIsCorrespondingMember" }
+}
+
/**
* A C++ `__is_array` built-in operation (used by some implementations of the
* `` header).
@@ -1138,6 +1299,42 @@ class BuiltInOperationIsArray extends BuiltInOperation, @isarray {
override string getAPrimaryQlClass() { result = "BuiltInOperationIsArray" }
}
+/**
+ * A C++ `__is_bounded_array` built-in operation (used by some implementations
+ * of the `` header).
+ *
+ * Returns `true` if a type is a bounded array type.
+ * ```
+ * template
+ * struct is_bounded_array
+ * : public integral_constant
+ * { };
+ * ```
+ */
+class BuiltInOperationIsBoundedArray extends BuiltInOperation, @isboundedarray {
+ override string toString() { result = "__is_bounded_array" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationIsBoundedArray" }
+}
+
+/**
+ * A C++ `__is_unbounded_array` built-in operation (used by some implementations
+ * of the `` header).
+ *
+ * Returns `true` if a type is an unbounded array type.
+ * ```
+ * template
+ * struct is_bounded_array
+ * : public integral_constant
+ * { };
+ * ```
+ */
+class BuiltInOperationIsUnboundedArray extends BuiltInOperation, @isunboundedarray {
+ override string toString() { result = "__is_unbounded_array" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationIsUnboundedArray" }
+}
+
/**
* A C++ `__array_rank` built-in operation (used by some implementations of the
* `` header).
@@ -1554,10 +1751,10 @@ class BuiltInBitCast extends BuiltInOperation, @builtinbitcast {
*
* Returns `true` if a type is a trivial type.
* ```
- * template
- * struct is_trivial
- * : public integral_constant
- * {};
+ * template
+ * struct is_trivial
+ * : public integral_constant
+ * {};
* ```
*/
class BuiltInIsTrivial extends BuiltInOperation, @istrivialexpr {
@@ -1565,3 +1762,126 @@ class BuiltInIsTrivial extends BuiltInOperation, @istrivialexpr {
override string getAPrimaryQlClass() { result = "BuiltInIsTrivial" }
}
+
+/**
+ * A C++ `__reference_constructs_from_temporary` built-in operation
+ * (used by some implementations of the `` header).
+ *
+ * Returns `true` if a reference type `_Tp` is bound to an expression of
+ * type `_Up` in direct-initialization, and a temporary object is bound.
+ * ```
+ * template
+ * struct reference_constructs_from_temporary
+ * : public integral_constant
+ * {};
+ * ```
+ */
+class BuiltInOperationReferenceConstructsFromTemporary extends BuiltInOperation,
+ @referenceconstructsfromtemporary
+{
+ override string toString() { result = "__reference_constructs_from_temporary" }
+
+ override string getAPrimaryQlClass() {
+ result = "BuiltInOperationReferenceConstructsFromTemporary"
+ }
+}
+
+/**
+ * A C++ `__reference_converts_from_temporary` built-in operation
+ * (used by some implementations of the `` header).
+ *
+ * Returns `true` if a reference type `_Tp` is bound to an expression of
+ * type `_Up` in copy-initialization, and a temporary object is bound.
+ * ```
+ * template
+ * struct reference_converts_from_temporary
+ * : public integral_constant
+ * {};
+ * ```
+ */
+class BuiltInOperationReferenceCovertsFromTemporary extends BuiltInOperation,
+ @referenceconvertsfromtemporary
+{
+ override string toString() { result = "__reference_converts_from_temporary" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationReferenceCovertsFromTemporary" }
+}
+
+/**
+ * A C++ `__reference_binds_to_temporary` built-in operation (used by some
+ * implementations of the `` header).
+ *
+ * Returns `true` if a reference of type `Type1` is bound to an expression of
+ * type `Type1`, and a temporary object is bound.
+ * ```
+ * __reference_binds_to_temporary(Type1, Type2)
+ */
+class BuiltInOperationReferenceBindsToTemporary extends BuiltInOperation, @referencebindstotemporary
+{
+ override string toString() { result = "__reference_binds_to_temporary" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationReferenceBindsToTemporary" }
+}
+
+/**
+ * A C++ `__builtin_has_attribute` built-in operation.
+ *
+ * Returns `true` if a type or expression has been declared with the
+ * specified attribute.
+ * ```
+ * __attribute__ ((aligned(8))) int v;
+ * bool has_attribute = __builtin_has_attribute(v, aligned);
+ * ```
+ */
+class BuiltInOperationHasAttribute extends BuiltInOperation, @builtinhasattribute {
+ override string toString() { result = "__builtin_has_attribute" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationHasAttribute" }
+}
+
+/**
+ * A C++ `__is_referenceable` built-in operation.
+ *
+ * Returns `true` if a type can be referenced.
+ * ```
+ * bool is_referenceable = __is_referenceable(int);
+ * ```
+ */
+class BuiltInOperationIsReferenceable extends BuiltInOperation, @isreferenceable {
+ override string toString() { result = "__is_referenceable" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationIsReferenceable" }
+}
+
+/**
+ * The `__is_valid_winrt_type` built-in operation. This is a Microsoft extension.
+ *
+ * Returns `true` if the type is a valid WinRT type.
+ */
+class BuiltInOperationIsValidWinRtType extends BuiltInOperation, @isvalidwinrttype {
+ override string toString() { result = "__is_valid_winrt_type" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationIsValidWinRtType" }
+}
+
+/**
+ * The `__is_win_class` built-in operation. This is a Microsoft extension.
+ *
+ * Returns `true` if the class is a ref class.
+ */
+class BuiltInOperationIsWinClass extends BuiltInOperation, @iswinclass {
+ override string toString() { result = "__is_win_class" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationIsWinClass" }
+}
+
+/**
+ * The `__is_win_class` built-in operation. This is a Microsoft extension.
+ *
+ * Returns `true` if the class is an interface class.
+ */
+class BuiltInOperationIsWinInterface extends BuiltInOperation, @iswininterface {
+ override string toString() { result = "__is_win_interface" }
+
+ override string getAPrimaryQlClass() { result = "BuiltInOperationIsWinInterface" }
+}
diff --git a/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll b/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll
index bf56a121821c..0d68bb1047fa 100644
--- a/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll
+++ b/cpp/ql/lib/semmle/code/cpp/exprs/Expr.qll
@@ -949,6 +949,16 @@ class NewArrayExpr extends NewOrNewArrayExpr, @new_array_expr {
* gives nothing, as the 10 is considered part of the type.
*/
Expr getExtent() { result = this.getChild(2) }
+
+ /**
+ * Gets the number of elements in the array, if available.
+ *
+ * For example, `new int[]{1,2,3}` has an array size of 3.
+ */
+ int getArraySize() {
+ result = this.getAllocatedType().(ArrayType).getArraySize() or
+ result = this.getInitializer().(ArrayAggregateLiteral).getArraySize()
+ }
}
private class TDeleteOrDeleteArrayExpr = @delete_expr or @delete_array_expr;
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll
index 34fdb500139a..9672f27199d6 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll
@@ -104,7 +104,7 @@ predicate hasRawIndirectInstruction(Instruction instr, int indirectionIndex) {
cached
private newtype TDefImpl =
- TDefAddressImpl(BaseIRVariable v) or
+ TDefAddressImpl(BaseSourceVariable v) or
TDirectDefImpl(Operand address, int indirectionIndex) {
isDef(_, _, address, _, _, indirectionIndex)
} or
@@ -325,9 +325,9 @@ private Instruction getInitializationTargetAddress(IRVariable v) {
)
}
-/** An initial definition of an `IRVariable`'s address. */
-private class DefAddressImpl extends DefImpl, TDefAddressImpl {
- BaseIRVariable v;
+/** An initial definition of an SSA variable address. */
+abstract private class DefAddressImpl extends DefImpl, TDefAddressImpl {
+ BaseSourceVariable v;
DefAddressImpl() {
this = TDefAddressImpl(v) and
@@ -342,6 +342,19 @@ private class DefAddressImpl extends DefImpl, TDefAddressImpl {
final override Node0Impl getValue() { none() }
+ override Cpp::Location getLocation() { result = v.getLocation() }
+
+ final override SourceVariable getSourceVariable() {
+ result.getBaseVariable() = v and
+ result.getIndirection() = 0
+ }
+
+ final override BaseSourceVariable getBaseSourceVariable() { result = v }
+}
+
+private class DefVariableAddressImpl extends DefAddressImpl {
+ override BaseIRVariable v;
+
final override predicate hasIndexInBlock(IRBlock block, int index) {
exists(IRVariable var | var = v.getIRVariable() |
block.getInstruction(index) = getInitializationTargetAddress(var)
@@ -353,15 +366,14 @@ private class DefAddressImpl extends DefImpl, TDefAddressImpl {
index = 0
)
}
+}
- override Cpp::Location getLocation() { result = v.getIRVariable().getLocation() }
+private class DefCallAddressImpl extends DefAddressImpl {
+ override BaseCallVariable v;
- final override SourceVariable getSourceVariable() {
- result.getBaseVariable() = v and
- result.getIndirection() = 0
+ final override predicate hasIndexInBlock(IRBlock block, int index) {
+ block.getInstruction(index) = v.getCallInstruction()
}
-
- final override BaseSourceVariable getBaseSourceVariable() { result = v }
}
private class DirectDef extends DefImpl, TDirectDefImpl {
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll
index 65f1c57b80c3..52bb16b1f3c5 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll
@@ -40,7 +40,8 @@ predicate ignoreInstruction(Instruction instr) {
instr instanceof AliasedDefinitionInstruction or
instr instanceof AliasedUseInstruction or
instr instanceof InitializeNonLocalInstruction or
- instr instanceof ReturnIndirectionInstruction
+ instr instanceof ReturnIndirectionInstruction or
+ instr instanceof UninitializedGroupInstruction
)
}
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/MemoryAccessKind.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/MemoryAccessKind.qll
index 5e11a310e2fb..1017360c6d60 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/MemoryAccessKind.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/MemoryAccessKind.qll
@@ -13,7 +13,8 @@ private newtype TMemoryAccessKind =
TPhiMemoryAccess() or
TUnmodeledMemoryAccess() or
TChiTotalMemoryAccess() or
- TChiPartialMemoryAccess()
+ TChiPartialMemoryAccess() or
+ TGroupedMemoryAccess()
/**
* Describes the set of memory locations memory accessed by a memory operand or
@@ -99,3 +100,11 @@ class ChiTotalMemoryAccess extends MemoryAccessKind, TChiTotalMemoryAccess {
class ChiPartialMemoryAccess extends MemoryAccessKind, TChiPartialMemoryAccess {
override string toString() { result = "chi(partial)" }
}
+
+/**
+ * The result of an `UninitializedGroup` instruction, which initializes a set of
+ * allocations that are each assigned the same virtual variable.
+ */
+class GroupedMemoryAccess extends MemoryAccessKind, TGroupedMemoryAccess {
+ override string toString() { result = "group" }
+}
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/Opcode.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/Opcode.qll
index c473969467da..bd1ffcd5ce15 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/Opcode.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/Opcode.qll
@@ -89,6 +89,7 @@ private newtype TOpcode =
TSizedBufferMayWriteSideEffect() or
TInitializeDynamicAllocation() or
TChi() or
+ TUninitializedGroup() or
TInlineAsm() or
TUnreached() or
TNewObj()
@@ -1237,6 +1238,17 @@ module Opcode {
}
}
+ /**
+ * The `Opcode` for a `UninitializedGroup`.
+ *
+ * See the `UninitializedGroupInstruction` documentation for more details.
+ */
+ class UninitializedGroup extends Opcode, TUninitializedGroup {
+ final override string toString() { result = "UninitializedGroup" }
+
+ override GroupedMemoryAccess getWriteMemoryAccess() { any() }
+ }
+
/**
* The `Opcode` for an `InlineAsmInstruction`.
*
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll
index c7e40da1e17c..af5dd4199858 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll
@@ -2142,6 +2142,47 @@ class ChiInstruction extends Instruction {
final predicate isPartialUpdate() { Construction::chiOnlyPartiallyUpdatesLocation(this) }
}
+/**
+ * An instruction that initializes a set of allocations that are each assigned
+ * the same "virtual variable".
+ *
+ * As an example, consider the following snippet:
+ * ```
+ * int a;
+ * int b;
+ * int* p;
+ * if(b) {
+ * p = &a;
+ * } else {
+ * p = &b;
+ * }
+ * *p = 5;
+ * int x = a;
+ * ```
+ *
+ * Since both the address of `a` and `b` reach `p` at `*p = 5` the IR alias
+ * analysis will create a region that contains both `a` and `b`. The region
+ * containing both `a` and `b` are initialized by an `UninitializedGroup`
+ * instruction in the entry block of the enclosing function.
+ */
+class UninitializedGroupInstruction extends Instruction {
+ UninitializedGroupInstruction() { this.getOpcode() instanceof Opcode::UninitializedGroup }
+
+ /**
+ * Gets an `IRVariable` whose memory is initialized by this instruction, if any.
+ * Note: Allocations that are not represented as `IRVariable`s (such as
+ * dynamic allocations) are not returned by this predicate even if this
+ * instruction initializes such memory.
+ */
+ final IRVariable getAnIRVariable() {
+ result = Construction::getAnUninitializedGroupVariable(this)
+ }
+
+ final override string getImmediateString() {
+ result = strictconcat(this.getAnIRVariable().toString(), ",")
+ }
+}
+
/**
* An instruction representing unreachable code.
*
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasAnalysis.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasAnalysis.qll
index 23a7c1e77fde..8f3493c1065f 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasAnalysis.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasAnalysis.qll
@@ -106,8 +106,7 @@ private predicate operandEscapesDomain(Operand operand) {
not isArgumentForParameter(_, operand, _) and
not isOnlyEscapesViaReturnArgument(operand) and
not operand.getUse() instanceof ReturnValueInstruction and
- not operand.getUse() instanceof ReturnIndirectionInstruction and
- not operand instanceof PhiInputOperand
+ not operand.getUse() instanceof ReturnIndirectionInstruction
}
/**
@@ -191,6 +190,11 @@ private predicate operandIsPropagated(Operand operand, IntValue bitOffset, Instr
// A copy propagates the source value.
operand = instr.(CopyInstruction).getSourceValueOperand() and bitOffset = 0
)
+ or
+ operand = instr.(PhiInstruction).getAnInputOperand() and
+ // Using `unknown` ensures termination since we cannot keep incrementing a bit offset
+ // through the back edge of a loop (or through recursion).
+ bitOffset = Ints::unknown()
}
private predicate operandEscapesNonReturn(Operand operand) {
@@ -212,9 +216,6 @@ private predicate operandEscapesNonReturn(Operand operand) {
or
isOnlyEscapesViaReturnArgument(operand) and resultEscapesNonReturn(operand.getUse())
or
- operand instanceof PhiInputOperand and
- resultEscapesNonReturn(operand.getUse())
- or
operandEscapesDomain(operand)
}
@@ -236,9 +237,6 @@ private predicate operandMayReachReturn(Operand operand) {
operand.getUse() instanceof ReturnValueInstruction
or
isOnlyEscapesViaReturnArgument(operand) and resultMayReachReturn(operand.getUse())
- or
- operand instanceof PhiInputOperand and
- resultMayReachReturn(operand.getUse())
}
private predicate operandReturned(Operand operand, IntValue bitOffset) {
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasConfiguration.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasConfiguration.qll
index 8cf69dec6ef8..ba2c1d5a22c0 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasConfiguration.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasConfiguration.qll
@@ -101,6 +101,8 @@ class IndirectParameterAllocation extends Allocation, TIndirectParameterAllocati
final override predicate isAlwaysAllocatedOnStack() { none() }
final override predicate alwaysEscapes() { none() }
+
+ final IRAutomaticVariable getIRVariable() { result = var }
}
class DynamicAllocation extends Allocation, TDynamicAllocation {
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 10fddf6352ba..aba70f8771d2 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
@@ -8,6 +8,7 @@ private import semmle.code.cpp.ir.internal.IntegerConstant as Ints
private import semmle.code.cpp.ir.internal.IntegerInterval as Interval
private import semmle.code.cpp.ir.implementation.internal.OperandTag
private import AliasConfiguration
+private import codeql.util.Boolean
private class IntValue = Ints::IntValue;
@@ -16,49 +17,196 @@ private predicate isIndirectOrBufferMemoryAccess(MemoryAccessKind kind) {
kind instanceof BufferMemoryAccess
}
+private predicate hasMemoryAccess(
+ AddressOperand addrOperand, Allocation var, IntValue startBitOffset, boolean grouped
+) {
+ addressOperandAllocationAndOffset(addrOperand, var, startBitOffset) and
+ if strictcount(Allocation alloc | addressOperandAllocationAndOffset(addrOperand, alloc, _)) > 1
+ then grouped = true
+ else grouped = false
+}
+
private predicate hasResultMemoryAccess(
- Instruction instr, Allocation var, IRType type, Language::LanguageType languageType,
- IntValue startBitOffset, IntValue endBitOffset, boolean isMayAccess
+ AddressOperand address, Instruction instr, Allocation var, IRType type,
+ Language::LanguageType languageType, IntValue startBitOffset, IntValue endBitOffset,
+ boolean isMayAccess, boolean grouped
) {
- exists(AddressOperand addrOperand |
- addrOperand = instr.getResultAddressOperand() and
- addressOperandAllocationAndOffset(addrOperand, var, startBitOffset) and
- languageType = instr.getResultLanguageType() and
- type = languageType.getIRType() and
- isIndirectOrBufferMemoryAccess(instr.getResultMemoryAccess()) and
- (if instr.hasResultMayMemoryAccess() then isMayAccess = true else isMayAccess = false) and
- if exists(type.getByteSize())
- then endBitOffset = Ints::add(startBitOffset, Ints::mul(type.getByteSize(), 8))
- else endBitOffset = Ints::unknown()
- )
+ address = instr.getResultAddressOperand() and
+ hasMemoryAccess(address, var, startBitOffset, grouped) and
+ languageType = instr.getResultLanguageType() and
+ type = languageType.getIRType() and
+ isIndirectOrBufferMemoryAccess(instr.getResultMemoryAccess()) and
+ (if instr.hasResultMayMemoryAccess() then isMayAccess = true else isMayAccess = false) and
+ if exists(type.getByteSize())
+ then endBitOffset = Ints::add(startBitOffset, Ints::mul(type.getByteSize(), 8))
+ else endBitOffset = Ints::unknown()
}
private predicate hasOperandMemoryAccess(
- MemoryOperand operand, Allocation var, IRType type, Language::LanguageType languageType,
- IntValue startBitOffset, IntValue endBitOffset, boolean isMayAccess
+ AddressOperand address, MemoryOperand operand, Allocation var, IRType type,
+ Language::LanguageType languageType, IntValue startBitOffset, IntValue endBitOffset,
+ boolean isMayAccess, boolean grouped
) {
- exists(AddressOperand addrOperand |
- addrOperand = operand.getAddressOperand() and
- addressOperandAllocationAndOffset(addrOperand, var, startBitOffset) and
- languageType = operand.getLanguageType() and
- type = languageType.getIRType() and
- isIndirectOrBufferMemoryAccess(operand.getMemoryAccess()) and
- (if operand.hasMayReadMemoryAccess() then isMayAccess = true else isMayAccess = false) and
- if exists(type.getByteSize())
- then endBitOffset = Ints::add(startBitOffset, Ints::mul(type.getByteSize(), 8))
- else endBitOffset = Ints::unknown()
+ address = operand.getAddressOperand() and
+ hasMemoryAccess(address, var, startBitOffset, grouped) and
+ languageType = operand.getLanguageType() and
+ type = languageType.getIRType() and
+ isIndirectOrBufferMemoryAccess(operand.getMemoryAccess()) and
+ (if operand.hasMayReadMemoryAccess() then isMayAccess = true else isMayAccess = false) and
+ if exists(type.getByteSize())
+ then endBitOffset = Ints::add(startBitOffset, Ints::mul(type.getByteSize(), 8))
+ else endBitOffset = Ints::unknown()
+}
+
+private Allocation getAnAllocation(AddressOperand address) {
+ hasResultMemoryAccess(address, _, result, _, _, _, _, _, true) or
+ hasOperandMemoryAccess(address, _, result, _, _, _, _, _, true)
+}
+
+private module AllocationSet0 =
+ QlBuiltins::InternSets;
+
+/**
+ * A set of allocations containing at least 2 elements.
+ */
+private class NonSingletonSets extends AllocationSet0::Set {
+ NonSingletonSets() { strictcount(Allocation var | this.contains(var)) > 1 }
+
+ /** Gets an allocation from this set. */
+ Allocation getAnAllocation() { this.contains(result) }
+
+ /** Gets the string representation of this set. */
+ string toString() { result = "{" + strictconcat(this.getAnAllocation().toString(), ", ") + "}" }
+}
+
+/** Holds the instersection of `s1` and `s2` is non-empty. */
+private predicate hasOverlappingElement(NonSingletonSets s1, NonSingletonSets s2) {
+ exists(Allocation var |
+ s1.contains(var) and
+ s2.contains(var)
+ )
+}
+
+private module AllocationSet =
+ QlBuiltins::EquivalenceRelation;
+
+/**
+ * Holds if `var` is created by the AST element `e`. Furthermore, the value `d`
+ * represents which branch of the `Allocation` type `var` is from.
+ */
+private predicate allocationAst(Allocation var, @element e, int d) {
+ var.(VariableAllocation).getIRVariable().getAst() = e and d = 0
+ or
+ var.(IndirectParameterAllocation).getIRVariable().getAst() = e and d = 1
+ or
+ var.(DynamicAllocation).getABaseInstruction().getAst() = e and d = 2
+}
+
+/** Holds if `x = y` and `x` is an AST element that creates an `Allocation`. */
+private predicate id(@element x, @element y) {
+ allocationAst(_, x, _) and
+ x = y
+}
+
+private predicate idOf(@element x, int y) = equivalenceRelation(id/2)(x, y)
+
+/** Gets a unique integer representation of `var`. */
+private int getUniqueAllocationId(Allocation var) {
+ exists(int r, @element e, int d |
+ allocationAst(var, e, d) and
+ idOf(e, r) and
+ result = 3 * r + d
)
}
+/**
+ * An equivalence class of a set of allocations.
+ *
+ * Any `VariableGroup` will be completely disjunct from any other
+ * `VariableGroup`.
+ */
+class VariableGroup extends AllocationSet::EquivalenceClass {
+ /** Gets the location of this set. */
+ final Location getLocation() { result = this.getIRFunction().getLocation() }
+
+ /** Gets the enclosing `IRFunction` of this set. */
+ final IRFunction getIRFunction() {
+ result = unique( | | this.getAnAllocation().getEnclosingIRFunction())
+ }
+
+ /** Gets the type of elements contained in this set. */
+ final Language::LanguageType getType() {
+ strictcount(Language::LanguageType langType |
+ exists(Allocation var | var = this.getAnAllocation() |
+ hasResultMemoryAccess(_, _, var, _, langType, _, _, _, true) or
+ hasOperandMemoryAccess(_, _, var, _, langType, _, _, _, true)
+ )
+ ) = 1 and
+ exists(Allocation var | var = this.getAnAllocation() |
+ hasResultMemoryAccess(_, _, var, _, result, _, _, _, true) or
+ hasOperandMemoryAccess(_, _, var, _, result, _, _, _, true)
+ )
+ or
+ strictcount(Language::LanguageType langType |
+ exists(Allocation var | var = this.getAnAllocation() |
+ hasResultMemoryAccess(_, _, var, _, langType, _, _, _, true) or
+ hasOperandMemoryAccess(_, _, var, _, langType, _, _, _, true)
+ )
+ ) > 1 and
+ result = any(IRUnknownType type).getCanonicalLanguageType()
+ }
+
+ /** Gets an allocation of this set. */
+ final Allocation getAnAllocation() {
+ exists(AllocationSet0::Set set |
+ this = AllocationSet::getEquivalenceClass(set) and
+ set.contains(result)
+ )
+ }
+
+ /** Gets a unique string representing this set. */
+ final private string getUniqueId() {
+ result = strictconcat(getUniqueAllocationId(this.getAnAllocation()).toString(), ",")
+ }
+
+ /**
+ * Gets the order that this set should be initialized in.
+ *
+ * Note: This is _not_ the order in which the _members_ of the set should be
+ * initialized. Rather, it represents the order in which the set should be
+ * initialized in relation to other sets. That is, if
+ * ```
+ * getInitializationOrder() = 2
+ * ```
+ * then this set will be initialized as the second (third) set in the
+ * enclosing function. In order words, the third `UninitializedGroup`
+ * instruction in the entry block of the enclosing function will initialize
+ * this set of allocations.
+ */
+ final int getInitializationOrder() {
+ exists(IRFunction func |
+ func = this.getIRFunction() and
+ this =
+ rank[result + 1](VariableGroup vg, string uniq |
+ vg.getIRFunction() = func and uniq = vg.getUniqueId()
+ |
+ vg order by uniq
+ )
+ )
+ }
+
+ string toString() { result = "{" + strictconcat(this.getAnAllocation().toString(), ", ") + "}" }
+}
+
private newtype TMemoryLocation =
TVariableMemoryLocation(
Allocation var, IRType type, Language::LanguageType languageType, IntValue startBitOffset,
IntValue endBitOffset, boolean isMayAccess
) {
(
- hasResultMemoryAccess(_, var, type, _, startBitOffset, endBitOffset, isMayAccess)
+ hasResultMemoryAccess(_, _, var, type, _, startBitOffset, endBitOffset, isMayAccess, false)
or
- hasOperandMemoryAccess(_, var, type, _, startBitOffset, endBitOffset, isMayAccess)
+ hasOperandMemoryAccess(_, _, var, type, _, startBitOffset, endBitOffset, isMayAccess, false)
or
// For a stack variable, always create a memory location for the entire variable.
var.isAlwaysAllocatedOnStack() and
@@ -69,22 +217,14 @@ private newtype TMemoryLocation =
) and
languageType = type.getCanonicalLanguageType()
} or
- TEntireAllocationMemoryLocation(Allocation var, boolean isMayAccess) {
- (
- var instanceof IndirectParameterAllocation or
- var instanceof DynamicAllocation
- ) and
- (isMayAccess = false or isMayAccess = true)
- } or
- TUnknownMemoryLocation(IRFunction irFunc, boolean isMayAccess) {
- isMayAccess = false or isMayAccess = true
- } or
- TAllNonLocalMemory(IRFunction irFunc, boolean isMayAccess) {
- isMayAccess = false or isMayAccess = true
+ TEntireAllocationMemoryLocation(Allocation var, Boolean isMayAccess) {
+ var instanceof IndirectParameterAllocation or
+ var instanceof DynamicAllocation
} or
- TAllAliasedMemory(IRFunction irFunc, boolean isMayAccess) {
- isMayAccess = false or isMayAccess = true
- }
+ TGroupedMemoryLocation(VariableGroup vg, Boolean isMayAccess, Boolean isAll) or
+ TUnknownMemoryLocation(IRFunction irFunc, Boolean isMayAccess) or
+ TAllNonLocalMemory(IRFunction irFunc, Boolean isMayAccess) or
+ TAllAliasedMemory(IRFunction irFunc, Boolean isMayAccess)
/**
* Represents the memory location accessed by a memory operand or memory result. In this implementation, the location is
@@ -116,7 +256,14 @@ abstract class MemoryLocation extends TMemoryLocation {
abstract predicate isMayAccess();
- Allocation getAllocation() { none() }
+ /**
+ * Gets an allocation associated with this `MemoryLocation`.
+ *
+ * This returns zero or one results in all cases except when `this` is an
+ * instance of `GroupedMemoryLocation`. When `this` is an instance of
+ * `GroupedMemoryLocation` this predicate always returns two or more results.
+ */
+ Allocation getAnAllocation() { none() }
/**
* Holds if the location cannot be overwritten except by definition of a `MemoryLocation` for
@@ -153,24 +300,29 @@ abstract class AllocationMemoryLocation extends MemoryLocation {
Allocation var;
boolean isMayAccess;
- AllocationMemoryLocation() {
- this instanceof TMemoryLocation and
- isMayAccess = false
- or
- isMayAccess = true // Just ensures that `isMayAccess` is bound.
- }
+ bindingset[isMayAccess]
+ AllocationMemoryLocation() { any() }
final override VirtualVariable getVirtualVariable() {
if allocationEscapes(var)
then result = TAllAliasedMemory(var.getEnclosingIRFunction(), false)
- else result.(AllocationMemoryLocation).getAllocation() = var
+ else (
+ // It may be that the grouped memory location contains an escaping
+ // allocation. In that case, the virtual variable is still the memory
+ // location that represents all aliased memory. Thus, we need to
+ // call `getVirtualVariable` on the grouped memory location.
+ result = getGroupedMemoryLocation(var, false, false).getVirtualVariable()
+ or
+ not exists(getGroupedMemoryLocation(var, false, false)) and
+ result.(AllocationMemoryLocation).getAnAllocation() = var
+ )
}
final override IRFunction getIRFunction() { result = var.getEnclosingIRFunction() }
final override Location getLocation() { result = var.getLocation() }
- final override Allocation getAllocation() { result = var }
+ final override Allocation getAnAllocation() { result = var }
final override predicate isMayAccess() { isMayAccess = true }
@@ -211,13 +363,13 @@ class VariableMemoryLocation extends TVariableMemoryLocation, AllocationMemoryLo
final override Language::LanguageType getType() {
if
strictcount(Language::LanguageType accessType |
- hasResultMemoryAccess(_, var, type, accessType, startBitOffset, endBitOffset, _) or
- hasOperandMemoryAccess(_, var, type, accessType, startBitOffset, endBitOffset, _)
+ hasResultMemoryAccess(_, _, var, type, accessType, startBitOffset, endBitOffset, _, false) or
+ hasOperandMemoryAccess(_, _, var, type, accessType, startBitOffset, endBitOffset, _, false)
) = 1
then
// All of the accesses have the same `LanguageType`, so just use that.
- hasResultMemoryAccess(_, var, type, result, startBitOffset, endBitOffset, _) or
- hasOperandMemoryAccess(_, var, type, result, startBitOffset, endBitOffset, _)
+ hasResultMemoryAccess(_, _, var, type, result, startBitOffset, endBitOffset, _, false) or
+ hasOperandMemoryAccess(_, _, var, type, result, startBitOffset, endBitOffset, _, false)
else
// There is no single type for all accesses, so just use the canonical one for this `IRType`.
result = type.getCanonicalLanguageType()
@@ -247,6 +399,89 @@ class VariableMemoryLocation extends TVariableMemoryLocation, AllocationMemoryLo
}
}
+/**
+ * A group of allocations represented as a single memory location.
+ *
+ * If `isAll()` holds then this memory location represents all the enclosing
+ * allocations, and if `isSome()` holds then this memory location represents
+ * one or more of the enclosing allocations.
+ *
+ * For example, consider the following snippet:
+ * ```
+ * int* p;
+ * int a, b;
+ * if(b) {
+ * p = &a;
+ * } else {
+ * p = &b;
+ * }
+ * *p = 42;
+ * ```
+ *
+ * The write memory location associated with the write to `*p` writes to a
+ * grouped memory location representing the _some_ allocation in the set
+ * `{a, b}`, and the subsequent `Chi` instruction merges the new value of
+ * `{a, b}` into a memory location that represents _all_ of the allocations
+ * in the set.
+ */
+class GroupedMemoryLocation extends TGroupedMemoryLocation, MemoryLocation {
+ VariableGroup vg;
+ boolean isMayAccess;
+ boolean isAll;
+
+ GroupedMemoryLocation() { this = TGroupedMemoryLocation(vg, isMayAccess, isAll) }
+
+ final override Location getLocation() { result = vg.getLocation() }
+
+ final override IRFunction getIRFunction() { result = vg.getIRFunction() }
+
+ final override predicate isMayAccess() { isMayAccess = true }
+
+ final override string getUniqueId() {
+ if this.isAll()
+ then result = "All{" + strictconcat(vg.getAnAllocation().getUniqueId(), ", ") + "}"
+ else result = "Some{" + strictconcat(vg.getAnAllocation().getUniqueId(), ", ") + "}"
+ }
+
+ final override string toStringInternal() { result = this.getUniqueId() }
+
+ final override Language::LanguageType getType() { result = vg.getType() }
+
+ final override VirtualVariable getVirtualVariable() {
+ if allocationEscapes(this.getAnAllocation())
+ then result = TAllAliasedMemory(vg.getIRFunction(), false)
+ else result = TGroupedMemoryLocation(vg, false, true)
+ }
+
+ /** Gets an allocation of this memory location. */
+ override Allocation getAnAllocation() { result = vg.getAnAllocation() }
+
+ /** Gets the set of allocations associated with this memory location. */
+ VariableGroup getGroup() { result = vg }
+
+ /** Holds if this memory location represents all the enclosing allocations. */
+ predicate isAll() { isAll = true }
+
+ /** Holds if this memory location represents one or more of the enclosing allocations. */
+ predicate isSome() { isAll = false }
+}
+
+private GroupedMemoryLocation getGroupedMemoryLocation(
+ Allocation alloc, boolean isMayAccess, boolean isAll
+) {
+ result.getAnAllocation() = alloc and
+ (
+ isMayAccess = true and result.isMayAccess()
+ or
+ isMayAccess = false and not result.isMayAccess()
+ ) and
+ (
+ isAll = true and result.isAll()
+ or
+ isAll = false and result.isSome()
+ )
+}
+
class EntireAllocationMemoryLocation extends TEntireAllocationMemoryLocation,
AllocationMemoryLocation
{
@@ -282,6 +517,14 @@ class VariableVirtualVariable extends VariableMemoryLocation, VirtualVariable {
}
}
+class GroupedVirtualVariable extends GroupedMemoryLocation, VirtualVariable {
+ GroupedVirtualVariable() {
+ forex(Allocation var | var = this.getAnAllocation() | not allocationEscapes(var)) and
+ not this.isMayAccess() and
+ this.isAll()
+ }
+}
+
/**
* An access to memory that is not known to be confined to a specific `IRVariable`.
*/
@@ -446,7 +689,7 @@ private Overlap getExtentOverlap(MemoryLocation def, MemoryLocation use) {
result instanceof MustExactlyOverlap
or
not use instanceof EntireAllocationMemoryLocation and
- if def.getAllocation() = use.getAllocation()
+ if def.getAnAllocation() = use.getAnAllocation()
then
// EntireAllocationMemoryLocation totally overlaps any location within
// the same allocation.
@@ -454,11 +697,48 @@ private Overlap getExtentOverlap(MemoryLocation def, MemoryLocation use) {
else (
// There is no overlap with a location that's known to belong to a
// different allocation, but all other locations may partially overlap.
- not exists(use.getAllocation()) and
+ not exists(use.getAnAllocation()) and
result instanceof MayPartiallyOverlap
)
)
or
+ exists(GroupedMemoryLocation group |
+ group = def and
+ def.getVirtualVariable() = use.getVirtualVariable()
+ |
+ (
+ use instanceof UnknownMemoryLocation or
+ use instanceof AllAliasedMemory
+ ) and
+ result instanceof MayPartiallyOverlap
+ or
+ group.isAll() and
+ (
+ group.getAnAllocation() =
+ [
+ use.(EntireAllocationMemoryLocation).getAnAllocation(),
+ use.(VariableMemoryLocation).getAnAllocation()
+ ]
+ or
+ use.(GroupedMemoryLocation).isSome()
+ ) and
+ result instanceof MustTotallyOverlap
+ or
+ group.isAll() and
+ use.(GroupedMemoryLocation).isAll() and
+ result instanceof MustExactlyOverlap
+ or
+ group.isSome() and
+ (
+ use instanceof EntireAllocationMemoryLocation
+ or
+ use instanceof VariableMemoryLocation
+ or
+ use instanceof GroupedMemoryLocation
+ ) and
+ result instanceof MayPartiallyOverlap
+ )
+ or
exists(VariableMemoryLocation defVariableLocation |
defVariableLocation = def and
(
@@ -468,7 +748,8 @@ private Overlap getExtentOverlap(MemoryLocation def, MemoryLocation use) {
(
use instanceof UnknownMemoryLocation or
use instanceof AllAliasedMemory or
- use instanceof EntireAllocationMemoryLocation
+ use instanceof EntireAllocationMemoryLocation or
+ use instanceof GroupedMemoryLocation
) and
result instanceof MayPartiallyOverlap
or
@@ -534,7 +815,7 @@ private predicate isCoveredOffset(Allocation var, int offsetRank, VariableMemory
exists(int startRank, int endRank, VirtualVariable vvar |
vml.getStartBitOffset() = rank[startRank](IntValue offset_ | isRelevantOffset(vvar, offset_)) and
vml.getEndBitOffset() = rank[endRank](IntValue offset_ | isRelevantOffset(vvar, offset_)) and
- var = vml.getAllocation() and
+ var = vml.getAnAllocation() and
vvar = vml.getVirtualVariable() and
isRelatableMemoryLocation(vml) and
offsetRank in [startRank .. endRank]
@@ -542,7 +823,7 @@ private predicate isCoveredOffset(Allocation var, int offsetRank, VariableMemory
}
private predicate hasUnknownOffset(Allocation var, VariableMemoryLocation vml) {
- vml.getAllocation() = var and
+ vml.getAnAllocation() = var and
(
vml.getStartBitOffset() = Ints::unknown() or
vml.getEndBitOffset() = Ints::unknown()
@@ -557,9 +838,9 @@ private predicate overlappingIRVariableMemoryLocations(
isCoveredOffset(var, offsetRank, use)
)
or
- hasUnknownOffset(use.getAllocation(), def)
+ hasUnknownOffset(use.getAnAllocation(), def)
or
- hasUnknownOffset(def.getAllocation(), use)
+ hasUnknownOffset(def.getAnAllocation(), use)
}
private Overlap getVariableMemoryLocationOverlap(
@@ -588,13 +869,24 @@ MemoryLocation getResultMemoryLocation(Instruction instr) {
(
(
isIndirectOrBufferMemoryAccess(kind) and
- if hasResultMemoryAccess(instr, _, _, _, _, _, _)
+ if hasResultMemoryAccess(_, instr, _, _, _, _, _, _, _)
then
- exists(Allocation var, IRType type, IntValue startBitOffset, IntValue endBitOffset |
- hasResultMemoryAccess(instr, var, type, _, startBitOffset, endBitOffset, isMayAccess) and
- result =
- TVariableMemoryLocation(var, type, _, startBitOffset, endBitOffset,
- unbindBool(isMayAccess))
+ exists(
+ Allocation var, IRType type, IntValue startBitOffset, IntValue endBitOffset,
+ boolean grouped
+ |
+ hasResultMemoryAccess(_, instr, var, type, _, startBitOffset, endBitOffset, isMayAccess,
+ grouped)
+ |
+ // If the instruction is only associated with one allocation we assign it a `VariableMemoryLocation`
+ if grouped = false
+ then
+ result =
+ TVariableMemoryLocation(var, type, _, startBitOffset, endBitOffset,
+ unbindBool(isMayAccess))
+ else
+ // And otherwise we assign it a memory location that groups all the relevant memory locations into one.
+ result = getGroupedMemoryLocation(var, unbindBool(isMayAccess), false)
)
else result = TUnknownMemoryLocation(instr.getEnclosingIRFunction(), isMayAccess)
)
@@ -621,12 +913,23 @@ MemoryLocation getOperandMemoryLocation(MemoryOperand operand) {
(
(
isIndirectOrBufferMemoryAccess(kind) and
- if hasOperandMemoryAccess(operand, _, _, _, _, _, _)
+ if hasOperandMemoryAccess(_, operand, _, _, _, _, _, _, _)
then
- exists(Allocation var, IRType type, IntValue startBitOffset, IntValue endBitOffset |
- hasOperandMemoryAccess(operand, var, type, _, startBitOffset, endBitOffset, isMayAccess) and
- result =
- TVariableMemoryLocation(var, type, _, startBitOffset, endBitOffset, isMayAccess)
+ exists(
+ Allocation var, IRType type, IntValue startBitOffset, IntValue endBitOffset,
+ boolean grouped
+ |
+ hasOperandMemoryAccess(_, operand, var, type, _, startBitOffset, endBitOffset,
+ isMayAccess, grouped)
+ |
+ // If the operand is only associated with one memory location we assign it a `VariableMemoryLocation`
+ if grouped = false
+ then
+ result =
+ TVariableMemoryLocation(var, type, _, startBitOffset, endBitOffset, isMayAccess)
+ else
+ // And otherwise we assign it a memory location that groups all relevant memory locations into one.
+ result = getGroupedMemoryLocation(var, isMayAccess, false)
)
else result = TUnknownMemoryLocation(operand.getEnclosingIRFunction(), isMayAccess)
)
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll
index d2e68c733041..819f3906b825 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll
@@ -15,6 +15,51 @@ private class OldInstruction = Reachability::ReachableInstruction;
import Cached
+/**
+ * Holds if `instruction` is the first instruction that may be followed by
+ * an `UninitializedGroup` instruction, and the enclosing function of
+ * `instruction` is `func`.
+ */
+private predicate isFirstInstructionBeforeUninitializedGroup(
+ Instruction instruction, IRFunction func
+) {
+ instruction = getChi(any(OldIR::InitializeNonLocalInstruction init)) and
+ func = instruction.getEnclosingIRFunction()
+}
+
+/** Gets the `i`'th `UninitializedGroup` instruction in `func`. */
+private UninitializedGroupInstruction getInitGroupInstruction(int i, IRFunction func) {
+ exists(Alias::VariableGroup vg |
+ vg.getIRFunction() = func and
+ vg.getInitializationOrder() = i and
+ result = uninitializedGroup(vg)
+ )
+}
+
+/**
+ * Holds if `instruction` is the last instruction in the chain of `UninitializedGroup`
+ * instructions in `func`. The chain of instructions may be empty in which case
+ * `instruction` satisfies
+ * ```
+ * isFirstInstructionBeforeUninitializedGroup(instruction, func)
+ * ```
+ */
+predicate isLastInstructionForUninitializedGroups(Instruction instruction, IRFunction func) {
+ exists(int i |
+ instruction = getInitGroupInstruction(i, func) and
+ not exists(getChi(instruction)) and
+ not exists(getInitGroupInstruction(i + 1, func))
+ )
+ or
+ exists(int i |
+ instruction = getChi(getInitGroupInstruction(i, func)) and
+ not exists(getInitGroupInstruction(i + 1, func))
+ )
+ or
+ isFirstInstructionBeforeUninitializedGroup(instruction, func) and
+ not exists(getInitGroupInstruction(0, func))
+}
+
cached
private module Cached {
cached
@@ -32,6 +77,11 @@ private module Cached {
hasChiNode(_, primaryInstruction)
}
+ cached
+ predicate hasChiNodeAfterUninitializedGroup(UninitializedGroupInstruction initGroup) {
+ hasChiNodeAfterUninitializedGroup(_, initGroup)
+ }
+
cached
predicate hasUnreachedInstructionCached(IRFunction irFunc) {
exists(OldIR::Instruction oldInstruction |
@@ -45,7 +95,8 @@ private module Cached {
}
class TStageInstruction =
- TRawInstruction or TPhiInstruction or TChiInstruction or TUnreachedInstruction;
+ TRawInstruction or TPhiInstruction or TChiInstruction or TUnreachedInstruction or
+ TUninitializedGroupInstruction;
/**
* If `oldInstruction` is a `Phi` instruction that has exactly one reachable predecessor block,
@@ -78,6 +129,8 @@ private module Cached {
or
instr instanceof TChiInstruction
or
+ instr instanceof TUninitializedGroupInstruction
+ or
instr instanceof TUnreachedInstruction
}
@@ -123,7 +176,8 @@ private module Cached {
predicate hasModeledMemoryResult(Instruction instruction) {
canModelResultForOldInstruction(getOldInstruction(instruction)) or
instruction instanceof PhiInstruction or // Phis always have modeled results
- instruction instanceof ChiInstruction // Chis always have modeled results
+ instruction instanceof ChiInstruction or // Chis always have modeled results
+ instruction instanceof UninitializedGroupInstruction // Group initializers always have modeled results
}
cached
@@ -134,16 +188,23 @@ private module Cached {
or
// Chi instructions track virtual variables, and therefore a chi instruction is
// conflated if it's associated with the aliased virtual variable.
- exists(OldInstruction oldInstruction | instruction = getChi(oldInstruction) |
- Alias::getResultMemoryLocation(oldInstruction).getVirtualVariable() instanceof
+ exists(Instruction input | instruction = getChi(input) |
+ Alias::getResultMemoryLocation(input).getVirtualVariable() instanceof
Alias::AliasedVirtualVariable
+ or
+ // A chi following an `UninitializedGroupInstruction` only happens when the virtual
+ // variable of the grouped memory location is `{AllAliasedMemory}`.
+ exists(Alias::GroupedMemoryLocation gml |
+ input = uninitializedGroup(gml.getGroup()) and
+ gml.getVirtualVariable() instanceof Alias::AliasedVirtualVariable
+ )
)
or
// Phi instructions track locations, and therefore a phi instruction is
// conflated if it's associated with a conflated location.
exists(Alias::MemoryLocation location |
instruction = getPhi(_, location) and
- not exists(location.getAllocation())
+ not exists(location.getAnAllocation())
)
}
@@ -205,7 +266,11 @@ private module Cached {
hasMemoryOperandDefinition(oldInstruction, oldOperand, overlap, result)
)
or
- instruction = getChi(getOldInstruction(result)) and
+ (
+ instruction = getChi(getOldInstruction(result))
+ or
+ instruction = getChi(result.(UninitializedGroupInstruction))
+ ) and
tag instanceof ChiPartialOperandTag and
overlap instanceof MustExactlyOverlap
or
@@ -263,6 +328,14 @@ private module Cached {
)
}
+ cached
+ IRVariable getAnUninitializedGroupVariable(UninitializedGroupInstruction init) {
+ exists(Alias::VariableGroup vg |
+ init = uninitializedGroup(vg) and
+ result = vg.getAnAllocation().getABaseInstruction().(VariableInstruction).getIRVariable()
+ )
+ }
+
/**
* Holds if `instr` is part of a cycle in the operand graph that doesn't go
* through a phi instruction and therefore should be impossible.
@@ -316,6 +389,19 @@ private module Cached {
result = getNewPhiOperandDefinitionFromOldSsa(instr, newPredecessorBlock, overlap)
}
+ private ChiInstruction getChiAfterUninitializedGroup(int i, IRFunction func) {
+ result =
+ rank[i + 1](VariableGroup vg, UninitializedGroupInstruction initGroup, ChiInstruction chi,
+ int r |
+ initGroup.getEnclosingIRFunction() = func and
+ chi = getChi(initGroup) and
+ initGroup = uninitializedGroup(vg) and
+ r = vg.getInitializationOrder()
+ |
+ chi order by r
+ )
+ }
+
cached
Instruction getChiInstructionTotalOperand(ChiInstruction chiInstr) {
exists(
@@ -329,6 +415,19 @@ private module Cached {
definitionReachesUse(vvar, defBlock, defRank, useBlock, useRank) and
result = getDefinitionOrChiInstruction(defBlock, defOffset, vvar, _)
)
+ or
+ exists(UninitializedGroupInstruction initGroup, IRFunction func |
+ chiInstr = getChi(initGroup) and
+ func = initGroup.getEnclosingIRFunction()
+ |
+ chiInstr = getChiAfterUninitializedGroup(0, func) and
+ isFirstInstructionBeforeUninitializedGroup(result, func)
+ or
+ exists(int i |
+ chiInstr = getChiAfterUninitializedGroup(i + 1, func) and
+ result = getChiAfterUninitializedGroup(i, func)
+ )
+ )
}
cached
@@ -344,14 +443,40 @@ private module Cached {
)
}
- /*
- * This adds Chi nodes to the instruction successor relation; if an instruction has a Chi node,
- * that node is its successor in the new successor relation, and the Chi node's successors are
- * the new instructions generated from the successors of the old instruction
- */
+ private UninitializedGroupInstruction firstInstructionToUninitializedGroup(
+ Instruction instruction, EdgeKind kind
+ ) {
+ exists(IRFunction func |
+ isFirstInstructionBeforeUninitializedGroup(instruction, func) and
+ result = getInitGroupInstruction(0, func) and
+ kind instanceof GotoEdge
+ )
+ }
- cached
- Instruction getInstructionSuccessor(Instruction instruction, EdgeKind kind) {
+ private Instruction getNextUninitializedGroupInstruction(Instruction instruction, EdgeKind kind) {
+ exists(int i, IRFunction func |
+ func = instruction.getEnclosingIRFunction() and
+ instruction = getInitGroupInstruction(i, func) and
+ kind instanceof GotoEdge
+ |
+ if hasChiNodeAfterUninitializedGroup(_, instruction)
+ then result = getChi(instruction)
+ else result = getInitGroupInstruction(i + 1, func)
+ )
+ or
+ exists(int i, IRFunction func, UninitializedGroupInstruction initGroup |
+ func = instruction.getEnclosingIRFunction() and
+ instruction = getChi(initGroup) and
+ initGroup = getInitGroupInstruction(i, func) and
+ kind instanceof GotoEdge
+ |
+ result = getInitGroupInstruction(i + 1, func)
+ )
+ }
+
+ private Instruction getInstructionSuccessorAfterUninitializedGroup0(
+ Instruction instruction, EdgeKind kind
+ ) {
if hasChiNode(_, getOldInstruction(instruction))
then
result = getChi(getOldInstruction(instruction)) and
@@ -371,6 +496,107 @@ private module Cached {
)
}
+ private Instruction getInstructionSuccessorAfterUninitializedGroup(
+ Instruction instruction, EdgeKind kind
+ ) {
+ exists(IRFunction func, Instruction firstBeforeUninitializedGroup |
+ isLastInstructionForUninitializedGroups(instruction, func) and
+ isFirstInstructionBeforeUninitializedGroup(firstBeforeUninitializedGroup, func) and
+ result = getInstructionSuccessorAfterUninitializedGroup0(firstBeforeUninitializedGroup, kind)
+ )
+ }
+
+ /**
+ * This adds Chi nodes to the instruction successor relation; if an instruction has a Chi node,
+ * that node is its successor in the new successor relation, and the Chi node's successors are
+ * the new instructions generated from the successors of the old instruction.
+ *
+ * Furthermore, the entry block is augmented with `UninitializedGroup` instructions and `Chi`
+ * instructions. For example, consider this example:
+ * ```cpp
+ * int x, y;
+ * int* p;
+ * if(b) {
+ * p = &x;
+ * escape(&x);
+ * } else {
+ * p = &y;
+ * }
+ * *p = 42;
+ *
+ * int z, w;
+ * int* q;
+ * if(b) {
+ * q = &z;
+ * } else {
+ * q = &w;
+ * }
+ * *q = 43;
+ * ```
+ *
+ * the unaliased IR for the entry block of this snippet is:
+ * ```
+ * v1(void) = EnterFunction :
+ * m1(unknown) = AliasedDefinition :
+ * m2(unknown) = InitializeNonLocal :
+ * r1(glval) = VariableAddress[b] :
+ * m3(bool) = InitializeParameter[b] : &:r1
+ * r2(glval) = VariableAddress[x] :
+ * m4(int) = Uninitialized[x] : &:r2
+ * r3(glval) = VariableAddress[y] :
+ * m5(int) = Uninitialized[y] : &:r3
+ * r4(glval) = VariableAddress[p] :
+ * m6(int *) = Uninitialized[p] : &:r4
+ * r5(glval) = VariableAddress[b] :
+ * r6(bool) = Load[b] : &:r5, m3
+ * v2(void) = ConditionalBranch : r6
+ * ```
+ * and we need to transform this to aliased IR by inserting an `UninitializedGroup`
+ * instruction for every `VariableGroup` memory location in the function. Furthermore,
+ * if the `VariableGroup` memory location contains an allocation that escapes we need
+ * to insert a `Chi` that writes the memory produced by `UninitializedGroup` into
+ * `{AllAliasedMemory}`. For the above snippet we then end up with:
+ * ```
+ * v1(void) = EnterFunction :
+ * m2(unknown) = AliasedDefinition :
+ * m3(unknown) = InitializeNonLocal :
+ * m4(unknown) = Chi : total:m2, partial:m3
+ * m5(int) = UninitializedGroup[x,y] :
+ * m6(unknown) = Chi : total:m4, partial:m5
+ * m7(int) = UninitializedGroup[w,z] :
+ * r1(glval) = VariableAddress[b] :
+ * m8(bool) = InitializeParameter[b] : &:r1
+ * r2(glval) = VariableAddress[x] :
+ * m10(int) = Uninitialized[x] : &:r2
+ * m11(unknown) = Chi : total:m6, partial:m10
+ * r3(glval) = VariableAddress[y] :
+ * m12(int) = Uninitialized[y] : &:r3
+ * m13(unknown) = Chi : total:m11, partial:m12
+ * r4(glval) = VariableAddress[p] :
+ * m14(int *) = Uninitialized[p] : &:r4
+ * r5(glval) = VariableAddress[b] :
+ * r6(bool) = Load[b] : &:r5, m8
+ * v2(void) = ConditionalBranch : r6
+ * ```
+ *
+ * Here, the group `{x, y}` contains an allocation that escapes (`x`), so there
+ * is a `Chi` after the `UninitializedGroup` that initializes the memory for the
+ * `VariableGroup` containing `x`. None of the allocations in `{w, z}` escape so
+ * there is no `Chi` following that the `UninitializedGroup` that initializes the
+ * memory of `{w, z}`.
+ */
+ cached
+ Instruction getInstructionSuccessor(Instruction instruction, EdgeKind kind) {
+ result = firstInstructionToUninitializedGroup(instruction, kind)
+ or
+ result = getNextUninitializedGroupInstruction(instruction, kind)
+ or
+ result = getInstructionSuccessorAfterUninitializedGroup(instruction, kind)
+ or
+ not isFirstInstructionBeforeUninitializedGroup(instruction, _) and
+ result = getInstructionSuccessorAfterUninitializedGroup0(instruction, kind)
+ }
+
cached
Instruction getInstructionBackEdgeSuccessor(Instruction instruction, EdgeKind kind) {
exists(OldInstruction oldInstruction |
@@ -406,6 +632,16 @@ private module Cached {
exists(IRFunctionBase irFunc |
instr = unreachedInstruction(irFunc) and result = irFunc.getFunction()
)
+ or
+ exists(Alias::VariableGroup vg |
+ instr = uninitializedGroup(vg) and
+ result = vg.getIRFunction().getFunction()
+ )
+ or
+ exists(UninitializedGroupInstruction initGroup |
+ instr = chiInstruction(initGroup) and
+ result = getInstructionAst(initGroup)
+ )
}
cached
@@ -418,9 +654,16 @@ private module Cached {
)
or
exists(Instruction primaryInstr, Alias::VirtualVariable vvar |
- instr = chiInstruction(primaryInstr) and
- hasChiNode(vvar, primaryInstr) and
- result = vvar.getType()
+ instr = chiInstruction(primaryInstr) and result = vvar.getType()
+ |
+ hasChiNode(vvar, primaryInstr)
+ or
+ hasChiNodeAfterUninitializedGroup(vvar, primaryInstr)
+ )
+ or
+ exists(Alias::VariableGroup vg |
+ instr = uninitializedGroup(vg) and
+ result = vg.getType()
)
or
instr = reusedPhiInstruction(_) and
@@ -448,6 +691,8 @@ private module Cached {
or
instr = chiInstruction(_) and opcode instanceof Opcode::Chi
or
+ instr = uninitializedGroup(_) and opcode instanceof Opcode::UninitializedGroup
+ or
instr = unreachedInstruction(_) and opcode instanceof Opcode::Unreached
}
@@ -460,10 +705,15 @@ private module Cached {
result = blockStartInstr.getEnclosingIRFunction()
)
or
- exists(OldInstruction primaryInstr |
+ exists(Instruction primaryInstr |
instr = chiInstruction(primaryInstr) and result = primaryInstr.getEnclosingIRFunction()
)
or
+ exists(Alias::VariableGroup vg |
+ instr = uninitializedGroup(vg) and
+ result = vg.getIRFunction()
+ )
+ or
instr = unreachedInstruction(result)
}
@@ -478,6 +728,8 @@ private module Cached {
instruction = getChi(oldInstruction) and
result = getNewInstruction(oldInstruction)
)
+ or
+ instruction = getChi(result.(UninitializedGroupInstruction))
}
}
@@ -485,7 +737,7 @@ private Instruction getNewInstruction(OldInstruction instr) { getOldInstruction(
private OldInstruction getOldInstruction(Instruction instr) { instr = result }
-private ChiInstruction getChi(OldInstruction primaryInstr) { result = chiInstruction(primaryInstr) }
+private ChiInstruction getChi(Instruction primaryInstr) { result = chiInstruction(primaryInstr) }
private PhiInstruction getPhi(OldBlock defBlock, Alias::MemoryLocation defLocation) {
result = phiInstruction(defBlock.getFirstInstruction(), defLocation)
@@ -506,6 +758,16 @@ private predicate hasChiNode(Alias::VirtualVariable vvar, OldInstruction def) {
)
}
+private predicate hasChiNodeAfterUninitializedGroup(
+ Alias::AliasedVirtualVariable vvar, UninitializedGroupInstruction initGroup
+) {
+ exists(Alias::GroupedMemoryLocation defLocation |
+ initGroup = uninitializedGroup(defLocation.getGroup()) and
+ defLocation.getVirtualVariable() = vvar and
+ Alias::getOverlap(defLocation, vvar) instanceof MayPartiallyOverlap
+ )
+}
+
private import PhiInsertion
/**
@@ -668,19 +930,33 @@ private import DefUse
* potentially very sparse.
*/
module DefUse {
+ bindingset[index, block]
+ pragma[inline_late]
+ private int getNonChiOffset(int index, OldBlock block) {
+ exists(IRFunction func | func = block.getEnclosingIRFunction() |
+ if
+ getNewBlock(block) = func.getEntryBlock() and
+ not block.getInstruction(index) instanceof InitializeNonLocalInstruction and
+ not block.getInstruction(index) instanceof AliasedDefinitionInstruction
+ then result = 2 * (index + count(VariableGroup vg | vg.getIRFunction() = func))
+ else result = 2 * index
+ )
+ }
+
+ bindingset[index, block]
+ pragma[inline_late]
+ private int getChiOffset(int index, OldBlock block) { result = getNonChiOffset(index, block) + 1 }
+
/**
* Gets the `Instruction` for the definition at offset `defOffset` in block `defBlock`.
*/
- Instruction getDefinitionOrChiInstruction(
+ private Instruction getDefinitionOrChiInstruction0(
OldBlock defBlock, int defOffset, Alias::MemoryLocation defLocation,
Alias::MemoryLocation actualDefLocation
) {
- exists(OldInstruction oldInstr, int oldOffset |
- oldInstr = defBlock.getInstruction(oldOffset) and
- oldOffset >= 0
- |
+ exists(OldInstruction oldInstr, int oldOffset | oldInstr = defBlock.getInstruction(oldOffset) |
// An odd offset corresponds to the `Chi` instruction.
- defOffset = oldOffset * 2 + 1 and
+ defOffset = getChiOffset(oldOffset, defBlock) and
result = getChi(oldInstr) and
(
defLocation = Alias::getResultMemoryLocation(oldInstr) or
@@ -689,7 +965,7 @@ module DefUse {
actualDefLocation = defLocation.getVirtualVariable()
or
// An even offset corresponds to the original instruction.
- defOffset = oldOffset * 2 and
+ defOffset = getNonChiOffset(oldOffset, defBlock) and
result = getNewInstruction(oldInstr) and
(
defLocation = Alias::getResultMemoryLocation(oldInstr) or
@@ -702,6 +978,54 @@ module DefUse {
hasDefinition(_, defLocation, defBlock, defOffset) and
result = getPhi(defBlock, defLocation) and
actualDefLocation = defLocation
+ or
+ exists(
+ Alias::VariableGroup vg, int index, UninitializedGroupInstruction initGroup,
+ Alias::GroupedMemoryLocation gml
+ |
+ // Add 3 to account for the function prologue:
+ // v1(void) = EnterFunction
+ // m1(unknown) = AliasedDefinition
+ // m2(unknown) = InitializeNonLocal
+ index = 3 + vg.getInitializationOrder() and
+ not gml.isMayAccess() and
+ gml.isSome() and
+ gml.getGroup() = vg and
+ vg.getIRFunction().getEntryBlock() = defBlock and
+ initGroup = uninitializedGroup(vg) and
+ (defLocation = gml or defLocation = gml.getVirtualVariable())
+ |
+ result = initGroup and
+ defOffset = 2 * index and
+ actualDefLocation = defLocation
+ or
+ result = getChi(initGroup) and
+ defOffset = 2 * index + 1 and
+ actualDefLocation = defLocation.getVirtualVariable()
+ )
+ }
+
+ private ChiInstruction remapGetDefinitionOrChiInstruction(Instruction oldResult) {
+ exists(IRFunction func |
+ isFirstInstructionBeforeUninitializedGroup(oldResult, func) and
+ isLastInstructionForUninitializedGroups(result, func)
+ )
+ }
+
+ Instruction getDefinitionOrChiInstruction(
+ OldBlock defBlock, int defOffset, Alias::MemoryLocation defLocation,
+ Alias::MemoryLocation actualDefLocation
+ ) {
+ exists(Instruction oldResult |
+ oldResult =
+ getDefinitionOrChiInstruction0(defBlock, defOffset, defLocation, actualDefLocation) and
+ (
+ result = remapGetDefinitionOrChiInstruction(oldResult)
+ or
+ not exists(remapGetDefinitionOrChiInstruction(oldResult)) and
+ result = oldResult
+ )
+ )
}
/**
@@ -842,8 +1166,20 @@ module DefUse {
block.getInstruction(index) = def and
overlap = Alias::getOverlap(defLocation, useLocation) and
if overlap instanceof MayPartiallyOverlap
- then offset = (index * 2) + 1 // The use will be connected to the definition on the `Chi` instruction.
- else offset = index * 2 // The use will be connected to the definition on the original instruction.
+ then offset = getChiOffset(index, block) // The use will be connected to the definition on the `Chi` instruction.
+ else offset = getNonChiOffset(index, block) // The use will be connected to the definition on the original instruction.
+ )
+ or
+ exists(UninitializedGroupInstruction initGroup, int index, Overlap overlap, VariableGroup vg |
+ initGroup.getEnclosingIRFunction().getEntryBlock() = getNewBlock(block) and
+ vg = defLocation.(Alias::GroupedMemoryLocation).getGroup() and
+ // EnterFunction + AliasedDefinition + InitializeNonLocal + index
+ index = 3 + vg.getInitializationOrder() and
+ initGroup = uninitializedGroup(vg) and
+ overlap = Alias::getOverlap(defLocation, useLocation) and
+ if overlap instanceof MayPartiallyOverlap and hasChiNodeAfterUninitializedGroup(initGroup)
+ then offset = 2 * index + 1 // The use will be connected to the definition on the `Chi` instruction.
+ else offset = 2 * index // The use will be connected to the definition on the original instruction.
)
}
@@ -904,10 +1240,11 @@ module DefUse {
block.getInstruction(index) = use and
(
// A direct use of the location.
- useLocation = Alias::getOperandMemoryLocation(use.getAnOperand()) and offset = index * 2
+ useLocation = Alias::getOperandMemoryLocation(use.getAnOperand()) and
+ offset = getNonChiOffset(index, block)
or
// A `Chi` instruction will include a use of the virtual variable.
- hasChiNode(useLocation, use) and offset = (index * 2) + 1
+ hasChiNode(useLocation, use) and offset = getChiOffset(index, block)
)
)
}
@@ -1057,5 +1394,9 @@ module Ssa {
predicate hasChiInstruction = Cached::hasChiInstructionCached/1;
+ predicate hasChiNodeAfterUninitializedGroup = Cached::hasChiNodeAfterUninitializedGroup/1;
+
predicate hasUnreachedInstruction = Cached::hasUnreachedInstructionCached/1;
+
+ class VariableGroup = Alias::VariableGroup;
}
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TInstruction.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TInstruction.qll
index bb3eb683653c..72ff5485a523 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TInstruction.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TInstruction.qll
@@ -31,6 +31,7 @@ newtype TInstruction =
TUnaliasedSsaUnreachedInstruction(IRFunctionBase irFunc) {
UnaliasedSsa::Ssa::hasUnreachedInstruction(irFunc)
} or
+ TUnaliasedSsaUninitializedGroupInstruction(UnaliasedSsa::Ssa::VariableGroup vg) or
TAliasedSsaPhiInstruction(
TRawInstruction blockStartInstr, AliasedSsa::Ssa::MemoryLocation memoryLocation
) {
@@ -41,6 +42,12 @@ newtype TInstruction =
} or
TAliasedSsaUnreachedInstruction(IRFunctionBase irFunc) {
AliasedSsa::Ssa::hasUnreachedInstruction(irFunc)
+ } or
+ TAliasedSsaUninitializedGroupInstruction(AliasedSsa::Ssa::VariableGroup vg) or
+ TAliasedSsaChiAfterUninitializedGroupInstruction(
+ TAliasedSsaUninitializedGroupInstruction initGroup
+ ) {
+ AliasedSsa::Ssa::hasChiNodeAfterUninitializedGroup(initGroup)
}
/**
@@ -62,7 +69,11 @@ module UnaliasedSsaInstructions {
class TChiInstruction = TUnaliasedSsaChiInstruction;
- TChiInstruction chiInstruction(TRawInstruction primaryInstruction) {
+ class TUninitializedGroupInstruction = TUnaliasedSsaUninitializedGroupInstruction;
+
+ class TRawOrUninitializedGroupInstruction = TRawInstruction or TUninitializedGroupInstruction;
+
+ TChiInstruction chiInstruction(TRawOrUninitializedGroupInstruction primaryInstruction) {
result = TUnaliasedSsaChiInstruction(primaryInstruction)
}
@@ -71,6 +82,12 @@ module UnaliasedSsaInstructions {
TUnreachedInstruction unreachedInstruction(IRFunctionBase irFunc) {
result = TUnaliasedSsaUnreachedInstruction(irFunc)
}
+
+ class VariableGroup = UnaliasedSsa::Ssa::VariableGroup;
+
+ // This really should just be `TUnaliasedSsaUninitializedGroupInstruction`, but that makes the
+ // compiler realize that certain expressions in `SSAConstruction` are unsatisfiable.
+ TRawOrUninitializedGroupInstruction uninitializedGroup(VariableGroup vg) { none() }
}
/**
@@ -92,10 +109,16 @@ module AliasedSsaInstructions {
result = TUnaliasedSsaPhiInstruction(blockStartInstr, _)
}
- class TChiInstruction = TAliasedSsaChiInstruction;
+ class TChiInstruction =
+ TAliasedSsaChiInstruction or TAliasedSsaChiAfterUninitializedGroupInstruction;
- TChiInstruction chiInstruction(TRawInstruction primaryInstruction) {
+ class TRawOrInitialzieGroupInstruction =
+ TRawInstruction or TAliasedSsaUninitializedGroupInstruction;
+
+ TChiInstruction chiInstruction(TRawOrInitialzieGroupInstruction primaryInstruction) {
result = TAliasedSsaChiInstruction(primaryInstruction)
+ or
+ result = TAliasedSsaChiAfterUninitializedGroupInstruction(primaryInstruction)
}
class TUnreachedInstruction = TAliasedSsaUnreachedInstruction;
@@ -103,4 +126,12 @@ module AliasedSsaInstructions {
TUnreachedInstruction unreachedInstruction(IRFunctionBase irFunc) {
result = TAliasedSsaUnreachedInstruction(irFunc)
}
+
+ class VariableGroup = AliasedSsa::Ssa::VariableGroup;
+
+ class TUninitializedGroupInstruction = TAliasedSsaUninitializedGroupInstruction;
+
+ TUninitializedGroupInstruction uninitializedGroup(VariableGroup vg) {
+ result = TAliasedSsaUninitializedGroupInstruction(vg)
+ }
}
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TOperand.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TOperand.qll
index 048beec54245..6989cfde765f 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TOperand.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TOperand.qll
@@ -12,6 +12,9 @@ private import semmle.code.cpp.ir.internal.Overlap
* Provides the newtype used to represent operands across all phases of the IR.
*/
private module Internal {
+ private class TAliasedChiInstruction =
+ TAliasedSsaChiInstruction or TAliasedSsaChiAfterUninitializedGroupInstruction;
+
/**
* An IR operand. `TOperand` is shared across all phases of the IR. There are branches of this
* type for operands created directly from the AST (`TRegisterOperand` and `TNonSSAMemoryOperand`),
@@ -52,7 +55,7 @@ private module Internal {
) {
exists(AliasedConstruction::getPhiOperandDefinition(useInstr, predecessorBlock, overlap))
} or
- TAliasedChiOperand(TAliasedSsaChiInstruction useInstr, ChiOperandTag tag) { any() }
+ TAliasedChiOperand(TAliasedChiInstruction useInstr, ChiOperandTag tag) { any() }
}
/**
@@ -198,10 +201,13 @@ module AliasedSsaOperands {
)
}
+ private class TChiInstruction =
+ TAliasedSsaChiInstruction or TAliasedSsaChiAfterUninitializedGroupInstruction;
+
/**
* Returns the Chi operand with the specified parameters.
*/
- TChiOperand chiOperand(TAliasedSsaChiInstruction useInstr, ChiOperandTag tag) {
+ TChiOperand chiOperand(TChiInstruction useInstr, ChiOperandTag tag) {
result = Internal::TAliasedChiOperand(useInstr, tag)
}
}
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/Instruction.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/Instruction.qll
index c7e40da1e17c..af5dd4199858 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/Instruction.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/Instruction.qll
@@ -2142,6 +2142,47 @@ class ChiInstruction extends Instruction {
final predicate isPartialUpdate() { Construction::chiOnlyPartiallyUpdatesLocation(this) }
}
+/**
+ * An instruction that initializes a set of allocations that are each assigned
+ * the same "virtual variable".
+ *
+ * As an example, consider the following snippet:
+ * ```
+ * int a;
+ * int b;
+ * int* p;
+ * if(b) {
+ * p = &a;
+ * } else {
+ * p = &b;
+ * }
+ * *p = 5;
+ * int x = a;
+ * ```
+ *
+ * Since both the address of `a` and `b` reach `p` at `*p = 5` the IR alias
+ * analysis will create a region that contains both `a` and `b`. The region
+ * containing both `a` and `b` are initialized by an `UninitializedGroup`
+ * instruction in the entry block of the enclosing function.
+ */
+class UninitializedGroupInstruction extends Instruction {
+ UninitializedGroupInstruction() { this.getOpcode() instanceof Opcode::UninitializedGroup }
+
+ /**
+ * Gets an `IRVariable` whose memory is initialized by this instruction, if any.
+ * Note: Allocations that are not represented as `IRVariable`s (such as
+ * dynamic allocations) are not returned by this predicate even if this
+ * instruction initializes such memory.
+ */
+ final IRVariable getAnIRVariable() {
+ result = Construction::getAnUninitializedGroupVariable(this)
+ }
+
+ final override string getImmediateString() {
+ result = strictconcat(this.getAnIRVariable().toString(), ",")
+ }
+}
+
/**
* An instruction representing unreachable code.
*
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll
index 7bea8178d141..29cdcfedda0f 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll
@@ -407,6 +407,8 @@ predicate hasUnreachedInstruction(IRFunction func) {
)
}
+IRVariable getAnUninitializedGroupVariable(UninitializedGroupInstruction instr) { none() }
+
import CachedForDebugging
cached
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll
index c7e40da1e17c..af5dd4199858 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll
@@ -2142,6 +2142,47 @@ class ChiInstruction extends Instruction {
final predicate isPartialUpdate() { Construction::chiOnlyPartiallyUpdatesLocation(this) }
}
+/**
+ * An instruction that initializes a set of allocations that are each assigned
+ * the same "virtual variable".
+ *
+ * As an example, consider the following snippet:
+ * ```
+ * int a;
+ * int b;
+ * int* p;
+ * if(b) {
+ * p = &a;
+ * } else {
+ * p = &b;
+ * }
+ * *p = 5;
+ * int x = a;
+ * ```
+ *
+ * Since both the address of `a` and `b` reach `p` at `*p = 5` the IR alias
+ * analysis will create a region that contains both `a` and `b`. The region
+ * containing both `a` and `b` are initialized by an `UninitializedGroup`
+ * instruction in the entry block of the enclosing function.
+ */
+class UninitializedGroupInstruction extends Instruction {
+ UninitializedGroupInstruction() { this.getOpcode() instanceof Opcode::UninitializedGroup }
+
+ /**
+ * Gets an `IRVariable` whose memory is initialized by this instruction, if any.
+ * Note: Allocations that are not represented as `IRVariable`s (such as
+ * dynamic allocations) are not returned by this predicate even if this
+ * instruction initializes such memory.
+ */
+ final IRVariable getAnIRVariable() {
+ result = Construction::getAnUninitializedGroupVariable(this)
+ }
+
+ final override string getImmediateString() {
+ result = strictconcat(this.getAnIRVariable().toString(), ",")
+ }
+}
+
/**
* An instruction representing unreachable code.
*
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll
index 23a7c1e77fde..8f3493c1065f 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll
@@ -106,8 +106,7 @@ private predicate operandEscapesDomain(Operand operand) {
not isArgumentForParameter(_, operand, _) and
not isOnlyEscapesViaReturnArgument(operand) and
not operand.getUse() instanceof ReturnValueInstruction and
- not operand.getUse() instanceof ReturnIndirectionInstruction and
- not operand instanceof PhiInputOperand
+ not operand.getUse() instanceof ReturnIndirectionInstruction
}
/**
@@ -191,6 +190,11 @@ private predicate operandIsPropagated(Operand operand, IntValue bitOffset, Instr
// A copy propagates the source value.
operand = instr.(CopyInstruction).getSourceValueOperand() and bitOffset = 0
)
+ or
+ operand = instr.(PhiInstruction).getAnInputOperand() and
+ // Using `unknown` ensures termination since we cannot keep incrementing a bit offset
+ // through the back edge of a loop (or through recursion).
+ bitOffset = Ints::unknown()
}
private predicate operandEscapesNonReturn(Operand operand) {
@@ -212,9 +216,6 @@ private predicate operandEscapesNonReturn(Operand operand) {
or
isOnlyEscapesViaReturnArgument(operand) and resultEscapesNonReturn(operand.getUse())
or
- operand instanceof PhiInputOperand and
- resultEscapesNonReturn(operand.getUse())
- or
operandEscapesDomain(operand)
}
@@ -236,9 +237,6 @@ private predicate operandMayReachReturn(Operand operand) {
operand.getUse() instanceof ReturnValueInstruction
or
isOnlyEscapesViaReturnArgument(operand) and resultMayReachReturn(operand.getUse())
- or
- operand instanceof PhiInputOperand and
- resultMayReachReturn(operand.getUse())
}
private predicate operandReturned(Operand operand, IntValue bitOffset) {
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll
index d2e68c733041..819f3906b825 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll
@@ -15,6 +15,51 @@ private class OldInstruction = Reachability::ReachableInstruction;
import Cached
+/**
+ * Holds if `instruction` is the first instruction that may be followed by
+ * an `UninitializedGroup` instruction, and the enclosing function of
+ * `instruction` is `func`.
+ */
+private predicate isFirstInstructionBeforeUninitializedGroup(
+ Instruction instruction, IRFunction func
+) {
+ instruction = getChi(any(OldIR::InitializeNonLocalInstruction init)) and
+ func = instruction.getEnclosingIRFunction()
+}
+
+/** Gets the `i`'th `UninitializedGroup` instruction in `func`. */
+private UninitializedGroupInstruction getInitGroupInstruction(int i, IRFunction func) {
+ exists(Alias::VariableGroup vg |
+ vg.getIRFunction() = func and
+ vg.getInitializationOrder() = i and
+ result = uninitializedGroup(vg)
+ )
+}
+
+/**
+ * Holds if `instruction` is the last instruction in the chain of `UninitializedGroup`
+ * instructions in `func`. The chain of instructions may be empty in which case
+ * `instruction` satisfies
+ * ```
+ * isFirstInstructionBeforeUninitializedGroup(instruction, func)
+ * ```
+ */
+predicate isLastInstructionForUninitializedGroups(Instruction instruction, IRFunction func) {
+ exists(int i |
+ instruction = getInitGroupInstruction(i, func) and
+ not exists(getChi(instruction)) and
+ not exists(getInitGroupInstruction(i + 1, func))
+ )
+ or
+ exists(int i |
+ instruction = getChi(getInitGroupInstruction(i, func)) and
+ not exists(getInitGroupInstruction(i + 1, func))
+ )
+ or
+ isFirstInstructionBeforeUninitializedGroup(instruction, func) and
+ not exists(getInitGroupInstruction(0, func))
+}
+
cached
private module Cached {
cached
@@ -32,6 +77,11 @@ private module Cached {
hasChiNode(_, primaryInstruction)
}
+ cached
+ predicate hasChiNodeAfterUninitializedGroup(UninitializedGroupInstruction initGroup) {
+ hasChiNodeAfterUninitializedGroup(_, initGroup)
+ }
+
cached
predicate hasUnreachedInstructionCached(IRFunction irFunc) {
exists(OldIR::Instruction oldInstruction |
@@ -45,7 +95,8 @@ private module Cached {
}
class TStageInstruction =
- TRawInstruction or TPhiInstruction or TChiInstruction or TUnreachedInstruction;
+ TRawInstruction or TPhiInstruction or TChiInstruction or TUnreachedInstruction or
+ TUninitializedGroupInstruction;
/**
* If `oldInstruction` is a `Phi` instruction that has exactly one reachable predecessor block,
@@ -78,6 +129,8 @@ private module Cached {
or
instr instanceof TChiInstruction
or
+ instr instanceof TUninitializedGroupInstruction
+ or
instr instanceof TUnreachedInstruction
}
@@ -123,7 +176,8 @@ private module Cached {
predicate hasModeledMemoryResult(Instruction instruction) {
canModelResultForOldInstruction(getOldInstruction(instruction)) or
instruction instanceof PhiInstruction or // Phis always have modeled results
- instruction instanceof ChiInstruction // Chis always have modeled results
+ instruction instanceof ChiInstruction or // Chis always have modeled results
+ instruction instanceof UninitializedGroupInstruction // Group initializers always have modeled results
}
cached
@@ -134,16 +188,23 @@ private module Cached {
or
// Chi instructions track virtual variables, and therefore a chi instruction is
// conflated if it's associated with the aliased virtual variable.
- exists(OldInstruction oldInstruction | instruction = getChi(oldInstruction) |
- Alias::getResultMemoryLocation(oldInstruction).getVirtualVariable() instanceof
+ exists(Instruction input | instruction = getChi(input) |
+ Alias::getResultMemoryLocation(input).getVirtualVariable() instanceof
Alias::AliasedVirtualVariable
+ or
+ // A chi following an `UninitializedGroupInstruction` only happens when the virtual
+ // variable of the grouped memory location is `{AllAliasedMemory}`.
+ exists(Alias::GroupedMemoryLocation gml |
+ input = uninitializedGroup(gml.getGroup()) and
+ gml.getVirtualVariable() instanceof Alias::AliasedVirtualVariable
+ )
)
or
// Phi instructions track locations, and therefore a phi instruction is
// conflated if it's associated with a conflated location.
exists(Alias::MemoryLocation location |
instruction = getPhi(_, location) and
- not exists(location.getAllocation())
+ not exists(location.getAnAllocation())
)
}
@@ -205,7 +266,11 @@ private module Cached {
hasMemoryOperandDefinition(oldInstruction, oldOperand, overlap, result)
)
or
- instruction = getChi(getOldInstruction(result)) and
+ (
+ instruction = getChi(getOldInstruction(result))
+ or
+ instruction = getChi(result.(UninitializedGroupInstruction))
+ ) and
tag instanceof ChiPartialOperandTag and
overlap instanceof MustExactlyOverlap
or
@@ -263,6 +328,14 @@ private module Cached {
)
}
+ cached
+ IRVariable getAnUninitializedGroupVariable(UninitializedGroupInstruction init) {
+ exists(Alias::VariableGroup vg |
+ init = uninitializedGroup(vg) and
+ result = vg.getAnAllocation().getABaseInstruction().(VariableInstruction).getIRVariable()
+ )
+ }
+
/**
* Holds if `instr` is part of a cycle in the operand graph that doesn't go
* through a phi instruction and therefore should be impossible.
@@ -316,6 +389,19 @@ private module Cached {
result = getNewPhiOperandDefinitionFromOldSsa(instr, newPredecessorBlock, overlap)
}
+ private ChiInstruction getChiAfterUninitializedGroup(int i, IRFunction func) {
+ result =
+ rank[i + 1](VariableGroup vg, UninitializedGroupInstruction initGroup, ChiInstruction chi,
+ int r |
+ initGroup.getEnclosingIRFunction() = func and
+ chi = getChi(initGroup) and
+ initGroup = uninitializedGroup(vg) and
+ r = vg.getInitializationOrder()
+ |
+ chi order by r
+ )
+ }
+
cached
Instruction getChiInstructionTotalOperand(ChiInstruction chiInstr) {
exists(
@@ -329,6 +415,19 @@ private module Cached {
definitionReachesUse(vvar, defBlock, defRank, useBlock, useRank) and
result = getDefinitionOrChiInstruction(defBlock, defOffset, vvar, _)
)
+ or
+ exists(UninitializedGroupInstruction initGroup, IRFunction func |
+ chiInstr = getChi(initGroup) and
+ func = initGroup.getEnclosingIRFunction()
+ |
+ chiInstr = getChiAfterUninitializedGroup(0, func) and
+ isFirstInstructionBeforeUninitializedGroup(result, func)
+ or
+ exists(int i |
+ chiInstr = getChiAfterUninitializedGroup(i + 1, func) and
+ result = getChiAfterUninitializedGroup(i, func)
+ )
+ )
}
cached
@@ -344,14 +443,40 @@ private module Cached {
)
}
- /*
- * This adds Chi nodes to the instruction successor relation; if an instruction has a Chi node,
- * that node is its successor in the new successor relation, and the Chi node's successors are
- * the new instructions generated from the successors of the old instruction
- */
+ private UninitializedGroupInstruction firstInstructionToUninitializedGroup(
+ Instruction instruction, EdgeKind kind
+ ) {
+ exists(IRFunction func |
+ isFirstInstructionBeforeUninitializedGroup(instruction, func) and
+ result = getInitGroupInstruction(0, func) and
+ kind instanceof GotoEdge
+ )
+ }
- cached
- Instruction getInstructionSuccessor(Instruction instruction, EdgeKind kind) {
+ private Instruction getNextUninitializedGroupInstruction(Instruction instruction, EdgeKind kind) {
+ exists(int i, IRFunction func |
+ func = instruction.getEnclosingIRFunction() and
+ instruction = getInitGroupInstruction(i, func) and
+ kind instanceof GotoEdge
+ |
+ if hasChiNodeAfterUninitializedGroup(_, instruction)
+ then result = getChi(instruction)
+ else result = getInitGroupInstruction(i + 1, func)
+ )
+ or
+ exists(int i, IRFunction func, UninitializedGroupInstruction initGroup |
+ func = instruction.getEnclosingIRFunction() and
+ instruction = getChi(initGroup) and
+ initGroup = getInitGroupInstruction(i, func) and
+ kind instanceof GotoEdge
+ |
+ result = getInitGroupInstruction(i + 1, func)
+ )
+ }
+
+ private Instruction getInstructionSuccessorAfterUninitializedGroup0(
+ Instruction instruction, EdgeKind kind
+ ) {
if hasChiNode(_, getOldInstruction(instruction))
then
result = getChi(getOldInstruction(instruction)) and
@@ -371,6 +496,107 @@ private module Cached {
)
}
+ private Instruction getInstructionSuccessorAfterUninitializedGroup(
+ Instruction instruction, EdgeKind kind
+ ) {
+ exists(IRFunction func, Instruction firstBeforeUninitializedGroup |
+ isLastInstructionForUninitializedGroups(instruction, func) and
+ isFirstInstructionBeforeUninitializedGroup(firstBeforeUninitializedGroup, func) and
+ result = getInstructionSuccessorAfterUninitializedGroup0(firstBeforeUninitializedGroup, kind)
+ )
+ }
+
+ /**
+ * This adds Chi nodes to the instruction successor relation; if an instruction has a Chi node,
+ * that node is its successor in the new successor relation, and the Chi node's successors are
+ * the new instructions generated from the successors of the old instruction.
+ *
+ * Furthermore, the entry block is augmented with `UninitializedGroup` instructions and `Chi`
+ * instructions. For example, consider this example:
+ * ```cpp
+ * int x, y;
+ * int* p;
+ * if(b) {
+ * p = &x;
+ * escape(&x);
+ * } else {
+ * p = &y;
+ * }
+ * *p = 42;
+ *
+ * int z, w;
+ * int* q;
+ * if(b) {
+ * q = &z;
+ * } else {
+ * q = &w;
+ * }
+ * *q = 43;
+ * ```
+ *
+ * the unaliased IR for the entry block of this snippet is:
+ * ```
+ * v1(void) = EnterFunction :
+ * m1(unknown) = AliasedDefinition :
+ * m2(unknown) = InitializeNonLocal :
+ * r1(glval) = VariableAddress[b] :
+ * m3(bool) = InitializeParameter[b] : &:r1
+ * r2(glval) = VariableAddress[x] :
+ * m4(int) = Uninitialized[x] : &:r2
+ * r3(glval) = VariableAddress[y] :
+ * m5(int) = Uninitialized[y] : &:r3
+ * r4(glval) = VariableAddress[p] :
+ * m6(int *) = Uninitialized[p] : &:r4
+ * r5(glval) = VariableAddress[b] :
+ * r6(bool) = Load[b] : &:r5, m3
+ * v2(void) = ConditionalBranch : r6
+ * ```
+ * and we need to transform this to aliased IR by inserting an `UninitializedGroup`
+ * instruction for every `VariableGroup` memory location in the function. Furthermore,
+ * if the `VariableGroup` memory location contains an allocation that escapes we need
+ * to insert a `Chi` that writes the memory produced by `UninitializedGroup` into
+ * `{AllAliasedMemory}`. For the above snippet we then end up with:
+ * ```
+ * v1(void) = EnterFunction :
+ * m2(unknown) = AliasedDefinition :
+ * m3(unknown) = InitializeNonLocal :
+ * m4(unknown) = Chi : total:m2, partial:m3
+ * m5(int) = UninitializedGroup[x,y] :
+ * m6(unknown) = Chi : total:m4, partial:m5
+ * m7(int) = UninitializedGroup[w,z] :
+ * r1(glval) = VariableAddress[b] :
+ * m8(bool) = InitializeParameter[b] : &:r1
+ * r2(glval) = VariableAddress[x] :
+ * m10(int) = Uninitialized[x] : &:r2
+ * m11(unknown) = Chi : total:m6, partial:m10
+ * r3(glval) = VariableAddress[y] :
+ * m12(int) = Uninitialized[y] : &:r3
+ * m13(unknown) = Chi : total:m11, partial:m12
+ * r4(glval) = VariableAddress[p] :
+ * m14(int *) = Uninitialized[p] : &:r4
+ * r5(glval) = VariableAddress[b] :
+ * r6(bool) = Load[b] : &:r5, m8
+ * v2(void) = ConditionalBranch : r6
+ * ```
+ *
+ * Here, the group `{x, y}` contains an allocation that escapes (`x`), so there
+ * is a `Chi` after the `UninitializedGroup` that initializes the memory for the
+ * `VariableGroup` containing `x`. None of the allocations in `{w, z}` escape so
+ * there is no `Chi` following that the `UninitializedGroup` that initializes the
+ * memory of `{w, z}`.
+ */
+ cached
+ Instruction getInstructionSuccessor(Instruction instruction, EdgeKind kind) {
+ result = firstInstructionToUninitializedGroup(instruction, kind)
+ or
+ result = getNextUninitializedGroupInstruction(instruction, kind)
+ or
+ result = getInstructionSuccessorAfterUninitializedGroup(instruction, kind)
+ or
+ not isFirstInstructionBeforeUninitializedGroup(instruction, _) and
+ result = getInstructionSuccessorAfterUninitializedGroup0(instruction, kind)
+ }
+
cached
Instruction getInstructionBackEdgeSuccessor(Instruction instruction, EdgeKind kind) {
exists(OldInstruction oldInstruction |
@@ -406,6 +632,16 @@ private module Cached {
exists(IRFunctionBase irFunc |
instr = unreachedInstruction(irFunc) and result = irFunc.getFunction()
)
+ or
+ exists(Alias::VariableGroup vg |
+ instr = uninitializedGroup(vg) and
+ result = vg.getIRFunction().getFunction()
+ )
+ or
+ exists(UninitializedGroupInstruction initGroup |
+ instr = chiInstruction(initGroup) and
+ result = getInstructionAst(initGroup)
+ )
}
cached
@@ -418,9 +654,16 @@ private module Cached {
)
or
exists(Instruction primaryInstr, Alias::VirtualVariable vvar |
- instr = chiInstruction(primaryInstr) and
- hasChiNode(vvar, primaryInstr) and
- result = vvar.getType()
+ instr = chiInstruction(primaryInstr) and result = vvar.getType()
+ |
+ hasChiNode(vvar, primaryInstr)
+ or
+ hasChiNodeAfterUninitializedGroup(vvar, primaryInstr)
+ )
+ or
+ exists(Alias::VariableGroup vg |
+ instr = uninitializedGroup(vg) and
+ result = vg.getType()
)
or
instr = reusedPhiInstruction(_) and
@@ -448,6 +691,8 @@ private module Cached {
or
instr = chiInstruction(_) and opcode instanceof Opcode::Chi
or
+ instr = uninitializedGroup(_) and opcode instanceof Opcode::UninitializedGroup
+ or
instr = unreachedInstruction(_) and opcode instanceof Opcode::Unreached
}
@@ -460,10 +705,15 @@ private module Cached {
result = blockStartInstr.getEnclosingIRFunction()
)
or
- exists(OldInstruction primaryInstr |
+ exists(Instruction primaryInstr |
instr = chiInstruction(primaryInstr) and result = primaryInstr.getEnclosingIRFunction()
)
or
+ exists(Alias::VariableGroup vg |
+ instr = uninitializedGroup(vg) and
+ result = vg.getIRFunction()
+ )
+ or
instr = unreachedInstruction(result)
}
@@ -478,6 +728,8 @@ private module Cached {
instruction = getChi(oldInstruction) and
result = getNewInstruction(oldInstruction)
)
+ or
+ instruction = getChi(result.(UninitializedGroupInstruction))
}
}
@@ -485,7 +737,7 @@ private Instruction getNewInstruction(OldInstruction instr) { getOldInstruction(
private OldInstruction getOldInstruction(Instruction instr) { instr = result }
-private ChiInstruction getChi(OldInstruction primaryInstr) { result = chiInstruction(primaryInstr) }
+private ChiInstruction getChi(Instruction primaryInstr) { result = chiInstruction(primaryInstr) }
private PhiInstruction getPhi(OldBlock defBlock, Alias::MemoryLocation defLocation) {
result = phiInstruction(defBlock.getFirstInstruction(), defLocation)
@@ -506,6 +758,16 @@ private predicate hasChiNode(Alias::VirtualVariable vvar, OldInstruction def) {
)
}
+private predicate hasChiNodeAfterUninitializedGroup(
+ Alias::AliasedVirtualVariable vvar, UninitializedGroupInstruction initGroup
+) {
+ exists(Alias::GroupedMemoryLocation defLocation |
+ initGroup = uninitializedGroup(defLocation.getGroup()) and
+ defLocation.getVirtualVariable() = vvar and
+ Alias::getOverlap(defLocation, vvar) instanceof MayPartiallyOverlap
+ )
+}
+
private import PhiInsertion
/**
@@ -668,19 +930,33 @@ private import DefUse
* potentially very sparse.
*/
module DefUse {
+ bindingset[index, block]
+ pragma[inline_late]
+ private int getNonChiOffset(int index, OldBlock block) {
+ exists(IRFunction func | func = block.getEnclosingIRFunction() |
+ if
+ getNewBlock(block) = func.getEntryBlock() and
+ not block.getInstruction(index) instanceof InitializeNonLocalInstruction and
+ not block.getInstruction(index) instanceof AliasedDefinitionInstruction
+ then result = 2 * (index + count(VariableGroup vg | vg.getIRFunction() = func))
+ else result = 2 * index
+ )
+ }
+
+ bindingset[index, block]
+ pragma[inline_late]
+ private int getChiOffset(int index, OldBlock block) { result = getNonChiOffset(index, block) + 1 }
+
/**
* Gets the `Instruction` for the definition at offset `defOffset` in block `defBlock`.
*/
- Instruction getDefinitionOrChiInstruction(
+ private Instruction getDefinitionOrChiInstruction0(
OldBlock defBlock, int defOffset, Alias::MemoryLocation defLocation,
Alias::MemoryLocation actualDefLocation
) {
- exists(OldInstruction oldInstr, int oldOffset |
- oldInstr = defBlock.getInstruction(oldOffset) and
- oldOffset >= 0
- |
+ exists(OldInstruction oldInstr, int oldOffset | oldInstr = defBlock.getInstruction(oldOffset) |
// An odd offset corresponds to the `Chi` instruction.
- defOffset = oldOffset * 2 + 1 and
+ defOffset = getChiOffset(oldOffset, defBlock) and
result = getChi(oldInstr) and
(
defLocation = Alias::getResultMemoryLocation(oldInstr) or
@@ -689,7 +965,7 @@ module DefUse {
actualDefLocation = defLocation.getVirtualVariable()
or
// An even offset corresponds to the original instruction.
- defOffset = oldOffset * 2 and
+ defOffset = getNonChiOffset(oldOffset, defBlock) and
result = getNewInstruction(oldInstr) and
(
defLocation = Alias::getResultMemoryLocation(oldInstr) or
@@ -702,6 +978,54 @@ module DefUse {
hasDefinition(_, defLocation, defBlock, defOffset) and
result = getPhi(defBlock, defLocation) and
actualDefLocation = defLocation
+ or
+ exists(
+ Alias::VariableGroup vg, int index, UninitializedGroupInstruction initGroup,
+ Alias::GroupedMemoryLocation gml
+ |
+ // Add 3 to account for the function prologue:
+ // v1(void) = EnterFunction
+ // m1(unknown) = AliasedDefinition
+ // m2(unknown) = InitializeNonLocal
+ index = 3 + vg.getInitializationOrder() and
+ not gml.isMayAccess() and
+ gml.isSome() and
+ gml.getGroup() = vg and
+ vg.getIRFunction().getEntryBlock() = defBlock and
+ initGroup = uninitializedGroup(vg) and
+ (defLocation = gml or defLocation = gml.getVirtualVariable())
+ |
+ result = initGroup and
+ defOffset = 2 * index and
+ actualDefLocation = defLocation
+ or
+ result = getChi(initGroup) and
+ defOffset = 2 * index + 1 and
+ actualDefLocation = defLocation.getVirtualVariable()
+ )
+ }
+
+ private ChiInstruction remapGetDefinitionOrChiInstruction(Instruction oldResult) {
+ exists(IRFunction func |
+ isFirstInstructionBeforeUninitializedGroup(oldResult, func) and
+ isLastInstructionForUninitializedGroups(result, func)
+ )
+ }
+
+ Instruction getDefinitionOrChiInstruction(
+ OldBlock defBlock, int defOffset, Alias::MemoryLocation defLocation,
+ Alias::MemoryLocation actualDefLocation
+ ) {
+ exists(Instruction oldResult |
+ oldResult =
+ getDefinitionOrChiInstruction0(defBlock, defOffset, defLocation, actualDefLocation) and
+ (
+ result = remapGetDefinitionOrChiInstruction(oldResult)
+ or
+ not exists(remapGetDefinitionOrChiInstruction(oldResult)) and
+ result = oldResult
+ )
+ )
}
/**
@@ -842,8 +1166,20 @@ module DefUse {
block.getInstruction(index) = def and
overlap = Alias::getOverlap(defLocation, useLocation) and
if overlap instanceof MayPartiallyOverlap
- then offset = (index * 2) + 1 // The use will be connected to the definition on the `Chi` instruction.
- else offset = index * 2 // The use will be connected to the definition on the original instruction.
+ then offset = getChiOffset(index, block) // The use will be connected to the definition on the `Chi` instruction.
+ else offset = getNonChiOffset(index, block) // The use will be connected to the definition on the original instruction.
+ )
+ or
+ exists(UninitializedGroupInstruction initGroup, int index, Overlap overlap, VariableGroup vg |
+ initGroup.getEnclosingIRFunction().getEntryBlock() = getNewBlock(block) and
+ vg = defLocation.(Alias::GroupedMemoryLocation).getGroup() and
+ // EnterFunction + AliasedDefinition + InitializeNonLocal + index
+ index = 3 + vg.getInitializationOrder() and
+ initGroup = uninitializedGroup(vg) and
+ overlap = Alias::getOverlap(defLocation, useLocation) and
+ if overlap instanceof MayPartiallyOverlap and hasChiNodeAfterUninitializedGroup(initGroup)
+ then offset = 2 * index + 1 // The use will be connected to the definition on the `Chi` instruction.
+ else offset = 2 * index // The use will be connected to the definition on the original instruction.
)
}
@@ -904,10 +1240,11 @@ module DefUse {
block.getInstruction(index) = use and
(
// A direct use of the location.
- useLocation = Alias::getOperandMemoryLocation(use.getAnOperand()) and offset = index * 2
+ useLocation = Alias::getOperandMemoryLocation(use.getAnOperand()) and
+ offset = getNonChiOffset(index, block)
or
// A `Chi` instruction will include a use of the virtual variable.
- hasChiNode(useLocation, use) and offset = (index * 2) + 1
+ hasChiNode(useLocation, use) and offset = getChiOffset(index, block)
)
)
}
@@ -1057,5 +1394,9 @@ module Ssa {
predicate hasChiInstruction = Cached::hasChiInstructionCached/1;
+ predicate hasChiNodeAfterUninitializedGroup = Cached::hasChiNodeAfterUninitializedGroup/1;
+
predicate hasUnreachedInstruction = Cached::hasUnreachedInstructionCached/1;
+
+ class VariableGroup = Alias::VariableGroup;
}
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 5c33ecf5f99b..8d11fdeec38e 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
@@ -2,6 +2,7 @@ import AliasAnalysis
private import SimpleSSAImports
import SimpleSSAPublicImports
private import AliasConfiguration
+private import codeql.util.Unit
private predicate isTotalAccess(Allocation var, AddressOperand addrOperand, IRType type) {
exists(Instruction constantBase, int bitOffset |
@@ -48,7 +49,7 @@ predicate canReuseSsaForVariable(IRAutomaticVariable var) {
private newtype TMemoryLocation = MkMemoryLocation(Allocation var) { isVariableModeled(var) }
-private MemoryLocation getMemoryLocation(Allocation var) { result.getAllocation() = var }
+private MemoryLocation getMemoryLocation(Allocation var) { result.getAnAllocation() = var }
class MemoryLocation extends TMemoryLocation {
Allocation var;
@@ -57,7 +58,7 @@ class MemoryLocation extends TMemoryLocation {
final string toString() { result = var.getAllocationString() }
- final Allocation getAllocation() { result = var }
+ final Allocation getAnAllocation() { result = var }
final Language::Location getLocation() { result = var.getLocation() }
@@ -77,6 +78,40 @@ class MemoryLocation extends TMemoryLocation {
predicate canReuseSsaForOldResult(Instruction instr) { none() }
+abstract class VariableGroup extends Unit {
+ abstract Allocation getAnAllocation();
+
+ string toString() { result = "{" + strictconcat(this.getAnAllocation().toString(), ", ") + "}" }
+
+ abstract Language::Location getLocation();
+
+ abstract IRFunction getIRFunction();
+
+ abstract Language::LanguageType getType();
+
+ abstract int getInitializationOrder();
+}
+
+class GroupedMemoryLocation extends MemoryLocation {
+ VariableGroup vg;
+
+ GroupedMemoryLocation() { none() }
+
+ /** Gets an allocation of this memory location. */
+ Allocation getAnAllocation() { result = vg.getAnAllocation() }
+
+ /** Gets the set of allocations associated with this memory location. */
+ VariableGroup getGroup() { result = vg }
+
+ predicate isMayAccess() { none() }
+
+ /** Holds if this memory location represents all the enclosing allocations. */
+ predicate isAll() { none() }
+
+ /** Holds if this memory location represents one or more of the enclosing allocations. */
+ predicate isSome() { none() }
+}
+
/**
* Represents a set of `MemoryLocation`s that cannot overlap with
* `MemoryLocation`s outside of the set. The `VirtualVariable` will be
diff --git a/cpp/ql/lib/semmle/code/cpp/models/implementations/StdString.qll b/cpp/ql/lib/semmle/code/cpp/models/implementations/StdString.qll
index e22468745790..fd28363297a6 100644
--- a/cpp/ql/lib/semmle/code/cpp/models/implementations/StdString.qll
+++ b/cpp/ql/lib/semmle/code/cpp/models/implementations/StdString.qll
@@ -66,7 +66,7 @@ abstract private class StdStringTaintFunction extends TaintFunction {
* Gets the index of a parameter to this function that is an iterator.
*/
final int getAnIteratorParameterIndex() {
- this.getParameter(result).getType() instanceof Iterator
+ this.getParameter(result).getUnspecifiedType() instanceof Iterator
}
}
diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme
index abfce5c170f9..3d35dd6b50ed 100644
--- a/cpp/ql/lib/semmlecode.cpp.dbscheme
+++ b/cpp/ql/lib/semmlecode.cpp.dbscheme
@@ -1748,6 +1748,25 @@ case @expr.kind of
| 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
;
@var_args_expr = @vastartexpr
@@ -1842,6 +1861,25 @@ case @expr.kind of
| @isunsigned
| @isvoid
| @isvolatile
+ | @istriviallycopyassignable
+ | @isassignablenopreconditioncheck
+ | @referencebindstotemporary
+ | @issameas
+ | @builtinhasattribute
+ | @ispointerinterconvertiblewithclass
+ | @builtinispointerinterconvertiblewithclass
+ | @iscorrespondingmember
+ | @builtiniscorrespondingmember
+ | @isboundedarray
+ | @isunboundedarray
+ | @isreferenceable
+ | @isnothrowconvertible
+ | @referenceconstructsfromtemporary
+ | @referenceconvertsfromtemporary
+ | @isconvertible
+ | @isvalidwinrttype
+ | @iswinclass
+ | @iswininterface
;
new_allocated_type(
diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats
index d6f973be1f64..fbb177927c72 100644
--- a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats
+++ b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats
@@ -2,7 +2,7 @@
@compilation
- 9654
+ 9651
@externalDataElement
@@ -18,71 +18,71 @@
@location_default
- 29787737
+ 29785199
@location_stmt
- 3820076
+ 3820138
- @diagnostic
- 5001
+ @location_expr
+ 13188829
- @location_expr
- 13188614
+ @diagnostic
+ 4979
@file
- 123139
+ 123129
@folder
- 16325
+ 16323
@macro_expansion
- 32959239
+ 32951596
@other_macro_reference
- 858248
+ 858174
@function
- 4646200
+ 4645804
@fun_decl
- 5010023
+ 5009596
@var_decl
- 8423424
+ 8422707
@type_decl
- 3242218
+ 3280187
@namespace_decl
- 311523
+ 311514
@using
- 369419
+ 369388
@static_assert
- 134652
+ 134648
@parameter
- 6576325
+ 6575765
@membervariable
- 1054750
+ 1054767
@globalvariable
@@ -90,11 +90,11 @@
@localvariable
- 576895
+ 576915
@enumconstant
- 241682
+ 241686
@errortype
@@ -322,27 +322,27 @@
@pointer
- 567656
+ 567608
@type_with_specifiers
- 1010307
+ 1010221
@array
- 110079
+ 110070
@routineptr
- 624503
+ 624146
@reference
- 1720495
+ 1720096
@gnu_vector
- 671
+ 693
@routinereference
@@ -350,7 +350,7 @@
@rvalue_reference
- 620537
+ 620183
@block
@@ -358,43 +358,43 @@
@decltype
- 27053
+ 27051
@usertype
- 5230182
+ 5228803
@mangledname
- 6448521
+ 6447972
@type_mention
- 4029338
+ 4029404
@routinetype
- 538026
+ 537719
@ptrtomember
- 37781
+ 37778
@specifier
- 24721
+ 24719
@gnuattribute
- 685665
+ 686073
@stdattribute
- 487639
+ 476990
@declspec
- 243121
+ 243125
@msattribute
@@ -402,15 +402,15 @@
@alignas
- 9795
+ 9794
@attribute_arg_token
- 39180
+ 39177
@attribute_arg_constant_expr
- 370352
+ 370787
@attribute_arg_empty
@@ -430,35 +430,35 @@
@derivation
- 390988
+ 390765
@frienddecl
- 706005
+ 705602
@comment
- 8682106
+ 8267972
@namespace
- 12127
+ 12126
- @specialnamequalifyingelement
- 466
+ @namequalifier
+ 1508764
- @namequalifier
- 1515301
+ @specialnamequalifyingelement
+ 466
@value
- 10777241
+ 10777417
@initialiser
- 1710223
+ 1710171
@address_of
@@ -466,15 +466,15 @@
@indirect
- 292660
+ 292665
@array_to_pointer
- 1430911
+ 1430934
@parexpr
- 3587661
+ 3587718
@arithnegexpr
@@ -490,19 +490,19 @@
@notexpr
- 276439
+ 276443
@postincrexpr
- 62048
+ 62049
@postdecrexpr
- 42037
+ 42038
@preincrexpr
- 70577
+ 70578
@predecrexpr
@@ -510,87 +510,87 @@
@conditionalexpr
- 657271
+ 657281
@addexpr
- 398414
+ 398421
@subexpr
- 340775
+ 340781
@mulexpr
- 306372
+ 306377
@divexpr
- 133173
+ 133175
@remexpr
- 15618
+ 15609
@paddexpr
- 86666
+ 86668
@psubexpr
- 49902
+ 49903
@pdiffexpr
- 35178
+ 33697
@lshiftexpr
- 566331
+ 566340
@rshiftexpr
- 140847
+ 140849
@andexpr
- 489081
+ 489088
@orexpr
- 145472
+ 145475
@xorexpr
- 54177
+ 54178
@eqexpr
- 470674
+ 470681
@neexpr
- 301682
+ 301687
@gtexpr
- 104015
+ 104007
@ltexpr
- 101683
+ 101675
@geexpr
- 59252
+ 59253
@leexpr
- 212537
+ 212540
@assignexpr
- 937004
+ 937019
@assignaddexpr
@@ -602,7 +602,7 @@
@assignmulexpr
- 8210
+ 8209
@assigndivexpr
@@ -610,7 +610,7 @@
@assignremexpr
- 413
+ 689
@assignlshiftexpr
@@ -626,7 +626,7 @@
@assignorexpr
- 23654
+ 23626
@assignxorexpr
@@ -642,23 +642,23 @@
@andlogicalexpr
- 249965
+ 249969
@orlogicalexpr
- 866154
+ 866168
@commaexpr
- 122711
+ 122868
@subscriptexpr
- 364880
+ 364458
@callexpr
- 316245
+ 316218
@vastartexpr
@@ -678,27 +678,27 @@
@varaccess
- 6029430
+ 6029528
@runtime_sizeof
- 295851
+ 295856
@runtime_alignof
- 49186
+ 49158
@expr_stmt
- 94392
+ 94393
@routineexpr
- 3150048
+ 3176148
@type_operand
- 1128813
+ 1128831
@offsetofexpr
@@ -706,11 +706,11 @@
@typescompexpr
- 563806
+ 563815
@literal
- 4406917
+ 4406923
@aggregateliteral
@@ -718,27 +718,27 @@
@c_style_cast
- 4210103
+ 4210086
@temp_init
- 795228
+ 791807
@errorexpr
- 46229
+ 46203
@reference_to
- 1569867
+ 1568970
@ref_indirect
- 1906417
+ 1905327
@vacuous_destructor_call
- 8035
+ 8030
@assume
@@ -794,35 +794,35 @@
@thisaccess
- 1117561
+ 1117527
@new_expr
- 46995
+ 46968
@delete_expr
- 11618
+ 11611
@throw_expr
- 21053
+ 21048
@condition_decl
- 40753
+ 40577
@braced_init_list
- 1064
+ 1060
@type_id
- 35968
+ 35947
@sizeof_pack
- 5597
+ 5596
@hasassignexpr
@@ -866,7 +866,7 @@
@isabstractexpr
- 19
+ 18
@isbaseofexpr
@@ -878,7 +878,7 @@
@isconvtoexpr
- 206
+ 197
@isemptyexpr
@@ -886,7 +886,7 @@
@isenumexpr
- 517
+ 492
@ispodexpr
@@ -910,7 +910,7 @@
@uuidof
- 20293
+ 20292
@delete_array_expr
@@ -926,43 +926,43 @@
@ctordirectinit
- 111383
+ 111319
@ctorvirtualinit
- 6320
+ 6318
@ctorfieldinit
- 198277
+ 198163
@ctordelegatinginit
- 3304
+ 3302
@dtordirectdestruct
- 41220
+ 41197
@dtorvirtualdestruct
- 4069
+ 4067
@dtorfielddestruct
- 41116
+ 41092
@static_cast
- 214369
+ 214320
@reinterpret_cast
- 30729
+ 31628
@const_cast
- 34971
+ 34584
@dynamic_cast
@@ -970,11 +970,11 @@
@lambdaexpr
- 21456
+ 21454
@param_ref
- 235847
+ 234832
@noopexpr
@@ -982,7 +982,7 @@
@istriviallyconstructibleexpr
- 1345
+ 1280
@isdestructibleexpr
@@ -994,7 +994,7 @@
@istriviallydestructibleexpr
- 827
+ 788
@istriviallyassignableexpr
@@ -1002,7 +1002,7 @@
@isnothrowassignableexpr
- 4138
+ 3941
@istrivialexpr
@@ -1038,7 +1038,7 @@
@isnothrowconstructibleexpr
- 14278
+ 13597
@hasfinalizerexpr
@@ -1074,11 +1074,11 @@
@isfinalexpr
- 1669
+ 1668
@noexceptexpr
- 24664
+ 24558
@builtinshufflevector
@@ -1090,7 +1090,7 @@
@builtinaddressof
- 13114
+ 13106
@vec_fill
@@ -1110,11 +1110,11 @@
@co_await
- 6
+ 12
@co_yield
- 1
+ 4
@isassignable
@@ -1250,67 +1250,143 @@
@reuseexpr
- 333955
+ 372471
+
+
+ @istriviallycopyassignable
+ 2
+
+
+ @isassignablenopreconditioncheck
+ 3
+
+
+ @referencebindstotemporary
+ 2
+
+
+ @issameas
+ 2
+
+
+ @builtinhasattribute
+ 2
+
+
+ @ispointerinterconvertiblewithclass
+ 2
+
+
+ @builtinispointerinterconvertiblewithclass
+ 2
+
+
+ @iscorrespondingmember
+ 2
+
+
+ @builtiniscorrespondingmember
+ 2
+
+
+ @isboundedarray
+ 2
+
+
+ @isunboundedarray
+ 2
+
+
+ @isreferenceable
+ 2
+
+
+ @isnothrowconvertible
+ 2
+
+
+ @referenceconstructsfromtemporary
+ 2
+
+
+ @referenceconvertsfromtemporary
+ 2
+
+
+ @isconvertible
+ 2
+
+
+ @isvalidwinrttype
+ 1
+
+
+ @iswinclass
+ 1
+
+
+ @iswininterface
+ 1
@lambdacapture
- 27986
+ 27983
@stmt_expr
- 1486099
+ 1486124
@stmt_if
- 725951
+ 725963
@stmt_while
- 29141
+ 29134
@stmt_goto
- 110696
+ 110698
@stmt_label
- 53144
+ 53145
@stmt_return
- 1285039
+ 1284930
@stmt_block
- 1424038
+ 1423917
@stmt_end_test_while
- 148881
+ 148884
@stmt_for
- 61559
+ 61560
@stmt_switch_case
- 207702
+ 206808
@stmt_switch
- 20787
+ 20788
@stmt_asm
- 109988
+ 109990
@stmt_decl
- 588988
+ 588851
@stmt_empty
- 191895
+ 192673
@stmt_continue
@@ -1318,11 +1394,11 @@
@stmt_break
- 103193
+ 103190
@stmt_try_block
- 45069
+ 44876
@stmt_microsoft_try
@@ -1346,51 +1422,51 @@
@stmt_handler
- 62736
+ 62466
@stmt_constexpr_if
- 52043
+ 53108
@stmt_co_return
- 2
+ 5
@ppd_if
- 666541
+ 666484
@ppd_ifdef
- 263071
+ 263049
@ppd_ifndef
- 266336
+ 266314
@ppd_elif
- 25187
+ 25185
@ppd_else
- 208964
+ 208946
@ppd_endif
- 1195950
+ 1195848
@ppd_plain_include
- 311114
+ 311088
@ppd_define
- 2407258
+ 2292433
@ppd_undef
- 258407
+ 258385
@ppd_include_next
@@ -1398,15 +1474,15 @@
@ppd_line
- 27551
+ 27519
@ppd_error
- 103
+ 98
@ppd_pragma
- 311642
+ 296776
@ppd_objc_import
@@ -1418,7 +1494,7 @@
@link_target
- 817
+ 814
@xmldtd
@@ -1436,23 +1512,23 @@
@xmlnamespace
4185
-
- @xmlcharacters
- 439958
-
@xmlcomment
26812
+
+ @xmlcharacters
+ 439958
+
compilations
- 9654
+ 9651
id
- 9654
+ 9651
cwd
@@ -1470,7 +1546,7 @@
1
2
- 9654
+ 9651
@@ -1496,7 +1572,7 @@
compilation_args
- 652584
+ 652594
id
@@ -1508,7 +1584,7 @@
arg
- 34462
+ 34463
@@ -1751,7 +1827,7 @@
2
1043
- 2063
+ 2064
@@ -1910,7 +1986,7 @@
1
2
- 1757
+ 1758
2
@@ -1946,7 +2022,7 @@
1
2
- 1757
+ 1758
2
@@ -2044,7 +2120,7 @@
seconds
- 9748
+ 9948
@@ -2134,38 +2210,38 @@
5
- 7
- 119
+ 8
+ 159
- 8
+ 9
10
159
10
11
- 79
+ 119
11
- 12
- 159
+ 14
+ 119
- 12
- 17
+ 16
+ 18
159
- 18
- 22
+ 19
+ 27
159
- 25
- 98
- 159
+ 38
+ 96
+ 119
@@ -2181,7 +2257,7 @@
1
2
- 1757
+ 1758
2
@@ -2233,12 +2309,12 @@
3
4
- 1438
+ 1318
4
5
- 319
+ 439
5
@@ -2248,27 +2324,27 @@
6
7
- 479
+ 399
7
8
- 119
+ 159
8
- 10
- 279
+ 9
+ 239
- 10
- 26
- 239
+ 9
+ 23
+ 279
- 26
- 84
- 239
+ 25
+ 92
+ 279
@@ -2316,16 +2392,21 @@
3
4
- 79
+ 39
- 137
- 138
+ 4
+ 5
39
- 142
- 143
+ 136
+ 137
+ 39
+
+
+ 145
+ 146
39
@@ -2342,27 +2423,27 @@
1
2
- 4994
+ 4954
2
3
- 2117
+ 2796
3
4
- 1278
+ 1118
4
- 5
- 958
+ 6
+ 918
- 5
+ 7
47
- 399
+ 159
@@ -2378,32 +2459,32 @@
1
2
- 4554
+ 4235
2
3
- 1997
+ 2317
3
4
- 1238
+ 1358
4
5
- 839
+ 1158
5
- 7
- 878
+ 12
+ 759
- 7
- 74
- 239
+ 26
+ 75
+ 119
@@ -2419,12 +2500,12 @@
1
2
- 8110
+ 8390
2
3
- 1638
+ 1558
@@ -2434,23 +2515,23 @@
diagnostic_for
- 5457
+ 5434
diagnostic
- 5001
+ 4979
compilation
- 817
+ 814
file_number
- 19
+ 18
file_number_diagnostic_number
- 399
+ 397
@@ -2464,12 +2545,12 @@
1
2
- 4849
+ 4828
2
7
- 152
+ 151
@@ -2485,7 +2566,7 @@
1
2
- 5001
+ 4979
@@ -2501,7 +2582,7 @@
1
2
- 5001
+ 4979
@@ -2517,27 +2598,27 @@
5
6
- 608
+ 605
7
8
- 76
+ 75
9
12
- 57
+ 56
13
16
- 38
+ 37
21
22
- 38
+ 37
@@ -2553,7 +2634,7 @@
1
2
- 817
+ 814
@@ -2569,27 +2650,27 @@
5
6
- 608
+ 605
7
8
- 76
+ 75
9
12
- 57
+ 56
13
16
- 38
+ 37
21
22
- 38
+ 37
@@ -2605,7 +2686,7 @@
263
264
- 19
+ 18
@@ -2621,7 +2702,7 @@
43
44
- 19
+ 18
@@ -2637,7 +2718,7 @@
21
22
- 19
+ 18
@@ -2653,42 +2734,42 @@
2
3
- 114
+ 113
3
4
- 38
+ 37
4
5
- 38
+ 37
5
6
- 38
+ 37
7
8
- 38
+ 37
11
12
- 38
+ 37
37
38
- 76
+ 75
43
44
- 19
+ 18
@@ -2704,37 +2785,37 @@
2
3
- 114
+ 113
3
4
- 38
+ 37
4
5
- 38
+ 37
5
6
- 38
+ 37
7
8
- 38
+ 37
11
12
- 38
+ 37
43
44
- 95
+ 94
@@ -2750,7 +2831,7 @@
1
2
- 399
+ 397
@@ -2760,19 +2841,19 @@
compilation_finished
- 9654
+ 9651
id
- 9654
+ 9651
cpu_seconds
- 7763
+ 6990
elapsed_seconds
- 145
+ 134
@@ -2786,7 +2867,7 @@
1
2
- 9654
+ 9651
@@ -2802,7 +2883,7 @@
1
2
- 9654
+ 9651
@@ -2818,17 +2899,17 @@
1
2
- 6510
+ 5457
2
3
- 872
+ 1073
3
- 14
- 380
+ 16
+ 458
@@ -2844,12 +2925,12 @@
1
2
- 7461
+ 6341
2
3
- 302
+ 648
@@ -2865,17 +2946,7 @@
2
3
- 22
-
-
- 3
- 4
- 11
-
-
- 6
- 7
- 11
+ 33
7
@@ -2888,38 +2959,38 @@
11
- 9
- 10
+ 10
+ 11
11
- 37
- 38
+ 11
+ 12
11
- 47
- 48
+ 54
+ 55
11
- 118
- 119
+ 156
+ 157
11
- 140
- 141
+ 173
+ 174
11
- 229
- 230
+ 177
+ 178
11
- 255
- 256
+ 261
+ 262
11
@@ -2936,17 +3007,7 @@
2
3
- 22
-
-
- 3
- 4
- 11
-
-
- 6
- 7
- 11
+ 33
7
@@ -2959,38 +3020,38 @@
11
- 9
- 10
+ 10
+ 11
11
- 37
- 38
+ 11
+ 12
11
- 47
- 48
+ 48
+ 49
11
- 97
- 98
+ 109
+ 110
11
- 112
- 113
+ 120
+ 121
11
- 183
- 184
+ 132
+ 133
11
- 208
- 209
+ 232
+ 233
11
@@ -4763,31 +4824,31 @@
locations_default
- 29787737
+ 29785199
id
- 29787737
+ 29785199
container
- 123139
+ 123129
startLine
- 2093378
+ 2093200
startColumn
- 36848
+ 36845
endLine
- 2097576
+ 2097398
endColumn
- 48043
+ 48039
@@ -4801,7 +4862,7 @@
1
2
- 29787737
+ 29785199
@@ -4817,7 +4878,7 @@
1
2
- 29787737
+ 29785199
@@ -4833,7 +4894,7 @@
1
2
- 29787737
+ 29785199
@@ -4849,7 +4910,7 @@
1
2
- 29787737
+ 29785199
@@ -4865,7 +4926,7 @@
1
2
- 29787737
+ 29785199
@@ -4881,62 +4942,62 @@
1
11
- 9795
+ 9794
11
18
- 10261
+ 10260
18
30
- 9328
+ 9327
30
42
- 9795
+ 9794
43
61
- 9795
+ 9794
61
79
- 9328
+ 9327
80
106
- 9795
+ 9794
109
149
- 9328
+ 9327
149
199
- 9328
+ 9327
206
292
- 9328
+ 9327
305
469
- 9328
+ 9327
482
850
- 9328
+ 9327
939
@@ -4957,67 +5018,67 @@
1
8
- 9328
+ 9327
8
13
- 9328
+ 9327
13
20
- 9795
+ 9794
20
32
- 9328
+ 9327
32
43
- 9795
+ 9794
44
61
- 9328
+ 9327
62
72
- 9328
+ 9327
73
93
- 9328
+ 9327
97
128
- 9328
+ 9327
128
180
- 9328
+ 9327
180
267
- 9328
+ 9327
277
414
- 9328
+ 9327
439
1465
- 9328
+ 9327
1557
@@ -5038,62 +5099,62 @@
1
4
- 8862
+ 8861
4
5
- 7929
+ 7928
5
6
- 7463
+ 7462
6
8
- 11194
+ 11193
8
10
- 9328
+ 9327
10
15
- 10728
+ 10727
15
23
- 9795
+ 9794
23
28
- 11194
+ 11193
28
34
- 9795
+ 9794
34
44
- 9328
+ 9327
44
55
- 9328
+ 9327
55
66
- 9795
+ 9794
66
@@ -5114,67 +5175,67 @@
1
8
- 9328
+ 9327
8
13
- 9328
+ 9327
13
20
- 9795
+ 9794
20
32
- 9328
+ 9327
32
43
- 9795
+ 9794
43
60
- 9328
+ 9327
61
71
- 9328
+ 9327
72
93
- 9328
+ 9327
94
127
- 9328
+ 9327
128
179
- 9328
+ 9327
180
268
- 9328
+ 9327
278
413
- 9328
+ 9327
437
1465
- 9328
+ 9327
1554
@@ -5195,67 +5256,67 @@
1
9
- 9795
+ 9794
9
13
- 9328
+ 9327
13
18
- 9328
+ 9327
18
26
- 10261
+ 10260
27
33
- 9328
+ 9327
33
39
- 9328
+ 9327
39
47
- 10261
+ 10260
47
54
- 9328
+ 9327
54
60
- 10261
+ 10260
60
66
- 9328
+ 9327
66
74
- 9795
+ 9794
74
78
- 9795
+ 9794
78
90
- 6996
+ 6995
@@ -5271,52 +5332,52 @@
1
2
- 581183
+ 581133
2
3
- 314846
+ 314819
3
4
- 194971
+ 194954
4
6
- 162320
+ 162306
6
10
- 183310
+ 183294
10
16
- 161854
+ 161840
16
25
- 168384
+ 168370
25
45
- 157189
+ 157176
45
160
- 157656
+ 157643
160
265
- 11660
+ 11659
@@ -5332,42 +5393,42 @@
1
2
- 870375
+ 870301
2
3
- 273333
+ 273310
3
5
- 193572
+ 193555
5
8
- 173515
+ 173500
8
13
- 187974
+ 187958
13
20
- 160921
+ 160907
20
51
- 159522
+ 159508
51
265
- 74163
+ 74157
@@ -5383,47 +5444,47 @@
1
2
- 611501
+ 611449
2
3
- 312980
+ 312954
3
4
- 198236
+ 198219
4
6
- 182844
+ 182828
6
9
- 173048
+ 173034
9
13
- 163253
+ 163239
13
19
- 173981
+ 173966
19
29
- 165119
+ 165105
29
52
- 112411
+ 112402
@@ -5439,22 +5500,22 @@
1
2
- 1530386
+ 1530256
2
3
- 348430
+ 348400
3
5
- 161854
+ 161840
5
16
- 52707
+ 52703
@@ -5470,47 +5531,47 @@
1
2
- 585847
+ 585797
2
3
- 316245
+ 316218
3
4
- 197770
+ 197753
4
6
- 168384
+ 168370
6
10
- 191706
+ 191690
10
15
- 165585
+ 165571
15
22
- 167918
+ 167903
22
34
- 164186
+ 164172
34
66
- 135733
+ 135722
@@ -5612,7 +5673,7 @@
23
35
- 3265
+ 3264
38
@@ -5632,7 +5693,7 @@
73
84
- 3265
+ 3264
84
@@ -5642,12 +5703,12 @@
96
101
- 3265
+ 3264
101
105
- 3265
+ 3264
107
@@ -5850,12 +5911,12 @@
7
11
- 3265
+ 3264
11
16
- 3265
+ 3264
16
@@ -5865,7 +5926,7 @@
22
24
- 3265
+ 3264
24
@@ -5875,12 +5936,12 @@
29
34
- 3265
+ 3264
34
41
- 3265
+ 3264
41
@@ -5921,52 +5982,52 @@
1
2
- 591444
+ 591394
2
3
- 306916
+ 306890
3
4
- 198236
+ 198219
4
6
- 159522
+ 159508
6
10
- 182844
+ 182828
10
16
- 160455
+ 160441
16
25
- 170716
+ 170702
25
45
- 158122
+ 158109
45
160
- 158122
+ 158109
160
265
- 11194
+ 11193
@@ -5982,47 +6043,47 @@
1
2
- 885767
+ 885692
2
3
- 259806
+ 259784
3
4
- 125005
+ 124995
4
6
- 140864
+ 140852
6
10
- 184709
+ 184694
10
15
- 168384
+ 168370
15
26
- 163253
+ 163239
26
120
- 158122
+ 158109
121
265
- 11660
+ 11659
@@ -6038,22 +6099,22 @@
1
2
- 1528054
+ 1527924
2
3
- 341433
+ 341404
3
5
- 170716
+ 170702
5
10
- 57372
+ 57367
@@ -6069,47 +6130,47 @@
1
2
- 622696
+ 622643
2
3
- 303185
+ 303159
3
4
- 201501
+ 201484
4
6
- 183777
+ 183761
6
9
- 169783
+ 169769
9
13
- 166518
+ 166504
13
19
- 174914
+ 174899
19
29
- 160921
+ 160907
29
52
- 114277
+ 114267
@@ -6125,47 +6186,47 @@
1
2
- 597975
+ 597924
2
3
- 306916
+ 306890
3
4
- 196370
+ 196354
4
6
- 169317
+ 169302
6
9
- 154857
+ 154844
9
14
- 168384
+ 168370
14
21
- 178646
+ 178630
21
32
- 163253
+ 163239
32
60
- 158122
+ 158109
60
@@ -6262,7 +6323,7 @@
1
2
- 5597
+ 5596
2
@@ -6338,7 +6399,7 @@
1
2
- 5597
+ 5596
2
@@ -6449,17 +6510,17 @@
35
39
- 3265
+ 3264
39
42
- 3265
+ 3264
42
44
- 3265
+ 3264
44
@@ -6490,7 +6551,7 @@
1
2
- 5597
+ 5596
2
@@ -6560,11 +6621,11 @@
locations_stmt
- 3820076
+ 3820138
id
- 3820076
+ 3820138
container
@@ -6572,7 +6633,7 @@
startLine
- 200182
+ 200185
startColumn
@@ -6580,7 +6641,7 @@
endLine
- 194437
+ 194441
endColumn
@@ -6598,7 +6659,7 @@
1
2
- 3820076
+ 3820138
@@ -6614,7 +6675,7 @@
1
2
- 3820076
+ 3820138
@@ -6630,7 +6691,7 @@
1
2
- 3820076
+ 3820138
@@ -6646,7 +6707,7 @@
1
2
- 3820076
+ 3820138
@@ -6662,7 +6723,7 @@
1
2
- 3820076
+ 3820138
@@ -7063,12 +7124,12 @@
1
2
- 21576
+ 21577
2
3
- 15317
+ 15318
3
@@ -7113,7 +7174,7 @@
37
45
- 15111
+ 15112
45
@@ -7154,7 +7215,7 @@
4
6
- 14411
+ 14412
6
@@ -7184,7 +7245,7 @@
29
36
- 16017
+ 16018
36
@@ -7194,7 +7255,7 @@
44
54
- 15667
+ 15668
54
@@ -7220,7 +7281,7 @@
2
3
- 20876
+ 20877
3
@@ -7250,7 +7311,7 @@
8
9
- 20423
+ 20424
9
@@ -7281,17 +7342,17 @@
1
2
- 34650
+ 34651
2
3
- 25838
+ 25839
3
4
- 18467
+ 18468
4
@@ -7336,7 +7397,7 @@
12
14
- 15811
+ 15812
14
@@ -7357,12 +7418,12 @@
1
2
- 22173
+ 22174
2
3
- 16223
+ 16224
3
@@ -7377,17 +7438,17 @@
6
8
- 14720
+ 14721
8
10
- 13217
+ 13218
10
14
- 18323
+ 18324
14
@@ -7813,7 +7874,7 @@
3
4
- 11508
+ 11509
4
@@ -7823,7 +7884,7 @@
6
8
- 12517
+ 12518
8
@@ -7838,7 +7899,7 @@
15
21
- 16120
+ 16121
21
@@ -7848,12 +7909,12 @@
27
34
- 14967
+ 14968
34
42
- 15770
+ 15771
42
@@ -7884,7 +7945,7 @@
2
3
- 16161
+ 16162
3
@@ -7904,7 +7965,7 @@
8
11
- 15914
+ 15915
11
@@ -7914,7 +7975,7 @@
16
20
- 14617
+ 14618
20
@@ -7950,7 +8011,7 @@
1
2
- 32529
+ 32530
2
@@ -8026,12 +8087,12 @@
2
3
- 20423
+ 20424
3
4
- 16861
+ 16862
4
@@ -8046,7 +8107,7 @@
6
7
- 20464
+ 20465
7
@@ -8056,7 +8117,7 @@
8
9
- 18776
+ 18777
9
@@ -8097,7 +8158,7 @@
3
4
- 12558
+ 12559
4
@@ -8132,7 +8193,7 @@
19
22
- 14061
+ 14062
22
@@ -8542,11 +8603,11 @@
locations_expr
- 13188614
+ 13188829
id
- 13188614
+ 13188829
container
@@ -8554,7 +8615,7 @@
startLine
- 192235
+ 192238
startColumn
@@ -8562,7 +8623,7 @@
endLine
- 192214
+ 192217
endColumn
@@ -8580,7 +8641,7 @@
1
2
- 13188614
+ 13188829
@@ -8596,7 +8657,7 @@
1
2
- 13188614
+ 13188829
@@ -8612,7 +8673,7 @@
1
2
- 13188614
+ 13188829
@@ -8628,7 +8689,7 @@
1
2
- 13188614
+ 13188829
@@ -8644,7 +8705,7 @@
1
2
- 13188614
+ 13188829
@@ -9065,7 +9126,7 @@
5
9
- 16511
+ 16512
9
@@ -9146,7 +9207,7 @@
3
4
- 11364
+ 11365
4
@@ -9161,7 +9222,7 @@
8
11
- 16470
+ 16471
11
@@ -9171,7 +9232,7 @@
16
21
- 16470
+ 16471
21
@@ -9186,7 +9247,7 @@
35
43
- 15873
+ 15874
43
@@ -9217,7 +9278,7 @@
7
11
- 16717
+ 16718
11
@@ -9257,7 +9318,7 @@
44
49
- 16923
+ 16924
49
@@ -9278,17 +9339,17 @@
1
2
- 102119
+ 102120
2
3
- 44697
+ 44698
3
4
- 27691
+ 27692
4
@@ -9334,7 +9395,7 @@
16
21
- 16470
+ 16471
21
@@ -9344,7 +9405,7 @@
27
33
- 16470
+ 16471
33
@@ -9354,12 +9415,12 @@
38
43
- 15564
+ 15565
43
47
- 14720
+ 14721
47
@@ -9775,12 +9836,12 @@
1
5
- 16161
+ 16162
5
9
- 16511
+ 16512
9
@@ -9790,22 +9851,22 @@
15
23
- 15111
+ 15112
23
32
- 15667
+ 15668
32
44
- 14761
+ 14762
44
60
- 14514
+ 14515
60
@@ -9861,7 +9922,7 @@
3
4
- 11364
+ 11365
4
@@ -9906,7 +9967,7 @@
40
49
- 14617
+ 14618
49
@@ -9927,17 +9988,17 @@
1
2
- 95633
+ 95635
2
3
- 50091
+ 50092
3
4
- 29420
+ 29421
4
@@ -9973,7 +10034,7 @@
7
11
- 16511
+ 16512
11
@@ -10003,12 +10064,12 @@
36
40
- 15317
+ 15318
40
44
- 16470
+ 16471
44
@@ -10039,7 +10100,7 @@
4
7
- 16820
+ 16821
7
@@ -10069,12 +10130,12 @@
32
38
- 17520
+ 17521
38
43
- 16161
+ 16162
43
@@ -10474,23 +10535,23 @@
numlines
- 1382525
+ 1382407
element_id
- 1375529
+ 1375411
num_lines
- 101683
+ 101675
num_code
- 84891
+ 84884
num_comment
- 59704
+ 59699
@@ -10504,12 +10565,12 @@
1
2
- 1368532
+ 1368415
2
3
- 6996
+ 6995
@@ -10525,7 +10586,7 @@
1
2
- 1369465
+ 1369348
2
@@ -10546,7 +10607,7 @@
1
2
- 1375529
+ 1375411
@@ -10562,22 +10623,22 @@
1
2
- 68100
+ 68094
2
3
- 12127
+ 12126
3
4
- 7463
+ 7462
4
21
- 7929
+ 7928
29
@@ -10598,12 +10659,12 @@
1
2
- 70432
+ 70426
2
3
- 12127
+ 12126
3
@@ -10613,7 +10674,7 @@
4
6
- 9328
+ 9327
6
@@ -10634,22 +10695,22 @@
1
2
- 69499
+ 69493
2
3
- 14926
+ 14924
3
4
- 10728
+ 10727
4
7
- 6530
+ 6529
@@ -10665,27 +10726,27 @@
1
2
- 52707
+ 52703
2
3
- 14459
+ 14458
3
5
- 6530
+ 6529
5
42
- 6530
+ 6529
44
922
- 4664
+ 4663
@@ -10701,12 +10762,12 @@
1
2
- 52707
+ 52703
2
3
- 16791
+ 16790
3
@@ -10716,7 +10777,7 @@
5
8
- 6530
+ 6529
8
@@ -10737,17 +10798,17 @@
1
2
- 53174
+ 53169
2
3
- 15858
+ 15857
3
5
- 7463
+ 7462
5
@@ -10757,7 +10818,7 @@
7
10
- 3265
+ 3264
@@ -10773,12 +10834,12 @@
1
2
- 34516
+ 34513
2
3
- 9328
+ 9327
3
@@ -10788,7 +10849,7 @@
4
6
- 4664
+ 4663
6
@@ -10814,12 +10875,12 @@
1
2
- 34516
+ 34513
2
3
- 9328
+ 9327
3
@@ -10829,17 +10890,17 @@
4
6
- 4664
+ 4663
6
8
- 4664
+ 4663
10
38
- 2332
+ 2331
@@ -10855,12 +10916,12 @@
1
2
- 34516
+ 34513
2
3
- 9328
+ 9327
3
@@ -10870,17 +10931,17 @@
4
6
- 4664
+ 4663
6
10
- 4664
+ 4663
10
37
- 2332
+ 2331
@@ -10890,31 +10951,31 @@
diagnostics
- 5001
+ 4979
id
- 5001
+ 4979
severity
- 19
+ 18
error_tag
- 38
+ 37
error_message
- 399
+ 397
full_error_message
- 4202
+ 4184
location
- 171
+ 170
@@ -10928,7 +10989,7 @@
1
2
- 5001
+ 4979
@@ -10944,7 +11005,7 @@
1
2
- 5001
+ 4979
@@ -10960,7 +11021,7 @@
1
2
- 5001
+ 4979
@@ -10976,7 +11037,7 @@
1
2
- 5001
+ 4979
@@ -10992,7 +11053,7 @@
1
2
- 5001
+ 4979
@@ -11008,7 +11069,7 @@
263
264
- 19
+ 18
@@ -11024,7 +11085,7 @@
2
3
- 19
+ 18
@@ -11040,7 +11101,7 @@
21
22
- 19
+ 18
@@ -11056,7 +11117,7 @@
221
222
- 19
+ 18
@@ -11072,7 +11133,7 @@
9
10
- 19
+ 18
@@ -11088,12 +11149,12 @@
43
44
- 19
+ 18
220
221
- 19
+ 18
@@ -11109,7 +11170,7 @@
1
2
- 38
+ 37
@@ -11125,12 +11186,12 @@
1
2
- 19
+ 18
20
21
- 19
+ 18
@@ -11146,12 +11207,12 @@
1
2
- 19
+ 18
220
221
- 19
+ 18
@@ -11167,12 +11228,12 @@
1
2
- 19
+ 18
8
9
- 19
+ 18
@@ -11188,27 +11249,27 @@
1
2
- 114
+ 113
2
3
- 152
+ 151
3
4
- 76
+ 75
43
44
- 19
+ 18
93
94
- 38
+ 37
@@ -11224,7 +11285,7 @@
1
2
- 399
+ 397
@@ -11240,7 +11301,7 @@
1
2
- 399
+ 397
@@ -11256,22 +11317,22 @@
1
2
- 133
+ 132
2
3
- 152
+ 151
3
4
- 76
+ 75
93
94
- 38
+ 37
@@ -11287,22 +11348,22 @@
1
2
- 171
+ 170
2
3
- 114
+ 113
3
4
- 76
+ 75
4
5
- 38
+ 37
@@ -11318,12 +11379,12 @@
1
2
- 4183
+ 4165
43
44
- 19
+ 18
@@ -11339,7 +11400,7 @@
1
2
- 4202
+ 4184
@@ -11355,7 +11416,7 @@
1
2
- 4202
+ 4184
@@ -11371,7 +11432,7 @@
1
2
- 4202
+ 4184
@@ -11387,7 +11448,7 @@
1
2
- 4202
+ 4184
@@ -11403,22 +11464,22 @@
6
7
- 38
+ 37
22
23
- 38
+ 37
41
42
- 76
+ 75
43
44
- 19
+ 18
@@ -11434,7 +11495,7 @@
1
2
- 171
+ 170
@@ -11450,7 +11511,7 @@
1
2
- 171
+ 170
@@ -11466,22 +11527,22 @@
1
2
- 19
+ 18
3
4
- 38
+ 37
5
6
- 38
+ 37
6
7
- 76
+ 75
@@ -11497,22 +11558,22 @@
1
2
- 19
+ 18
6
7
- 38
+ 37
22
23
- 38
+ 37
41
42
- 76
+ 75
@@ -11522,15 +11583,15 @@
files
- 123139
+ 123129
id
- 123139
+ 123129
name
- 123139
+ 123129
@@ -11544,7 +11605,7 @@
1
2
- 123139
+ 123129
@@ -11560,7 +11621,7 @@
1
2
- 123139
+ 123129
@@ -11570,15 +11631,15 @@
folders
- 16325
+ 16323
id
- 16325
+ 16323
name
- 16325
+ 16323
@@ -11592,7 +11653,7 @@
1
2
- 16325
+ 16323
@@ -11608,7 +11669,7 @@
1
2
- 16325
+ 16323
@@ -11618,15 +11679,15 @@
containerparent
- 138532
+ 138520
parent
- 16325
+ 16323
child
- 138532
+ 138520
@@ -11640,12 +11701,12 @@
1
2
- 7463
+ 7462
2
3
- 3265
+ 3264
3
@@ -11681,7 +11742,7 @@
1
2
- 138532
+ 138520
@@ -11691,11 +11752,11 @@
fileannotations
- 5083033
+ 5081854
id
- 4855
+ 4853
kind
@@ -11703,11 +11764,11 @@
name
- 54277
+ 54265
value
- 45630
+ 45619
@@ -11726,7 +11787,7 @@
2
3
- 4687
+ 4686
@@ -11942,62 +12003,62 @@
1
2
- 8781
+ 8779
2
3
- 6163
+ 6162
3
5
- 4139
+ 4138
5
9
- 4228
+ 4227
9
14
- 3948
+ 3947
14
18
- 4139
+ 4138
18
20
- 4676
+ 4674
20
34
- 4183
+ 4182
34
128
- 4463
+ 4462
128
229
- 4083
+ 4082
229
387
- 4206
+ 4205
387
434
- 1264
+ 1263
@@ -12013,7 +12074,7 @@
1
2
- 54277
+ 54265
@@ -12029,57 +12090,57 @@
1
2
- 8792
+ 8790
2
3
- 7987
+ 7985
3
4
- 2539
+ 2538
4
6
- 4474
+ 4473
6
9
- 4094
+ 4093
9
14
- 4172
+ 4171
14
17
- 4094
+ 4093
17
22
- 4552
+ 4551
22
41
- 4172
+ 4171
41
82
- 4127
+ 4126
82
157
- 4071
+ 4070
158
@@ -12100,7 +12161,7 @@
1
2
- 7092
+ 7090
2
@@ -12110,12 +12171,12 @@
5
8
- 3300
+ 3299
8
15
- 3501
+ 3500
15
@@ -12125,12 +12186,12 @@
17
19
- 4105
+ 4104
19
34
- 3300
+ 3299
34
@@ -12140,12 +12201,12 @@
189
201
- 3579
+ 3578
201
266
- 3523
+ 3522
266
@@ -12155,7 +12216,7 @@
322
399
- 3915
+ 3914
399
@@ -12176,7 +12237,7 @@
1
2
- 45619
+ 45608
2
@@ -12197,7 +12258,7 @@
1
2
- 7114
+ 7113
2
@@ -12207,12 +12268,12 @@
5
8
- 3479
+ 3478
8
15
- 3523
+ 3522
15
@@ -12222,22 +12283,22 @@
17
19
- 3557
+ 3556
19
29
- 3479
+ 3478
29
39
- 3635
+ 3634
39
48
- 3579
+ 3578
48
@@ -12247,12 +12308,12 @@
74
102
- 3423
+ 3422
102
119
- 3568
+ 3567
119
@@ -12267,15 +12328,15 @@
inmacroexpansion
- 109784721
+ 109786483
id
- 18028276
+ 18028566
inv
- 2700307
+ 2700352
@@ -12289,37 +12350,37 @@
1
3
- 1582036
+ 1582063
3
5
- 1077853
+ 1077870
5
6
- 1184943
+ 1184962
6
7
- 4820169
+ 4820246
7
8
- 6386284
+ 6386387
8
9
- 2605386
+ 2605427
9
21
- 371602
+ 371608
@@ -12335,32 +12396,32 @@
1
2
- 378443
+ 378450
2
3
- 544126
+ 544144
3
4
- 351533
+ 351538
4
7
- 200669
+ 200672
7
8
- 207162
+ 207166
8
9
- 241901
+ 241904
9
@@ -12370,22 +12431,22 @@
10
11
- 325503
+ 325508
11
337
- 224867
+ 224861
339
423
- 206363
+ 206367
423
7616
- 17525
+ 17526
@@ -12395,15 +12456,15 @@
affectedbymacroexpansion
- 35690892
+ 35691465
id
- 5157002
+ 5157087
inv
- 2784914
+ 2784960
@@ -12417,37 +12478,37 @@
1
2
- 2816076
+ 2816122
2
3
- 560157
+ 560166
3
4
- 264920
+ 264924
4
5
- 565823
+ 565832
5
12
- 391923
+ 391929
12
50
- 407422
+ 407428
50
9900
- 150680
+ 150682
@@ -12463,62 +12524,62 @@
1
4
- 229127
+ 229132
4
7
- 231800
+ 231804
7
9
- 220489
+ 220493
9
12
- 251100
+ 251104
12
13
- 333995
+ 334000
13
14
- 165596
+ 165599
14
15
- 298859
+ 298864
15
16
- 121849
+ 121851
16
17
- 276622
+ 276627
17
18
- 146948
+ 146950
18
20
- 252148
+ 252152
20
25
- 208989
+ 208993
25
@@ -12533,19 +12594,19 @@
macroinvocations
- 33190389
+ 33182692
id
- 33190389
+ 33182692
macro_id
- 78765
+ 78746
location
- 753510
+ 753335
kind
@@ -12563,7 +12624,7 @@
1
2
- 33190389
+ 33182692
@@ -12579,7 +12640,7 @@
1
2
- 33190389
+ 33182692
@@ -12595,7 +12656,7 @@
1
2
- 33190389
+ 33182692
@@ -12611,57 +12672,57 @@
1
2
- 16108
+ 16105
2
3
- 16421
+ 16418
3
4
- 3087
+ 3086
4
5
- 5224
+ 5222
5
8
- 5638
+ 5636
8
13
- 6051
+ 6050
13
26
- 6119
+ 6117
26
61
- 6007
+ 6005
61
199
- 5917
+ 5916
199
1697
- 5962
+ 5961
1716
168807
- 2226
+ 2225
@@ -12677,37 +12738,37 @@
1
2
- 42084
+ 42074
2
3
- 10302
+ 10300
3
4
- 5112
+ 5111
4
6
- 6779
+ 6777
6
13
- 6421
+ 6419
13
66
- 5951
+ 5949
66
3614
- 2114
+ 2113
@@ -12723,12 +12784,12 @@
1
2
- 73082
+ 73065
2
3
- 5682
+ 5681
@@ -12744,37 +12805,37 @@
1
2
- 278681
+ 278617
2
3
- 168090
+ 168051
3
4
- 70117
+ 70101
4
5
- 59747
+ 59734
5
9
- 69759
+ 69743
9
21
- 58573
+ 58559
21
244764
- 48538
+ 48527
@@ -12790,12 +12851,12 @@
1
2
- 707756
+ 707592
2
350
- 45753
+ 45742
@@ -12811,7 +12872,7 @@
1
2
- 753510
+ 753335
@@ -12884,15 +12945,15 @@
macroparent
- 29680455
+ 29673573
id
- 29680455
+ 29673573
parent_id
- 23077000
+ 23071649
@@ -12906,7 +12967,7 @@
1
2
- 29680455
+ 29673573
@@ -12922,17 +12983,17 @@
1
2
- 17830675
+ 17826541
2
3
- 4419217
+ 4418192
3
88
- 827107
+ 826915
@@ -12942,15 +13003,15 @@
macrolocationbind
- 4043998
+ 4044068
id
- 2831290
+ 2831338
location
- 2021169
+ 2021204
@@ -12964,22 +13025,22 @@
1
2
- 2230032
+ 2230070
2
3
- 341142
+ 341148
3
7
- 230537
+ 230540
7
57
- 29578
+ 29579
@@ -12995,22 +13056,22 @@
1
2
- 1611104
+ 1611131
2
3
- 177691
+ 177694
3
8
- 156877
+ 156880
8
723
- 75496
+ 75498
@@ -13020,11 +13081,11 @@
macro_argument_unexpanded
- 83786944
+ 83767514
invocation
- 25979141
+ 25973117
argument_index
@@ -13032,7 +13093,7 @@
text
- 315429
+ 315356
@@ -13046,22 +13107,22 @@
1
2
- 7366004
+ 7364296
2
3
- 10578205
+ 10575752
3
4
- 6083801
+ 6082391
4
67
- 1951130
+ 1950677
@@ -13077,22 +13138,22 @@
1
2
- 7435529
+ 7433804
2
3
- 10723430
+ 10720943
3
4
- 5918977
+ 5917605
4
67
- 1901204
+ 1900763
@@ -13160,57 +13221,57 @@
1
2
- 34756
+ 34748
2
3
- 60709
+ 60695
3
4
- 17585
+ 17581
4
5
- 44657
+ 44646
5
7
- 23704
+ 23699
7
12
- 18357
+ 18353
12
16
- 21422
+ 21417
16
23
- 24756
+ 24750
23
42
- 24107
+ 24101
42
129
- 23861
+ 23855
129
522417
- 21511
+ 21506
@@ -13226,17 +13287,17 @@
1
2
- 228118
+ 228065
2
3
- 77120
+ 77102
3
9
- 10191
+ 10188
@@ -13246,11 +13307,11 @@
macro_argument_expanded
- 83786944
+ 83767514
invocation
- 25979141
+ 25973117
argument_index
@@ -13258,7 +13319,7 @@
text
- 191157
+ 191113
@@ -13272,22 +13333,22 @@
1
2
- 7366004
+ 7364296
2
3
- 10578205
+ 10575752
3
4
- 6083801
+ 6082391
4
67
- 1951130
+ 1950677
@@ -13303,22 +13364,22 @@
1
2
- 10593150
+ 10590693
2
3
- 9119085
+ 9116971
3
4
- 5161172
+ 5159975
4
9
- 1105732
+ 1105476
@@ -13386,22 +13447,22 @@
1
2
- 20605
+ 20601
2
3
- 36971
+ 36963
3
4
- 8982
+ 8980
4
5
- 16231
+ 16228
5
@@ -13411,37 +13472,37 @@
6
7
- 22641
+ 22636
7
9
- 14665
+ 14662
9
14
- 11936
+ 11933
14
19
- 14419
+ 14416
19
48
- 14341
+ 14337
48
151
- 14352
+ 14349
152
1060462
- 13614
+ 13610
@@ -13457,17 +13518,17 @@
1
2
- 96742
+ 96719
2
3
- 80141
+ 80122
3
66
- 14274
+ 14270
@@ -13477,19 +13538,19 @@
functions
- 4646200
+ 4645804
id
- 4646200
+ 4645804
name
- 1917064
+ 1916901
kind
- 3265
+ 3264
@@ -13503,7 +13564,7 @@
1
2
- 4646200
+ 4645804
@@ -13519,7 +13580,7 @@
1
2
- 4646200
+ 4645804
@@ -13535,22 +13596,22 @@
1
2
- 1504266
+ 1504138
2
3
- 152059
+ 152046
3
5
- 150193
+ 150180
5
1676
- 110546
+ 110536
@@ -13566,7 +13627,7 @@
1
2
- 1916598
+ 1916435
2
@@ -13673,15 +13734,15 @@
function_entry_point
- 1156769
+ 1156670
id
- 1146973
+ 1146876
entry_point
- 1156769
+ 1156670
@@ -13695,12 +13756,12 @@
1
2
- 1137178
+ 1137081
2
3
- 9795
+ 9794
@@ -13716,7 +13777,7 @@
1
2
- 1156769
+ 1156670
@@ -13726,15 +13787,15 @@
function_return_type
- 4651331
+ 4650935
id
- 4646200
+ 4645804
return_type
- 987451
+ 987367
@@ -13748,7 +13809,7 @@
1
2
- 4641069
+ 4640674
2
@@ -13769,22 +13830,22 @@
1
2
- 510284
+ 510240
2
3
- 375949
+ 375917
3
10
- 75096
+ 75090
10
2516
- 26120
+ 26118
@@ -13794,23 +13855,23 @@
coroutine
- 2
+ 6
function
- 2
+ 6
traits
- 1
+ 3
handle
- 2
+ 6
promise
- 2
+ 6
@@ -13824,7 +13885,7 @@
1
2
- 2
+ 6
@@ -13840,7 +13901,7 @@
1
2
- 2
+ 6
@@ -13856,7 +13917,7 @@
1
2
- 2
+ 6
@@ -13869,11 +13930,21 @@
12
+
+ 1
+ 2
+ 1
+
2
3
1
+
+ 3
+ 4
+ 1
+
@@ -13885,11 +13956,21 @@
12
+
+ 1
+ 2
+ 1
+
2
3
1
+
+ 3
+ 4
+ 1
+
@@ -13901,11 +13982,21 @@
12
+
+ 1
+ 2
+ 1
+
2
3
1
+
+ 3
+ 4
+ 1
+
@@ -13920,7 +14011,7 @@
1
2
- 2
+ 6
@@ -13936,7 +14027,7 @@
1
2
- 2
+ 6
@@ -13952,7 +14043,7 @@
1
2
- 2
+ 6
@@ -13968,7 +14059,7 @@
1
2
- 2
+ 6
@@ -13984,7 +14075,7 @@
1
2
- 2
+ 6
@@ -14000,7 +14091,7 @@
1
2
- 2
+ 6
@@ -14010,11 +14101,11 @@
coroutine_new
- 2
+ 6
function
- 2
+ 6
new
@@ -14032,7 +14123,7 @@
1
2
- 2
+ 6
@@ -14046,8 +14137,8 @@
12
- 2
- 3
+ 6
+ 7
1
@@ -14058,11 +14149,11 @@
coroutine_delete
- 2
+ 6
function
- 2
+ 6
delete
@@ -14080,7 +14171,7 @@
1
2
- 2
+ 6
@@ -14094,8 +14185,8 @@
12
- 2
- 3
+ 6
+ 7
1
@@ -14106,59 +14197,59 @@
purefunctions
- 100915
+ 100911
id
- 100915
+ 100911
function_deleted
- 137599
+ 137587
id
- 137599
+ 137587
function_defaulted
- 73697
+ 73691
id
- 73697
+ 73691
function_prototyped
- 4554311
+ 4553923
id
- 4554311
+ 4553923
member_function_this_type
- 545957
+ 545645
id
- 545957
+ 545645
this_type
- 187389
+ 187282
@@ -14172,7 +14263,7 @@
1
2
- 545957
+ 545645
@@ -14188,32 +14279,32 @@
1
2
- 67657
+ 67619
2
3
- 44838
+ 44812
3
4
- 30193
+ 30176
4
5
- 15340
+ 15331
5
7
- 15375
+ 15366
7
66
- 13983
+ 13975
@@ -14223,27 +14314,27 @@
fun_decls
- 5015153
+ 5014726
id
- 5010023
+ 5009596
function
- 4502537
+ 4502153
type_id
- 986052
+ 985968
name
- 1819579
+ 1819424
location
- 3418532
+ 3418241
@@ -14257,7 +14348,7 @@
1
2
- 5010023
+ 5009596
@@ -14273,7 +14364,7 @@
1
2
- 5004892
+ 5004465
2
@@ -14294,7 +14385,7 @@
1
2
- 5010023
+ 5009596
@@ -14310,7 +14401,7 @@
1
2
- 5010023
+ 5009596
@@ -14326,17 +14417,17 @@
1
2
- 4073879
+ 4073532
2
3
- 355893
+ 355862
3
7
- 72764
+ 72758
@@ -14352,12 +14443,12 @@
1
2
- 4462889
+ 4462509
2
3
- 39647
+ 39643
@@ -14373,7 +14464,7 @@
1
2
- 4502537
+ 4502153
@@ -14389,12 +14480,12 @@
1
2
- 4130318
+ 4129966
2
4
- 371285
+ 371253
5
@@ -14415,22 +14506,22 @@
1
2
- 435654
+ 435617
2
3
- 438452
+ 438415
3
8
- 75096
+ 75090
8
2761
- 36848
+ 36845
@@ -14446,22 +14537,22 @@
1
2
- 519613
+ 519568
2
3
- 367554
+ 367522
3
11
- 75563
+ 75556
11
2477
- 23321
+ 23319
@@ -14477,17 +14568,17 @@
1
2
- 858714
+ 858641
2
5
- 89556
+ 89548
5
823
- 37781
+ 37778
@@ -14503,22 +14594,22 @@
1
2
- 754698
+ 754634
2
3
- 131535
+ 131524
3
10
- 74630
+ 74623
10
2030
- 25187
+ 25185
@@ -14534,27 +14625,27 @@
1
2
- 1234664
+ 1234559
2
3
- 266803
+ 266780
3
4
- 80693
+ 80687
4
6
- 136666
+ 136655
6
1710
- 100750
+ 100742
@@ -14570,22 +14661,22 @@
1
2
- 1413777
+ 1413656
2
3
- 151126
+ 151113
3
5
- 144129
+ 144117
5
1660
- 110546
+ 110536
@@ -14601,17 +14692,17 @@
1
2
- 1601285
+ 1601149
2
4
- 134800
+ 134789
4
930
- 83492
+ 83485
@@ -14627,27 +14718,27 @@
1
2
- 1255654
+ 1255547
2
3
- 293390
+ 293365
3
4
- 79761
+ 79754
4
8
- 137599
+ 137587
8
653
- 53174
+ 53169
@@ -14663,17 +14754,17 @@
1
2
- 2962355
+ 2962102
2
4
- 296188
+ 296163
4
55
- 159988
+ 159975
@@ -14689,17 +14780,17 @@
1
2
- 3029522
+ 3029264
2
6
- 262605
+ 262582
6
55
- 126405
+ 126394
@@ -14715,12 +14806,12 @@
1
2
- 3208634
+ 3208361
2
25
- 209897
+ 209879
@@ -14736,12 +14827,12 @@
1
2
- 3246416
+ 3246139
2
13
- 172116
+ 172101
@@ -14751,22 +14842,22 @@
fun_def
- 1935256
+ 1935091
id
- 1935256
+ 1935091
fun_specialized
- 26120
+ 26118
id
- 26120
+ 26118
@@ -14784,11 +14875,11 @@
fun_decl_specifiers
- 2904050
+ 2903802
id
- 1688043
+ 1687899
name
@@ -14806,17 +14897,17 @@
1
2
- 490693
+ 490652
2
3
- 1178691
+ 1178591
3
4
- 18657
+ 18655
@@ -14988,26 +15079,26 @@
fun_decl_empty_throws
- 1933856
+ 1933692
fun_decl
- 1933856
+ 1933692
fun_decl_noexcept
- 60528
+ 61680
fun_decl
- 60528
+ 61680
constant
- 60424
+ 61582
@@ -15021,7 +15112,7 @@
1
2
- 60528
+ 61680
@@ -15037,12 +15128,12 @@
1
2
- 60321
+ 61483
2
3
- 103
+ 98
@@ -15052,22 +15143,22 @@
fun_decl_empty_noexcept
- 869909
+ 869834
fun_decl
- 869909
+ 869834
fun_decl_typedef_type
- 2867
+ 2864
fun_decl
- 2867
+ 2864
typedeftype_id
@@ -15085,7 +15176,7 @@
1
2
- 2867
+ 2864
@@ -15161,19 +15252,19 @@
param_decl_bind
- 7380000
+ 7379371
id
- 7380000
+ 7379371
index
- 7929
+ 7928
fun_decl
- 4223140
+ 4222780
@@ -15187,7 +15278,7 @@
1
2
- 7380000
+ 7379371
@@ -15203,7 +15294,7 @@
1
2
- 7380000
+ 7379371
@@ -15381,22 +15472,22 @@
1
2
- 2363447
+ 2363245
2
3
- 1060682
+ 1060592
3
4
- 502354
+ 502312
4
18
- 296655
+ 296630
@@ -15412,22 +15503,22 @@
1
2
- 2363447
+ 2363245
2
3
- 1060682
+ 1060592
3
4
- 502354
+ 502312
4
18
- 296655
+ 296630
@@ -15437,27 +15528,27 @@
var_decls
- 8494323
+ 8493599
id
- 8423424
+ 8422707
variable
- 7412184
+ 7411553
type_id
- 2384436
+ 2384233
name
- 667007
+ 666951
location
- 5307144
+ 5306692
@@ -15471,7 +15562,7 @@
1
2
- 8423424
+ 8422707
@@ -15487,12 +15578,12 @@
1
2
- 8355324
+ 8354612
2
3
- 68100
+ 68094
@@ -15508,7 +15599,7 @@
1
2
- 8423424
+ 8422707
@@ -15524,7 +15615,7 @@
1
2
- 8420626
+ 8419908
2
@@ -15545,17 +15636,17 @@
1
2
- 6560933
+ 6560374
2
3
- 697792
+ 697733
3
7
- 153458
+ 153445
@@ -15571,12 +15662,12 @@
1
2
- 7241001
+ 7240384
2
4
- 171183
+ 171168
@@ -15592,12 +15683,12 @@
1
2
- 7296974
+ 7296352
2
3
- 115210
+ 115200
@@ -15613,12 +15704,12 @@
1
2
- 6867383
+ 6866798
2
4
- 544800
+ 544754
@@ -15634,27 +15725,27 @@
1
2
- 1469283
+ 1469158
2
3
- 509351
+ 509308
3
4
- 97952
+ 97943
4
7
- 187042
+ 187026
7
762
- 120807
+ 120797
@@ -15670,22 +15761,22 @@
1
2
- 1602684
+ 1602548
2
3
- 484630
+ 484588
3
7
- 186575
+ 186559
7
724
- 110546
+ 110536
@@ -15701,17 +15792,17 @@
1
2
- 1877417
+ 1877257
2
3
- 384812
+ 384779
3
128
- 122207
+ 122196
@@ -15727,22 +15818,22 @@
1
2
- 1705301
+ 1705156
2
3
- 401604
+ 401569
3
8
- 188441
+ 188425
8
592
- 89089
+ 89082
@@ -15758,37 +15849,37 @@
1
2
- 340967
+ 340937
2
3
- 86757
+ 86750
3
4
- 48509
+ 48505
4
6
- 51774
+ 51770
6
12
- 52241
+ 52236
12
33
- 50375
+ 50371
34
3223
- 36382
+ 36379
@@ -15804,37 +15895,37 @@
1
2
- 368486
+ 368455
2
3
- 77895
+ 77888
3
4
- 45244
+ 45240
4
6
- 49442
+ 49438
6
14
- 53174
+ 53169
14
56
- 50841
+ 50837
56
3140
- 21922
+ 21920
@@ -15850,27 +15941,27 @@
1
2
- 456643
+ 456605
2
3
- 93754
+ 93746
3
5
- 46643
+ 46639
5
19
- 50841
+ 50837
19
1927
- 19124
+ 19122
@@ -15886,32 +15977,32 @@
1
2
- 378748
+ 378716
2
3
- 90489
+ 90481
3
5
- 59704
+ 59699
5
9
- 51308
+ 51303
9
21
- 50375
+ 50371
21
1010
- 36382
+ 36379
@@ -15927,17 +16018,17 @@
1
2
- 4492275
+ 4491892
2
3
- 531274
+ 531228
3
1735
- 283595
+ 283570
@@ -15953,17 +16044,17 @@
1
2
- 4881285
+ 4880869
2
17
- 415130
+ 415095
17
1731
- 10728
+ 10727
@@ -15979,12 +16070,12 @@
1
2
- 4957315
+ 4956893
2
1513
- 349829
+ 349799
@@ -16000,12 +16091,12 @@
1
2
- 5297815
+ 5297364
2
6
- 9328
+ 9327
@@ -16015,26 +16106,26 @@
var_def
- 4024903
+ 4024560
id
- 4024903
+ 4024560
var_decl_specifiers
- 310648
+ 378249
id
- 310648
+ 378249
name
- 1399
+ 1865
@@ -16048,7 +16139,7 @@
1
2
- 310648
+ 378249
@@ -16071,6 +16162,11 @@
67
466
+
+ 145
+ 146
+ 466
+
585
586
@@ -16095,19 +16191,19 @@
type_decls
- 3242218
+ 3280187
id
- 3242218
+ 3280187
type_id
- 3191843
+ 3229815
location
- 3163390
+ 3163120
@@ -16121,7 +16217,7 @@
1
2
- 3242218
+ 3280187
@@ -16137,7 +16233,7 @@
1
2
- 3242218
+ 3280187
@@ -16153,12 +16249,12 @@
1
2
- 3150330
+ 3188306
2
5
- 41513
+ 41509
@@ -16174,12 +16270,12 @@
1
2
- 3150330
+ 3188306
2
5
- 41513
+ 41509
@@ -16195,12 +16291,12 @@
1
2
- 3123276
+ 3110884
2
20
- 40113
+ 52236
@@ -16216,12 +16312,12 @@
1
2
- 3123276
+ 3110884
2
20
- 40113
+ 52236
@@ -16231,33 +16327,33 @@
type_def
- 2624653
+ 2639354
id
- 2624653
+ 2639354
type_decl_top
- 743037
+ 742974
type_decl
- 743037
+ 742974
namespace_decls
- 311523
+ 311514
id
- 311523
+ 311514
namespace_id
@@ -16265,11 +16361,11 @@
location
- 311523
+ 311514
bodylocation
- 311523
+ 311514
@@ -16283,7 +16379,7 @@
1
2
- 311523
+ 311514
@@ -16299,7 +16395,7 @@
1
2
- 311523
+ 311514
@@ -16315,7 +16411,7 @@
1
2
- 311523
+ 311514
@@ -16529,7 +16625,7 @@
1
2
- 311523
+ 311514
@@ -16545,7 +16641,7 @@
1
2
- 311523
+ 311514
@@ -16561,7 +16657,7 @@
1
2
- 311523
+ 311514
@@ -16577,7 +16673,7 @@
1
2
- 311523
+ 311514
@@ -16593,7 +16689,7 @@
1
2
- 311523
+ 311514
@@ -16609,7 +16705,7 @@
1
2
- 311523
+ 311514
@@ -16619,19 +16715,19 @@
usings
- 369419
+ 369388
id
- 369419
+ 369388
element_id
- 315312
+ 315286
location
- 247679
+ 247658
@@ -16645,7 +16741,7 @@
1
2
- 369419
+ 369388
@@ -16661,7 +16757,7 @@
1
2
- 369419
+ 369388
@@ -16677,12 +16773,12 @@
1
2
- 263071
+ 263049
2
3
- 50841
+ 50837
3
@@ -16703,12 +16799,12 @@
1
2
- 263071
+ 263049
2
3
- 50841
+ 50837
3
@@ -16729,22 +16825,22 @@
1
2
- 202434
+ 202417
2
4
- 10728
+ 10727
4
5
- 31251
+ 31248
5
11
- 3265
+ 3264
@@ -16760,22 +16856,22 @@
1
2
- 202434
+ 202417
2
4
- 10728
+ 10727
4
5
- 31251
+ 31248
5
11
- 3265
+ 3264
@@ -16785,15 +16881,15 @@
using_container
- 462579
+ 462471
parent
- 10951
+ 10949
child
- 293313
+ 293245
@@ -16807,7 +16903,7 @@
1
2
- 3266
+ 3265
2
@@ -16822,7 +16918,7 @@
6
7
- 2472
+ 2471
7
@@ -16842,7 +16938,7 @@
179
183
- 850
+ 849
201
@@ -16863,22 +16959,22 @@
1
2
- 216338
+ 216288
2
3
- 51257
+ 51245
3
11
- 23603
+ 23598
13
41
- 2114
+ 2113
@@ -16888,19 +16984,19 @@
static_asserts
- 134652
+ 134648
id
- 134652
+ 134648
condition
- 134652
+ 134648
message
- 30221
+ 30220
location
@@ -16922,7 +17018,7 @@
1
2
- 134652
+ 134648
@@ -16938,7 +17034,7 @@
1
2
- 134652
+ 134648
@@ -16954,7 +17050,7 @@
1
2
- 134652
+ 134648
@@ -16970,7 +17066,7 @@
1
2
- 134652
+ 134648
@@ -16986,7 +17082,7 @@
1
2
- 134652
+ 134648
@@ -17002,7 +17098,7 @@
1
2
- 134652
+ 134648
@@ -17018,7 +17114,7 @@
1
2
- 134652
+ 134648
@@ -17034,7 +17130,7 @@
1
2
- 134652
+ 134648
@@ -17153,7 +17249,7 @@
1
2
- 23664
+ 23663
2
@@ -17189,12 +17285,12 @@
1
2
- 3288
+ 3287
2
3
- 2831
+ 2830
3
@@ -17229,7 +17325,7 @@
17
18
- 3434
+ 3433
19
@@ -17250,12 +17346,12 @@
1
2
- 3288
+ 3287
2
3
- 2831
+ 2830
3
@@ -17290,7 +17386,7 @@
17
18
- 3434
+ 3433
19
@@ -17321,7 +17417,7 @@
3
4
- 6081
+ 6080
4
@@ -17357,7 +17453,7 @@
4
5
- 3707
+ 3706
5
@@ -17496,23 +17592,23 @@
params
- 6740045
+ 6739471
id
- 6576325
+ 6575765
function
- 3879840
+ 3879510
index
- 7929
+ 7928
type_id
- 2188998
+ 2188812
@@ -17526,7 +17622,7 @@
1
2
- 6576325
+ 6575765
@@ -17542,7 +17638,7 @@
1
2
- 6576325
+ 6575765
@@ -17558,12 +17654,12 @@
1
2
- 6452719
+ 6452169
2
4
- 123606
+ 123595
@@ -17579,22 +17675,22 @@
1
2
- 2257099
+ 2256906
2
3
- 952002
+ 951921
3
4
- 429590
+ 429553
4
18
- 241149
+ 241128
@@ -17610,22 +17706,22 @@
1
2
- 2257099
+ 2256906
2
3
- 952002
+ 951921
3
4
- 429590
+ 429553
4
18
- 241149
+ 241128
@@ -17641,22 +17737,22 @@
1
2
- 2555153
+ 2554936
2
3
- 826063
+ 825993
3
4
- 346097
+ 346068
4
12
- 152525
+ 152512
@@ -17910,22 +18006,22 @@
1
2
- 1488407
+ 1488280
2
3
- 440318
+ 440281
3
8
- 170250
+ 170235
8
518
- 90022
+ 90015
@@ -17941,22 +18037,22 @@
1
2
- 1708100
+ 1707954
2
3
- 248145
+ 248124
3
9
- 168384
+ 168370
9
502
- 64368
+ 64363
@@ -17972,17 +18068,17 @@
1
2
- 1761740
+ 1761590
2
3
- 348430
+ 348400
3
13
- 78828
+ 78821
@@ -17992,15 +18088,15 @@
overrides
- 125864
+ 125718
new
- 122888
+ 122746
old
- 9753
+ 9742
@@ -18014,12 +18110,12 @@
1
2
- 119920
+ 119782
2
4
- 2967
+ 2964
@@ -18035,32 +18131,32 @@
1
2
- 4293
+ 4288
2
3
- 2100
+ 2098
3
4
- 925
+ 924
4
5
- 458
+ 457
5
7
- 850
+ 849
7
23
- 762
+ 761
25
@@ -18075,19 +18171,19 @@
membervariables
- 1056548
+ 1056565
id
- 1054750
+ 1054767
type_id
- 327744
+ 327749
name
- 451642
+ 451649
@@ -18101,7 +18197,7 @@
1
2
- 1053032
+ 1053049
2
@@ -18122,7 +18218,7 @@
1
2
- 1054750
+ 1054767
@@ -18138,17 +18234,17 @@
1
2
- 243041
+ 243045
2
3
- 51900
+ 51901
3
10
- 25530
+ 25531
10
@@ -18169,17 +18265,17 @@
1
2
- 255267
+ 255271
2
3
- 46466
+ 46467
3
40
- 24611
+ 24612
41
@@ -18200,17 +18296,17 @@
1
2
- 295341
+ 295346
2
3
- 86540
+ 86542
3
5
- 41192
+ 41193
5
@@ -18231,12 +18327,12 @@
1
2
- 367858
+ 367864
2
3
- 51740
+ 51741
3
@@ -18422,19 +18518,19 @@
localvariables
- 576895
+ 576915
id
- 576895
+ 576915
type_id
- 37592
+ 37715
name
- 90648
+ 90543
@@ -18448,7 +18544,7 @@
1
2
- 576895
+ 576915
@@ -18464,7 +18560,7 @@
1
2
- 576895
+ 576915
@@ -18480,17 +18576,17 @@
1
2
- 21032
+ 21174
2
3
- 5372
+ 5362
3
4
- 2459
+ 2456
4
@@ -18500,12 +18596,12 @@
7
18
- 2855
+ 2847
18
- 15849
- 2492
+ 15850
+ 2493
@@ -18521,27 +18617,27 @@
1
2
- 26775
+ 26907
2
3
- 4568
+ 4562
3
5
- 2917
+ 2918
5
- 31
- 2821
+ 33
+ 2835
- 31
+ 33
3455
- 508
+ 491
@@ -18557,27 +18653,27 @@
1
2
- 57094
+ 57028
2
3
- 14300
+ 14284
3
5
- 8319
+ 8309
5
15
- 6989
+ 6981
15
5178
- 3943
+ 3938
@@ -18593,17 +18689,17 @@
1
2
- 76576
+ 76488
2
3
- 7419
+ 7410
3
1486
- 6652
+ 6644
@@ -18613,15 +18709,15 @@
autoderivation
- 147957
+ 149570
var
- 147957
+ 149570
derivation_type
- 517
+ 492
@@ -18635,7 +18731,7 @@
1
2
- 147957
+ 149570
@@ -18649,29 +18745,29 @@
12
- 33
- 34
- 103
+ 34
+ 35
+ 98
- 91
- 92
- 103
+ 101
+ 102
+ 98
- 354
- 355
- 103
+ 377
+ 378
+ 98
- 392
- 393
- 103
+ 411
+ 412
+ 98
- 560
- 561
- 103
+ 595
+ 596
+ 98
@@ -18681,15 +18777,15 @@
orphaned_variables
- 37359
+ 37338
var
- 37359
+ 37338
function
- 32837
+ 32818
@@ -18703,7 +18799,7 @@
1
2
- 37359
+ 37338
@@ -18719,12 +18815,12 @@
1
2
- 30785
+ 30767
2
47
- 2052
+ 2051
@@ -18734,11 +18830,11 @@
enumconstants
- 241682
+ 241686
id
- 241682
+ 241686
parent
@@ -18754,11 +18850,11 @@
name
- 241403
+ 241407
location
- 221585
+ 221589
@@ -18772,7 +18868,7 @@
1
2
- 241682
+ 241686
@@ -18788,7 +18884,7 @@
1
2
- 241682
+ 241686
@@ -18804,7 +18900,7 @@
1
2
- 241682
+ 241686
@@ -18820,7 +18916,7 @@
1
2
- 241682
+ 241686
@@ -18836,7 +18932,7 @@
1
2
- 241682
+ 241686
@@ -19137,12 +19233,12 @@
3
4
- 1757
+ 1758
4
5
- 878
+ 879
5
@@ -19157,7 +19253,7 @@
12
20
- 878
+ 879
20
@@ -19193,12 +19289,12 @@
3
4
- 1757
+ 1758
4
5
- 878
+ 879
5
@@ -19213,7 +19309,7 @@
12
20
- 878
+ 879
20
@@ -19265,12 +19361,12 @@
3
4
- 1757
+ 1758
4
5
- 878
+ 879
5
@@ -19285,7 +19381,7 @@
12
20
- 878
+ 879
20
@@ -19321,12 +19417,12 @@
3
4
- 1757
+ 1758
4
5
- 878
+ 879
5
@@ -19341,7 +19437,7 @@
12
20
- 878
+ 879
20
@@ -19447,7 +19543,7 @@
1
2
- 241123
+ 241127
2
@@ -19468,7 +19564,7 @@
1
2
- 241123
+ 241127
2
@@ -19489,7 +19585,7 @@
1
2
- 241403
+ 241407
@@ -19505,7 +19601,7 @@
1
2
- 241403
+ 241407
@@ -19521,7 +19617,7 @@
1
2
- 241123
+ 241127
2
@@ -19542,7 +19638,7 @@
1
2
- 220826
+ 220830
2
@@ -19563,7 +19659,7 @@
1
2
- 221585
+ 221589
@@ -19579,7 +19675,7 @@
1
2
- 220826
+ 220830
2
@@ -19600,7 +19696,7 @@
1
2
- 221585
+ 221589
@@ -19616,7 +19712,7 @@
1
2
- 220826
+ 220830
2
@@ -19631,23 +19727,23 @@
builtintypes
- 26120
+ 26118
id
- 26120
+ 26118
name
- 26120
+ 26118
kind
- 26120
+ 26118
size
- 3265
+ 3264
sign
@@ -19655,7 +19751,7 @@
alignment
- 2332
+ 2331
@@ -19669,7 +19765,7 @@
1
2
- 26120
+ 26118
@@ -19685,7 +19781,7 @@
1
2
- 26120
+ 26118
@@ -19701,7 +19797,7 @@
1
2
- 26120
+ 26118
@@ -19717,7 +19813,7 @@
1
2
- 26120
+ 26118
@@ -19733,7 +19829,7 @@
1
2
- 26120
+ 26118
@@ -19749,7 +19845,7 @@
1
2
- 26120
+ 26118
@@ -19765,7 +19861,7 @@
1
2
- 26120
+ 26118
@@ -19781,7 +19877,7 @@
1
2
- 26120
+ 26118
@@ -19797,7 +19893,7 @@
1
2
- 26120
+ 26118
@@ -19813,7 +19909,7 @@
1
2
- 26120
+ 26118
@@ -19829,7 +19925,7 @@
1
2
- 26120
+ 26118
@@ -19845,7 +19941,7 @@
1
2
- 26120
+ 26118
@@ -19861,7 +19957,7 @@
1
2
- 26120
+ 26118
@@ -19877,7 +19973,7 @@
1
2
- 26120
+ 26118
@@ -19893,7 +19989,7 @@
1
2
- 26120
+ 26118
@@ -20052,7 +20148,7 @@
3
4
- 2332
+ 2331
@@ -20312,7 +20408,7 @@
2
3
- 2332
+ 2331
@@ -20328,7 +20424,7 @@
3
4
- 2332
+ 2331
@@ -20338,15 +20434,15 @@
derivedtypes
- 4330887
+ 4330518
id
- 4330887
+ 4330518
name
- 2161012
+ 2160828
kind
@@ -20354,7 +20450,7 @@
type_id
- 2670830
+ 2670603
@@ -20368,7 +20464,7 @@
1
2
- 4330887
+ 4330518
@@ -20384,7 +20480,7 @@
1
2
- 4330887
+ 4330518
@@ -20400,7 +20496,7 @@
1
2
- 4330887
+ 4330518
@@ -20416,17 +20512,17 @@
1
2
- 1899340
+ 1899178
2
5
- 164653
+ 164638
5
1153
- 97019
+ 97011
@@ -20442,7 +20538,7 @@
1
2
- 2160079
+ 2159895
2
@@ -20463,17 +20559,17 @@
1
2
- 1899340
+ 1899178
2
5
- 164653
+ 164638
5
1135
- 97019
+ 97011
@@ -20612,22 +20708,22 @@
1
2
- 1651194
+ 1651053
2
3
- 560193
+ 560145
3
4
- 354027
+ 353997
4
72
- 105415
+ 105406
@@ -20643,22 +20739,22 @@
1
2
- 1662389
+ 1662247
2
3
- 552730
+ 552683
3
4
- 351228
+ 351198
4
72
- 104482
+ 104473
@@ -20674,22 +20770,22 @@
1
2
- 1655392
+ 1655251
2
3
- 563924
+ 563876
3
4
- 353094
+ 353064
4
6
- 98418
+ 98410
@@ -20699,11 +20795,11 @@
pointerishsize
- 3210500
+ 3210227
id
- 3210500
+ 3210227
size
@@ -20725,7 +20821,7 @@
1
2
- 3210500
+ 3210227
@@ -20741,7 +20837,7 @@
1
2
- 3210500
+ 3210227
@@ -20815,19 +20911,19 @@
arraysizes
- 88157
+ 88149
id
- 88157
+ 88149
num_elements
- 31717
+ 31715
bytesize
- 33117
+ 33114
alignment
@@ -20845,7 +20941,7 @@
1
2
- 88157
+ 88149
@@ -20861,7 +20957,7 @@
1
2
- 88157
+ 88149
@@ -20877,7 +20973,7 @@
1
2
- 88157
+ 88149
@@ -20898,7 +20994,7 @@
2
3
- 23788
+ 23786
3
@@ -20929,12 +21025,12 @@
1
2
- 26587
+ 26584
2
3
- 2332
+ 2331
3
@@ -20955,7 +21051,7 @@
1
2
- 26587
+ 26584
2
@@ -20965,7 +21061,7 @@
3
5
- 2332
+ 2331
@@ -20986,17 +21082,17 @@
2
3
- 23788
+ 23786
3
4
- 3265
+ 3264
4
6
- 2332
+ 2331
7
@@ -21017,7 +21113,7 @@
1
2
- 27519
+ 27517
2
@@ -21043,12 +21139,12 @@
1
2
- 27519
+ 27517
2
3
- 4664
+ 4663
4
@@ -21151,15 +21247,15 @@
typedefbase
- 1672135
+ 1671747
id
- 1672135
+ 1671747
type_id
- 787114
+ 786932
@@ -21173,7 +21269,7 @@
1
2
- 1672135
+ 1671747
@@ -21189,22 +21285,22 @@
1
2
- 612558
+ 612416
2
3
- 82557
+ 82538
3
6
- 61481
+ 61467
6
5437
- 30517
+ 30510
@@ -21214,23 +21310,23 @@
decltypes
- 165808
+ 165094
id
- 16658
+ 16587
expr
- 165808
+ 165094
base_type
- 9945
+ 9903
parentheses_would_change_meaning
- 19
+ 18
@@ -21244,37 +21340,37 @@
1
2
- 5077
+ 5055
2
3
- 6180
+ 6153
3
5
- 1102
+ 1098
5
12
- 1293
+ 1287
12
18
- 1350
+ 1344
18
46
- 1255
+ 1249
51
740
- 399
+ 397
@@ -21290,7 +21386,7 @@
1
2
- 16658
+ 16587
@@ -21306,7 +21402,7 @@
1
2
- 16658
+ 16587
@@ -21322,7 +21418,7 @@
1
2
- 165808
+ 165094
@@ -21338,7 +21434,7 @@
1
2
- 165808
+ 165094
@@ -21354,7 +21450,7 @@
1
2
- 165808
+ 165094
@@ -21370,17 +21466,17 @@
1
2
- 7226
+ 7195
2
3
- 2263
+ 2253
4
149
- 456
+ 454
@@ -21396,37 +21492,37 @@
1
2
- 722
+ 719
2
3
- 6123
+ 6097
3
4
- 342
+ 340
4
5
- 969
+ 965
5
7
- 760
+ 757
7
32
- 798
+ 795
32
3888
- 228
+ 227
@@ -21442,7 +21538,7 @@
1
2
- 9945
+ 9903
@@ -21458,7 +21554,7 @@
876
877
- 19
+ 18
@@ -21474,7 +21570,7 @@
8719
8720
- 19
+ 18
@@ -21490,7 +21586,7 @@
523
524
- 19
+ 18
@@ -21500,15 +21596,15 @@
usertypes
- 5230182
+ 5228803
id
- 5230182
+ 5228803
name
- 1351274
+ 1351159
kind
@@ -21526,7 +21622,7 @@
1
2
- 5230182
+ 5228803
@@ -21542,7 +21638,7 @@
1
2
- 5230182
+ 5228803
@@ -21558,27 +21654,27 @@
1
2
- 982787
+ 982703
2
3
- 153458
+ 153445
3
7
- 104482
+ 104473
7
61
- 101683
+ 101675
65
874
- 8862
+ 8861
@@ -21594,17 +21690,17 @@
1
2
- 1210876
+ 1210772
2
3
- 125005
+ 125461
3
7
- 15392
+ 14924
@@ -21638,8 +21734,8 @@
466
- 135
- 136
+ 133
+ 134
466
@@ -21704,8 +21800,8 @@
466
- 43
- 44
+ 41
+ 42
466
@@ -21746,19 +21842,19 @@
usertypesize
- 1705768
+ 1704689
id
- 1705768
+ 1704689
size
- 13526
+ 13525
alignment
- 2332
+ 2331
@@ -21772,7 +21868,7 @@
1
2
- 1705768
+ 1704689
@@ -21788,7 +21884,7 @@
1
2
- 1705768
+ 1704689
@@ -21804,7 +21900,7 @@
1
2
- 3265
+ 3264
2
@@ -21843,7 +21939,7 @@
740
- 2472
+ 2470
932
@@ -21860,7 +21956,7 @@
1
2
- 10261
+ 10260
2
@@ -21904,8 +22000,8 @@
466
- 3211
- 3212
+ 3209
+ 3210
466
@@ -21952,26 +22048,26 @@
usertype_final
- 9415
+ 8966
id
- 9415
+ 8966
usertype_uuid
- 36638
+ 36637
id
- 36638
+ 36637
uuid
- 36264
+ 36263
@@ -21985,7 +22081,7 @@
1
2
- 36638
+ 36637
@@ -22001,7 +22097,7 @@
1
2
- 35889
+ 35888
2
@@ -22016,15 +22112,15 @@
mangled_name
- 9478043
+ 9476303
id
- 9478043
+ 9476303
mangled_name
- 6448521
+ 6447972
is_complete
@@ -22042,7 +22138,7 @@
1
2
- 9478043
+ 9476303
@@ -22058,7 +22154,7 @@
1
2
- 9478043
+ 9476303
@@ -22074,12 +22170,12 @@
1
2
- 6167725
+ 6167199
2
874
- 280796
+ 280772
@@ -22095,7 +22191,7 @@
1
2
- 6448521
+ 6447972
@@ -22109,8 +22205,8 @@
12
- 20320
- 20321
+ 20318
+ 20319
466
@@ -22137,59 +22233,59 @@
is_pod_class
- 530515
+ 530392
id
- 530515
+ 530392
is_standard_layout_class
- 1253788
+ 1252748
id
- 1253788
+ 1252748
is_complete
- 1645130
+ 1644057
id
- 1645130
+ 1644057
is_class_template
- 397872
+ 397838
id
- 397872
+ 397838
class_instantiation
- 1088668
+ 1088576
to
- 1088668
+ 1088576
from
- 168384
+ 168370
@@ -22203,7 +22299,7 @@
1
2
- 1088668
+ 1088576
@@ -22219,42 +22315,42 @@
1
2
- 59704
+ 59699
2
3
- 29385
+ 29383
3
4
- 15858
+ 15857
4
5
- 13060
+ 13059
5
6
- 9795
+ 9794
6
10
- 12593
+ 12592
10
16
- 13060
+ 13059
16
70
- 13526
+ 13525
70
@@ -22269,11 +22365,11 @@
class_template_argument
- 2857953
+ 2857290
type_id
- 1304340
+ 1304038
index
@@ -22281,7 +22377,7 @@
arg_type
- 832912
+ 832719
@@ -22295,27 +22391,27 @@
1
2
- 536388
+ 536264
2
3
- 395940
+ 395848
3
4
- 229337
+ 229284
4
7
- 119283
+ 119255
7
113
- 23391
+ 23385
@@ -22331,22 +22427,22 @@
1
2
- 562800
+ 562669
2
3
- 407082
+ 406987
3
4
- 242660
+ 242604
4
113
- 91797
+ 91776
@@ -22454,27 +22550,27 @@
1
2
- 518534
+ 518414
2
3
- 172856
+ 172815
3
4
- 50865
+ 50853
4
10
- 63495
+ 63480
10
10265
- 27161
+ 27154
@@ -22490,17 +22586,17 @@
1
2
- 734146
+ 733975
2
3
- 80599
+ 80581
3
22
- 18167
+ 18162
@@ -22510,11 +22606,11 @@
class_template_argument_value
- 494891
+ 494849
type_id
- 304584
+ 304558
index
@@ -22522,7 +22618,7 @@
arg_value
- 494891
+ 494849
@@ -22536,12 +22632,12 @@
1
2
- 249544
+ 249523
2
3
- 53174
+ 53169
3
@@ -22562,22 +22658,22 @@
1
2
- 189374
+ 189358
2
3
- 81160
+ 81153
3
4
- 12127
+ 12126
4
9
- 21922
+ 21920
@@ -22655,7 +22751,7 @@
1
2
- 494891
+ 494849
@@ -22671,7 +22767,7 @@
1
2
- 494891
+ 494849
@@ -22681,15 +22777,15 @@
is_proxy_class_for
- 62969
+ 62031
id
- 62969
+ 62031
templ_param_id
- 62969
+ 62031
@@ -22703,7 +22799,7 @@
1
2
- 62969
+ 62031
@@ -22719,7 +22815,7 @@
1
2
- 62969
+ 62031
@@ -22729,19 +22825,19 @@
type_mentions
- 4029338
+ 4029404
id
- 4029338
+ 4029404
type_id
- 198212
+ 198215
location
- 3995817
+ 3995882
kind
@@ -22759,7 +22855,7 @@
1
2
- 4029338
+ 4029404
@@ -22775,7 +22871,7 @@
1
2
- 4029338
+ 4029404
@@ -22791,7 +22887,7 @@
1
2
- 4029338
+ 4029404
@@ -22807,7 +22903,7 @@
1
2
- 97608
+ 97609
2
@@ -22832,7 +22928,7 @@
7
12
- 15861
+ 15862
12
@@ -22858,7 +22954,7 @@
1
2
- 97608
+ 97609
2
@@ -22883,7 +22979,7 @@
7
12
- 15861
+ 15862
12
@@ -22909,7 +23005,7 @@
1
2
- 198212
+ 198215
@@ -22925,12 +23021,12 @@
1
2
- 3962295
+ 3962360
2
3
- 33521
+ 33522
@@ -22946,12 +23042,12 @@
1
2
- 3962295
+ 3962360
2
3
- 33521
+ 33522
@@ -22967,7 +23063,7 @@
1
2
- 3995817
+ 3995882
@@ -23025,26 +23121,26 @@
is_function_template
- 1401649
+ 1401530
id
- 1401649
+ 1401530
function_instantiation
- 894647
+ 894135
to
- 894647
+ 894135
from
- 144220
+ 144138
@@ -23058,7 +23154,7 @@
1
2
- 894647
+ 894135
@@ -23074,27 +23170,27 @@
1
2
- 100008
+ 99951
2
3
- 14227
+ 14219
3
6
- 11861
+ 11855
6
21
- 11896
+ 11889
22
870
- 6226
+ 6223
@@ -23104,11 +23200,11 @@
function_template_argument
- 2310067
+ 2308747
function_id
- 1319621
+ 1318866
index
@@ -23116,7 +23212,7 @@
arg_type
- 300789
+ 300617
@@ -23130,22 +23226,22 @@
1
2
- 673411
+ 673026
2
3
- 389910
+ 389687
3
4
- 186519
+ 186413
4
15
- 69779
+ 69739
@@ -23161,22 +23257,22 @@
1
2
- 690804
+ 690409
2
3
- 399684
+ 399456
3
4
- 166622
+ 166527
4
9
- 62509
+ 62473
@@ -23324,32 +23420,32 @@
1
2
- 184258
+ 184153
2
3
- 44038
+ 44013
3
5
- 23167
+ 23153
5
16
- 23201
+ 23188
16
107
- 22714
+ 22701
108
957
- 3408
+ 3407
@@ -23365,17 +23461,17 @@
1
2
- 271048
+ 270893
2
4
- 25671
+ 25656
4
17
- 4069
+ 4067
@@ -23385,11 +23481,11 @@
function_template_argument_value
- 358464
+ 358259
function_id
- 192467
+ 192357
index
@@ -23397,7 +23493,7 @@
arg_value
- 355855
+ 355651
@@ -23411,12 +23507,12 @@
1
2
- 183215
+ 183110
2
8
- 9252
+ 9247
@@ -23432,17 +23528,17 @@
1
2
- 175875
+ 175774
2
31
- 15096
+ 15088
32
97
- 1495
+ 1494
@@ -23580,12 +23676,12 @@
1
2
- 353246
+ 353044
2
3
- 2608
+ 2607
@@ -23601,7 +23697,7 @@
1
2
- 355855
+ 355651
@@ -23611,26 +23707,26 @@
is_variable_template
- 46973
+ 40299
id
- 46973
+ 40299
variable_instantiation
- 171237
+ 178341
to
- 171237
+ 178341
from
- 25659
+ 24829
@@ -23644,7 +23740,7 @@
1
2
- 171237
+ 178341
@@ -23660,42 +23756,42 @@
1
2
- 13761
+ 12217
2
3
- 2586
+ 2857
3
4
- 1241
+ 1182
4
6
- 1862
+ 2167
6
8
- 1345
+ 1280
8
- 12
- 2172
+ 11
+ 2069
- 12
- 38
- 1965
+ 11
+ 31
+ 1872
- 46
- 278
- 724
+ 33
+ 291
+ 1182
@@ -23705,19 +23801,19 @@
variable_template_argument
- 308331
+ 322099
variable_id
- 162132
+ 169671
index
- 1758
+ 1675
arg_type
- 169995
+ 175287
@@ -23731,22 +23827,22 @@
1
2
- 82980
+ 86017
2
3
- 50491
+ 54192
3
4
- 18624
+ 19213
4
17
- 10036
+ 10247
@@ -23762,22 +23858,22 @@
1
2
- 87636
+ 90353
2
3
- 51733
+ 55473
3
4
- 13554
+ 14385
4
17
- 9208
+ 9459
@@ -23791,49 +23887,54 @@
12
- 9
- 10
- 103
+ 10
+ 11
+ 98
- 19
- 20
- 620
+ 20
+ 21
+ 591
- 26
- 27
- 413
+ 27
+ 28
+ 295
- 47
- 48
- 103
+ 28
+ 29
+ 98
- 93
- 94
- 103
+ 50
+ 51
+ 98
- 185
- 186
- 103
+ 100
+ 101
+ 98
- 548
- 549
- 103
+ 196
+ 197
+ 98
- 627
- 628
- 103
+ 589
+ 590
+ 98
- 1253
- 1254
- 103
+ 697
+ 698
+ 98
+
+
+ 1392
+ 1393
+ 98
@@ -23849,52 +23950,57 @@
1
2
- 103
+ 98
10
11
- 413
+ 394
11
12
- 206
+ 197
12
13
- 413
+ 295
- 29
- 30
- 103
+ 13
+ 14
+ 98
- 48
- 49
- 103
+ 31
+ 32
+ 98
- 130
- 131
- 103
+ 53
+ 54
+ 98
- 376
- 377
- 103
+ 138
+ 139
+ 98
- 403
- 404
- 103
+ 406
+ 407
+ 98
- 743
- 744
- 103
+ 442
+ 443
+ 98
+
+
+ 809
+ 810
+ 98
@@ -23910,22 +24016,22 @@
1
2
- 136783
+ 138338
2
3
- 19348
+ 21578
3
- 24
- 12829
+ 11
+ 13301
- 24
- 110
- 1034
+ 11
+ 119
+ 2069
@@ -23941,16 +24047,16 @@
1
2
- 153130
+ 158241
2
3
- 14795
+ 14976
3
- 6
+ 7
2069
@@ -23961,19 +24067,19 @@
variable_template_argument_value
- 11795
+ 11922
variable_id
- 7760
+ 8079
index
- 413
+ 394
arg_value
- 11795
+ 11922
@@ -23987,12 +24093,12 @@
1
2
- 7346
+ 7685
2
3
- 413
+ 394
@@ -24008,17 +24114,17 @@
1
2
- 4345
+ 4828
2
3
- 3104
+ 2955
4
5
- 310
+ 295
@@ -24034,22 +24140,22 @@
4
5
- 103
+ 98
- 19
- 20
- 103
+ 23
+ 24
+ 98
26
27
- 103
+ 98
- 30
- 31
- 103
+ 33
+ 34
+ 98
@@ -24065,22 +24171,22 @@
7
8
- 103
+ 98
- 28
- 29
- 103
+ 32
+ 33
+ 98
38
39
- 103
+ 98
- 41
- 42
- 103
+ 44
+ 45
+ 98
@@ -24096,7 +24202,7 @@
1
2
- 11795
+ 11922
@@ -24112,7 +24218,7 @@
1
2
- 11795
+ 11922
@@ -24122,15 +24228,15 @@
routinetypes
- 538026
+ 537719
id
- 538026
+ 537719
return_type
- 280336
+ 280175
@@ -24144,7 +24250,7 @@
1
2
- 538026
+ 537719
@@ -24160,17 +24266,17 @@
1
2
- 244159
+ 244019
2
3
- 20940
+ 20928
3
3595
- 15236
+ 15227
@@ -24180,19 +24286,19 @@
routinetypeargs
- 982320
+ 982237
routine
- 423060
+ 423024
index
- 7929
+ 7928
type_id
- 226689
+ 226670
@@ -24206,27 +24312,27 @@
1
2
- 152525
+ 152512
2
3
- 133868
+ 133856
3
4
- 63435
+ 63430
4
5
- 45711
+ 45707
5
18
- 27519
+ 27517
@@ -24242,27 +24348,27 @@
1
2
- 182377
+ 182362
2
3
- 133401
+ 133390
3
4
- 58771
+ 58766
4
5
- 33583
+ 33580
5
11
- 14926
+ 14924
@@ -24420,27 +24526,27 @@
1
2
- 146461
+ 146449
2
3
- 30784
+ 30782
3
5
- 16791
+ 16790
5
12
- 18191
+ 18189
12
110
- 14459
+ 14458
@@ -24456,22 +24562,22 @@
1
2
- 172582
+ 172567
2
3
- 30784
+ 30782
3
6
- 18657
+ 18655
6
14
- 4664
+ 4663
@@ -24481,19 +24587,19 @@
ptrtomembers
- 37781
+ 37778
id
- 37781
+ 37778
type_id
- 37781
+ 37778
class_id
- 15392
+ 15391
@@ -24507,7 +24613,7 @@
1
2
- 37781
+ 37778
@@ -24523,7 +24629,7 @@
1
2
- 37781
+ 37778
@@ -24539,7 +24645,7 @@
1
2
- 37781
+ 37778
@@ -24555,7 +24661,7 @@
1
2
- 37781
+ 37778
@@ -24571,7 +24677,7 @@
1
2
- 13526
+ 13525
8
@@ -24597,7 +24703,7 @@
1
2
- 13526
+ 13525
8
@@ -24617,15 +24723,15 @@
specifiers
- 24721
+ 24719
id
- 24721
+ 24719
str
- 24721
+ 24719
@@ -24639,7 +24745,7 @@
1
2
- 24721
+ 24719
@@ -24655,7 +24761,7 @@
1
2
- 24721
+ 24719
@@ -24665,11 +24771,11 @@
typespecifiers
- 1291103
+ 1290060
type_id
- 1272912
+ 1271871
spec_id
@@ -24687,12 +24793,12 @@
1
2
- 1254721
+ 1253681
2
3
- 18191
+ 18189
@@ -24733,12 +24839,7 @@
219
220
- 466
-
-
- 221
- 222
- 466
+ 932
2042
@@ -24753,11 +24854,11 @@
funspecifiers
- 12603886
+ 12596680
func_id
- 3853638
+ 3851434
spec_id
@@ -24775,27 +24876,27 @@
1
2
- 310668
+ 310491
2
3
- 540079
+ 539770
3
4
- 1133449
+ 1132801
4
5
- 1623611
+ 1622683
5
8
- 245828
+ 245688
@@ -24911,11 +25012,11 @@
varspecifiers
- 2244038
+ 2243847
var_id
- 1223936
+ 1223832
spec_id
@@ -24933,22 +25034,22 @@
1
2
- 729510
+ 729448
2
3
- 202434
+ 202417
3
4
- 58304
+ 58299
4
5
- 233686
+ 233666
@@ -25009,27 +25110,27 @@
attributes
- 729440
+ 707258
id
- 729440
+ 707258
kind
- 310
+ 295
name
- 1655
+ 1576
name_space
- 206
+ 197
location
- 479361
+ 456496
@@ -25043,7 +25144,7 @@
1
2
- 729440
+ 707258
@@ -25059,7 +25160,7 @@
1
2
- 729440
+ 707258
@@ -25075,7 +25176,7 @@
1
2
- 729440
+ 707258
@@ -25091,7 +25192,7 @@
1
2
- 729440
+ 707258
@@ -25107,17 +25208,17 @@
5
6
- 103
+ 98
2332
2333
- 103
+ 98
- 4713
- 4714
- 103
+ 4841
+ 4842
+ 98
@@ -25133,17 +25234,17 @@
1
2
- 103
+ 98
6
7
- 103
+ 98
11
12
- 103
+ 98
@@ -25159,12 +25260,12 @@
1
2
- 206
+ 197
2
3
- 103
+ 98
@@ -25180,17 +25281,17 @@
2
3
- 103
+ 98
2057
2058
- 103
+ 98
2574
2575
- 103
+ 98
@@ -25206,72 +25307,67 @@
1
2
- 310
+ 197
2
3
- 103
+ 197
4
5
- 103
+ 98
5
6
- 103
+ 98
11
12
- 103
+ 98
14
15
- 103
-
-
- 16
- 17
- 103
+ 197
18
19
- 103
+ 98
24
25
- 103
+ 98
- 86
- 87
- 103
+ 88
+ 89
+ 98
- 115
- 116
- 103
+ 117
+ 118
+ 98
- 1048
- 1049
- 103
+ 1080
+ 1081
+ 98
1760
1761
- 103
+ 98
- 3944
- 3945
- 103
+ 4037
+ 4038
+ 98
@@ -25287,12 +25383,12 @@
1
2
- 1448
+ 1379
2
3
- 206
+ 197
@@ -25308,7 +25404,7 @@
1
2
- 1655
+ 1576
@@ -25324,67 +25420,67 @@
1
2
- 310
+ 295
2
3
- 206
+ 197
4
5
- 103
+ 98
6
7
- 103
+ 98
8
9
- 103
+ 98
9
10
- 103
+ 98
14
15
- 103
+ 98
18
19
- 103
+ 98
59
60
- 103
+ 98
72
73
- 103
+ 98
333
334
- 103
+ 98
1756
1757
- 103
+ 98
2388
2389
- 103
+ 98
@@ -25398,14 +25494,14 @@
12
- 19
- 20
- 103
+ 20
+ 21
+ 98
- 7031
- 7032
- 103
+ 7158
+ 7159
+ 98
@@ -25421,12 +25517,12 @@
1
2
- 103
+ 98
3
4
- 103
+ 98
@@ -25442,12 +25538,12 @@
2
3
- 103
+ 98
14
15
- 103
+ 98
@@ -25463,12 +25559,12 @@
9
10
- 103
+ 98
4624
4625
- 103
+ 98
@@ -25484,17 +25580,17 @@
1
2
- 422351
+ 398559
2
3
- 36316
+ 35274
3
- 201
- 20693
+ 202
+ 22662
@@ -25510,7 +25606,7 @@
1
2
- 479361
+ 456496
@@ -25526,12 +25622,12 @@
1
2
- 475119
+ 452456
2
3
- 4242
+ 4039
@@ -25547,7 +25643,7 @@
1
2
- 479361
+ 456496
@@ -25557,11 +25653,11 @@
attribute_args
- 410000
+ 410431
id
- 410000
+ 410431
kind
@@ -25569,7 +25665,7 @@
attribute
- 298054
+ 298495
index
@@ -25577,7 +25673,7 @@
location
- 327440
+ 327412
@@ -25591,7 +25687,7 @@
1
2
- 410000
+ 410431
@@ -25607,7 +25703,7 @@
1
2
- 410000
+ 410431
@@ -25623,7 +25719,7 @@
1
2
- 410000
+ 410431
@@ -25639,7 +25735,7 @@
1
2
- 410000
+ 410431
@@ -25663,8 +25759,8 @@
466
- 794
- 795
+ 795
+ 796
466
@@ -25689,8 +25785,8 @@
466
- 606
- 607
+ 607
+ 608
466
@@ -25754,17 +25850,17 @@
1
2
- 215961
+ 216409
2
3
- 52241
+ 52236
3
4
- 29852
+ 29849
@@ -25780,12 +25876,12 @@
1
2
- 273799
+ 274242
2
3
- 24254
+ 24252
@@ -25801,17 +25897,17 @@
1
2
- 215961
+ 216409
2
3
- 52241
+ 52236
3
4
- 29852
+ 29849
@@ -25827,17 +25923,17 @@
1
2
- 215961
+ 216409
2
3
- 52241
+ 52236
3
4
- 29852
+ 29849
@@ -25861,8 +25957,8 @@
466
- 639
- 640
+ 640
+ 641
466
@@ -25908,8 +26004,8 @@
466
- 639
- 640
+ 640
+ 641
466
@@ -25952,17 +26048,17 @@
1
2
- 278930
+ 278440
2
3
- 23321
+ 23786
3
9
- 24721
+ 24719
17
@@ -25983,12 +26079,12 @@
1
2
- 314846
+ 314819
2
3
- 12593
+ 12592
@@ -26004,17 +26100,17 @@
1
2
- 278930
+ 278440
2
3
- 23321
+ 23786
3
9
- 24721
+ 24719
17
@@ -26035,7 +26131,7 @@
1
2
- 327440
+ 327412
@@ -26045,15 +26141,15 @@
attribute_arg_value
- 39180
+ 39177
arg
- 39180
+ 39177
value
- 15858
+ 15857
@@ -26067,7 +26163,7 @@
1
2
- 39180
+ 39177
@@ -26083,7 +26179,7 @@
1
2
- 14459
+ 14458
2
@@ -26146,15 +26242,15 @@
attribute_arg_constant
- 370352
+ 370787
arg
- 370352
+ 370787
constant
- 370352
+ 370787
@@ -26168,7 +26264,7 @@
1
2
- 370352
+ 370787
@@ -26184,7 +26280,7 @@
1
2
- 370352
+ 370787
@@ -26295,15 +26391,15 @@
typeattributes
- 84325
+ 82963
type_id
- 61666
+ 58330
spec_id
- 84325
+ 82963
@@ -26317,17 +26413,17 @@
1
2
- 55768
+ 49659
2
- 4
- 4242
+ 3
+ 6897
- 12
+ 3
13
- 1655
+ 1773
@@ -26343,7 +26439,7 @@
1
2
- 84325
+ 82963
@@ -26353,15 +26449,15 @@
funcattributes
- 651615
+ 652026
func_id
- 443117
+ 443079
spec_id
- 651615
+ 652026
@@ -26375,17 +26471,17 @@
1
2
- 334436
+ 333941
2
3
- 65301
+ 65762
3
6
- 34982
+ 34979
6
@@ -26406,7 +26502,7 @@
1
2
- 651615
+ 652026
@@ -26522,15 +26618,15 @@
unspecifiedtype
- 10145051
+ 10143254
type_id
- 10145051
+ 10143254
unspecified_type_id
- 6817474
+ 6815961
@@ -26544,7 +26640,7 @@
1
2
- 10145051
+ 10143254
@@ -26560,17 +26656,17 @@
1
2
- 4584630
+ 4583307
2
3
- 1995426
+ 1995256
3
145
- 237417
+ 237397
@@ -26580,19 +26676,19 @@
member
- 4943849
+ 4941022
parent
- 639217
+ 638852
index
- 8696
+ 8691
child
- 4899184
+ 4896383
@@ -26606,42 +26702,42 @@
1
3
- 19062
+ 19051
3
4
- 344410
+ 344213
4
5
- 37777
+ 37755
5
7
- 52491
+ 52461
7
10
- 52178
+ 52148
10
15
- 49569
+ 49540
15
24
- 48943
+ 48915
24
251
- 34785
+ 34765
@@ -26657,42 +26753,42 @@
1
3
- 19062
+ 19051
3
4
- 344341
+ 344144
4
5
- 37811
+ 37790
5
7
- 52595
+ 52565
7
10
- 52526
+ 52496
10
15
- 49186
+ 49158
15
24
- 49012
+ 48984
24
255
- 34681
+ 34661
@@ -26708,17 +26804,17 @@
1
2
- 1391
+ 1390
2
3
- 800
+ 799
3
4
- 939
+ 938
5
@@ -26779,7 +26875,7 @@
1
2
- 800
+ 799
2
@@ -26834,7 +26930,7 @@
2770
18057
- 452
+ 451
@@ -26850,7 +26946,7 @@
1
2
- 4899184
+ 4896383
@@ -26866,12 +26962,12 @@
1
2
- 4855876
+ 4853100
2
8
- 43307
+ 43283
@@ -26881,15 +26977,15 @@
enclosingfunction
- 117840
+ 117812
child
- 117840
+ 117812
parent
- 67310
+ 67294
@@ -26903,7 +26999,7 @@
1
2
- 117840
+ 117812
@@ -26919,22 +27015,22 @@
1
2
- 35573
+ 35565
2
3
- 20885
+ 20880
3
4
- 5906
+ 5905
4
45
- 4944
+ 4943
@@ -26944,15 +27040,15 @@
derivations
- 390988
+ 390765
derivation
- 390988
+ 390765
sub
- 370743
+ 370531
index
@@ -26960,11 +27056,11 @@
super
- 202451
+ 202335
location
- 37672
+ 37651
@@ -26978,7 +27074,7 @@
1
2
- 390988
+ 390765
@@ -26994,7 +27090,7 @@
1
2
- 390988
+ 390765
@@ -27010,7 +27106,7 @@
1
2
- 390988
+ 390765
@@ -27026,7 +27122,7 @@
1
2
- 390988
+ 390765
@@ -27042,12 +27138,12 @@
1
2
- 355785
+ 355582
2
7
- 14957
+ 14949
@@ -27063,12 +27159,12 @@
1
2
- 355785
+ 355582
2
7
- 14957
+ 14949
@@ -27084,12 +27180,12 @@
1
2
- 355785
+ 355582
2
7
- 14957
+ 14949
@@ -27105,12 +27201,12 @@
1
2
- 355785
+ 355582
2
7
- 14957
+ 14949
@@ -27255,12 +27351,12 @@
1
2
- 195076
+ 194965
2
1519
- 7374
+ 7370
@@ -27276,12 +27372,12 @@
1
2
- 195076
+ 194965
2
1519
- 7374
+ 7370
@@ -27297,12 +27393,12 @@
1
2
- 201999
+ 201883
2
4
- 452
+ 451
@@ -27318,12 +27414,12 @@
1
2
- 198798
+ 198685
2
108
- 3652
+ 3650
@@ -27339,22 +27435,22 @@
1
2
- 28002
+ 27986
2
5
- 3200
+ 3198
5
15
- 2887
+ 2885
15
134
- 2852
+ 2850
136
@@ -27375,22 +27471,22 @@
1
2
- 28002
+ 27986
2
5
- 3200
+ 3198
5
15
- 2887
+ 2885
15
134
- 2852
+ 2850
136
@@ -27411,7 +27507,7 @@
1
2
- 37672
+ 37651
@@ -27427,22 +27523,22 @@
1
2
- 30367
+ 30350
2
5
- 3339
+ 3337
5
45
- 2852
+ 2850
54
415
- 1113
+ 1112
@@ -27452,11 +27548,11 @@
derspecifiers
- 392867
+ 392642
der_id
- 390605
+ 390382
spec_id
@@ -27474,12 +27570,12 @@
1
2
- 388344
+ 388122
2
3
- 2261
+ 2259
@@ -27520,11 +27616,11 @@
direct_base_offsets
- 362081
+ 361874
der_id
- 362081
+ 361874
offset
@@ -27542,7 +27638,7 @@
1
2
- 362081
+ 361874
@@ -27593,11 +27689,11 @@
virtual_base_offsets
- 6443
+ 6442
sub
- 3557
+ 3556
super
@@ -27650,12 +27746,12 @@
1
2
- 2998
+ 2997
2
4
- 302
+ 301
4
@@ -27884,23 +27980,23 @@
frienddecls
- 706005
+ 705602
id
- 706005
+ 705602
type_id
- 41846
+ 41822
decl_id
- 69292
+ 69253
location
- 6261
+ 6257
@@ -27914,7 +28010,7 @@
1
2
- 706005
+ 705602
@@ -27930,7 +28026,7 @@
1
2
- 706005
+ 705602
@@ -27946,7 +28042,7 @@
1
2
- 706005
+ 705602
@@ -27962,47 +28058,47 @@
1
2
- 6122
+ 6118
2
3
- 13044
+ 13037
3
6
- 2921
+ 2920
6
10
- 3165
+ 3163
10
17
- 3235
+ 3233
17
24
- 3304
+ 3302
25
36
- 3269
+ 3267
37
55
- 3200
+ 3198
55
103
- 3582
+ 3580
@@ -28018,47 +28114,47 @@
1
2
- 6122
+ 6118
2
3
- 13044
+ 13037
3
6
- 2921
+ 2920
6
10
- 3165
+ 3163
10
17
- 3235
+ 3233
17
24
- 3304
+ 3302
25
36
- 3269
+ 3267
37
55
- 3200
+ 3198
55
103
- 3582
+ 3580
@@ -28074,12 +28170,12 @@
1
2
- 40420
+ 40397
2
13
- 1426
+ 1425
@@ -28095,37 +28191,37 @@
1
2
- 39968
+ 39945
2
3
- 5809
+ 5805
3
8
- 5948
+ 5944
8
15
- 5356
+ 5353
15
32
- 5217
+ 5214
32
71
- 5217
+ 5214
72
160
- 1774
+ 1773
@@ -28141,37 +28237,37 @@
1
2
- 39968
+ 39945
2
3
- 5809
+ 5805
3
8
- 5948
+ 5944
8
15
- 5356
+ 5353
15
32
- 5217
+ 5214
32
71
- 5217
+ 5214
72
160
- 1774
+ 1773
@@ -28187,7 +28283,7 @@
1
2
- 68631
+ 68592
2
@@ -28208,7 +28304,7 @@
1
2
- 5878
+ 5875
2
@@ -28229,7 +28325,7 @@
1
2
- 6122
+ 6118
2
@@ -28250,7 +28346,7 @@
1
2
- 5913
+ 5910
2
@@ -28265,19 +28361,19 @@
comments
- 8682106
+ 8267972
id
- 8682106
+ 8267972
contents
- 3305971
+ 3148277
location
- 8682106
+ 8267972
@@ -28291,7 +28387,7 @@
1
2
- 8682106
+ 8267972
@@ -28307,7 +28403,7 @@
1
2
- 8682106
+ 8267972
@@ -28323,17 +28419,17 @@
1
2
- 3024231
+ 2879976
2
7
- 248527
+ 236672
7
32784
- 33212
+ 31628
@@ -28349,17 +28445,17 @@
1
2
- 3024231
+ 2879976
2
7
- 248527
+ 236672
7
32784
- 33212
+ 31628
@@ -28375,7 +28471,7 @@
1
2
- 8682106
+ 8267972
@@ -28391,7 +28487,7 @@
1
2
- 8682106
+ 8267972
@@ -28401,15 +28497,15 @@
commentbinding
- 3088293
+ 3088030
id
- 2443208
+ 2443000
element
- 3011797
+ 3011541
@@ -28423,12 +28519,12 @@
1
2
- 2366245
+ 2366044
2
97
- 76962
+ 76955
@@ -28444,12 +28540,12 @@
1
2
- 2935301
+ 2935051
2
3
- 76496
+ 76489
@@ -28459,15 +28555,15 @@
exprconv
- 7033379
+ 7033492
converted
- 7033379
+ 7033492
conversion
- 7033379
+ 7033492
@@ -28481,7 +28577,7 @@
1
2
- 7033379
+ 7033492
@@ -28497,7 +28593,7 @@
1
2
- 7033379
+ 7033492
@@ -28507,30 +28603,30 @@
compgenerated
- 9267960
+ 9273474
id
- 9267960
+ 9273474
synthetic_destructor_call
- 473158
+ 510792
element
- 286203
+ 324717
i
- 380
+ 359
destructor_call
- 473158
+ 510792
@@ -28544,27 +28640,27 @@
1
2
- 188057
+ 227088
2
3
- 50984
+ 50651
3
4
- 21850
+ 21775
4
- 6
- 21584
+ 8
+ 24539
- 6
+ 8
20
- 3727
+ 662
@@ -28580,27 +28676,27 @@
1
2
- 188057
+ 227088
2
3
- 50984
+ 50651
3
4
- 21850
+ 21775
4
- 6
- 21584
+ 8
+ 24539
- 6
+ 8
20
- 3727
+ 662
@@ -28616,102 +28712,97 @@
2
3
- 19
+ 18
3
4
- 19
+ 18
4
5
- 19
+ 18
5
6
- 19
+ 18
6
7
- 19
+ 18
7
8
- 19
+ 18
10
11
- 19
+ 18
11
12
- 19
+ 18
16
17
- 19
+ 18
19
20
- 19
+ 18
27
28
- 19
+ 18
35
36
- 19
-
-
- 37
- 38
- 19
+ 18
83
84
- 19
+ 18
196
197
- 19
+ 18
435
436
- 19
+ 18
1331
1332
- 19
+ 18
- 2480
- 2481
- 19
+ 2481
+ 2482
+ 18
5156
5157
- 19
+ 18
- 15018
- 15019
- 19
+ 17149
+ 17150
+ 18
@@ -28727,102 +28818,97 @@
2
3
- 19
+ 18
3
4
- 19
+ 18
4
5
- 19
+ 18
5
6
- 19
+ 18
6
7
- 19
+ 18
7
8
- 19
+ 18
10
11
- 19
+ 18
11
12
- 19
+ 18
16
17
- 19
+ 18
19
20
- 19
+ 18
27
28
- 19
+ 18
35
36
- 19
-
-
- 37
- 38
- 19
+ 18
83
84
- 19
+ 18
196
197
- 19
+ 18
435
436
- 19
+ 18
1331
1332
- 19
+ 18
- 2480
- 2481
- 19
+ 2481
+ 2482
+ 18
5156
5157
- 19
+ 18
- 15018
- 15019
- 19
+ 17149
+ 17150
+ 18
@@ -28838,7 +28924,7 @@
1
2
- 473158
+ 510792
@@ -28854,7 +28940,7 @@
1
2
- 473158
+ 510792
@@ -28864,15 +28950,15 @@
namespaces
- 12127
+ 12126
id
- 12127
+ 12126
name
- 9795
+ 9794
@@ -28886,7 +28972,7 @@
1
2
- 12127
+ 12126
@@ -28933,15 +29019,15 @@
namespacembrs
- 2385836
+ 2385633
parentid
- 10261
+ 10260
memberid
- 2385836
+ 2385633
@@ -29016,7 +29102,7 @@
1
2
- 2385836
+ 2385633
@@ -29026,11 +29112,11 @@
exprparents
- 14207231
+ 14207462
expr_id
- 14207231
+ 14207462
child_index
@@ -29038,7 +29124,7 @@
parent_id
- 9454166
+ 9454319
@@ -29052,7 +29138,7 @@
1
2
- 14207231
+ 14207462
@@ -29068,7 +29154,7 @@
1
2
- 14207231
+ 14207462
@@ -29186,17 +29272,17 @@
1
2
- 5409633
+ 5409721
2
3
- 3706777
+ 3706838
3
712
- 337754
+ 337760
@@ -29212,17 +29298,17 @@
1
2
- 5409633
+ 5409721
2
3
- 3706777
+ 3706838
3
712
- 337754
+ 337760
@@ -29232,22 +29318,22 @@
expr_isload
- 5168684
+ 5082911
expr_id
- 5168684
+ 5082911
conversionkinds
- 4221331
+ 4221314
expr_id
- 4221331
+ 4221314
kind
@@ -29265,7 +29351,7 @@
1
2
- 4221331
+ 4221314
@@ -29304,8 +29390,8 @@
1
- 4131254
- 4131255
+ 4131237
+ 4131238
1
@@ -29316,15 +29402,15 @@
iscall
- 3182186
+ 3208148
caller
- 3182186
+ 3208148
kind
- 57
+ 56
@@ -29338,7 +29424,7 @@
1
2
- 3182186
+ 3208148
@@ -29354,17 +29440,17 @@
1319
1320
- 19
+ 18
2473
2474
- 19
+ 18
- 163543
- 163544
- 19
+ 165637
+ 165638
+ 18
@@ -29374,15 +29460,15 @@
numtemplatearguments
- 393249
+ 393024
expr_id
- 393249
+ 393024
num
- 313
+ 312
@@ -29396,7 +29482,7 @@
1
2
- 393249
+ 393024
@@ -29500,23 +29586,23 @@
namequalifiers
- 1515301
+ 1508764
id
- 1515301
+ 1508764
qualifiableelement
- 1515301
+ 1508764
qualifyingelement
- 97613
+ 97193
location
- 304593
+ 303282
@@ -29530,7 +29616,7 @@
1
2
- 1515301
+ 1508764
@@ -29546,7 +29632,7 @@
1
2
- 1515301
+ 1508764
@@ -29562,7 +29648,7 @@
1
2
- 1515301
+ 1508764
@@ -29578,7 +29664,7 @@
1
2
- 1515301
+ 1508764
@@ -29594,7 +29680,7 @@
1
2
- 1515301
+ 1508764
@@ -29610,7 +29696,7 @@
1
2
- 1515301
+ 1508764
@@ -29626,27 +29712,27 @@
1
2
- 58457
+ 58206
2
3
- 22420
+ 22324
3
5
- 8918
+ 8880
5
92
- 7378
+ 7346
96
21584
- 437
+ 435
@@ -29662,27 +29748,27 @@
1
2
- 58457
+ 58206
2
3
- 22420
+ 22324
3
5
- 8918
+ 8880
5
92
- 7378
+ 7346
96
21584
- 437
+ 435
@@ -29698,22 +29784,22 @@
1
2
- 63877
+ 63602
2
3
- 20671
+ 20582
3
5
- 8386
+ 8350
5
7095
- 4678
+ 4658
@@ -29729,32 +29815,32 @@
1
2
- 100656
+ 100223
2
3
- 28430
+ 28307
3
4
- 44651
+ 44459
4
6
- 13768
+ 13727
6
7
- 95692
+ 95262
7
790
- 21393
+ 21301
@@ -29770,32 +29856,32 @@
1
2
- 100656
+ 100223
2
3
- 28430
+ 28307
3
4
- 44651
+ 44459
4
6
- 13768
+ 13727
6
7
- 95692
+ 95262
7
790
- 21393
+ 21301
@@ -29811,22 +29897,22 @@
1
2
- 137206
+ 136616
2
3
- 55738
+ 55498
3
4
- 102443
+ 102003
4
143
- 9204
+ 9164
@@ -29836,15 +29922,15 @@
varbind
- 6029430
+ 6029528
expr
- 6029430
+ 6029528
var
- 768569
+ 768581
@@ -29858,7 +29944,7 @@
1
2
- 6029430
+ 6029528
@@ -29874,47 +29960,47 @@
1
2
- 126228
+ 126230
2
3
- 137881
+ 137883
3
4
- 106298
+ 106300
4
5
- 85215
+ 85217
5
6
- 61292
+ 61293
6
7
- 48115
+ 48116
7
9
- 59624
+ 59625
9
13
- 59274
+ 59275
13
28
- 58883
+ 58884
28
@@ -29929,15 +30015,15 @@
funbind
- 3188690
+ 3214624
expr
- 3182471
+ 3208432
fun
- 512219
+ 510072
@@ -29951,12 +30037,12 @@
1
2
- 3176253
+ 3202241
2
3
- 6218
+ 6191
@@ -29972,32 +30058,32 @@
1
2
- 315736
+ 314454
2
3
- 78026
+ 77652
3
4
- 31396
+ 31261
4
7
- 46153
+ 45955
7
121
- 38471
+ 38305
123
5011
- 2434
+ 2442
@@ -30007,11 +30093,11 @@
expr_allocator
- 45951
+ 45925
expr
- 45951
+ 45925
func
@@ -30033,7 +30119,7 @@
1
2
- 45951
+ 45925
@@ -30049,7 +30135,7 @@
1
2
- 45951
+ 45925
@@ -30133,11 +30219,11 @@
expr_deallocator
- 54613
+ 54581
expr
- 54613
+ 54581
func
@@ -30159,7 +30245,7 @@
1
2
- 54613
+ 54581
@@ -30175,7 +30261,7 @@
1
2
- 54613
+ 54581
@@ -30280,15 +30366,15 @@
expr_cond_guard
- 657271
+ 657281
cond
- 657271
+ 657281
guard
- 657271
+ 657281
@@ -30302,7 +30388,7 @@
1
2
- 657271
+ 657281
@@ -30318,7 +30404,7 @@
1
2
- 657271
+ 657281
@@ -30328,15 +30414,15 @@
expr_cond_true
- 657268
+ 657279
cond
- 657268
+ 657279
true
- 657268
+ 657279
@@ -30350,7 +30436,7 @@
1
2
- 657268
+ 657279
@@ -30366,7 +30452,7 @@
1
2
- 657268
+ 657279
@@ -30376,15 +30462,15 @@
expr_cond_false
- 657271
+ 657281
cond
- 657271
+ 657281
false
- 657271
+ 657281
@@ -30398,7 +30484,7 @@
1
2
- 657271
+ 657281
@@ -30414,7 +30500,7 @@
1
2
- 657271
+ 657281
@@ -30424,15 +30510,15 @@
values
- 10777241
+ 10777417
id
- 10777241
+ 10777417
str
- 88067
+ 88069
@@ -30446,7 +30532,7 @@
1
2
- 10777241
+ 10777417
@@ -30462,7 +30548,7 @@
1
2
- 59548
+ 59549
2
@@ -30472,7 +30558,7 @@
3
6
- 6916
+ 6917
6
@@ -30492,15 +30578,15 @@
valuetext
- 4757336
+ 4757348
id
- 4757336
+ 4757348
text
- 703968
+ 703970
@@ -30514,7 +30600,7 @@
1
2
- 4757336
+ 4757348
@@ -30535,12 +30621,12 @@
2
3
- 102500
+ 102501
3
7
- 56769
+ 56770
7
@@ -30555,15 +30641,15 @@
valuebind
- 11211484
+ 11211667
val
- 10777241
+ 10777417
expr
- 11211484
+ 11211667
@@ -30577,12 +30663,12 @@
1
2
- 10365543
+ 10365712
2
7
- 411698
+ 411704
@@ -30598,7 +30684,7 @@
1
2
- 11211484
+ 11211667
@@ -30608,15 +30694,15 @@
fieldoffsets
- 1054750
+ 1054767
id
- 1054750
+ 1054767
byteoffset
- 22693
+ 22694
bitoffset
@@ -30634,7 +30720,7 @@
1
2
- 1054750
+ 1054767
@@ -30650,7 +30736,7 @@
1
2
- 1054750
+ 1054767
@@ -30712,7 +30798,7 @@
1
2
- 22014
+ 22015
2
@@ -30809,19 +30895,19 @@
bitfield
- 20693
+ 19706
id
- 20693
+ 19706
bits
- 2586
+ 2463
declared_bits
- 2586
+ 2463
@@ -30835,7 +30921,7 @@
1
2
- 20693
+ 19706
@@ -30851,7 +30937,7 @@
1
2
- 20693
+ 19706
@@ -30867,42 +30953,42 @@
1
2
- 724
+ 689
2
3
- 620
+ 591
3
4
- 206
+ 197
4
5
- 206
+ 197
5
6
- 206
+ 197
6
8
- 206
+ 197
8
11
- 206
+ 197
12
115
- 206
+ 197
@@ -30918,7 +31004,7 @@
1
2
- 2586
+ 2463
@@ -30934,42 +31020,42 @@
1
2
- 724
+ 689
2
3
- 620
+ 591
3
4
- 206
+ 197
4
5
- 206
+ 197
5
6
- 206
+ 197
6
8
- 206
+ 197
8
11
- 206
+ 197
12
115
- 206
+ 197
@@ -30985,7 +31071,7 @@
1
2
- 2586
+ 2463
@@ -30995,23 +31081,23 @@
initialisers
- 1710223
+ 1710171
init
- 1710223
+ 1710171
var
- 719570
+ 719548
expr
- 1710223
+ 1710171
location
- 394513
+ 394501
@@ -31025,7 +31111,7 @@
1
2
- 1710223
+ 1710171
@@ -31041,7 +31127,7 @@
1
2
- 1710223
+ 1710171
@@ -31057,7 +31143,7 @@
1
2
- 1710223
+ 1710171
@@ -31073,17 +31159,17 @@
1
2
- 633825
+ 633806
2
15
- 28723
+ 28722
16
25
- 57020
+ 57019
@@ -31099,17 +31185,17 @@
1
2
- 633825
+ 633806
2
15
- 28723
+ 28722
16
25
- 57020
+ 57019
@@ -31125,7 +31211,7 @@
1
2
- 719563
+ 719541
2
@@ -31146,7 +31232,7 @@
1
2
- 1710223
+ 1710171
@@ -31162,7 +31248,7 @@
1
2
- 1710223
+ 1710171
@@ -31178,7 +31264,7 @@
1
2
- 1710223
+ 1710171
@@ -31194,17 +31280,17 @@
1
2
- 321597
+ 321587
2
3
- 23956
+ 23955
3
15
- 30976
+ 30975
15
@@ -31225,12 +31311,12 @@
1
2
- 344480
+ 344470
2
4
- 36086
+ 36085
4
@@ -31251,17 +31337,17 @@
1
2
- 321597
+ 321587
2
3
- 23956
+ 23955
3
15
- 30976
+ 30975
15
@@ -31287,15 +31373,15 @@
expr_ancestor
- 477285
+ 514901
exp
- 477285
+ 514901
ancestor
- 268993
+ 307486
@@ -31309,7 +31395,7 @@
1
2
- 477285
+ 514901
@@ -31325,27 +31411,27 @@
1
2
- 163963
+ 202889
2
3
- 55148
+ 54930
3
4
- 22496
+ 22400
4
- 6
- 22592
+ 7
+ 25070
- 6
+ 7
26
- 4792
+ 2196
@@ -31355,11 +31441,11 @@
exprs
- 18388431
+ 18388730
id
- 18388431
+ 18388730
kind
@@ -31367,7 +31453,7 @@
location
- 8488521
+ 8488659
@@ -31381,7 +31467,7 @@
1
2
- 18388431
+ 18388730
@@ -31397,7 +31483,7 @@
1
2
- 18388431
+ 18388730
@@ -31575,22 +31661,22 @@
1
2
- 7145513
+ 7145629
2
3
- 663064
+ 663075
3
18
- 638135
+ 638145
18
71656
- 41807
+ 41808
@@ -31606,17 +31692,17 @@
1
2
- 7251587
+ 7251705
2
3
- 618273
+ 618283
3
32
- 618661
+ 618671
@@ -31626,19 +31712,19 @@
expr_reuse
- 333955
+ 372471
reuse
- 333955
+ 372471
original
- 333955
+ 372452
value_category
- 19
+ 37
@@ -31652,7 +31738,7 @@
1
2
- 333955
+ 372471
@@ -31668,7 +31754,7 @@
1
2
- 333955
+ 372471
@@ -31684,7 +31770,12 @@
1
2
- 333955
+ 372433
+
+
+ 2
+ 3
+ 18
@@ -31700,7 +31791,7 @@
1
2
- 333955
+ 372452
@@ -31714,9 +31805,14 @@
12
- 17561
- 17562
- 19
+ 15
+ 16
+ 18
+
+
+ 19656
+ 19657
+ 18
@@ -31730,9 +31826,14 @@
12
- 17561
- 17562
- 19
+ 15
+ 16
+ 18
+
+
+ 19655
+ 19656
+ 18
@@ -31742,15 +31843,15 @@
expr_types
- 18456468
+ 18452210
id
- 18325931
+ 18321703
typeid
- 1236717
+ 1236464
value_category
@@ -31768,12 +31869,12 @@
1
2
- 18195394
+ 18191197
2
3
- 130536
+ 130506
@@ -31789,7 +31890,7 @@
1
2
- 18325931
+ 18321703
@@ -31805,42 +31906,42 @@
1
2
- 448002
+ 447977
2
3
- 256901
+ 256729
3
4
- 102760
+ 102714
4
5
- 84078
+ 84159
5
8
- 110166
+ 110118
8
14
- 98352
+ 98307
14
42
- 93486
+ 93532
42
- 125373
- 42967
+ 125371
+ 42924
@@ -31856,17 +31957,17 @@
1
2
- 1069040
+ 1068826
2
3
- 157261
+ 157225
3
4
- 10414
+ 10412
@@ -31885,13 +31986,13 @@
11
- 372581
- 372582
+ 372567
+ 372568
11
- 1250724
- 1250725
+ 1250740
+ 1250741
11
@@ -31916,8 +32017,8 @@
11
- 92889
- 92890
+ 92892
+ 92893
11
@@ -31928,15 +32029,15 @@
new_allocated_type
- 46995
+ 46968
expr
- 46995
+ 46968
type_id
- 27793
+ 27777
@@ -31950,7 +32051,7 @@
1
2
- 46995
+ 46968
@@ -31966,12 +32067,12 @@
1
2
- 11618
+ 11611
2
3
- 14714
+ 14705
3
@@ -32029,7 +32130,7 @@
2
3
- 1936
+ 1935
3
@@ -33071,15 +33172,15 @@
condition_decl_bind
- 40753
+ 40577
expr
- 40753
+ 40577
decl
- 40753
+ 40577
@@ -33093,7 +33194,7 @@
1
2
- 40753
+ 40577
@@ -33109,7 +33210,7 @@
1
2
- 40753
+ 40577
@@ -33119,15 +33220,15 @@
typeid_bind
- 35968
+ 35947
expr
- 35968
+ 35947
type_id
- 16175
+ 16165
@@ -33141,7 +33242,7 @@
1
2
- 35968
+ 35947
@@ -33157,7 +33258,7 @@
1
2
- 15757
+ 15748
3
@@ -33172,11 +33273,11 @@
uuidof_bind
- 20293
+ 20292
expr
- 20293
+ 20292
type_id
@@ -33194,7 +33295,7 @@
1
2
- 20293
+ 20292
@@ -33225,11 +33326,11 @@
sizeof_bind
- 199194
+ 199197
expr
- 199194
+ 199197
type_id
@@ -33247,7 +33348,7 @@
1
2
- 199194
+ 199197
@@ -33356,11 +33457,11 @@
lambdas
- 21456
+ 21454
expr
- 21456
+ 21454
default_capture
@@ -33382,7 +33483,7 @@
1
2
- 21456
+ 21454
@@ -33398,7 +33499,7 @@
1
2
- 21456
+ 21454
@@ -33472,15 +33573,15 @@
lambda_capture
- 27986
+ 27983
id
- 27986
+ 27983
lambda
- 20523
+ 20521
index
@@ -33488,7 +33589,7 @@
field
- 27986
+ 27983
captured_by_reference
@@ -33514,7 +33615,7 @@
1
2
- 27986
+ 27983
@@ -33530,7 +33631,7 @@
1
2
- 27986
+ 27983
@@ -33546,7 +33647,7 @@
1
2
- 27986
+ 27983
@@ -33562,7 +33663,7 @@
1
2
- 27986
+ 27983
@@ -33578,7 +33679,7 @@
1
2
- 27986
+ 27983
@@ -33594,7 +33695,7 @@
1
2
- 27986
+ 27983
@@ -33610,12 +33711,12 @@
1
2
- 13060
+ 13059
2
3
- 7463
+ 7462
@@ -33631,12 +33732,12 @@
1
2
- 13060
+ 13059
2
3
- 7463
+ 7462
@@ -33652,12 +33753,12 @@
1
2
- 13060
+ 13059
2
3
- 7463
+ 7462
@@ -33673,7 +33774,7 @@
1
2
- 20523
+ 20521
@@ -33689,7 +33790,7 @@
1
2
- 20523
+ 20521
@@ -33705,12 +33806,12 @@
1
2
- 13060
+ 13059
2
3
- 7463
+ 7462
@@ -33842,7 +33943,7 @@
1
2
- 27986
+ 27983
@@ -33858,7 +33959,7 @@
1
2
- 27986
+ 27983
@@ -33874,7 +33975,7 @@
1
2
- 27986
+ 27983
@@ -33890,7 +33991,7 @@
1
2
- 27986
+ 27983
@@ -33906,7 +34007,7 @@
1
2
- 27986
+ 27983
@@ -33922,7 +34023,7 @@
1
2
- 27986
+ 27983
@@ -34351,19 +34452,19 @@
stmts
- 4618654
+ 4652754
id
- 4618654
+ 4652754
kind
- 1965
+ 1872
location
- 2268406
+ 2173505
@@ -34377,7 +34478,7 @@
1
2
- 4618654
+ 4652754
@@ -34393,7 +34494,7 @@
1
2
- 4618654
+ 4652754
@@ -34409,97 +34510,97 @@
1
2
- 103
+ 98
18
19
- 103
+ 98
22
23
- 103
+ 98
- 46
- 47
- 103
+ 51
+ 52
+ 98
- 75
- 76
- 103
+ 76
+ 77
+ 98
- 83
- 84
- 103
+ 84
+ 85
+ 98
- 102
- 103
- 103
+ 107
+ 108
+ 98
- 154
- 155
- 103
+ 163
+ 164
+ 98
- 242
- 243
- 103
+ 258
+ 259
+ 98
- 284
- 285
- 103
+ 299
+ 300
+ 98
- 383
- 384
- 103
+ 412
+ 413
+ 98
- 418
- 419
- 103
+ 498
+ 499
+ 98
- 503
- 504
- 103
+ 539
+ 540
+ 98
- 1326
- 1327
- 103
+ 1372
+ 1373
+ 98
- 2636
- 2637
- 103
+ 2811
+ 2812
+ 98
- 4622
- 4623
- 103
+ 4882
+ 4883
+ 98
- 8806
- 8807
- 103
+ 9278
+ 9279
+ 98
- 11579
- 11580
- 103
+ 12170
+ 12171
+ 98
- 13339
- 13340
- 103
+ 14180
+ 14181
+ 98
@@ -34515,97 +34616,97 @@
1
2
- 103
+ 98
8
9
- 103
+ 98
18
19
- 103
+ 98
45
46
- 103
+ 98
50
51
- 103
+ 98
56
57
- 103
+ 98
74
75
- 103
-
-
- 89
- 90
- 103
+ 98
101
102
- 103
+ 98
- 128
- 129
- 103
+ 103
+ 104
+ 98
- 209
- 210
- 103
+ 131
+ 132
+ 98
+
+
+ 225
+ 226
+ 98
252
253
- 103
+ 98
368
369
- 103
+ 98
- 642
- 643
- 103
+ 650
+ 651
+ 98
- 1743
- 1744
- 103
+ 1754
+ 1755
+ 98
- 2190
- 2191
- 103
+ 2198
+ 2199
+ 98
- 4228
- 4229
- 103
+ 4253
+ 4254
+ 98
- 6071
- 6072
- 103
+ 6102
+ 6103
+ 98
- 6567
- 6568
- 103
+ 6617
+ 6618
+ 98
@@ -34621,22 +34722,22 @@
1
2
- 1878336
+ 1726665
2
- 4
- 173927
+ 3
+ 178637
- 4
- 12
- 174031
+ 3
+ 8
+ 166419
- 12
+ 8
689
- 42110
+ 101783
@@ -34652,12 +34753,12 @@
1
2
- 2211706
+ 2118820
2
8
- 56699
+ 54684
@@ -34763,15 +34864,15 @@
if_initialization
- 310
+ 295
if_stmt
- 310
+ 295
init_id
- 310
+ 295
@@ -34785,7 +34886,7 @@
1
2
- 310
+ 295
@@ -34801,7 +34902,7 @@
1
2
- 310
+ 295
@@ -34811,15 +34912,15 @@
if_then
- 725951
+ 725963
if_stmt
- 725951
+ 725963
then_id
- 725951
+ 725963
@@ -34833,7 +34934,7 @@
1
2
- 725951
+ 725963
@@ -34849,7 +34950,7 @@
1
2
- 725951
+ 725963
@@ -34859,15 +34960,15 @@
if_else
- 184679
+ 184682
if_stmt
- 184679
+ 184682
else_id
- 184679
+ 184682
@@ -34881,7 +34982,7 @@
1
2
- 184679
+ 184682
@@ -34897,7 +34998,7 @@
1
2
- 184679
+ 184682
@@ -34907,15 +35008,15 @@
constexpr_if_initialization
- 2
+ 3
constexpr_if_stmt
- 2
+ 3
init_id
- 2
+ 3
@@ -34929,7 +35030,7 @@
1
2
- 2
+ 3
@@ -34945,7 +35046,7 @@
1
2
- 2
+ 3
@@ -34955,15 +35056,15 @@
constexpr_if_then
- 52043
+ 53108
constexpr_if_stmt
- 52043
+ 53108
then_id
- 52043
+ 53108
@@ -34977,7 +35078,7 @@
1
2
- 52043
+ 53108
@@ -34993,7 +35094,7 @@
1
2
- 52043
+ 53108
@@ -35003,15 +35104,15 @@
constexpr_if_else
- 30522
+ 30840
constexpr_if_stmt
- 30522
+ 30840
else_id
- 30522
+ 30840
@@ -35025,7 +35126,7 @@
1
2
- 30522
+ 30840
@@ -35041,7 +35142,7 @@
1
2
- 30522
+ 30840
@@ -35051,15 +35152,15 @@
while_body
- 29141
+ 29134
while_stmt
- 29141
+ 29134
body_id
- 29141
+ 29134
@@ -35073,7 +35174,7 @@
1
2
- 29141
+ 29134
@@ -35089,7 +35190,7 @@
1
2
- 29141
+ 29134
@@ -35099,15 +35200,15 @@
do_body
- 148881
+ 148884
do_stmt
- 148881
+ 148884
body_id
- 148881
+ 148884
@@ -35121,7 +35222,7 @@
1
2
- 148881
+ 148884
@@ -35137,7 +35238,7 @@
1
2
- 148881
+ 148884
@@ -35147,15 +35248,15 @@
switch_initialization
- 6
+ 8
switch_stmt
- 6
+ 8
init_id
- 6
+ 8
@@ -35169,7 +35270,7 @@
1
2
- 6
+ 8
@@ -35185,7 +35286,7 @@
1
2
- 6
+ 8
@@ -35195,19 +35296,19 @@
switch_case
- 207702
+ 206808
switch_stmt
- 11029
+ 10982
index
- 4678
+ 4658
case_id
- 207702
+ 206808
@@ -35221,57 +35322,57 @@
2
3
- 57
+ 56
3
4
- 2396
+ 2385
4
5
- 1768
+ 1760
5
6
- 1045
+ 1041
6
8
- 988
+ 984
8
9
- 532
+ 530
9
10
- 1026
+ 1022
10
11
- 361
+ 359
11
14
- 1007
+ 1003
14
31
- 931
+ 927
36
247
- 912
+ 908
@@ -35287,57 +35388,57 @@
2
3
- 57
+ 56
3
4
- 2396
+ 2385
4
5
- 1768
+ 1760
5
6
- 1045
+ 1041
6
8
- 988
+ 984
8
9
- 532
+ 530
9
10
- 1026
+ 1022
10
11
- 361
+ 359
11
14
- 1007
+ 1003
14
31
- 931
+ 927
36
247
- 912
+ 908
@@ -35353,32 +35454,32 @@
14
15
- 1236
+ 1230
19
20
- 570
+ 568
33
34
- 2015
+ 2007
34
63
- 399
+ 397
68
304
- 361
+ 359
358
581
- 95
+ 94
@@ -35394,32 +35495,32 @@
14
15
- 1236
+ 1230
19
20
- 570
+ 568
33
34
- 2015
+ 2007
34
63
- 399
+ 397
68
304
- 361
+ 359
358
581
- 95
+ 94
@@ -35435,7 +35536,7 @@
1
2
- 207702
+ 206808
@@ -35451,7 +35552,7 @@
1
2
- 207702
+ 206808
@@ -35461,15 +35562,15 @@
switch_body
- 20787
+ 20788
switch_stmt
- 20787
+ 20788
body_id
- 20787
+ 20788
@@ -35483,7 +35584,7 @@
1
2
- 20787
+ 20788
@@ -35499,7 +35600,7 @@
1
2
- 20787
+ 20788
@@ -35509,15 +35610,15 @@
for_initialization
- 53406
+ 53407
for_stmt
- 53406
+ 53407
init_id
- 53406
+ 53407
@@ -35531,7 +35632,7 @@
1
2
- 53406
+ 53407
@@ -35547,7 +35648,7 @@
1
2
- 53406
+ 53407
@@ -35557,15 +35658,15 @@
for_condition
- 55671
+ 55672
for_stmt
- 55671
+ 55672
condition_id
- 55671
+ 55672
@@ -35579,7 +35680,7 @@
1
2
- 55671
+ 55672
@@ -35595,7 +35696,7 @@
1
2
- 55671
+ 55672
@@ -35605,15 +35706,15 @@
for_update
- 53509
+ 53510
for_stmt
- 53509
+ 53510
update_id
- 53509
+ 53510
@@ -35627,7 +35728,7 @@
1
2
- 53509
+ 53510
@@ -35643,7 +35744,7 @@
1
2
- 53509
+ 53510
@@ -35653,15 +35754,15 @@
for_body
- 61559
+ 61560
for_stmt
- 61559
+ 61560
body_id
- 61559
+ 61560
@@ -35675,7 +35776,7 @@
1
2
- 61559
+ 61560
@@ -35691,7 +35792,7 @@
1
2
- 61559
+ 61560
@@ -35701,19 +35802,19 @@
stmtparents
- 4054557
+ 4054504
id
- 4054557
+ 4054504
index
- 12327
+ 12326
parent
- 1721299
+ 1721253
@@ -35727,7 +35828,7 @@
1
2
- 4054557
+ 4054504
@@ -35743,7 +35844,7 @@
1
2
- 4054557
+ 4054504
@@ -35803,7 +35904,7 @@
77
- 195140
+ 195141
704
@@ -35864,7 +35965,7 @@
77
- 195140
+ 195141
704
@@ -35881,27 +35982,27 @@
1
2
- 989142
+ 989112
2
3
- 372562
+ 372551
3
4
- 105701
+ 105697
4
6
- 111255
+ 111251
6
17
- 130355
+ 130357
17
@@ -35922,27 +36023,27 @@
1
2
- 989142
+ 989112
2
3
- 372562
+ 372551
3
4
- 105701
+ 105697
4
6
- 111255
+ 111251
6
17
- 130355
+ 130357
17
@@ -35957,30 +36058,30 @@
ishandler
- 62736
+ 62466
block
- 62736
+ 62466
stmt_decl_bind
- 580797
+ 580812
stmt
- 540979
+ 541032
num
- 75
+ 74
decl
- 580692
+ 580708
@@ -35994,12 +36095,12 @@
1
2
- 520271
+ 520345
2
19
- 20707
+ 20687
@@ -36015,12 +36116,12 @@
1
2
- 520271
+ 520345
2
19
- 20707
+ 20687
@@ -36099,18 +36200,18 @@
4
- 2570
- 2571
+ 2571
+ 2572
4
- 4968
- 4969
+ 4969
+ 4970
4
- 129790
- 129791
+ 129953
+ 129954
4
@@ -36190,18 +36291,18 @@
4
- 2570
- 2571
+ 2571
+ 2572
4
- 4968
- 4969
+ 4969
+ 4970
4
- 129765
- 129766
+ 129928
+ 129929
4
@@ -36218,7 +36319,7 @@
1
2
- 580655
+ 580671
2
@@ -36239,7 +36340,7 @@
1
2
- 580692
+ 580708
@@ -36249,19 +36350,19 @@
stmt_decl_entry_bind
- 523673
+ 580812
stmt
- 484155
+ 541032
num
- 75
+ 74
decl_entry
- 523614
+ 580754
@@ -36275,12 +36376,12 @@
1
2
- 463710
+ 520345
2
19
- 20444
+ 20687
@@ -36296,12 +36397,12 @@
1
2
- 463710
+ 520345
2
19
- 20444
+ 20687
@@ -36380,18 +36481,18 @@
4
- 2561
- 2562
+ 2571
+ 2572
4
- 4905
- 4906
+ 4969
+ 4970
4
- 116157
- 116158
+ 129953
+ 129954
4
@@ -36471,18 +36572,18 @@
4
- 2561
- 2562
+ 2571
+ 2572
4
- 4905
- 4906
+ 4969
+ 4970
4
- 116143
- 116144
+ 129939
+ 129940
4
@@ -36499,7 +36600,7 @@
1
2
- 523593
+ 580733
3
@@ -36520,7 +36621,7 @@
1
2
- 523614
+ 580754
@@ -36530,15 +36631,15 @@
blockscope
- 1415642
+ 1415522
block
- 1415642
+ 1415522
enclosing
- 1300432
+ 1300321
@@ -36552,7 +36653,7 @@
1
2
- 1415642
+ 1415522
@@ -36568,12 +36669,12 @@
1
2
- 1235130
+ 1235025
2
13
- 65301
+ 65295
@@ -36583,11 +36684,11 @@
jumpinfo
- 254469
+ 254474
id
- 254469
+ 254474
str
@@ -36595,7 +36696,7 @@
target
- 53144
+ 53145
@@ -36609,7 +36710,7 @@
1
2
- 254469
+ 254474
@@ -36625,7 +36726,7 @@
1
2
- 254469
+ 254474
@@ -36723,7 +36824,7 @@
2
3
- 26477
+ 26478
3
@@ -36733,7 +36834,7 @@
4
5
- 5352
+ 5353
5
@@ -36759,7 +36860,7 @@
1
2
- 53144
+ 53145
@@ -36769,19 +36870,19 @@
preprocdirects
- 4386889
+ 4186401
id
- 4386889
+ 4186401
kind
- 1138
+ 5130
location
- 4384302
+ 4145824
@@ -36795,7 +36896,7 @@
1
2
- 4386889
+ 4186401
@@ -36811,7 +36912,7 @@
1
2
- 4386889
+ 4186401
@@ -36825,59 +36926,59 @@
12
- 1
- 2
- 103
+ 4
+ 5
+ 466
- 122
- 123
- 103
+ 54
+ 55
+ 466
- 694
- 695
- 103
+ 151
+ 152
+ 466
- 799
- 800
- 103
+ 448
+ 449
+ 466
- 932
- 933
- 103
+ 554
+ 555
+ 466
- 1689
- 1690
- 103
+ 564
+ 565
+ 466
- 1792
- 1793
- 103
+ 571
+ 572
+ 466
- 3012
- 3013
- 103
+ 667
+ 668
+ 466
- 3802
- 3803
- 103
+ 1429
+ 1430
+ 466
- 6290
- 6291
- 103
+ 1970
+ 1971
+ 466
- 23266
- 23267
- 103
+ 2564
+ 2565
+ 466
@@ -36891,59 +36992,59 @@
12
- 1
- 2
- 103
+ 4
+ 5
+ 466
- 122
- 123
- 103
+ 54
+ 55
+ 466
- 694
- 695
- 103
+ 151
+ 152
+ 466
- 799
- 800
- 103
+ 448
+ 449
+ 466
- 932
- 933
- 103
+ 554
+ 555
+ 466
- 1689
- 1690
- 103
+ 564
+ 565
+ 466
- 1792
- 1793
- 103
+ 571
+ 572
+ 466
- 3012
- 3013
- 103
+ 667
+ 668
+ 466
- 3802
- 3803
- 103
+ 1429
+ 1430
+ 466
- 6290
- 6291
- 103
+ 1883
+ 1884
+ 466
- 23241
- 23242
- 103
+ 2564
+ 2565
+ 466
@@ -36959,12 +37060,12 @@
1
2
- 4384198
+ 4145358
- 26
- 27
- 103
+ 88
+ 89
+ 466
@@ -36980,7 +37081,7 @@
1
2
- 4384302
+ 4145824
@@ -36990,15 +37091,15 @@
preprocpair
- 1430102
+ 1429980
begin
- 1195950
+ 1195848
elseelifend
- 1430102
+ 1429980
@@ -37012,17 +37113,17 @@
1
2
- 977656
+ 977573
2
3
- 208031
+ 208014
3
11
- 10261
+ 10260
@@ -37038,7 +37139,7 @@
1
2
- 1430102
+ 1429980
@@ -37048,41 +37149,41 @@
preproctrue
- 766359
+ 766294
branch
- 766359
+ 766294
preprocfalse
- 331171
+ 331143
branch
- 331171
+ 331143
preproctext
- 3537219
+ 3368495
id
- 3537219
+ 3368495
head
- 2563493
+ 2441215
body
- 1498199
+ 1426735
@@ -37096,7 +37197,7 @@
1
2
- 3537219
+ 3368495
@@ -37112,7 +37213,7 @@
1
2
- 3537219
+ 3368495
@@ -37128,12 +37229,12 @@
1
2
- 2417708
+ 2302384
2
740
- 145784
+ 138830
@@ -37149,12 +37250,12 @@
1
2
- 2501827
+ 2382490
2
5
- 61666
+ 58724
@@ -37170,17 +37271,17 @@
1
2
- 1356242
+ 1291550
2
6
- 112364
+ 107005
6
11630
- 29591
+ 28179
@@ -37196,17 +37297,17 @@
1
2
- 1359243
+ 1294407
2
7
- 112675
+ 107300
7
2980
- 26280
+ 25026
@@ -37216,15 +37317,15 @@
includes
- 312980
+ 312954
id
- 312980
+ 312954
included
- 117076
+ 117066
@@ -37238,7 +37339,7 @@
1
2
- 312980
+ 312954
@@ -37254,32 +37355,32 @@
1
2
- 61103
+ 61098
2
3
- 21922
+ 21920
3
4
- 12593
+ 12592
4
6
- 10261
+ 10260
6
14
- 8862
+ 8861
14
47
- 2332
+ 2331
@@ -37289,15 +37390,15 @@
link_targets
- 817
+ 814
id
- 817
+ 814
binary
- 817
+ 814
@@ -37311,7 +37412,7 @@
1
2
- 817
+ 814
@@ -37327,7 +37428,7 @@
1
2
- 817
+ 814
@@ -37337,11 +37438,11 @@
link_parent
- 38867468
+ 38845246
element
- 4926386
+ 4923570
link_target
@@ -37359,17 +37460,17 @@
1
2
- 664089
+ 663709
2
9
- 25845
+ 25830
9
10
- 4236452
+ 4234029
diff --git a/cpp/ql/lib/upgrades/abfce5c170f93e281948f7689ece373464fdaf87/old.dbscheme b/cpp/ql/lib/upgrades/abfce5c170f93e281948f7689ece373464fdaf87/old.dbscheme
new file mode 100644
index 000000000000..abfce5c170f9
--- /dev/null
+++ b/cpp/ql/lib/upgrades/abfce5c170f93e281948f7689ece373464fdaf87/old.dbscheme
@@ -0,0 +1,2251 @@
+
+/**
+ * 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)
+
+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
+);
+
+usings(
+ unique int id: @using,
+ int element_id: @element ref,
+ int location: @location_default 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
+);
+
+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
+
+/*
+ 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
+);
+
+/*
+ case @deallocator.form of
+ 0 = plain
+ | 1 = size
+ | 2 = alignment
+ | 3 = size_and_alignment
+ ;
+*/
+
+/**
+ * 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
+;
+
+@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
+ ;
+
+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;
+
+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/abfce5c170f93e281948f7689ece373464fdaf87/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/abfce5c170f93e281948f7689ece373464fdaf87/semmlecode.cpp.dbscheme
new file mode 100644
index 000000000000..3d35dd6b50ed
--- /dev/null
+++ b/cpp/ql/lib/upgrades/abfce5c170f93e281948f7689ece373464fdaf87/semmlecode.cpp.dbscheme
@@ -0,0 +1,2289 @@
+
+/**
+ * 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)
+
+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
+);
+
+usings(
+ unique int id: @using,
+ int element_id: @element ref,
+ int location: @location_default 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
+);
+
+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
+
+/*
+ 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
+);
+
+/*
+ case @deallocator.form of
+ 0 = plain
+ | 1 = size
+ | 2 = alignment
+ | 3 = size_and_alignment
+ ;
+*/
+
+/**
+ * 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
+;
+
+@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
+ ;
+
+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;
+
+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/abfce5c170f93e281948f7689ece373464fdaf87/upgrade.properties b/cpp/ql/lib/upgrades/abfce5c170f93e281948f7689ece373464fdaf87/upgrade.properties
new file mode 100644
index 000000000000..db0e7e92d0e9
--- /dev/null
+++ b/cpp/ql/lib/upgrades/abfce5c170f93e281948f7689ece373464fdaf87/upgrade.properties
@@ -0,0 +1,2 @@
+description: Add new builtin operations
+compatibility: backwards
diff --git a/cpp/ql/src/CHANGELOG.md b/cpp/ql/src/CHANGELOG.md
index badaa459be17..9f10be7db909 100644
--- a/cpp/ql/src/CHANGELOG.md
+++ b/cpp/ql/src/CHANGELOG.md
@@ -1,3 +1,14 @@
+## 1.1.0
+
+### Query Metadata Changes
+
+* The precision of `cpp/iterator-to-expired-container` ("Iterator to expired container") has been increased to `high`. As a result, it will be run by default as part of the Code Scanning suite.
+* The precision of `cpp/unsafe-strncat` ("Potentially unsafe call to strncat") has been increased to `high`. As a result, it will be run by default as part of the Code Scanning suite.
+
+### Minor Analysis Improvements
+
+* The `cpp/unsigned-difference-expression-compared-zero` ("Unsigned difference expression compared to zero") query now produces fewer false positives.
+
## 1.0.3
No user-facing changes.
diff --git a/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.ql b/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.ql
index 492315ad8b73..e38bfbf562be 100644
--- a/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.ql
+++ b/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.ql
@@ -172,5 +172,5 @@ where
not arg.isFromUninstantiatedTemplate(_) and
not actual.getUnspecifiedType() instanceof ErroneousType
select arg,
- "This argument should be of type '" + expected.getName() + "' but is of type '" +
+ "This format specifier for type '" + expected.getName() + "' does not match the argument type '" +
actual.getUnspecifiedType().getName() + "'."
diff --git a/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.cpp b/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.cpp
deleted file mode 100644
index bf9822d5fd88..000000000000
--- a/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-Record* fixRecord(Record* r) {
- Record myRecord = *r;
- delete r;
-
- myRecord.fix();
- return &myRecord; //returns reference to myRecord, which is a stack-allocated object
-}
\ No newline at end of file
diff --git a/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.qhelp b/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.qhelp
index 0c59a36199e0..a5bc20ffe970 100644
--- a/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.qhelp
+++ b/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.qhelp
@@ -5,22 +5,23 @@
-This rule finds return statements that return pointers to an object allocated on the stack.
-The lifetime of a stack allocated memory location only lasts until the function returns, and
-the contents of that memory become undefined after that. Clearly, using a pointer to stack
+
This rule finds return statements that return pointers to an object allocated on the stack.
+The lifetime of a stack allocated memory location only lasts until the function returns, and
+the contents of that memory become undefined after that. Clearly, using a pointer to stack
memory after the function has already returned will have undefined results.
-Use the functions of the malloc family to dynamically allocate memory on the heap for data that is used across function calls.
+Use the functions of the malloc family, or new, to dynamically allocate memory on the heap for data that is used across function calls.
-
-
-
-
-
+
+The following example allocates an object on the stack and returns a pointer to it. This is incorrect because the object is deallocated
+when the function returns, and the pointer becomes invalid.
+
+To fix this, allocate the object on the heap using new and return a pointer to the heap-allocated object.
+
diff --git a/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemoryBad.cpp b/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemoryBad.cpp
new file mode 100644
index 000000000000..196410d840f3
--- /dev/null
+++ b/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemoryBad.cpp
@@ -0,0 +1,5 @@
+Record *mkRecord(int value) {
+ Record myRecord(value);
+
+ return &myRecord; // BAD: returns a pointer to `myRecord`, which is a stack-allocated object.
+}
diff --git a/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemoryGood.cpp b/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemoryGood.cpp
new file mode 100644
index 000000000000..e888a7fbfe2c
--- /dev/null
+++ b/cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemoryGood.cpp
@@ -0,0 +1,5 @@
+Record *mkRecord(int value) {
+ Record *myRecord = new Record(value);
+
+ return myRecord; // GOOD: returns a pointer to a `myRecord`, which is a heap-allocated object.
+}
diff --git a/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousCallToStrncat.ql b/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousCallToStrncat.ql
index 37ad8fd70766..32c486f0c3ab 100644
--- a/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousCallToStrncat.ql
+++ b/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousCallToStrncat.ql
@@ -4,7 +4,7 @@
* @kind problem
* @problem.severity warning
* @security-severity 9.3
- * @precision medium
+ * @precision high
* @id cpp/unsafe-strncat
* @tags reliability
* correctness
diff --git a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.c b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.c
index d2f2b76fddc5..38ecc79ef2d6 100644
--- a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.c
+++ b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.c
@@ -1,5 +1,14 @@
-unsigned limit = get_limit();
-unsigned total = 0;
-while (limit - total > 0) { // wrong: if `total` is greater than `limit` this will underflow and continue executing the loop.
+uint32_t limit = get_limit();
+uint32_t total = 0;
+
+while (limit - total > 0) { // BAD: if `total` is greater than `limit` this will underflow and continue executing the loop.
total += get_data();
-}
\ No newline at end of file
+}
+
+while (total < limit) { // GOOD: never underflows here because there is no arithmetic.
+ total += get_data();
+}
+
+while ((int64_t)limit - total > 0) { // GOOD: never underflows here because the result always fits in an `int64_t`.
+ total += get_data();
+}
diff --git a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql
index 5f7d88e9a716..61ee5d4cad1d 100644
--- a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql
+++ b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql
@@ -17,6 +17,7 @@ import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
import semmle.code.cpp.rangeanalysis.RangeAnalysisUtils
import semmle.code.cpp.controlflow.Guards
import semmle.code.cpp.ir.dataflow.DataFlow
+import semmle.code.cpp.valuenumbering.GlobalValueNumbering
/**
* Holds if `sub` is guarded by a condition which ensures that
@@ -34,45 +35,108 @@ predicate isGuarded(SubExpr sub, Expr left, Expr right) {
}
/**
- * Holds if `n` is known or suspected to be less than or equal to
- * `sub.getLeftOperand()`.
+ * Gets an expression that is less than or equal to `sub.getLeftOperand()`.
+ * These serve as the base cases for `exprIsSubLeftOrLess`.
*/
-predicate exprIsSubLeftOrLess(SubExpr sub, DataFlow::Node n) {
+Expr exprIsLeftOrLessBase(SubExpr sub) {
interestingSubExpr(sub, _) and // Manual magic
- (
- n.asExpr() = sub.getLeftOperand()
+ exists(Expr e | globalValueNumber(e).getAnExpr() = sub.getLeftOperand() |
+ // sub = e - x
+ // result = e
+ // so:
+ // result <= e
+ result = e
+ or
+ // sub = e - x
+ // result = e & y
+ // so:
+ // result = e & y <= e
+ result.(BitwiseAndExpr).getAnOperand() = e
or
- exists(DataFlow::Node other |
- // dataflow
- exprIsSubLeftOrLess(sub, other) and
- (
- DataFlow::localFlowStep(n, other) or
- DataFlow::localFlowStep(other, n)
- )
+ exists(SubExpr s |
+ // sub = e - x
+ // result = s
+ // s = e - y
+ // y >= 0
+ // so:
+ // result = e - y <= e
+ result = s and
+ s.getLeftOperand() = e and
+ lowerBound(s.getRightOperand().getFullyConverted()) >= 0
)
or
- exists(DataFlow::Node other |
- // guard constraining `sub`
- exprIsSubLeftOrLess(sub, other) and
- isGuarded(sub, other.asExpr(), n.asExpr()) // other >= n
+ exists(Expr other |
+ // sub = e - x
+ // result = a
+ // a = e + y
+ // y <= 0
+ // so:
+ // result = e + y <= e + 0 = e
+ result.(AddExpr).hasOperands(e, other) and
+ upperBound(other.getFullyConverted()) <= 0
)
or
- exists(DataFlow::Node other, float p, float q |
- // linear access of `other`
- exprIsSubLeftOrLess(sub, other) and
- linearAccess(n.asExpr(), other.asExpr(), p, q) and // n = p * other + q
- p <= 1 and
- q <= 0
+ exists(DivExpr d |
+ // sub = e - x
+ // result = d
+ // d = e / y
+ // y >= 1
+ // so:
+ // result = e / y <= e / 1 = e
+ result = d and
+ d.getLeftOperand() = e and
+ lowerBound(d.getRightOperand().getFullyConverted()) >= 1
)
or
- exists(DataFlow::Node other, float p, float q |
- // linear access of `n`
- exprIsSubLeftOrLess(sub, other) and
- linearAccess(other.asExpr(), n.asExpr(), p, q) and // other = p * n + q
- p >= 1 and
- q >= 0
+ exists(RShiftExpr rs |
+ // sub = e - x
+ // result = rs
+ // rs = e >> y
+ // so:
+ // result = e >> y <= e
+ result = rs and
+ rs.getLeftOperand() = e
+ )
+ )
+}
+
+/**
+ * Holds if `n` is known or suspected to be less than or equal to
+ * `sub.getLeftOperand()`.
+ */
+predicate exprIsSubLeftOrLess(SubExpr sub, DataFlow::Node n) {
+ n.asExpr() = exprIsLeftOrLessBase(sub)
+ or
+ exists(DataFlow::Node other |
+ // dataflow
+ exprIsSubLeftOrLess(sub, other) and
+ (
+ DataFlow::localFlowStep(n, other) or
+ DataFlow::localFlowStep(other, n)
)
)
+ or
+ exists(DataFlow::Node other |
+ // guard constraining `sub`
+ exprIsSubLeftOrLess(sub, other) and
+ isGuarded(sub, other.asExpr(), n.asExpr()) // other >= n
+ )
+ or
+ exists(DataFlow::Node other, float p, float q |
+ // linear access of `other`
+ exprIsSubLeftOrLess(sub, other) and
+ linearAccess(n.asExpr(), other.asExpr(), p, q) and // n = p * other + q
+ p <= 1 and
+ q <= 0
+ )
+ or
+ exists(DataFlow::Node other, float p, float q |
+ // linear access of `n`
+ exprIsSubLeftOrLess(sub, other) and
+ linearAccess(other.asExpr(), n.asExpr(), p, q) and // other = p * n + q
+ p >= 1 and
+ q >= 0
+ )
}
predicate interestingSubExpr(SubExpr sub, RelationalOperation ro) {
diff --git a/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRaceBad.c b/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRaceBad.c
index 03e8a82a38c6..993364a54d44 100644
--- a/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRaceBad.c
+++ b/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRaceBad.c
@@ -1,15 +1,17 @@
char *file_name;
FILE *f_ptr;
-
+
/* Initialize file_name */
-
+
f_ptr = fopen(file_name, "w");
if (f_ptr == NULL) {
/* Handle error */
}
-
+
/* ... */
-
+
if (chmod(file_name, S_IRUSR) == -1) {
/* Handle error */
-}
\ No newline at end of file
+}
+
+fclose(f_ptr);
diff --git a/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRaceGood.c b/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRaceGood.c
index bf14cffbd4d3..4e5fb19a03fb 100644
--- a/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRaceGood.c
+++ b/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRaceGood.c
@@ -1,8 +1,8 @@
char *file_name;
int fd;
-
+
/* Initialize file_name */
-
+
fd = open(
file_name,
O_WRONLY | O_CREAT | O_EXCL,
@@ -11,9 +11,11 @@ fd = open(
if (fd == -1) {
/* Handle error */
}
-
+
/* ... */
-
+
if (fchmod(fd, S_IRUSR) == -1) {
/* Handle error */
-}
\ No newline at end of file
+}
+
+close(fd);
diff --git a/cpp/ql/src/Security/CWE/CWE-416/IteratorToExpiredContainer.ql b/cpp/ql/src/Security/CWE/CWE-416/IteratorToExpiredContainer.ql
index 139555cfa1d6..11d628c1affa 100644
--- a/cpp/ql/src/Security/CWE/CWE-416/IteratorToExpiredContainer.ql
+++ b/cpp/ql/src/Security/CWE/CWE-416/IteratorToExpiredContainer.ql
@@ -2,7 +2,7 @@
* @name Iterator to expired container
* @description Using an iterator owned by a container whose lifetime has expired may lead to unexpected behavior.
* @kind problem
- * @precision medium
+ * @precision high
* @id cpp/iterator-to-expired-container
* @problem.severity warning
* @security-severity 8.8
diff --git a/cpp/ql/src/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.cpp b/cpp/ql/src/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.cpp
index 055aadcedb65..446cb14befa9 100644
--- a/cpp/ql/src/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.cpp
+++ b/cpp/ql/src/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.cpp
@@ -34,7 +34,7 @@ void good1(std::size_t length) noexcept {
// GOOD: the allocation failure is handled appropriately.
void good2(std::size_t length) noexcept {
- int* dest = new int[length];
+ int* dest = new(std::nothrow) int[length];
if(!dest) {
return;
}
diff --git a/cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.c b/cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.c
index b015770ad80b..f4c544445c06 100644
--- a/cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.c
+++ b/cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.c
@@ -1,11 +1,38 @@
void write_default_config_bad() {
// BAD - this is world-writable so any user can overwrite the config
int out = creat(OUTFILE, 0666);
- dprintf(out, DEFAULT_CONFIG);
+ if (out < 0) {
+ // handle error
+ }
+
+ dprintf(out, "%s", DEFAULT_CONFIG);
+ close(out);
}
void write_default_config_good() {
// GOOD - this allows only the current user to modify the file
int out = creat(OUTFILE, S_IWUSR | S_IRUSR);
- dprintf(out, DEFAULT_CONFIG);
+ if (out < 0) {
+ // handle error
+ }
+
+ dprintf(out, "%s", DEFAULT_CONFIG);
+ close(out);
+}
+
+void write_default_config_good_2() {
+ // GOOD - this allows only the current user to modify the file
+ int out = open(OUTFILE, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR);
+ if (out < 0) {
+ // handle error
+ }
+
+ FILE *fd = fdopen(out, "w");
+ if (fd == NULL) {
+ close(out);
+ // handle error
+ }
+
+ fprintf(fd, "%s", DEFAULT_CONFIG);
+ fclose(fd);
}
diff --git a/cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.qhelp b/cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.qhelp
index 6ee951490414..58a5a55f5092 100644
--- a/cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.qhelp
+++ b/cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.qhelp
@@ -29,10 +29,11 @@ so it is important that they cannot be controlled by an attacker.
-The first example creates the default configuration file with the usual "default" Unix permissions, 0666
. This makes the
+The first example creates the default configuration file with the usual "default" Unix permissions, 0666
. This makes the
file world-writable, so that an attacker could write in their own configuration that would be read by the program. The second example uses
more restrictive permissions: a combination of the standard Unix constants S_IWUSR
and S_IRUSR
which means that
-only the current user will have read and write access to the file.
+only the current user will have read and write access to the file. The third example shows another way to create a file with more restrictive
+permissions if a FILE *
stream pointer is required rather than a file descriptor.
diff --git a/cpp/ql/src/change-notes/released/1.1.0.md b/cpp/ql/src/change-notes/released/1.1.0.md
new file mode 100644
index 000000000000..50e703a5814a
--- /dev/null
+++ b/cpp/ql/src/change-notes/released/1.1.0.md
@@ -0,0 +1,10 @@
+## 1.1.0
+
+### Query Metadata Changes
+
+* The precision of `cpp/iterator-to-expired-container` ("Iterator to expired container") has been increased to `high`. As a result, it will be run by default as part of the Code Scanning suite.
+* The precision of `cpp/unsafe-strncat` ("Potentially unsafe call to strncat") has been increased to `high`. As a result, it will be run by default as part of the Code Scanning suite.
+
+### Minor Analysis Improvements
+
+* The `cpp/unsigned-difference-expression-compared-zero` ("Unsigned difference expression compared to zero") query now produces fewer false positives.
diff --git a/cpp/ql/src/codeql-pack.release.yml b/cpp/ql/src/codeql-pack.release.yml
index 06fa75b96cbc..2ac15439f561 100644
--- a/cpp/ql/src/codeql-pack.release.yml
+++ b/cpp/ql/src/codeql-pack.release.yml
@@ -1,2 +1,2 @@
---
-lastReleaseVersion: 1.0.3
+lastReleaseVersion: 1.1.0
diff --git a/cpp/ql/src/qlpack.yml b/cpp/ql/src/qlpack.yml
index ccdcb00ec6eb..179bbafe4ac8 100644
--- a/cpp/ql/src/qlpack.yml
+++ b/cpp/ql/src/qlpack.yml
@@ -1,5 +1,5 @@
name: codeql/cpp-queries
-version: 1.0.3
+version: 1.1.0
groups:
- cpp
- queries
diff --git a/cpp/ql/test/library-tests/array_sizes/arr2.expected b/cpp/ql/test/library-tests/array_sizes/arr2.expected
index 959f04358288..d48fdf2e5b09 100644
--- a/cpp/ql/test/library-tests/array_sizes/arr2.expected
+++ b/cpp/ql/test/library-tests/array_sizes/arr2.expected
@@ -1,5 +1,11 @@
| file://:0:0:0:0 | char[6] | 6 |
| file://:0:0:0:0 | char[26] | 26 |
+| file://:0:0:0:0 | char[] | |
+| file://:0:0:0:0 | const char[6] | 6 |
+| file://:0:0:0:0 | double[0] | 0 |
+| file://:0:0:0:0 | double[3] | 3 |
+| file://:0:0:0:0 | double[4] | 4 |
+| file://:0:0:0:0 | double[] | |
| file://:0:0:0:0 | int[1] | 1 |
| file://:0:0:0:0 | int[11] | 11 |
| file://:0:0:0:0 | long[] | |
diff --git a/cpp/ql/test/library-tests/array_sizes/implicit_sizes.cpp b/cpp/ql/test/library-tests/array_sizes/implicit_sizes.cpp
new file mode 100644
index 000000000000..e2a6b14669c5
--- /dev/null
+++ b/cpp/ql/test/library-tests/array_sizes/implicit_sizes.cpp
@@ -0,0 +1,10 @@
+// semmle-extractor-options: -std=c++20
+double a1[]{1,2,3};
+double* p1 = new double[]{1,2,3};
+double* p2 = new double[0]{};
+double* p3 = new double[]{};
+char c[]{"Hello"};
+char* d = new char[]{"Hello"};
+double a2[](1,2,3);
+double* p4 = new double[](1,2,3);
+double* p5 = new double[4]{1,2}; // Size mismatch
diff --git a/cpp/ql/test/library-tests/array_sizes/new.expected b/cpp/ql/test/library-tests/array_sizes/new.expected
new file mode 100644
index 000000000000..7275eeb8c1e5
--- /dev/null
+++ b/cpp/ql/test/library-tests/array_sizes/new.expected
@@ -0,0 +1,6 @@
+| implicit_sizes.cpp:3:14:3:32 | new[] | 3 |
+| implicit_sizes.cpp:4:14:4:28 | new[] | 0 |
+| implicit_sizes.cpp:5:14:5:27 | new[] | 0 |
+| implicit_sizes.cpp:7:11:7:29 | new[] | 6 |
+| implicit_sizes.cpp:9:14:9:32 | new[] | 3 |
+| implicit_sizes.cpp:10:14:10:31 | new[] | 4 |
diff --git a/cpp/ql/test/library-tests/array_sizes/new.ql b/cpp/ql/test/library-tests/array_sizes/new.ql
new file mode 100644
index 000000000000..6282687cfce5
--- /dev/null
+++ b/cpp/ql/test/library-tests/array_sizes/new.ql
@@ -0,0 +1,4 @@
+import cpp
+
+from NewArrayExpr nae
+select nae, nae.getArraySize()
diff --git a/cpp/ql/test/library-tests/atomic/variables.expected b/cpp/ql/test/library-tests/atomic/variables.expected
index eb76e9c25ed2..ccd92c70f6de 100644
--- a/cpp/ql/test/library-tests/atomic/variables.expected
+++ b/cpp/ql/test/library-tests/atomic/variables.expected
@@ -1,7 +1,5 @@
| (unnamed parameter 0) | __va_list_tag && | rvalue reference to {struct __va_list_tag} |
-| (unnamed parameter 0) | atomic_box && | rvalue reference to {struct atomic_box} |
| (unnamed parameter 0) | const __va_list_tag & | reference to {const {struct __va_list_tag}} |
-| (unnamed parameter 0) | const atomic_box & | reference to {const {struct atomic_box}} |
| a | _Atomic(int) | atomic {int} |
| b | _Atomic(int) | atomic {int} |
| c | _Atomic(int) * | pointer to {atomic {int}} |
diff --git a/cpp/ql/test/library-tests/builtins/type_traits/clang.cpp b/cpp/ql/test/library-tests/builtins/type_traits/clang.cpp
index 2c25f1881382..167023c1a33c 100644
--- a/cpp/ql/test/library-tests/builtins/type_traits/clang.cpp
+++ b/cpp/ql/test/library-tests/builtins/type_traits/clang.cpp
@@ -1,4 +1,4 @@
-// semmle-extractor-options: --clang --clang_version 100000
+// semmle-extractor-options: --clang --clang_version 180000
struct S {
void f() {}
@@ -93,3 +93,18 @@ struct S2 {
bool bok_is_trivial1 = __is_trivial(int);
bool bok_is_trivial2 = __is_trivial(S2);
+
+bool bok_reference_binds_to_temporary1 = __reference_binds_to_temporary(int&, long&);
+bool bok_reference_binds_to_temporary2 = __reference_binds_to_temporary(int const &, long&);
+
+bool b_is_same_as1 = __is_same_as(int, int);
+bool b_is_same_as2 = __is_same_as(int, float);
+
+bool b_is_bounded_array1 = __is_bounded_array(int[]);
+bool b_is_bounded_array2 = __is_bounded_array(int[42]);
+
+bool b_is_unbounded_array1 = __is_unbounded_array(int[]);
+bool b_is_unbounded_array2 = __is_unbounded_array(int[42]);
+
+bool b_is_referenceable1 = __is_referenceable(int);
+bool b_is_referenceable2 = __is_referenceable(void);
diff --git a/cpp/ql/test/library-tests/builtins/type_traits/expr.expected b/cpp/ql/test/library-tests/builtins/type_traits/expr.expected
index 9cc6ec6ec929..edf63baef9e9 100644
--- a/cpp/ql/test/library-tests/builtins/type_traits/expr.expected
+++ b/cpp/ql/test/library-tests/builtins/type_traits/expr.expected
@@ -125,9 +125,78 @@
| clang.cpp:94:24:94:40 | int | | |
| clang.cpp:95:24:95:39 | S2 | | |
| clang.cpp:95:24:95:39 | __is_trivial | S2 | 0 |
+| clang.cpp:97:42:97:84 | __reference_binds_to_temporary | int &,long & | 0 |
+| clang.cpp:97:42:97:84 | int & | | |
+| clang.cpp:97:42:97:84 | long & | | |
+| clang.cpp:98:42:98:91 | __reference_binds_to_temporary | const int &,long & | 1 |
+| clang.cpp:98:42:98:91 | const int & | | |
+| clang.cpp:98:42:98:91 | long & | | |
+| clang.cpp:100:22:100:43 | __is_same_as | int,int | 1 |
+| clang.cpp:100:22:100:43 | int | | |
+| clang.cpp:100:22:100:43 | int | | |
+| clang.cpp:101:22:101:45 | __is_same_as | int,float | 0 |
+| clang.cpp:101:22:101:45 | float | | |
+| clang.cpp:101:22:101:45 | int | | |
+| clang.cpp:103:28:103:52 | __is_bounded_array | int[] | 0 |
+| clang.cpp:103:28:103:52 | int[] | | |
+| clang.cpp:104:28:104:54 | __is_bounded_array | int[42] | 1 |
+| clang.cpp:104:28:104:54 | int[42] | | |
+| clang.cpp:104:51:104:52 | 42 | | 42 |
+| clang.cpp:104:51:104:52 | (unsigned long)... | | 42 |
+| clang.cpp:106:30:106:56 | __is_unbounded_array | int[] | 1 |
+| clang.cpp:106:30:106:56 | int[] | | |
+| clang.cpp:107:30:107:58 | __is_unbounded_array | int[42] | 0 |
+| clang.cpp:107:30:107:58 | int[42] | | |
+| clang.cpp:107:55:107:56 | 42 | | 42 |
+| clang.cpp:107:55:107:56 | (unsigned long)... | | 42 |
+| clang.cpp:109:28:109:50 | __is_referenceable | int | 1 |
+| clang.cpp:109:28:109:50 | int | | |
+| clang.cpp:110:28:110:51 | __is_referenceable | void | 0 |
+| clang.cpp:110:28:110:51 | void | | |
| file://:0:0:0:0 | 0 | | 0 |
| file://:0:0:0:0 | 1 | | 1 |
| file://:0:0:0:0 | 2 | | 2 |
+| gcc.cpp:3:25:3:25 | 8 | | 8 |
+| gcc.cpp:4:25:4:59 | 0 | | 0 |
+| gcc.cpp:4:25:4:59 | __builtin_has_attribute | v,0 | 1 |
+| gcc.cpp:4:49:4:49 | v | | |
+| gcc.cpp:5:25:5:62 | 0 | | 0 |
+| gcc.cpp:5:25:5:62 | __builtin_has_attribute | v,0 | 0 |
+| gcc.cpp:5:49:5:49 | v | | |
+| gcc.cpp:13:50:13:111 | __builtin_is_pointer_interconvertible_with_class | i | 1 |
+| gcc.cpp:13:99:13:110 | i | | |
+| gcc.cpp:14:50:14:111 | __builtin_is_pointer_interconvertible_with_class | d | 0 |
+| gcc.cpp:14:99:14:110 | d | | |
+| gcc.cpp:16:35:16:95 | __builtin_is_corresponding_member | i,i | 1 |
+| gcc.cpp:16:69:16:80 | i | | |
+| gcc.cpp:16:83:16:94 | i | | |
+| gcc.cpp:17:35:17:95 | __builtin_is_corresponding_member | i,d | 0 |
+| gcc.cpp:17:69:17:80 | i | | |
+| gcc.cpp:17:83:17:94 | d | | |
+| gcc.cpp:19:34:19:67 | __is_nothrow_convertible | int,int | 1 |
+| gcc.cpp:19:34:19:67 | int | | |
+| gcc.cpp:19:34:19:67 | int | | |
+| gcc.cpp:20:34:20:72 | __is_nothrow_convertible | a_struct,int | 0 |
+| gcc.cpp:20:34:20:72 | a_struct | | |
+| gcc.cpp:20:34:20:72 | int | | |
+| gcc.cpp:22:26:22:51 | __is_convertible | int,int | 1 |
+| gcc.cpp:22:26:22:51 | int | | |
+| gcc.cpp:22:26:22:51 | int | | |
+| gcc.cpp:23:26:23:56 | __is_convertible | a_struct,int | 0 |
+| gcc.cpp:23:26:23:56 | a_struct | | |
+| gcc.cpp:23:26:23:56 | int | | |
+| gcc.cpp:25:47:25:95 | __reference_constructs_from_temporary | int &&,int | 1 |
+| gcc.cpp:25:47:25:95 | int | | |
+| gcc.cpp:25:47:25:95 | int && | | |
+| gcc.cpp:26:47:26:97 | __reference_constructs_from_temporary | int &&,int && | 0 |
+| gcc.cpp:26:47:26:97 | int && | | |
+| gcc.cpp:26:47:26:97 | int && | | |
+| gcc.cpp:28:45:28:91 | __reference_converts_from_temporary | int &&,int | 1 |
+| gcc.cpp:28:45:28:91 | int | | |
+| gcc.cpp:28:45:28:91 | int && | | |
+| gcc.cpp:29:45:29:93 | __reference_converts_from_temporary | int &&,int && | 0 |
+| gcc.cpp:29:45:29:93 | int && | | |
+| gcc.cpp:29:45:29:93 | int && | | |
| ms.cpp:38:41:38:45 | 0 | | 0 |
| ms.cpp:88:27:88:45 | __has_assign | empty | 0 |
| ms.cpp:88:27:88:45 | empty | | |
@@ -452,3 +521,38 @@
| ms.cpp:272:51:272:104 | __is_pointer_interconvertible_base_of | empty,abstract | 0 |
| ms.cpp:272:51:272:104 | abstract | | |
| ms.cpp:272:51:272:104 | empty | | |
+| ms.cpp:274:44:274:85 | __is_trivially_copy_assignable | has_assign | 0 |
+| ms.cpp:274:44:274:85 | has_assign | | |
+| ms.cpp:275:44:275:78 | __is_trivially_copy_assignable | int | 1 |
+| ms.cpp:275:44:275:78 | int | | |
+| ms.cpp:277:51:277:107 | __is_assignable_no_precondition_check | a_struct,a_struct | 1 |
+| ms.cpp:277:51:277:107 | a_struct | | |
+| ms.cpp:277:51:277:107 | a_struct | | |
+| ms.cpp:278:51:278:104 | __is_assignable_no_precondition_check | a_struct,empty | 0 |
+| ms.cpp:278:51:278:104 | a_struct | | |
+| ms.cpp:278:51:278:104 | empty | | |
+| ms.cpp:279:51:279:102 | __is_assignable_no_precondition_check | a_struct,int | 0 |
+| ms.cpp:279:51:279:102 | a_struct | | |
+| ms.cpp:279:51:279:102 | int | | |
+| ms.cpp:281:54:281:117 | __is_pointer_interconvertible_with_class | a_struct,i | 1 |
+| ms.cpp:281:54:281:117 | a_struct | | |
+| ms.cpp:281:105:281:116 | i | | |
+| ms.cpp:282:54:282:117 | __is_pointer_interconvertible_with_class | a_struct,d | 0 |
+| ms.cpp:282:54:282:117 | a_struct | | |
+| ms.cpp:282:105:282:116 | d | | |
+| ms.cpp:284:39:284:111 | __is_corresponding_member | a_struct,a_struct,i,i | 1 |
+| ms.cpp:284:39:284:111 | a_struct | | |
+| ms.cpp:284:39:284:111 | a_struct | | |
+| ms.cpp:284:85:284:96 | i | | |
+| ms.cpp:284:99:284:110 | i | | |
+| ms.cpp:285:39:285:111 | __is_corresponding_member | a_struct,a_struct,i,d | 0 |
+| ms.cpp:285:39:285:111 | a_struct | | |
+| ms.cpp:285:39:285:111 | a_struct | | |
+| ms.cpp:285:85:285:96 | i | | |
+| ms.cpp:285:99:285:110 | d | | |
+| ms.cpp:287:34:287:59 | __is_valid_winrt_type | int | 1 |
+| ms.cpp:287:34:287:59 | int | | |
+| ms.cpp:288:27:288:45 | __is_win_class | int | 0 |
+| ms.cpp:288:27:288:45 | int | | |
+| ms.cpp:289:31:289:53 | __is_win_interface | int | 0 |
+| ms.cpp:289:31:289:53 | int | | |
diff --git a/cpp/ql/test/library-tests/builtins/type_traits/gcc.cpp b/cpp/ql/test/library-tests/builtins/type_traits/gcc.cpp
new file mode 100644
index 000000000000..54224343e7e2
--- /dev/null
+++ b/cpp/ql/test/library-tests/builtins/type_traits/gcc.cpp
@@ -0,0 +1,29 @@
+// semmle-extractor-options: --gnu_version 130000
+
+__attribute__ ((aligned(8))) int v;
+bool b_has_attribute1 = __builtin_has_attribute(v, aligned);
+bool b_has_attribute2 = __builtin_has_attribute(v, aligned(4));
+
+
+struct a_struct {
+ int i;
+ double d;
+};
+
+bool b_is_pointer_interconvertible_with_class1 = __builtin_is_pointer_interconvertible_with_class(&a_struct::i);
+bool b_is_pointer_interconvertible_with_class2 = __builtin_is_pointer_interconvertible_with_class(&a_struct::d);
+
+bool b_is_corresponding_member1 = __builtin_is_corresponding_member(&a_struct::i, &a_struct::i);
+bool b_is_corresponding_member2 = __builtin_is_corresponding_member(&a_struct::i, &a_struct::d);
+
+bool b_is_nothrow_convertible1 = __is_nothrow_convertible(int, int);
+bool b_is_nothrow_convertible2 = __is_nothrow_convertible(a_struct, int);
+
+bool b_is_convertible1 = __is_convertible(int, int);
+bool b_is_convertible2 = __is_convertible(a_struct, int);
+
+bool b_reference_constructs_from_temporary1 = __reference_constructs_from_temporary(int&&, int);
+bool b_reference_constructs_from_temporary2 = __reference_constructs_from_temporary(int&&, int&&);
+
+bool b_reference_converts_from_temporary1 = __reference_converts_from_temporary(int&&, int);
+bool b_reference_converts_from_temporary2 = __reference_converts_from_temporary(int&&, int&&);
diff --git a/cpp/ql/test/library-tests/builtins/type_traits/ms.cpp b/cpp/ql/test/library-tests/builtins/type_traits/ms.cpp
index 6083f9dc6bb5..d51248dd3ec8 100644
--- a/cpp/ql/test/library-tests/builtins/type_traits/ms.cpp
+++ b/cpp/ql/test/library-tests/builtins/type_traits/ms.cpp
@@ -270,4 +270,21 @@ void f(void) {
bool b_is_pointer_interconvertible_base_of1 = __is_pointer_interconvertible_base_of(empty, empty);
bool b_is_pointer_interconvertible_base_of2 = __is_pointer_interconvertible_base_of(empty, abstract);
+
+ bool b_is_trivially_copy_assignable1 = __is_trivially_copy_assignable(has_assign);
+ bool b_is_trivially_copy_assignable2 = __is_trivially_copy_assignable(int);
+
+ bool b_is_assignable_no_precondition_check1 = __is_assignable_no_precondition_check(a_struct, a_struct);
+ bool b_is_assignable_no_precondition_check2 = __is_assignable_no_precondition_check(a_struct, empty);
+ bool b_is_assignable_no_precondition_check3 = __is_assignable_no_precondition_check(a_struct, int);
+
+ bool b_is_pointer_interconvertible_with_class1 = __is_pointer_interconvertible_with_class(a_struct, &a_struct::i);
+ bool b_is_pointer_interconvertible_with_class2 = __is_pointer_interconvertible_with_class(a_struct, &a_struct::d);
+
+ bool b_is_corresponding_member1 = __is_corresponding_member(a_struct, a_struct, &a_struct::i, &a_struct::i);
+ bool b_is_corresponding_member2 = __is_corresponding_member(a_struct, a_struct, &a_struct::i, &a_struct::d);
+
+ bool b_is_valid_winrt_type = __is_valid_winrt_type(int);
+ bool b_is_win_class = __is_win_class(int);
+ bool b_is_win_interface = __is_win_interface(int);
}
diff --git a/cpp/ql/test/library-tests/dataflow/calls-as-ssa-variables/test.cpp b/cpp/ql/test/library-tests/dataflow/calls-as-ssa-variables/test.cpp
new file mode 100644
index 000000000000..367650dab469
--- /dev/null
+++ b/cpp/ql/test/library-tests/dataflow/calls-as-ssa-variables/test.cpp
@@ -0,0 +1,29 @@
+namespace std
+{
+ struct ptrdiff_t;
+ struct input_iterator_tag
+ {
+ };
+ struct forward_iterator_tag : public input_iterator_tag
+ {
+ };
+}
+
+struct A
+{
+ using value_type = int;
+ using difference_type = std::ptrdiff_t;
+ using pointer = int*;
+ using reference = int&;
+ using iterator_category = std::forward_iterator_tag;
+};
+
+A get();
+
+void test()
+{
+ while (true)
+ {
+ auto &&x = get();
+ }
+}
diff --git a/cpp/ql/test/library-tests/dataflow/calls-as-ssa-variables/test.expected b/cpp/ql/test/library-tests/dataflow/calls-as-ssa-variables/test.expected
new file mode 100644
index 000000000000..e217064d1dfc
--- /dev/null
+++ b/cpp/ql/test/library-tests/dataflow/calls-as-ssa-variables/test.expected
@@ -0,0 +1,4 @@
+edges
+nodes
+subpaths
+#select
diff --git a/cpp/ql/test/library-tests/dataflow/calls-as-ssa-variables/test.ql b/cpp/ql/test/library-tests/dataflow/calls-as-ssa-variables/test.ql
new file mode 100644
index 000000000000..f2f9744f7d9e
--- /dev/null
+++ b/cpp/ql/test/library-tests/dataflow/calls-as-ssa-variables/test.ql
@@ -0,0 +1,23 @@
+/**
+ * @kind path-problem
+ */
+
+import semmle.code.cpp.ir.IR
+import semmle.code.cpp.dataflow.new.DataFlow
+import Flow::PathGraph
+
+module Config implements DataFlow::ConfigSig {
+ predicate isSource(DataFlow::Node source) {
+ source.asInstruction().(VariableAddressInstruction).getIRVariable() instanceof IRTempVariable
+ }
+
+ predicate isSink(DataFlow::Node sink) {
+ sink.asInstruction().(CallInstruction).getStaticCallTarget().hasName("get")
+ }
+}
+
+module Flow = DataFlow::Global;
+
+from Flow::PathNode source, Flow::PathNode sink
+where Flow::flowPath(source, sink)
+select sink.getNode(), source, sink, ""
diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected
index 8ec8033d086e..4343816afaa8 100644
--- a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected
+++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected
@@ -1,2 +1,46 @@
testFailures
failures
+edges
+| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:10 |
+| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:2 |
+| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | *recv_buffer | provenance | Src:MaD:2 Sink:MaD:6 |
+| asio_streams.cpp:97:37:97:44 | call to source | asio_streams.cpp:98:7:98:14 | send_str | provenance | TaintFunction |
+| asio_streams.cpp:97:37:97:44 | call to source | asio_streams.cpp:100:64:100:71 | *send_str | provenance | TaintFunction |
+| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | |
+| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:101:7:101:17 | send_buffer | provenance | |
+| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:103:29:103:39 | *send_buffer | provenance | Sink:MaD:6 |
+| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | provenance | |
+| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:10 |
+| test.cpp:4:5:4:11 | [summary param] 0 in ymlStep | test.cpp:4:5:4:11 | [summary] to write: ReturnValue in ymlStep | provenance | MaD:2 |
+| test.cpp:7:10:7:18 | call to ymlSource | test.cpp:7:10:7:18 | call to ymlSource | provenance | Src:MaD:0 |
+| test.cpp:7:10:7:18 | call to ymlSource | test.cpp:11:10:11:10 | x | provenance | Sink:MaD:1 |
+| test.cpp:7:10:7:18 | call to ymlSource | test.cpp:13:18:13:18 | x | provenance | |
+| test.cpp:13:10:13:16 | call to ymlStep | test.cpp:13:10:13:16 | call to ymlStep | provenance | |
+| test.cpp:13:10:13:16 | call to ymlStep | test.cpp:15:10:15:10 | y | provenance | Sink:MaD:1 |
+| test.cpp:13:18:13:18 | x | test.cpp:4:5:4:11 | [summary param] 0 in ymlStep | provenance | |
+| test.cpp:13:18:13:18 | x | test.cpp:13:10:13:16 | call to ymlStep | provenance | MaD:2 |
+nodes
+| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | semmle.label | [summary param] *0 in buffer |
+| asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | semmle.label | [summary] to write: ReturnValue in buffer |
+| asio_streams.cpp:87:34:87:44 | read_until output argument | semmle.label | read_until output argument |
+| asio_streams.cpp:91:7:91:17 | recv_buffer | semmle.label | recv_buffer |
+| asio_streams.cpp:93:29:93:39 | *recv_buffer | semmle.label | *recv_buffer |
+| asio_streams.cpp:97:37:97:44 | call to source | semmle.label | call to source |
+| asio_streams.cpp:98:7:98:14 | send_str | semmle.label | send_str |
+| asio_streams.cpp:100:44:100:62 | call to buffer | semmle.label | call to buffer |
+| asio_streams.cpp:100:44:100:62 | call to buffer | semmle.label | call to buffer |
+| asio_streams.cpp:100:64:100:71 | *send_str | semmle.label | *send_str |
+| asio_streams.cpp:101:7:101:17 | send_buffer | semmle.label | send_buffer |
+| asio_streams.cpp:103:29:103:39 | *send_buffer | semmle.label | *send_buffer |
+| test.cpp:4:5:4:11 | [summary param] 0 in ymlStep | semmle.label | [summary param] 0 in ymlStep |
+| test.cpp:4:5:4:11 | [summary] to write: ReturnValue in ymlStep | semmle.label | [summary] to write: ReturnValue in ymlStep |
+| test.cpp:7:10:7:18 | call to ymlSource | semmle.label | call to ymlSource |
+| test.cpp:7:10:7:18 | call to ymlSource | semmle.label | call to ymlSource |
+| test.cpp:11:10:11:10 | x | semmle.label | x |
+| test.cpp:13:10:13:16 | call to ymlStep | semmle.label | call to ymlStep |
+| test.cpp:13:10:13:16 | call to ymlStep | semmle.label | call to ymlStep |
+| test.cpp:13:18:13:18 | x | semmle.label | x |
+| test.cpp:15:10:15:10 | y | semmle.label | y |
+subpaths
+| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | asio_streams.cpp:100:44:100:62 | call to buffer |
+| test.cpp:13:18:13:18 | x | test.cpp:4:5:4:11 | [summary param] 0 in ymlStep | test.cpp:4:5:4:11 | [summary] to write: ReturnValue in ymlStep | test.cpp:13:10:13:16 | call to ymlStep |
diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.ql b/cpp/ql/test/library-tests/dataflow/external-models/flow.ql
index d6c2a70c4d9f..8ca0df3fa561 100644
--- a/cpp/ql/test/library-tests/dataflow/external-models/flow.ql
+++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.ql
@@ -1,6 +1,7 @@
import TestUtilities.dataflow.FlowTestCommon
import cpp
import semmle.code.cpp.security.FlowSources
+import IRTest::IRFlow::PathGraph
module IRTest {
private import semmle.code.cpp.ir.IR
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 06941d388e27..1e8087c7ec96 100644
--- a/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected
+++ b/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected
@@ -301,27 +301,6 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future
| file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | (unnamed parameter 0) | |
| file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | (unnamed parameter 0) | |
| file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | file://:0:0:0:0 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | stl.h:75:8:75:8 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | stl.h:75:8:75:8 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | stl.h:389:9:389:9 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | stl.h:389:9:389:9 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | stl.h:389:9:389:9 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | stl.h:389:9:389:9 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | stl.h:389:9:389:9 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | stl.h:389:9:389:9 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | stl.h:389:9:389:9 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | stl.h:389:9:389:9 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | stl.h:389:9:389:9 | (unnamed parameter 0) | |
-| file://:0:0:0:0 | (unnamed parameter 0) | stl.h:389:9:389:9 | (unnamed parameter 0) | |
| file://:0:0:0:0 | (unnamed parameter 0) | structlikeclass.cpp:5:7:5:7 | (unnamed parameter 0) | |
| file://:0:0:0:0 | (unnamed parameter 0) | structlikeclass.cpp:5:7:5:7 | (unnamed parameter 0) | |
| file://:0:0:0:0 | (unnamed parameter 0) | taint.cpp:228:11:228:11 | (unnamed parameter 0) | |
@@ -3599,12 +3578,6 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future
| standalone_iterators.cpp:128:2:128:3 | it | standalone_iterators.cpp:128:5:128:5 | call to operator+= | TAINT |
| standalone_iterators.cpp:128:2:128:3 | ref arg it | standalone_iterators.cpp:129:7:129:8 | it | |
| standalone_iterators.cpp:128:8:128:13 | call to source | standalone_iterators.cpp:128:2:128:3 | ref arg it | TAINT |
-| stl.h:75:8:75:8 | container | stl.h:75:8:75:8 | constructor init of field container | TAINT |
-| stl.h:75:8:75:8 | container | stl.h:75:8:75:8 | constructor init of field container | TAINT |
-| stl.h:75:8:75:8 | container | stl.h:75:8:75:8 | container | |
-| stl.h:75:8:75:8 | container | stl.h:75:8:75:8 | container | |
-| stl.h:75:8:75:8 | this | stl.h:75:8:75:8 | constructor init of field container [pre-this] | |
-| stl.h:75:8:75:8 | this | stl.h:75:8:75:8 | constructor init of field container [pre-this] | |
| stl.h:95:69:95:69 | x | stl.h:95:69:95:69 | x | |
| stl.h:95:69:95:69 | x | stl.h:95:69:95:69 | x | |
| stl.h:95:69:95:69 | x | stl.h:95:69:95:69 | x | |
@@ -3620,41 +3593,6 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future
| stl.h:292:30:292:40 | call to allocator | stl.h:292:21:292:41 | noexcept(...) | TAINT |
| stl.h:292:30:292:40 | call to allocator | stl.h:292:21:292:41 | noexcept(...) | TAINT |
| stl.h:292:53:292:63 | 0 | stl.h:292:46:292:64 | (no string representation) | TAINT |
-| stl.h:389:9:389:9 | constructor init of field first [post-this] | stl.h:389:9:389:9 | constructor init of field second [pre-this] | |
-| stl.h:389:9:389:9 | constructor init of field first [post-this] | stl.h:389:9:389:9 | constructor init of field second [pre-this] | |
-| stl.h:389:9:389:9 | constructor init of field first [post-this] | stl.h:389:9:389:9 | constructor init of field second [pre-this] | |
-| stl.h:389:9:389:9 | constructor init of field first [post-this] | stl.h:389:9:389:9 | constructor init of field second [pre-this] | |
-| stl.h:389:9:389:9 | constructor init of field first [post-this] | stl.h:389:9:389:9 | constructor init of field second [pre-this] | |
-| stl.h:389:9:389:9 | constructor init of field first [pre-this] | stl.h:389:9:389:9 | constructor init of field second [pre-this] | |
-| stl.h:389:9:389:9 | constructor init of field first [pre-this] | stl.h:389:9:389:9 | constructor init of field second [pre-this] | |
-| stl.h:389:9:389:9 | constructor init of field first [pre-this] | stl.h:389:9:389:9 | constructor init of field second [pre-this] | |
-| stl.h:389:9:389:9 | constructor init of field first [pre-this] | stl.h:389:9:389:9 | constructor init of field second [pre-this] | |
-| stl.h:389:9:389:9 | constructor init of field first [pre-this] | stl.h:389:9:389:9 | constructor init of field second [pre-this] | |
-| stl.h:389:9:389:9 | first | stl.h:389:9:389:9 | constructor init of field first | TAINT |
-| stl.h:389:9:389:9 | first | stl.h:389:9:389:9 | constructor init of field first | TAINT |
-| stl.h:389:9:389:9 | first | stl.h:389:9:389:9 | constructor init of field first | TAINT |
-| stl.h:389:9:389:9 | first | stl.h:389:9:389:9 | constructor init of field first | TAINT |
-| stl.h:389:9:389:9 | first | stl.h:389:9:389:9 | constructor init of field first | TAINT |
-| stl.h:389:9:389:9 | first | stl.h:389:9:389:9 | first | |
-| stl.h:389:9:389:9 | first | stl.h:389:9:389:9 | first | |
-| stl.h:389:9:389:9 | first | stl.h:389:9:389:9 | first | |
-| stl.h:389:9:389:9 | first | stl.h:389:9:389:9 | first | |
-| stl.h:389:9:389:9 | first | stl.h:389:9:389:9 | first | |
-| stl.h:389:9:389:9 | second | stl.h:389:9:389:9 | constructor init of field second | TAINT |
-| stl.h:389:9:389:9 | second | stl.h:389:9:389:9 | constructor init of field second | TAINT |
-| stl.h:389:9:389:9 | second | stl.h:389:9:389:9 | constructor init of field second | TAINT |
-| stl.h:389:9:389:9 | second | stl.h:389:9:389:9 | constructor init of field second | TAINT |
-| stl.h:389:9:389:9 | second | stl.h:389:9:389:9 | constructor init of field second | TAINT |
-| stl.h:389:9:389:9 | second | stl.h:389:9:389:9 | second | |
-| stl.h:389:9:389:9 | second | stl.h:389:9:389:9 | second | |
-| stl.h:389:9:389:9 | second | stl.h:389:9:389:9 | second | |
-| stl.h:389:9:389:9 | second | stl.h:389:9:389:9 | second | |
-| stl.h:389:9:389:9 | second | stl.h:389:9:389:9 | second | |
-| stl.h:389:9:389:9 | this | stl.h:389:9:389:9 | constructor init of field first [pre-this] | |
-| stl.h:389:9:389:9 | this | stl.h:389:9:389:9 | constructor init of field first [pre-this] | |
-| stl.h:389:9:389:9 | this | stl.h:389:9:389:9 | constructor init of field first [pre-this] | |
-| stl.h:389:9:389:9 | this | stl.h:389:9:389:9 | constructor init of field first [pre-this] | |
-| stl.h:389:9:389:9 | this | stl.h:389:9:389:9 | constructor init of field first [pre-this] | |
| stl.h:396:3:396:3 | this | stl.h:396:36:396:43 | constructor init of field first [pre-this] | |
| stl.h:396:3:396:3 | this | stl.h:396:36:396:43 | constructor init of field first [pre-this] | |
| stl.h:396:3:396:3 | this | stl.h:396:36:396:43 | constructor init of field first [pre-this] | |
@@ -4361,6 +4299,8 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future
| string.cpp:446:17:446:17 | a | string.cpp:446:19:446:23 | call to begin | TAINT |
| string.cpp:446:17:446:17 | ref arg a | string.cpp:446:8:446:8 | a | |
| string.cpp:446:17:446:17 | ref arg a | string.cpp:447:8:447:8 | a | |
+| string.cpp:446:17:446:25 | call to iterator | string.cpp:446:8:446:8 | ref arg a | TAINT |
+| string.cpp:446:17:446:25 | call to iterator | string.cpp:446:10:446:15 | call to insert | TAINT |
| string.cpp:446:19:446:23 | call to begin | string.cpp:446:17:446:25 | call to iterator | TAINT |
| string.cpp:446:32:446:34 | 120 | string.cpp:446:8:446:8 | ref arg a | TAINT |
| string.cpp:446:32:446:34 | 120 | string.cpp:446:10:446:15 | call to insert | TAINT |
@@ -4369,6 +4309,8 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future
| string.cpp:449:17:449:17 | b | string.cpp:449:19:449:23 | call to begin | TAINT |
| string.cpp:449:17:449:17 | ref arg b | string.cpp:449:8:449:8 | b | |
| string.cpp:449:17:449:17 | ref arg b | string.cpp:450:8:450:8 | b | |
+| string.cpp:449:17:449:25 | call to iterator | string.cpp:449:8:449:8 | ref arg b | TAINT |
+| string.cpp:449:17:449:25 | call to iterator | string.cpp:449:10:449:15 | call to insert | TAINT |
| string.cpp:449:19:449:23 | call to begin | string.cpp:449:17:449:25 | call to iterator | TAINT |
| string.cpp:449:32:449:46 | call to source | string.cpp:449:8:449:8 | ref arg b | TAINT |
| string.cpp:449:32:449:46 | call to source | string.cpp:449:10:449:15 | call to insert | TAINT |
@@ -4396,6 +4338,8 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future
| string.cpp:459:17:459:17 | c | string.cpp:459:19:459:21 | call to end | TAINT |
| string.cpp:459:17:459:17 | ref arg c | string.cpp:459:8:459:8 | c | |
| string.cpp:459:17:459:17 | ref arg c | string.cpp:460:8:460:8 | c | |
+| string.cpp:459:17:459:23 | call to iterator | string.cpp:459:8:459:8 | ref arg c | TAINT |
+| string.cpp:459:17:459:23 | call to iterator | string.cpp:459:10:459:15 | call to insert | TAINT |
| string.cpp:459:19:459:21 | call to end | string.cpp:459:17:459:23 | call to iterator | TAINT |
| string.cpp:459:26:459:27 | ref arg s1 | string.cpp:459:38:459:39 | s1 | |
| string.cpp:459:26:459:27 | ref arg s1 | string.cpp:465:28:465:29 | s1 | |
@@ -4413,6 +4357,8 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future
| string.cpp:462:17:462:17 | d | string.cpp:462:19:462:21 | call to end | TAINT |
| string.cpp:462:17:462:17 | ref arg d | string.cpp:462:8:462:8 | d | |
| string.cpp:462:17:462:17 | ref arg d | string.cpp:463:8:463:8 | d | |
+| string.cpp:462:17:462:23 | call to iterator | string.cpp:462:8:462:8 | ref arg d | TAINT |
+| string.cpp:462:17:462:23 | call to iterator | string.cpp:462:10:462:15 | call to insert | TAINT |
| string.cpp:462:19:462:21 | call to end | string.cpp:462:17:462:23 | call to iterator | TAINT |
| string.cpp:462:26:462:27 | ref arg s2 | string.cpp:462:38:462:39 | s2 | |
| string.cpp:462:26:462:27 | ref arg s2 | string.cpp:465:8:465:9 | s2 | |
@@ -4432,6 +4378,8 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future
| string.cpp:465:18:465:19 | ref arg s2 | string.cpp:465:8:465:9 | s2 | |
| string.cpp:465:18:465:19 | ref arg s2 | string.cpp:466:8:466:9 | s2 | |
| string.cpp:465:18:465:19 | s2 | string.cpp:465:21:465:23 | call to end | TAINT |
+| string.cpp:465:18:465:25 | call to iterator | string.cpp:465:8:465:9 | ref arg s2 | TAINT |
+| string.cpp:465:18:465:25 | call to iterator | string.cpp:465:11:465:16 | call to insert | TAINT |
| string.cpp:465:21:465:23 | call to end | string.cpp:465:18:465:25 | call to iterator | TAINT |
| string.cpp:465:28:465:29 | ref arg s1 | string.cpp:465:40:465:41 | s1 | |
| string.cpp:465:28:465:29 | s1 | string.cpp:465:31:465:35 | call to begin | TAINT |
diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected b/cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected
index e00434dd75fb..976b83beaa8a 100644
--- a/cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected
+++ b/cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected
@@ -377,7 +377,6 @@ getParameterTypeName
| stl.h:88:25:88:33 | operator= | 0 | value_type && |
| stl.h:91:24:91:33 | operator++ | 0 | int |
| stl.h:91:24:91:33 | operator++ | 0 | int |
-| stl.h:139:8:139:8 | basic_string | 0 | basic_string & |
| stl.h:148:3:148:14 | basic_string | 0 | const class:2 & |
| stl.h:149:33:149:44 | basic_string | 0 | const class:0 * |
| stl.h:149:33:149:44 | basic_string | 1 | const class:2 & |
diff --git a/cpp/ql/test/library-tests/declaration/IsMember.expected b/cpp/ql/test/library-tests/declaration/IsMember.expected
index 80fcd74689ce..69c6d20e9629 100644
--- a/cpp/ql/test/library-tests/declaration/IsMember.expected
+++ b/cpp/ql/test/library-tests/declaration/IsMember.expected
@@ -17,10 +17,6 @@
| declaration.cpp:51:7:51:7 | operator= |
| declaration.cpp:52:7:52:14 | myField0 |
| declaration.cpp:53:9:53:17 | myPointer |
-| declaration.cpp:62:7:62:7 | operator= |
-| declaration.cpp:62:7:62:7 | operator= |
-| declaration.cpp:62:7:62:7 | operator= |
-| declaration.cpp:62:7:62:7 | operator= |
| declaration.cpp:65:5:65:20 | myMemberVariable |
| declaration.cpp:65:5:65:20 | myMemberVariable |
| declaration.cpp:65:5:65:20 | myMemberVariable |
@@ -36,10 +32,6 @@
| declaration.cpp:105:9:105:21 | myNestedField |
| declaration.cpp:108:3:108:10 | MyClass1 |
| declaration.cpp:110:7:110:17 | getMyField1 |
-| declaration.cpp:119:7:119:7 | operator= |
-| declaration.cpp:119:7:119:7 | operator= |
-| declaration.cpp:119:7:119:7 | operator= |
-| declaration.cpp:119:7:119:7 | operator= |
| declaration.cpp:122:5:122:20 | myMemberVariable |
| declaration.cpp:122:5:122:20 | myMemberVariable |
| declaration.cpp:122:5:122:20 | myMemberVariable |
diff --git a/cpp/ql/test/library-tests/declarationEntry/declarationEntry/declarationEntry.expected b/cpp/ql/test/library-tests/declarationEntry/declarationEntry/declarationEntry.expected
index 19c55430e1cc..ab6134ac4d00 100644
--- a/cpp/ql/test/library-tests/declarationEntry/declarationEntry/declarationEntry.expected
+++ b/cpp/ql/test/library-tests/declarationEntry/declarationEntry/declarationEntry.expected
@@ -15,10 +15,6 @@
| declarationEntry.cpp:20:6:20:11 | myEnum | declarationEntry.cpp:18:6:18:11 | declaration of myEnum | 1 | 1 |
| declarationEntry.cpp:20:6:20:11 | myEnum | declarationEntry.cpp:20:6:20:11 | definition of myEnum | 1 | 1 |
| declarationEntry.cpp:27:20:27:20 | T | declarationEntry.cpp:27:20:27:20 | definition of T | 1 | 1 |
-| declarationEntry.cpp:28:7:28:7 | operator= | declarationEntry.cpp:28:7:28:7 | declaration of operator= | 1 | 1 |
-| declarationEntry.cpp:28:7:28:7 | operator= | declarationEntry.cpp:28:7:28:7 | declaration of operator= | 1 | 1 |
-| declarationEntry.cpp:28:7:28:7 | operator= | declarationEntry.cpp:28:7:28:7 | declaration of operator= | 1 | 1 |
-| declarationEntry.cpp:28:7:28:7 | operator= | declarationEntry.cpp:28:7:28:7 | declaration of operator= | 1 | 1 |
| declarationEntry.cpp:28:7:28:21 | myTemplateClass | declarationEntry.cpp:28:7:28:21 | definition of myTemplateClass | 1 | 1 |
| declarationEntry.cpp:28:7:28:21 | myTemplateClass | declarationEntry.cpp:28:7:28:21 | definition of myTemplateClass | 1 | 0 |
| declarationEntry.cpp:28:7:28:21 | myTemplateClass | declarationEntry.cpp:28:7:28:21 | definition of myTemplateClass | 1 | 0 |
diff --git a/cpp/ql/test/library-tests/declarationEntry/declarationEntry/fde.expected b/cpp/ql/test/library-tests/declarationEntry/declarationEntry/fde.expected
index 71c81c7ac826..88050e8c71d0 100644
--- a/cpp/ql/test/library-tests/declarationEntry/declarationEntry/fde.expected
+++ b/cpp/ql/test/library-tests/declarationEntry/declarationEntry/fde.expected
@@ -6,10 +6,6 @@
| declarationEntry.c:17:6:17:21 | declaration of myFourthFunction | | 1 | c_linkage |
| declarationEntry.cpp:9:6:9:15 | declaration of myFunction | | 0 | |
| declarationEntry.cpp:11:6:11:15 | definition of myFunction | | 0 | |
-| declarationEntry.cpp:28:7:28:7 | declaration of operator= | | 0 | |
-| declarationEntry.cpp:28:7:28:7 | declaration of operator= | | 0 | |
-| declarationEntry.cpp:28:7:28:7 | declaration of operator= | | 0 | |
-| declarationEntry.cpp:28:7:28:7 | declaration of operator= | | 0 | |
| declarationEntry.cpp:39:7:39:7 | declaration of operator= | | 0 | |
| declarationEntry.cpp:39:7:39:7 | declaration of operator= | | 0 | |
| macro.c:2:1:2:3 | declaration of foo | | 2 | c_linkage, static |
diff --git a/cpp/ql/test/library-tests/declarationEntry/declarationEntry/roundTrip.expected b/cpp/ql/test/library-tests/declarationEntry/declarationEntry/roundTrip.expected
index e0ea52ab0270..2f9ea170973e 100644
--- a/cpp/ql/test/library-tests/declarationEntry/declarationEntry/roundTrip.expected
+++ b/cpp/ql/test/library-tests/declarationEntry/declarationEntry/roundTrip.expected
@@ -15,10 +15,6 @@
| declarationEntry.cpp:18:6:18:11 | declaration of myEnum | declarationEntry.cpp:20:6:20:11 | myEnum | yes |
| declarationEntry.cpp:20:6:20:11 | definition of myEnum | declarationEntry.cpp:20:6:20:11 | myEnum | yes |
| declarationEntry.cpp:27:20:27:20 | definition of T | declarationEntry.cpp:27:20:27:20 | T | yes |
-| declarationEntry.cpp:28:7:28:7 | declaration of operator= | declarationEntry.cpp:28:7:28:7 | operator= | yes |
-| declarationEntry.cpp:28:7:28:7 | declaration of operator= | declarationEntry.cpp:28:7:28:7 | operator= | yes |
-| declarationEntry.cpp:28:7:28:7 | declaration of operator= | declarationEntry.cpp:28:7:28:7 | operator= | yes |
-| declarationEntry.cpp:28:7:28:7 | declaration of operator= | declarationEntry.cpp:28:7:28:7 | operator= | yes |
| declarationEntry.cpp:28:7:28:21 | definition of myTemplateClass | declarationEntry.cpp:28:7:28:21 | myTemplateClass | yes |
| declarationEntry.cpp:31:4:31:19 | definition of myMemberVariable | declarationEntry.cpp:31:4:31:19 | myMemberVariable | yes |
| declarationEntry.cpp:31:4:31:19 | definition of myMemberVariable | declarationEntry.cpp:31:4:31:19 | myMemberVariable | yes |
@@ -31,10 +27,6 @@
| declarationEntry.cpp:42:6:42:21 | definition of myMemberVariable | declarationEntry.cpp:42:6:42:21 | myMemberVariable | yes |
| file://:0:0:0:0 | declaration of 1st parameter | file://:0:0:0:0 | (unnamed parameter 0) | yes |
| file://:0:0:0:0 | declaration of 1st parameter | file://:0:0:0:0 | (unnamed parameter 0) | yes |
-| file://:0:0:0:0 | declaration of 1st parameter | file://:0:0:0:0 | (unnamed parameter 0) | yes |
-| file://:0:0:0:0 | declaration of 1st parameter | file://:0:0:0:0 | (unnamed parameter 0) | yes |
-| file://:0:0:0:0 | declaration of 1st parameter | file://:0:0:0:0 | (unnamed parameter 0) | yes |
-| file://:0:0:0:0 | declaration of 1st parameter | file://:0:0:0:0 | (unnamed parameter 0) | yes |
| file://:0:0:0:0 | definition of fp_offset | file://:0:0:0:0 | fp_offset | yes |
| file://:0:0:0:0 | definition of gp_offset | file://:0:0:0:0 | gp_offset | yes |
| file://:0:0:0:0 | definition of overflow_arg_area | file://:0:0:0:0 | overflow_arg_area | yes |
diff --git a/cpp/ql/test/library-tests/declarationEntry/more/declarationEntry.expected b/cpp/ql/test/library-tests/declarationEntry/more/declarationEntry.expected
index 47b7f0559438..b4817f60ad14 100644
--- a/cpp/ql/test/library-tests/declarationEntry/more/declarationEntry.expected
+++ b/cpp/ql/test/library-tests/declarationEntry/more/declarationEntry.expected
@@ -2,10 +2,6 @@
| file://:0:0:0:0 | declaration of 1st parameter |
| file://:0:0:0:0 | declaration of 1st parameter |
| file://:0:0:0:0 | declaration of 1st parameter |
-| file://:0:0:0:0 | declaration of 1st parameter |
-| file://:0:0:0:0 | declaration of 1st parameter |
-| file://:0:0:0:0 | declaration of 1st parameter |
-| file://:0:0:0:0 | declaration of 1st parameter |
| file://:0:0:0:0 | definition of fp_offset |
| file://:0:0:0:0 | definition of gp_offset |
| file://:0:0:0:0 | definition of overflow_arg_area |
@@ -72,12 +68,6 @@
| test.cpp:64:19:64:19 | definition of T |
| test.cpp:65:7:65:27 | declaration of tmplInstantiatedClass |
| test.cpp:66:19:66:19 | definition of T |
-| test.cpp:67:7:67:7 | declaration of operator= |
-| test.cpp:67:7:67:7 | declaration of operator= |
-| test.cpp:67:7:67:7 | declaration of operator= |
-| test.cpp:67:7:67:7 | declaration of operator= |
-| test.cpp:67:7:67:7 | definition of tmplInstantiatedClass |
-| test.cpp:67:7:67:7 | definition of tmplInstantiatedClass |
| test.cpp:67:7:67:27 | definition of tmplInstantiatedClass |
| test.cpp:68:7:68:7 | definition of t |
| test.cpp:68:7:68:7 | definition of t |
diff --git a/cpp/ql/test/library-tests/depends_initializers/VariableInitializers.expected b/cpp/ql/test/library-tests/depends_initializers/VariableInitializers.expected
index dbe414484053..c4b5b52d062f 100644
--- a/cpp/ql/test/library-tests/depends_initializers/VariableInitializers.expected
+++ b/cpp/ql/test/library-tests/depends_initializers/VariableInitializers.expected
@@ -6,8 +6,6 @@
| file://:0:0:0:0 | (unnamed parameter 0) | 0 | 0 |
| file://:0:0:0:0 | (unnamed parameter 0) | 0 | 0 |
| file://:0:0:0:0 | (unnamed parameter 0) | 0 | 0 |
-| file://:0:0:0:0 | (unnamed parameter 0) | 0 | 0 |
-| file://:0:0:0:0 | (unnamed parameter 0) | 0 | 0 |
| file://:0:0:0:0 | fp_offset | 0 | 0 |
| file://:0:0:0:0 | gp_offset | 0 | 0 |
| file://:0:0:0:0 | overflow_arg_area | 0 | 0 |
diff --git a/cpp/ql/test/library-tests/functions/functions/Functions1.expected b/cpp/ql/test/library-tests/functions/functions/Functions1.expected
index 94756685634c..eeda8cfc8225 100644
--- a/cpp/ql/test/library-tests/functions/functions/Functions1.expected
+++ b/cpp/ql/test/library-tests/functions/functions/Functions1.expected
@@ -1,11 +1,6 @@
-| ODASA-5186.cpp:4:8:4:8 | MyClass | MyClass | | declaration:ODASA-5186.cpp:4:8:4:8, definition:ODASA-5186.cpp:4:8:4:8 |
-| ODASA-5186.cpp:4:8:4:8 | operator= | operator= | MyClass && (unnamed parameter 0) | declaration:ODASA-5186.cpp:4:8:4:8 |
-| ODASA-5186.cpp:4:8:4:8 | operator= | operator= | const MyClass & (unnamed parameter 0) | declaration:ODASA-5186.cpp:4:8:4:8 |
| ODASA-5186.cpp:5:8:5:8 | operator== | operator== | const MyClass & other | declaration:ODASA-5186.cpp:5:8:5:8, definition:ODASA-5186.cpp:5:8:5:8 |
| ODASA-5186.cpp:5:8:5:17 | operator== | operator== | const MyClass & other | declaration:ODASA-5186.cpp:5:8:5:17, definition:ODASA-5186.cpp:5:8:5:17 |
| ODASA-5186.cpp:8:6:8:9 | test | test | | TopLevelFunction, declaration:ODASA-5186.cpp:8:6:8:9, definition:ODASA-5186.cpp:8:6:8:9, isTopLevel |
-| ODASA-5186.hpp:2:8:2:8 | operator= | operator= | NEQ_helper> && (unnamed parameter 0) | declaration:ODASA-5186.hpp:2:8:2:8 |
-| ODASA-5186.hpp:2:8:2:8 | operator= | operator= | const NEQ_helper> & (unnamed parameter 0) | declaration:ODASA-5186.hpp:2:8:2:8 |
| ODASA-5186.hpp:4:18:4:27 | operator!= | operator!= | const MyClass & x, const MyClass & y | TopLevelFunction, declaration:ODASA-5186.hpp:4:18:4:27, definition:ODASA-5186.hpp:4:18:4:27, isTopLevel |
| ODASA-5186.hpp:4:18:4:27 | operator!= | operator!= | const T & x, const T & y | TopLevelFunction, declaration:ODASA-5186.hpp:4:18:4:27, definition:ODASA-5186.hpp:4:18:4:27, isTopLevel |
| functions.cpp:1:6:1:6 | f | f | int a, int b | TopLevelFunction, declaration:functions.cpp:1:6:1:6, definition:functions.cpp:1:6:1:6, isTopLevel |
diff --git a/cpp/ql/test/library-tests/functions/functions/Functions2.expected b/cpp/ql/test/library-tests/functions/functions/Functions2.expected
index 4040d024ebb5..956932385f76 100644
--- a/cpp/ql/test/library-tests/functions/functions/Functions2.expected
+++ b/cpp/ql/test/library-tests/functions/functions/Functions2.expected
@@ -1,10 +1,5 @@
| ODASA-5186.cpp:4:8:4:14 | MyClass | Class | ODASA-5186.cpp:5:8:5:17 | operator== | |
-| ODASA-5186.cpp:4:8:4:14 | MyClass | Struct | ODASA-5186.cpp:4:8:4:8 | MyClass | Constructor, NoArgConstructor, getAConstructor() |
-| ODASA-5186.cpp:4:8:4:14 | MyClass | Struct | ODASA-5186.cpp:4:8:4:8 | operator= | |
-| ODASA-5186.cpp:4:8:4:14 | MyClass | Struct | ODASA-5186.cpp:4:8:4:8 | operator= | |
| ODASA-5186.cpp:4:8:4:14 | MyClass | Struct | ODASA-5186.cpp:5:8:5:8 | operator== | |
-| ODASA-5186.hpp:2:8:2:17 | NEQ_helper> | Struct | ODASA-5186.hpp:2:8:2:8 | operator= | |
-| ODASA-5186.hpp:2:8:2:17 | NEQ_helper> | Struct | ODASA-5186.hpp:2:8:2:8 | operator= | |
| file://:0:0:0:0 | __va_list_tag | Struct | file://:0:0:0:0 | operator= | |
| file://:0:0:0:0 | __va_list_tag | Struct | file://:0:0:0:0 | operator= | |
| functions.cpp:7:8:7:8 | A | Struct | functions.cpp:7:8:7:8 | operator= | |
diff --git a/cpp/ql/test/library-tests/identifiers/qualified_names/qualifiedNames.expected b/cpp/ql/test/library-tests/identifiers/qualified_names/qualifiedNames.expected
index c98c493af257..f959304832ac 100644
--- a/cpp/ql/test/library-tests/identifiers/qualified_names/qualifiedNames.expected
+++ b/cpp/ql/test/library-tests/identifiers/qualified_names/qualifiedNames.expected
@@ -39,8 +39,6 @@
| qualifiedNames.cpp:39:3:39:19 | typedefStructName | typedefStructName | | | typedefStructName | typedefStructName |
| qualifiedNames.cpp:39:23:39:40 | ptypedefStructName | ptypedefStructName | | | ptypedefStructName | ptypedefStructName |
| qualifiedNames.cpp:41:11:41:18 | typedefC | typedefC | | | typedefC | typedefC |
-| qualifiedNames.cpp:45:10:45:10 | operator= | templates::TemplateClass::operator= | templates | TemplateClass | operator= | (not global) |
-| qualifiedNames.cpp:45:10:45:10 | operator= | templates::TemplateClass::operator= | templates | TemplateClass | operator= | (not global) |
| qualifiedNames.cpp:45:10:45:22 | TemplateClass | templates::TemplateClass | templates | | TemplateClass | (not global) |
| qualifiedNames.cpp:45:10:45:22 | TemplateClass | templates::TemplateClass | templates | | TemplateClass | (not global) |
| qualifiedNames.cpp:45:10:45:22 | TemplateClass | templates::TemplateClass | templates | | TemplateClass | (not global) |
diff --git a/cpp/ql/test/library-tests/instantiations/test.expected b/cpp/ql/test/library-tests/instantiations/test.expected
index 7460a9fa9dcc..f4a3f63f143c 100644
--- a/cpp/ql/test/library-tests/instantiations/test.expected
+++ b/cpp/ql/test/library-tests/instantiations/test.expected
@@ -25,10 +25,6 @@
| test.cpp:16:7:16:7 | operator= |
| test.cpp:16:32:16:35 | vfun |
| test.cpp:19:7:19:7 | C |
-| test.cpp:19:7:19:7 | C |
-| test.cpp:19:7:19:7 | C |
-| test.cpp:19:7:19:7 | operator= |
-| test.cpp:19:7:19:7 | operator= |
| test.cpp:21:18:21:18 | vfun |
| test.cpp:21:18:21:21 | vfun |
| test.cpp:27:6:27:6 | f |
diff --git a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected
index 94f8d8bff3c9..cba8a74758a2 100644
--- a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected
+++ b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected
@@ -1729,30 +1729,6 @@ complex.c:
# 144| ValueCategory = prvalue
# 145| getStmt(72): [ReturnStmt] return ...
coroutines.cpp:
-# 4| [CopyAssignmentOperator] std::coroutine_traits& std::coroutine_traits::operator=(std::coroutine_traits const&)
-# 4| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const coroutine_traits &
-# 4| [MoveAssignmentOperator] std::coroutine_traits& std::coroutine_traits::operator=(std::coroutine_traits&&)
-# 4| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [RValueReferenceType] coroutine_traits &&
-# 4| [CopyAssignmentOperator] std::coroutine_traits& std::coroutine_traits::operator=(std::coroutine_traits const&)
-# 4| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const coroutine_traits &
-# 4| [MoveAssignmentOperator] std::coroutine_traits& std::coroutine_traits::operator=(std::coroutine_traits&&)
-# 4| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [RValueReferenceType] coroutine_traits &&
-# 4| [CopyAssignmentOperator] std::coroutine_traits& std::coroutine_traits::operator=(std::coroutine_traits const&)
-# 4| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const coroutine_traits &
-# 4| [MoveAssignmentOperator] std::coroutine_traits& std::coroutine_traits::operator=(std::coroutine_traits&&)
-# 4| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [RValueReferenceType] coroutine_traits &&
# 12| [Constructor] void std::coroutine_handle::coroutine_handle()
# 12| :
# 13| [Constructor] void std::coroutine_handle::coroutine_handle(std::nullptr_t)
@@ -8629,14 +8605,6 @@ ir.cpp:
# 709| getArgument(1): [VariableAccess] y
# 709| Type = [IntType] int
# 709| ValueCategory = prvalue(load)
-# 713| [CopyAssignmentOperator] Outer& Outer::operator=(Outer const&)
-# 713| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const Outer &
-# 713| [MoveAssignmentOperator] Outer& Outer::operator=(Outer&&)
-# 713| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [RValueReferenceType] Outer &&
# 715| [MemberFunction,TemplateFunction] T Outer::Func(U, V)
# 715| :
# 715| getParameter(0): [Parameter] x
@@ -11941,22 +11909,6 @@ ir.cpp:
# 1054| getRightOperand().getFullyConverted(): [ReferenceDereferenceExpr] (reference dereference)
# 1054| Type = [IntType] int
# 1054| ValueCategory = prvalue(load)
-# 1078| [CopyAssignmentOperator] std::iterator& std::iterator::operator=(std::iterator const&)
-# 1078| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const iterator &
-# 1078| [CopyAssignmentOperator] std::iterator& std::iterator::operator=(std::iterator const&)
-# 1078| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const iterator &
-# 1078| [CopyAssignmentOperator] std::iterator& std::iterator::operator=(std::iterator const&)
-# 1078| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const iterator &
-# 1078| [CopyAssignmentOperator] std::iterator& std::iterator::operator=(std::iterator const&)
-# 1078| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const iterator &
# 1081| [Constructor] void std::iterator::iterator()
# 1081| :
# 1082| [Constructor] void std::iterator::iterator(std::iterator const&)
@@ -12105,38 +12057,6 @@ ir.cpp:
# 1105| :
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
#-----| Type = [RValueReferenceType] output_iterator_tag &&
-# 1108| [CopyAssignmentOperator] std::vector& std::vector::operator=(std::vector const&)
-# 1108| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const vector &
-# 1108| [CopyAssignmentOperator] std::vector& std::vector::operator=(std::vector const&)
-# 1108| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const vector &
-# 1108| [CopyAssignmentOperator] std::vector& std::vector::operator=(std::vector const&)
-# 1108| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const vector &
-# 1108| [CopyAssignmentOperator] std::vector& std::vector::operator=(std::vector const&)
-# 1108| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const vector &
-# 1108| [CopyConstructor] void std::vector::vector(std::vector const&)
-# 1108| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const vector &
-# 1108| [CopyConstructor] void std::vector::vector(std::vector const&)
-# 1108| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const vector &
-# 1108| [CopyConstructor] void std::vector::vector(std::vector const&)
-# 1108| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const vector &
-# 1108| [CopyConstructor] void std::vector::vector(std::vector const&)
-# 1108| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const vector &
# 1109| [Constructor] void std::vector::vector(ClassWithDestructor)
# 1109| :
# 1109| getParameter(0): [Parameter] (unnamed parameter 0)
@@ -17431,14 +17351,6 @@ ir.cpp:
# 1904| :
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
#-----| Type = [RValueReferenceType] S &&
-# 1908| [CopyAssignmentOperator] missing_declaration_entries::Bar1& missing_declaration_entries::Bar1::operator=(missing_declaration_entries::Bar1 const&)
-# 1908| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const Bar1 &
-# 1908| [MoveAssignmentOperator] missing_declaration_entries::Bar1& missing_declaration_entries::Bar1::operator=(missing_declaration_entries::Bar1&&)
-# 1908| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [RValueReferenceType] Bar1 &&
# 1911| [MemberFunction] void* missing_declaration_entries::Bar1::missing_type_decl_entry(missing_declaration_entries::Bar1::pointer)
# 1911| :
# 1911| getParameter(0): [Parameter] p
@@ -17494,14 +17406,6 @@ ir.cpp:
# 1919| Value = [CStyleCast] 0
# 1919| ValueCategory = prvalue
# 1920| getStmt(2): [ReturnStmt] return ...
-# 1922| [CopyAssignmentOperator] missing_declaration_entries::Bar2& missing_declaration_entries::Bar2::operator=(missing_declaration_entries::Bar2 const&)
-# 1922| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const Bar2 &
-# 1922| [MoveAssignmentOperator] missing_declaration_entries::Bar2& missing_declaration_entries::Bar2::operator=(missing_declaration_entries::Bar2&&)
-# 1922| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [RValueReferenceType] Bar2 &&
# 1924| [MemberFunction] int missing_declaration_entries::Bar2::two_missing_variable_declaration_entries()
# 1924| :
# 1924| getEntryPoint(): [BlockStmt] { ... }
@@ -17644,14 +17548,6 @@ ir.cpp:
# 1934| Type = [ClassTemplateInstantiation,Struct] Bar2
# 1934| ValueCategory = lvalue
# 1935| getStmt(2): [ReturnStmt] return ...
-# 1937| [CopyAssignmentOperator] missing_declaration_entries::Bar3& missing_declaration_entries::Bar3::operator=(missing_declaration_entries::Bar3 const&)
-# 1937| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [LValueReferenceType] const Bar3 &
-# 1937| [MoveAssignmentOperator] missing_declaration_entries::Bar3& missing_declaration_entries::Bar3::operator=(missing_declaration_entries::Bar3&&)
-# 1937| :
-#-----| getParameter(0): [Parameter] (unnamed parameter 0)
-#-----| Type = [RValueReferenceType] Bar3 &&
# 1939| [MemberFunction] int missing_declaration_entries::Bar3::two_more_missing_variable_declaration_entries()
# 1939| :
# 1939| getEntryPoint(): [BlockStmt] { ... }
@@ -22753,6 +22649,616 @@ ir.cpp:
# 2556| Type = [LongType] unsigned long
# 2556| ValueCategory = prvalue(load)
# 2557| getStmt(1): [ReturnStmt] return ...
+# 2559| [TopLevelFunction] void p_points_to_x_or_y(int, int)
+# 2559| :
+# 2559| getParameter(0): [Parameter] a
+# 2559| Type = [IntType] int
+# 2559| getParameter(1): [Parameter] b
+# 2559| Type = [IntType] int
+# 2559| getEntryPoint(): [BlockStmt] { ... }
+# 2560| getStmt(0): [DeclStmt] declaration
+# 2560| getDeclarationEntry(0): [VariableDeclarationEntry] definition of x
+# 2560| Type = [IntType] int
+# 2561| getStmt(1): [DeclStmt] declaration
+# 2561| getDeclarationEntry(0): [VariableDeclarationEntry] definition of y
+# 2561| Type = [IntType] int
+# 2562| getStmt(2): [DeclStmt] declaration
+# 2562| getDeclarationEntry(0): [VariableDeclarationEntry] definition of p
+# 2562| Type = [IntPointerType] int *
+# 2563| getStmt(3): [IfStmt] if (...) ...
+# 2563| getCondition(): [LTExpr] ... < ...
+# 2563| Type = [BoolType] bool
+# 2563| ValueCategory = prvalue
+# 2563| getLesserOperand(): [VariableAccess] a
+# 2563| Type = [IntType] int
+# 2563| ValueCategory = prvalue(load)
+# 2563| getGreaterOperand(): [VariableAccess] b
+# 2563| Type = [IntType] int
+# 2563| ValueCategory = prvalue(load)
+# 2563| getThen(): [BlockStmt] { ... }
+# 2564| getStmt(0): [ExprStmt] ExprStmt
+# 2564| getExpr(): [AssignExpr] ... = ...
+# 2564| Type = [IntPointerType] int *
+# 2564| ValueCategory = lvalue
+# 2564| getLValue(): [VariableAccess] p
+# 2564| Type = [IntPointerType] int *
+# 2564| ValueCategory = lvalue
+# 2564| getRValue(): [AddressOfExpr] & ...
+# 2564| Type = [IntPointerType] int *
+# 2564| ValueCategory = prvalue
+# 2564| getOperand(): [VariableAccess] x
+# 2564| Type = [IntType] int
+# 2564| ValueCategory = lvalue
+# 2565| getElse(): [BlockStmt] { ... }
+# 2566| getStmt(0): [ExprStmt] ExprStmt
+# 2566| getExpr(): [AssignExpr] ... = ...
+# 2566| Type = [IntPointerType] int *
+# 2566| ValueCategory = lvalue
+# 2566| getLValue(): [VariableAccess] p
+# 2566| Type = [IntPointerType] int *
+# 2566| ValueCategory = lvalue
+# 2566| getRValue(): [AddressOfExpr] & ...
+# 2566| Type = [IntPointerType] int *
+# 2566| ValueCategory = prvalue
+# 2566| getOperand(): [VariableAccess] y
+# 2566| Type = [IntType] int
+# 2566| ValueCategory = lvalue
+# 2568| getStmt(4): [ExprStmt] ExprStmt
+# 2568| getExpr(): [AssignExpr] ... = ...
+# 2568| Type = [IntType] int
+# 2568| ValueCategory = lvalue
+# 2568| getLValue(): [PointerDereferenceExpr] * ...
+# 2568| Type = [IntType] int
+# 2568| ValueCategory = lvalue
+# 2568| getOperand(): [VariableAccess] p
+# 2568| Type = [IntPointerType] int *
+# 2568| ValueCategory = prvalue(load)
+# 2568| getRValue(): [Literal] 5
+# 2568| Type = [IntType] int
+# 2568| Value = [Literal] 5
+# 2568| ValueCategory = prvalue
+# 2569| getStmt(5): [DeclStmt] declaration
+# 2569| getDeclarationEntry(0): [VariableDeclarationEntry] definition of z
+# 2569| Type = [IntType] int
+# 2569| getVariable().getInitializer(): [Initializer] initializer for z
+# 2569| getExpr(): [VariableAccess] x
+# 2569| Type = [IntType] int
+# 2569| ValueCategory = prvalue(load)
+# 2570| getStmt(6): [DeclStmt] declaration
+# 2570| getDeclarationEntry(0): [VariableDeclarationEntry] definition of w
+# 2570| Type = [IntType] int
+# 2570| getVariable().getInitializer(): [Initializer] initializer for w
+# 2570| getExpr(): [VariableAccess] y
+# 2570| Type = [IntType] int
+# 2570| ValueCategory = prvalue(load)
+# 2571| getStmt(7): [ReturnStmt] return ...
+# 2573| [TopLevelFunction] int phi_after_while()
+# 2573|