diff --git a/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/builtintypes.ql b/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/builtintypes.ql new file mode 100644 index 000000000000..165bd8923cc7 --- /dev/null +++ b/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/builtintypes.ql @@ -0,0 +1,9 @@ +class BuiltinType extends @builtintype { + string toString() { none() } +} + +from BuiltinType id, string name, int kind, int new_kind, int size, int sign, int alignment +where + builtintypes(id, name, kind, size, sign, alignment) and + if kind = 63 then /* @errortype */ new_kind = 1 else new_kind = kind +select id, name, new_kind, size, sign, alignment diff --git a/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/derivedtypes.ql b/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/derivedtypes.ql new file mode 100644 index 000000000000..76067a70d1c1 --- /dev/null +++ b/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/derivedtypes.ql @@ -0,0 +1,9 @@ +class Type extends @type { + string toString() { none() } +} + +from Type type, string name, int kind, int new_kind, Type type_id +where + derivedtypes(type, name, kind, type_id) and + if kind = 11 then /* @gnu_vector */ new_kind = 5 else new_kind = kind +select type, name, new_kind, type_id diff --git a/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/old.dbscheme b/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/old.dbscheme new file mode 100644 index 000000000000..e38346051783 --- /dev/null +++ b/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/old.dbscheme @@ -0,0 +1,2506 @@ + +/** + * 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 +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +/* +case @function.kind of + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; +*/ + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @type_operator.kind of +| 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; +*/ + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +/* +case @usertype.kind of +| 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; +*/ + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_expr ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_expr ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_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 +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/semmlecode.cpp.dbscheme b/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/semmlecode.cpp.dbscheme new file mode 100644 index 000000000000..9baef67d1ffc --- /dev/null +++ b/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/semmlecode.cpp.dbscheme @@ -0,0 +1,2499 @@ + +/** + * 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 +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +/* +case @function.kind of + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; +*/ + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +; + +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 or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @type_operator.kind of +| 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; +*/ + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +/* +case @usertype.kind of +| 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; +*/ + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_expr ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_expr ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_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 +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/upgrade.properties b/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/upgrade.properties new file mode 100644 index 000000000000..e29cebc506e7 --- /dev/null +++ b/cpp/downgrades/e38346051783182ea75822e4adf8d4c6a949bc37/upgrade.properties @@ -0,0 +1,5 @@ +description: Arm scalable vector type support +compatibility: backwards +builtintypes.rel: run builtintypes.qlo +derivedtypes.rel: run derivedtypes.qlo +tupleelements.rel: delete diff --git a/cpp/ql/lib/semmle/code/cpp/Type.qll b/cpp/ql/lib/semmle/code/cpp/Type.qll index fef978b198d6..c9dded7e4cf9 100644 --- a/cpp/ql/lib/semmle/code/cpp/Type.qll +++ b/cpp/ql/lib/semmle/code/cpp/Type.qll @@ -352,7 +352,23 @@ class UnknownType extends BuiltInType { private predicate isArithmeticType(@builtintype type, int kind) { builtintypes(type, _, kind, _, _, _) and kind >= 4 and - kind != 34 // Exclude decltype(nullptr) + kind != 34 and // Exclude decltype(nullptr) + kind != 63 // Exclude __SVCount_t +} + +/** + * The Arm scalable vector count type. + * + * In the following example, `a` is declared using the scalable vector + * count type: + * ``` + * svcount_t a; + * ``` + */ +class ScalableVectorCount extends BuiltInType { + ScalableVectorCount() { builtintypes(underlyingElement(this), _, 63, _, _, _) } + + override string getAPrimaryQlClass() { result = "ScalableVectorCount" } } /** @@ -1084,7 +1100,7 @@ class NullPointerType extends BuiltInType { /** * A C/C++ derived type. * - * These are pointer and reference types, array and GNU vector types, and `const` and `volatile` types. + * These are pointer and reference types, array and vector types, and `const` and `volatile` types. * In all cases, the type is formed from a single base type. For example: * ``` * int *pi; @@ -1643,6 +1659,30 @@ class GNUVectorType extends DerivedType { override predicate isDeeplyConstBelow() { this.getBaseType().isDeeplyConst() } } +/** + * An Arm Scalable vector type. + * + * In the following example, `a` has a scalable vector type consisting + * of 8-bit signed integer elements: + * ``` + * svint8_t a; + * ``` + */ +class ScalableVectorType extends DerivedType { + ScalableVectorType() { derivedtypes(underlyingElement(this), _, 11, _) } + + /** + * Get the number of tuple elements of this scalable vector type. + */ + int getNumTupleElements() { tupleelements(underlyingElement(this), result) } + + override string getAPrimaryQlClass() { result = "ScalableVectorType" } + + override string explain() { result = "scalable vector of {" + this.getBaseType().explain() + "}" } + + override predicate isDeeplyConstBelow() { this.getBaseType().isDeeplyConst() } +} + /** * A C/C++ pointer to a function. See 7.7. * ``` diff --git a/cpp/ql/lib/semmle/code/cpp/ir/internal/CppType.qll b/cpp/ql/lib/semmle/code/cpp/ir/internal/CppType.qll index f61a3a52c6bd..d873e3ec757e 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/internal/CppType.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/internal/CppType.qll @@ -134,6 +134,8 @@ private predicate isOpaqueType(Type type) { ) or type instanceof PointerToMemberType // PTMs are missing size info + or + type instanceof ScalableVectorCount } /** diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme index 9baef67d1ffc..e38346051783 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme @@ -692,6 +692,7 @@ case @builtintype.kind of | 60 = @complex_float64x // _Complex _Float64x | 61 = @complex_std_float128 // _Complex _Float128 | 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t ; builtintypes( @@ -718,6 +719,7 @@ case @derivedtype.kind of | 8 = @rvalue_reference // C++11 // ... 9 type_conforming_to_protocols deprecated | 10 = @block +| 11 = @scalable_vector // Arm SVE ; derivedtypes( @@ -738,6 +740,11 @@ arraysizes( int alignment: int ref ); +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + typedefbase( unique int id: @usertype ref, int type_id: @type ref diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats index a09e3c44d347..dc51cf5b2186 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats @@ -2,7 +2,7 @@ @compilation - 14477 + 14471 @externalDataElement @@ -18,15 +18,15 @@ @location_default - 36187125 + 36187310 @location_stmt - 5217074 + 5217100 @location_expr - 18007831 + 18007923 @diagnostic @@ -34,43 +34,43 @@ @file - 74673 + 74641 @folder - 14187 + 14181 @macro_expansion - 39310397 + 39310599 @other_macro_reference - 300692 + 300694 @function - 4010769 + 4010790 @fun_decl - 4149688 + 4149709 @var_decl - 9262560 + 9262608 @type_decl - 1687983 + 1687349 @namespace_decl - 430961 + 430963 @using_declaration - 306602 + 306677 @using_directive @@ -82,27 +82,27 @@ @static_assert - 183513 + 183514 @parameter - 6957539 + 6957575 @membervariable - 1493394 + 1493401 @globalvariable - 488088 + 488090 @localvariable - 725943 + 726100 @enumconstant - 344763 + 344765 @errortype @@ -332,13 +332,17 @@ @mfp8 124 + + @scalable_vector_count + 124 + @pointer - 455607 + 455609 @type_with_specifiers - 695716 + 695720 @array @@ -346,15 +350,15 @@ @routineptr - 684228 + 684232 @reference - 969430 + 969435 @gnu_vector - 774 + 773 @routinereference @@ -362,31 +366,35 @@ @rvalue_reference - 291453 + 291455 @block 10 - @decltype - 102348 + @scalable_vector + 1 @type_operator 7960 + + @decltype + 102349 + @usertype - 4459321 + 4458594 @mangledname - 6330532 + 6330564 @type_mention - 5828677 + 5828707 @concept_template @@ -394,11 +402,11 @@ @routinetype - 604424 + 604428 @ptrtomember - 11030 + 11025 @specifier @@ -410,11 +418,11 @@ @stdattribute - 350169 + 350171 @declspec - 329728 + 329730 @msattribute @@ -430,11 +438,11 @@ @attribute_arg_constant_expr - 82159 + 82124 @attribute_arg_expr - 1608 + 1607 @attribute_arg_empty @@ -450,19 +458,19 @@ @derivation - 476983 + 476986 @frienddecl - 700584 + 700589 @comment - 11220785 + 11220843 @namespace - 9905 + 9901 @specialnamequalifyingelement @@ -470,15 +478,15 @@ @namequalifier - 3041824 + 3041775 @value - 13474536 + 13474605 @initialiser - 2340619 + 2340631 @address_of @@ -486,23 +494,23 @@ @indirect - 404151 + 404153 @array_to_pointer - 1953741 + 1953751 @parexpr - 4915183 + 4915208 @arithnegexpr - 586531 + 586534 @unaryplusexpr - 4072 + 4073 @complementexpr @@ -510,7 +518,7 @@ @notexpr - 355762 + 355764 @postincrexpr @@ -522,31 +530,31 @@ @preincrexpr - 96713 + 96714 @predecrexpr - 35820 + 35821 @conditionalexpr - 897875 + 897880 @addexpr - 571550 + 571553 @subexpr - 466797 + 466799 @mulexpr - 435791 + 435793 @divexpr - 54099 + 54088 @remexpr @@ -566,19 +574,19 @@ @lshiftexpr - 551693 + 551696 @rshiftexpr - 200553 + 200554 @andexpr - 481215 + 481218 @orexpr - 194054 + 194055 @xorexpr @@ -586,31 +594,31 @@ @eqexpr - 643368 + 643372 @neexpr - 411868 + 411870 @gtexpr - 111148 + 111149 @ltexpr - 139428 + 139429 @geexpr - 81383 + 81384 @leexpr - 292034 + 292036 @assignexpr - 1281138 + 1281144 @assignaddexpr @@ -622,7 +630,7 @@ @assignmulexpr - 12614 + 12609 @assigndivexpr @@ -654,7 +662,7 @@ @assignpaddexpr - 18627 + 18628 @assignpsubexpr @@ -662,23 +670,23 @@ @andlogicalexpr - 346587 + 346589 @orlogicalexpr - 1103517 + 1103523 @commaexpr - 168900 + 168901 @subscriptexpr - 435140 + 435142 @callexpr - 261549 + 261438 @vastartexpr @@ -698,39 +706,39 @@ @varaccess - 8254589 + 8254631 @runtime_sizeof - 402045 + 402047 @runtime_alignof - 49885 + 49886 @expr_stmt - 148363 + 148364 @routineexpr - 5732152 + 5732059 @type_operand - 1405356 + 1405363 @offsetofexpr - 149023 + 149024 @typescompexpr - 701930 + 701934 @literal - 7967615 + 7967633 @aggregateliteral @@ -742,19 +750,19 @@ @temp_init - 992498 + 992341 @errorexpr - 45694 + 45695 @reference_to - 1902971 + 1902670 @ref_indirect - 2107682 + 2107696 @vacuous_destructor_call @@ -814,11 +822,11 @@ @thisaccess - 1518618 + 1518626 @new_expr - 46205 + 46206 @delete_expr @@ -826,11 +834,11 @@ @throw_expr - 24109 + 24105 @condition_decl - 408900 + 408893 @braced_init_list @@ -934,7 +942,7 @@ @delete_array_expr - 1427 + 1426 @new_array_expr @@ -946,7 +954,7 @@ @ctordirectinit - 112822 + 112823 @ctorvirtualinit @@ -954,7 +962,7 @@ @ctorfieldinit - 206503 + 206504 @ctordelegatinginit @@ -962,7 +970,7 @@ @dtordirectdestruct - 39424 + 39425 @dtorvirtualdestruct @@ -970,23 +978,23 @@ @dtorfielddestruct - 39833 + 39834 @static_cast - 389021 + 389023 @reinterpret_cast - 41839 + 41840 @const_cast - 24465 + 24466 @dynamic_cast - 907 + 906 @lambdaexpr @@ -994,7 +1002,7 @@ @param_ref - 164043 + 164017 @noopexpr @@ -1022,11 +1030,11 @@ @isnothrowassignableexpr - 5121 + 5122 @istrivialexpr - 3369 + 3368 @isstandardlayoutexpr @@ -1098,7 +1106,7 @@ @noexceptexpr - 28361 + 28356 @builtinshufflevector @@ -1270,7 +1278,7 @@ @reuseexpr - 846996 + 846982 @istriviallycopyassignable @@ -1382,7 +1390,7 @@ @concept_id - 90429 + 90427 @lambdacapture @@ -1390,11 +1398,11 @@ @stmt_expr - 2031604 + 2031614 @stmt_if - 990209 + 990214 @stmt_while @@ -1402,47 +1410,47 @@ @stmt_goto - 151587 + 151588 @stmt_label - 72705 + 72706 @stmt_return - 1254954 + 1255290 @stmt_block - 1844666 + 1844676 @stmt_end_test_while - 233640 + 233641 @stmt_for - 84388 + 84389 @stmt_switch_case - 836109 + 836096 @stmt_switch - 411847 + 411840 @stmt_asm - 64198 + 64199 @stmt_decl - 769065 + 769069 @stmt_empty - 429382 + 429375 @stmt_continue @@ -1450,11 +1458,11 @@ @stmt_break - 140292 + 140293 @stmt_try_block - 26703 + 26698 @stmt_microsoft_try @@ -1474,11 +1482,11 @@ @stmt_range_based_for - 6388 + 6387 @stmt_handler - 43754 + 43747 @stmt_constexpr_if @@ -1502,43 +1510,43 @@ @ppd_if - 588904 + 588907 @ppd_ifdef - 214362 + 214363 @ppd_ifndef - 158245 + 158246 @ppd_elif - 25096 + 25085 @ppd_else - 236236 + 236237 @ppd_endif - 885604 + 885609 @ppd_plain_include - 364778 + 364623 @ppd_define - 2746387 + 2746401 @ppd_undef - 100940 + 100941 @ppd_pragma - 406761 + 406763 @ppd_include_next @@ -1546,7 +1554,7 @@ @ppd_line - 18825 + 18829 @ppd_error @@ -1604,11 +1612,11 @@ compilations - 14477 + 14471 id - 14477 + 14471 cwd @@ -1626,7 +1634,7 @@ 1 2 - 14477 + 14471 @@ -1652,19 +1660,19 @@ compilation_args - 1159054 + 1158561 id - 14477 + 14471 num - 1681 + 1680 arg - 33514 + 33500 @@ -1678,7 +1686,7 @@ 36 42 - 1149 + 1148 42 @@ -1713,7 +1721,7 @@ 72 90 - 1028 + 1027 94 @@ -1723,7 +1731,7 @@ 98 99 - 1536 + 1535 100 @@ -1733,7 +1741,7 @@ 103 104 - 2285 + 2284 104 @@ -1743,12 +1751,12 @@ 120 138 - 1064 + 1063 139 140 - 520 + 519 @@ -1769,7 +1777,7 @@ 38 39 - 1717 + 1716 39 @@ -1794,7 +1802,7 @@ 54 63 - 1028 + 1027 64 @@ -1804,7 +1812,7 @@ 67 68 - 1608 + 1607 68 @@ -1814,7 +1822,7 @@ 70 71 - 1608 + 1607 73 @@ -1824,7 +1832,7 @@ 79 89 - 1294 + 1293 89 @@ -1850,7 +1858,7 @@ 90 108 - 133 + 132 108 @@ -1860,7 +1868,7 @@ 198 422 - 133 + 132 422 @@ -1875,17 +1883,17 @@ 605 749 - 133 + 132 750 778 - 133 + 132 781 883 - 133 + 132 930 @@ -1916,7 +1924,7 @@ 5 7 - 133 + 132 9 @@ -1926,7 +1934,7 @@ 12 15 - 133 + 132 15 @@ -1936,7 +1944,7 @@ 18 22 - 133 + 132 22 @@ -1951,7 +1959,7 @@ 29 34 - 133 + 132 34 @@ -1961,17 +1969,17 @@ 45 63 - 133 + 132 67 94 - 133 + 132 94 164 - 133 + 132 171 @@ -1992,17 +2000,17 @@ 1 2 - 15348 + 15341 2 3 - 14525 + 14519 3 103 - 2515 + 2514 104 @@ -2023,17 +2031,17 @@ 1 2 - 22193 + 22184 2 3 - 9990 + 9986 3 62 - 1330 + 1329 @@ -2043,11 +2051,11 @@ compilation_build_mode - 14477 + 14471 id - 14477 + 14471 mode @@ -2065,7 +2073,7 @@ 1 2 - 14477 + 14471 @@ -2353,7 +2361,7 @@ seconds - 13346 + 13999 @@ -2434,22 +2442,22 @@ 3 4 - 708 + 762 4 5 - 653 + 599 6 - 8 - 217 + 7 + 163 8 - 9 - 108 + 10 + 163 10 @@ -2463,22 +2471,22 @@ 14 - 16 - 108 + 17 + 163 - 16 + 18 20 - 217 + 163 20 - 38 + 45 217 - 48 - 87 + 54 + 94 108 @@ -2547,17 +2555,17 @@ 3 4 - 1470 + 1307 4 5 - 926 + 1143 5 6 - 326 + 217 6 @@ -2567,7 +2575,7 @@ 7 8 - 163 + 217 8 @@ -2580,13 +2588,13 @@ 381 - 22 - 48 + 23 + 51 381 - 87 - 88 + 89 + 90 54 @@ -2643,13 +2651,13 @@ 54 - 132 - 133 + 139 + 140 54 - 142 - 143 + 157 + 158 54 @@ -2666,7 +2674,7 @@ 1 2 - 7190 + 7353 2 @@ -2676,16 +2684,16 @@ 3 4 - 1470 + 1852 4 - 7 - 1089 + 6 + 1198 - 7 - 45 + 6 + 46 272 @@ -2702,32 +2710,32 @@ 1 2 - 6373 + 6700 2 3 - 2941 + 2887 3 4 - 1525 + 1906 4 5 - 926 + 1252 5 - 8 + 11 1089 - 8 + 38 75 - 490 + 163 @@ -2743,12 +2751,12 @@ 1 2 - 11384 + 11493 2 3 - 1961 + 2505 @@ -3004,15 +3012,15 @@ compilation_finished - 14477 + 14471 id - 14477 + 14471 cpu_seconds - 10957 + 10844 elapsed_seconds @@ -3030,7 +3038,7 @@ 1 2 - 14477 + 14471 @@ -3046,7 +3054,7 @@ 1 2 - 14477 + 14471 @@ -3062,17 +3070,17 @@ 1 2 - 9204 + 9151 2 3 - 1306 + 1172 3 - 34 - 447 + 26 + 519 @@ -3088,12 +3096,12 @@ 1 2 - 10353 + 10227 2 3 - 604 + 616 @@ -3114,66 +3122,66 @@ 2 3 - 60 + 48 - 9 - 10 + 3 + 4 12 - 10 - 11 + 6 + 7 12 - 12 - 13 + 9 + 10 12 - 13 - 14 - 12 + 11 + 12 + 24 - 14 - 15 + 12 + 13 12 - 21 - 22 + 18 + 19 12 - 30 - 31 + 37 + 38 12 - 50 - 51 + 64 + 65 12 - 160 - 161 + 152 + 153 12 - 261 - 262 + 247 + 248 12 - 278 - 279 + 300 + 301 12 - 328 - 329 + 318 + 319 12 @@ -3195,61 +3203,71 @@ 2 3 - 60 + 48 + + + 3 + 4 + 12 + + + 6 + 7 + 12 9 10 - 24 + 12 - 12 - 13 + 10 + 11 12 - 13 - 14 + 11 + 12 12 - 14 - 15 + 12 + 13 12 - 21 - 22 + 18 + 19 12 - 29 - 30 + 37 + 38 12 - 49 - 50 + 60 + 61 12 - 150 - 151 + 139 + 140 12 - 172 - 173 + 162 + 163 12 - 227 - 228 + 228 + 229 12 - 240 - 241 + 244 + 245 12 @@ -5022,19 +5040,19 @@ locations_default - 36187125 + 36187310 id - 36187125 + 36187310 container - 40975 + 40976 startLine - 7487103 + 7487141 startColumn @@ -5042,7 +5060,7 @@ endLine - 7489102 + 7489140 endColumn @@ -5060,7 +5078,7 @@ 1 2 - 36187125 + 36187310 @@ -5076,7 +5094,7 @@ 1 2 - 36187125 + 36187310 @@ -5092,7 +5110,7 @@ 1 2 - 36187125 + 36187310 @@ -5108,7 +5126,7 @@ 1 2 - 36187125 + 36187310 @@ -5124,7 +5142,7 @@ 1 2 - 36187125 + 36187310 @@ -5520,27 +5538,27 @@ 1 2 - 4954590 + 4954615 2 3 - 799780 + 799784 3 4 - 565667 + 565670 4 12 - 592402 + 592405 12 210 - 561670 + 561673 210 @@ -5561,22 +5579,22 @@ 1 2 - 5012806 + 5012832 2 3 - 1233150 + 1233157 3 6 - 663360 + 663363 6 106 - 561670 + 561673 107 @@ -5597,22 +5615,22 @@ 1 2 - 5648932 + 5648961 2 3 - 532062 + 532065 3 7 - 578660 + 578663 7 24 - 570789 + 570792 24 @@ -5633,12 +5651,12 @@ 1 2 - 7312456 + 7312493 2 81 - 174647 + 174648 @@ -5654,27 +5672,27 @@ 1 2 - 5021426 + 5021452 2 3 - 766674 + 766678 3 4 - 559171 + 559174 4 12 - 603645 + 603648 12 235 - 536185 + 536187 @@ -6070,27 +6088,27 @@ 1 2 - 4954215 + 4954241 2 3 - 807026 + 807030 3 4 - 560795 + 560798 4 12 - 592776 + 592779 12 214 - 561795 + 561797 214 @@ -6111,22 +6129,22 @@ 1 2 - 5011307 + 5011332 2 3 - 1236274 + 1236280 3 6 - 663735 + 663738 6 107 - 561795 + 561797 107 @@ -6147,12 +6165,12 @@ 1 2 - 7307958 + 7307996 2 7 - 181143 + 181144 @@ -6168,27 +6186,27 @@ 1 2 - 5651556 + 5651585 2 3 - 530688 + 530691 3 7 - 579534 + 579537 7 24 - 570415 + 570417 24 72 - 156907 + 156908 @@ -6204,27 +6222,27 @@ 1 2 - 5021301 + 5021327 2 3 - 773295 + 773299 3 4 - 554549 + 554552 4 12 - 604644 + 604648 12 235 - 535310 + 535313 @@ -6539,11 +6557,11 @@ locations_stmt - 5217074 + 5217100 id - 5217074 + 5217100 container @@ -6551,7 +6569,7 @@ startLine - 273595 + 273596 startColumn @@ -6559,7 +6577,7 @@ endLine - 265744 + 265745 endColumn @@ -6577,7 +6595,7 @@ 1 2 - 5217074 + 5217100 @@ -6593,7 +6611,7 @@ 1 2 - 5217074 + 5217100 @@ -6609,7 +6627,7 @@ 1 2 - 5217074 + 5217100 @@ -6625,7 +6643,7 @@ 1 2 - 5217074 + 5217100 @@ -6641,7 +6659,7 @@ 1 2 - 5217074 + 5217100 @@ -7067,7 +7085,7 @@ 8 11 - 22876 + 22877 11 @@ -7102,7 +7120,7 @@ 56 73 - 11733 + 11734 @@ -7199,7 +7217,7 @@ 2 3 - 28532 + 28533 3 @@ -7260,7 +7278,7 @@ 1 2 - 47357 + 47358 2 @@ -7300,7 +7318,7 @@ 9 10 - 14772 + 14773 10 @@ -7381,7 +7399,7 @@ 22 26 - 25296 + 25297 26 @@ -7949,7 +7967,7 @@ 4 5 - 20850 + 20851 5 @@ -8116,7 +8134,7 @@ 19 22 - 19021 + 19022 22 @@ -8531,11 +8549,11 @@ locations_expr - 18007831 + 18007923 id - 18007831 + 18007923 container @@ -8543,7 +8561,7 @@ startLine - 262733 + 262734 startColumn @@ -8551,7 +8569,7 @@ endLine - 262705 + 262706 endColumn @@ -8569,7 +8587,7 @@ 1 2 - 18007831 + 18007923 @@ -8585,7 +8603,7 @@ 1 2 - 18007831 + 18007923 @@ -8601,7 +8619,7 @@ 1 2 - 18007831 + 18007923 @@ -8617,7 +8635,7 @@ 1 2 - 18007831 + 18007923 @@ -8633,7 +8651,7 @@ 1 2 - 18007831 + 18007923 @@ -9049,7 +9067,7 @@ 1 5 - 22060 + 22061 5 @@ -9125,7 +9143,7 @@ 1 2 - 32190 + 32191 2 @@ -9196,7 +9214,7 @@ 1 4 - 21863 + 21864 4 @@ -9241,7 +9259,7 @@ 40 44 - 22679 + 22680 44 @@ -9282,7 +9300,7 @@ 4 6 - 20034 + 20035 6 @@ -9774,7 +9792,7 @@ 15 23 - 20653 + 20654 23 @@ -9789,7 +9807,7 @@ 44 60 - 19837 + 19838 60 @@ -9835,7 +9853,7 @@ 1 2 - 32190 + 32191 2 @@ -9865,12 +9883,12 @@ 11 15 - 19837 + 19838 15 20 - 22876 + 22877 20 @@ -9916,12 +9934,12 @@ 2 3 - 68405 + 68406 3 4 - 40266 + 40267 4 @@ -9947,12 +9965,12 @@ 1 4 - 21666 + 21667 4 7 - 23889 + 23890 7 @@ -9967,7 +9985,7 @@ 16 21 - 23692 + 23693 21 @@ -10063,7 +10081,7 @@ 43 47 - 19837 + 19838 47 @@ -10458,15 +10476,15 @@ numlines - 808525 + 808529 element_id - 807400 + 807405 num_lines - 39476 + 39477 num_code @@ -10488,7 +10506,7 @@ 1 2 - 806276 + 806280 2 @@ -10509,7 +10527,7 @@ 1 2 - 806276 + 806280 2 @@ -10530,7 +10548,7 @@ 1 2 - 807151 + 807155 2 @@ -11451,15 +11469,15 @@ files - 74673 + 74641 id - 74673 + 74641 name - 74673 + 74641 @@ -11473,7 +11491,7 @@ 1 2 - 74673 + 74641 @@ -11489,7 +11507,7 @@ 1 2 - 74673 + 74641 @@ -11499,15 +11517,15 @@ folders - 14187 + 14181 id - 14187 + 14181 name - 14187 + 14181 @@ -11521,7 +11539,7 @@ 1 2 - 14187 + 14181 @@ -11537,7 +11555,7 @@ 1 2 - 14187 + 14181 @@ -11547,15 +11565,15 @@ containerparent - 88836 + 88798 parent - 14187 + 14181 child - 88836 + 88798 @@ -11569,12 +11587,12 @@ 1 2 - 6906 + 6903 2 3 - 1741 + 1740 3 @@ -11584,7 +11602,7 @@ 4 6 - 1149 + 1148 6 @@ -11594,12 +11612,12 @@ 10 16 - 1149 + 1148 16 44 - 1064 + 1063 44 @@ -11620,7 +11638,7 @@ 1 2 - 88836 + 88798 @@ -11630,11 +11648,11 @@ fileannotations - 4809925 + 4807876 id - 6603 + 6600 kind @@ -11642,11 +11660,11 @@ name - 67234 + 67206 value - 45246 + 45227 @@ -11665,7 +11683,7 @@ 2 3 - 6373 + 6371 @@ -11726,7 +11744,7 @@ 631 753 - 520 + 519 753 @@ -11891,62 +11909,62 @@ 1 2 - 12626 + 12621 2 3 - 4995 + 4993 3 5 - 5793 + 5790 5 7 - 4692 + 4690 7 9 - 5261 + 5258 9 16 - 4958 + 4956 16 19 - 5599 + 5597 19 27 - 4874 + 4872 27 47 - 5539 + 5537 47 128 - 5636 + 5633 128 459 - 5297 + 5295 459 546 - 1959 + 1958 @@ -11962,7 +11980,7 @@ 1 2 - 67234 + 67206 @@ -11978,57 +11996,57 @@ 1 2 - 13267 + 13262 2 3 - 8805 + 8801 3 4 - 4692 + 4690 4 6 - 4656 + 4654 6 8 - 3918 + 3917 8 11 - 5430 + 5428 11 17 - 6180 + 6177 17 23 - 5382 + 5379 23 41 - 5357 + 5355 41 95 - 5116 + 5113 95 1726 - 4426 + 4424 @@ -12044,72 +12062,72 @@ 1 2 - 3846 + 3844 2 4 - 1874 + 1873 4 5 - 3652 + 3651 5 8 - 2818 + 2816 8 14 - 3398 + 3397 14 17 - 2213 + 2212 17 24 - 3483 + 3481 24 51 - 4051 + 4050 51 58 - 3471 + 3469 58 80 - 3410 + 3409 81 151 - 3531 + 3530 151 334 - 3410 + 3409 334 473 - 3434 + 3433 473 547 - 2648 + 2647 @@ -12125,7 +12143,7 @@ 1 2 - 45234 + 45215 2 @@ -12146,67 +12164,67 @@ 1 2 - 3894 + 3892 2 4 - 2189 + 2188 4 5 - 3495 + 3493 5 8 - 2842 + 2841 8 14 - 3991 + 3989 14 18 - 3954 + 3953 18 28 - 3664 + 3663 28 34 - 3604 + 3602 34 41 - 3664 + 3663 41 66 - 3422 + 3421 66 92 - 3519 + 3518 92 113 - 3422 + 3421 113 145 - 3471 + 3469 145 @@ -12221,15 +12239,15 @@ inmacroexpansion - 149995198 + 149995966 id - 24670750 + 24670876 inv - 3705246 + 3705264 @@ -12243,37 +12261,37 @@ 1 3 - 2209385 + 2209396 3 5 - 1474970 + 1474978 5 6 - 1620361 + 1620369 6 7 - 6582512 + 6582546 7 8 - 8718957 + 8719001 8 9 - 3557031 + 3557049 9 22 - 507532 + 507534 @@ -12289,32 +12307,32 @@ 1 2 - 531651 + 531654 2 3 - 743204 + 743208 3 4 - 481510 + 481512 4 7 - 275301 + 275303 7 8 - 282151 + 282153 8 9 - 330245 + 330247 9 @@ -12324,17 +12342,17 @@ 10 11 - 444648 + 444650 11 337 - 307797 + 307798 339 423 - 281754 + 281755 423 @@ -12349,15 +12367,15 @@ affectedbymacroexpansion - 48735594 + 48735844 id - 7044705 + 7044741 inv - 3803102 + 3803122 @@ -12371,37 +12389,37 @@ 1 2 - 3846690 + 3846709 2 3 - 766301 + 766305 3 4 - 361840 + 361841 4 5 - 772732 + 772736 5 12 - 535157 + 535160 12 50 - 556264 + 556267 50 9900 - 205718 + 205719 @@ -12417,62 +12435,62 @@ 1 4 - 313247 + 313248 4 7 - 316606 + 316607 7 9 - 301086 + 301088 9 12 - 342937 + 342938 12 13 - 456002 + 456004 13 14 - 226098 + 226099 14 15 - 408036 + 408038 15 16 - 166428 + 166429 16 17 - 377676 + 377677 17 18 - 200635 + 200636 18 20 - 344253 + 344255 20 25 - 285391 + 285393 25 @@ -12487,19 +12505,19 @@ macroinvocations - 39390474 + 39390675 id - 39390474 + 39390675 macro_id - 181996 + 181997 location - 5904613 + 5904643 kind @@ -12517,7 +12535,7 @@ 1 2 - 39390474 + 39390675 @@ -12533,7 +12551,7 @@ 1 2 - 39390474 + 39390675 @@ -12549,7 +12567,7 @@ 1 2 - 39390474 + 39390675 @@ -12636,7 +12654,7 @@ 4 5 - 10349 + 10350 5 @@ -12693,17 +12711,17 @@ 1 2 - 5248369 + 5248396 2 3 - 248072 + 248074 3 70079 - 408170 + 408172 @@ -12719,7 +12737,7 @@ 1 2 - 5882442 + 5882472 2 @@ -12740,7 +12758,7 @@ 1 2 - 5904613 + 5904643 @@ -12813,15 +12831,15 @@ macroparent - 32844542 + 32844710 id - 32844542 + 32844710 parent_id - 15561370 + 15561449 @@ -12835,7 +12853,7 @@ 1 2 - 32844542 + 32844710 @@ -12851,27 +12869,27 @@ 1 2 - 7669068 + 7669107 2 3 - 1551190 + 1551198 3 4 - 4552687 + 4552710 4 5 - 1263079 + 1263086 5 205 - 525343 + 525346 @@ -12881,15 +12899,15 @@ macrolocationbind - 6882795 + 6883157 id - 4222137 + 4222542 location - 2746999 + 2746954 @@ -12903,12 +12921,12 @@ 1 2 - 2459682 + 2460116 2 3 - 1326273 + 1326251 3 @@ -12918,7 +12936,7 @@ 4 5 - 413547 + 413540 5 @@ -12939,12 +12957,12 @@ 1 2 - 1393982 + 1393959 2 3 - 907153 + 907138 3 @@ -12954,7 +12972,7 @@ 4 5 - 410836 + 410829 5 @@ -12969,19 +12987,19 @@ macro_argument_unexpanded - 94316565 + 94276712 invocation - 30014759 + 30002299 argument_index - 798 + 797 text - 393068 + 392900 @@ -12995,22 +13013,22 @@ 1 2 - 11049162 + 11044782 2 3 - 11160894 + 11156139 3 4 - 5710115 + 5707682 4 67 - 2094586 + 2093693 @@ -13026,22 +13044,22 @@ 1 2 - 11258293 + 11253824 2 3 - 11180088 + 11175326 3 4 - 5531620 + 5529264 4 67 - 2044755 + 2043884 @@ -13066,7 +13084,7 @@ 645295 - 2481630 + 2481657 36 @@ -13109,57 +13127,57 @@ 1 2 - 46371 + 46351 2 3 - 71431 + 71401 3 4 - 26487 + 26476 4 5 - 39731 + 39714 5 6 - 44799 + 44779 6 9 - 32728 + 32714 9 15 - 32861 + 32847 15 27 - 29946 + 29933 27 57 - 30454 + 30441 57 517 - 29692 + 29680 518 485092 - 8563 + 8559 @@ -13175,17 +13193,17 @@ 1 2 - 278458 + 278339 2 3 - 102914 + 102870 3 9 - 11695 + 11690 @@ -13195,19 +13213,19 @@ macro_argument_expanded - 94316565 + 94276712 invocation - 30014759 + 30002299 argument_index - 798 + 797 text - 238097 + 237996 @@ -13221,22 +13239,22 @@ 1 2 - 11049162 + 11044782 2 3 - 11160894 + 11156139 3 4 - 5710115 + 5707682 4 67 - 2094586 + 2093693 @@ -13252,22 +13270,22 @@ 1 2 - 14427235 + 14421415 2 3 - 9629429 + 9625327 3 4 - 4824874 + 4822818 4 9 - 1133220 + 1132737 @@ -13292,7 +13310,7 @@ 645295 - 2481630 + 2481657 36 @@ -13335,57 +13353,57 @@ 1 2 - 25253 + 25243 2 3 - 31337 + 31324 3 4 - 52225 + 52203 4 5 - 18408 + 18400 5 6 - 3543 + 3542 6 7 - 20851 + 20842 7 10 - 19363 + 19355 10 19 - 20585 + 20576 19 51 - 17863 + 17856 51 253 - 17997 + 17989 254 - 1166756 - 10667 + 1166783 + 10663 @@ -13401,17 +13419,17 @@ 1 2 - 120330 + 120279 2 3 - 101813 + 101770 3 66 - 15953 + 15946 @@ -13421,15 +13439,15 @@ functions - 4010769 + 4010790 id - 4010769 + 4010790 name - 1648531 + 1648540 kind @@ -13447,7 +13465,7 @@ 1 2 - 4010769 + 4010790 @@ -13463,7 +13481,7 @@ 1 2 - 4010769 + 4010790 @@ -13479,7 +13497,7 @@ 1 2 - 1402301 + 1402308 2 @@ -13505,7 +13523,7 @@ 1 2 - 1645658 + 1645667 2 @@ -13622,15 +13640,15 @@ function_entry_point - 1141039 + 1141046 id - 1137291 + 1137298 entry_point - 1141039 + 1141046 @@ -13644,7 +13662,7 @@ 1 2 - 1134088 + 1134095 2 @@ -13665,7 +13683,7 @@ 1 2 - 1141039 + 1141046 @@ -13675,15 +13693,15 @@ function_return_type - 4028259 + 4028280 id - 4010769 + 4010790 return_type - 622884 + 622887 @@ -13697,7 +13715,7 @@ 1 2 - 3993280 + 3993300 2 @@ -13718,12 +13736,12 @@ 1 2 - 312941 + 312942 2 3 - 213499 + 213500 3 @@ -14029,11 +14047,11 @@ function_deleted - 88084 + 88082 id - 88084 + 88082 @@ -14051,11 +14069,11 @@ function_prototyped - 4009270 + 4009291 id - 4009270 + 4009291 @@ -14135,15 +14153,15 @@ member_function_this_type - 676227 + 676231 id - 676227 + 676231 this_type - 177645 + 177646 @@ -14157,7 +14175,7 @@ 1 2 - 676227 + 676231 @@ -14213,27 +14231,27 @@ fun_decls - 4155684 + 4155705 id - 4149688 + 4149709 function - 3986284 + 3986304 type_id - 614888 + 614892 name - 1647032 + 1647041 location - 2769873 + 2769887 @@ -14247,7 +14265,7 @@ 1 2 - 4149688 + 4149709 @@ -14263,7 +14281,7 @@ 1 2 - 4143691 + 4143712 2 @@ -14284,7 +14302,7 @@ 1 2 - 4149688 + 4149709 @@ -14300,7 +14318,7 @@ 1 2 - 4149688 + 4149709 @@ -14316,12 +14334,12 @@ 1 2 - 3836247 + 3836266 2 4 - 150036 + 150037 @@ -14337,7 +14355,7 @@ 1 2 - 3967795 + 3967815 2 @@ -14358,7 +14376,7 @@ 1 2 - 3986284 + 3986304 @@ -14374,12 +14392,12 @@ 1 2 - 3842993 + 3843012 2 4 - 143290 + 143291 @@ -14395,12 +14413,12 @@ 1 2 - 298199 + 298201 2 3 - 220370 + 220371 3 @@ -14410,7 +14428,7 @@ 5 354 - 46222 + 46223 358 @@ -14431,12 +14449,12 @@ 1 2 - 308318 + 308320 2 3 - 211625 + 211626 3 @@ -14446,7 +14464,7 @@ 5 1033 - 46222 + 46223 1483 @@ -14467,7 +14485,7 @@ 1 2 - 494584 + 494587 2 @@ -14477,7 +14495,7 @@ 3 7 - 51094 + 51095 7 @@ -14498,7 +14516,7 @@ 1 2 - 457981 + 457983 2 @@ -14529,7 +14547,7 @@ 1 2 - 1297737 + 1297744 2 @@ -14560,7 +14578,7 @@ 1 2 - 1401801 + 1401809 2 @@ -14570,7 +14588,7 @@ 4 3162 - 105687 + 105688 @@ -14586,7 +14604,7 @@ 1 2 - 1556960 + 1556968 2 @@ -14607,17 +14625,17 @@ 1 2 - 1322098 + 1322105 2 3 - 208502 + 208503 3 1592 - 116431 + 116432 @@ -14633,17 +14651,17 @@ 1 2 - 2390096 + 2390108 2 3 - 237735 + 237736 3 211 - 142041 + 142042 @@ -14659,17 +14677,17 @@ 1 2 - 2393844 + 2393856 2 3 - 234487 + 234488 3 211 - 141541 + 141542 @@ -14685,7 +14703,7 @@ 1 2 - 2654566 + 2654579 2 @@ -14706,12 +14724,12 @@ 1 2 - 2730646 + 2730660 2 8 - 39226 + 39227 @@ -14721,11 +14739,11 @@ fun_def - 1413170 + 1413177 id - 1413170 + 1413177 @@ -14754,11 +14772,11 @@ fun_decl_specifiers - 4102216 + 4102237 id - 1688258 + 1688267 name @@ -14776,17 +14794,17 @@ 1 2 - 361537 + 361539 2 3 - 262470 + 262472 3 4 - 1041263 + 1041268 4 @@ -14988,26 +15006,26 @@ fun_decl_empty_throws - 437031 + 437033 fun_decl - 437031 + 437033 fun_decl_noexcept - 141854 + 141855 fun_decl - 141854 + 141855 constant - 141377 + 141378 @@ -15021,7 +15039,7 @@ 1 2 - 141854 + 141855 @@ -15037,7 +15055,7 @@ 1 2 - 140934 + 140935 2 @@ -15052,11 +15070,11 @@ fun_decl_empty_noexcept - 1163816 + 1163822 fun_decl - 1163816 + 1163822 @@ -15161,7 +15179,7 @@ fun_requires - 29110 + 29109 id @@ -15322,11 +15340,11 @@ param_decl_bind - 7189902 + 7189939 id - 7189902 + 7189939 index @@ -15334,7 +15352,7 @@ fun_decl - 3478082 + 3478100 @@ -15348,7 +15366,7 @@ 1 2 - 7189902 + 7189939 @@ -15364,7 +15382,7 @@ 1 2 - 7189902 + 7189939 @@ -15462,27 +15480,27 @@ 1 2 - 1499244 + 1499252 2 3 - 956813 + 956818 3 4 - 579909 + 579912 4 5 - 283083 + 283085 5 65 - 159031 + 159032 @@ -15498,27 +15516,27 @@ 1 2 - 1499244 + 1499252 2 3 - 956813 + 956818 3 4 - 579909 + 579912 4 5 - 283083 + 283085 5 65 - 159031 + 159032 @@ -15528,27 +15546,27 @@ var_decls - 9269431 + 9269479 id - 9262560 + 9262608 variable - 8972356 + 8972402 type_id - 1462391 + 1462398 name - 852374 + 852378 location - 6204481 + 6204513 @@ -15562,7 +15580,7 @@ 1 2 - 9262560 + 9262608 @@ -15578,12 +15596,12 @@ 1 2 - 9255689 + 9255737 2 3 - 6870 + 6871 @@ -15599,7 +15617,7 @@ 1 2 - 9262560 + 9262608 @@ -15615,7 +15633,7 @@ 1 2 - 9262560 + 9262608 @@ -15631,12 +15649,12 @@ 1 2 - 8695144 + 8695188 2 4 - 277212 + 277213 @@ -15652,7 +15670,7 @@ 1 2 - 8933629 + 8933674 2 @@ -15673,12 +15691,12 @@ 1 2 - 8866668 + 8866713 2 4 - 105687 + 105688 @@ -15694,12 +15712,12 @@ 1 2 - 8720504 + 8720548 2 4 - 251852 + 251853 @@ -15715,22 +15733,22 @@ 1 2 - 854748 + 854752 2 3 - 284957 + 284959 3 5 - 128049 + 128050 5 11 - 112933 + 112934 11 @@ -15751,27 +15769,27 @@ 1 2 - 875111 + 875115 2 3 - 270466 + 270467 3 5 - 123427 + 123428 5 11 - 112933 + 112934 11 2859 - 80452 + 80453 @@ -15787,12 +15805,12 @@ 1 2 - 1124964 + 1124970 2 3 - 193136 + 193137 3 @@ -15802,7 +15820,7 @@ 7 1038 - 29107 + 29108 @@ -15818,12 +15836,12 @@ 1 2 - 990918 + 990923 2 3 - 219121 + 219122 3 @@ -15833,7 +15851,7 @@ 6 95 - 109810 + 109811 97 @@ -15854,17 +15872,17 @@ 1 2 - 465851 + 465853 2 3 - 165777 + 165778 3 4 - 60089 + 60090 4 @@ -15895,7 +15913,7 @@ 1 2 - 478718 + 478721 2 @@ -15905,12 +15923,12 @@ 3 4 - 54967 + 54968 4 8 - 71832 + 71833 8 @@ -15936,7 +15954,7 @@ 1 2 - 654865 + 654868 2 @@ -15967,12 +15985,12 @@ 1 2 - 493085 + 493087 2 3 - 183267 + 183268 3 @@ -15982,7 +16000,7 @@ 4 8 - 65211 + 65212 8 @@ -16003,12 +16021,12 @@ 1 2 - 5756869 + 5756898 2 2943 - 447612 + 447614 @@ -16024,12 +16042,12 @@ 1 2 - 5780855 + 5780884 2 2935 - 423626 + 423628 @@ -16045,12 +16063,12 @@ 1 2 - 5920523 + 5920553 2 2555 - 283958 + 283959 @@ -16066,7 +16084,7 @@ 1 2 - 6191988 + 6192020 2 @@ -16081,11 +16099,11 @@ var_def - 3731808 + 3731827 id - 3731808 + 3731827 @@ -16103,11 +16121,11 @@ var_decl_specifiers - 488962 + 488965 id - 488962 + 488965 name @@ -16125,7 +16143,7 @@ 1 2 - 488962 + 488965 @@ -16235,19 +16253,19 @@ type_decls - 1687983 + 1687349 id - 1687983 + 1687349 type_id - 1651022 + 1650403 location - 1326265 + 1325700 @@ -16261,7 +16279,7 @@ 1 2 - 1687983 + 1687349 @@ -16277,7 +16295,7 @@ 1 2 - 1687983 + 1687349 @@ -16293,12 +16311,12 @@ 1 2 - 1624425 + 1623818 2 24 - 26596 + 26585 @@ -16314,12 +16332,12 @@ 1 2 - 1625611 + 1625003 2 24 - 25411 + 25400 @@ -16335,12 +16353,12 @@ 1 2 - 1257941 + 1257405 2 651 - 68323 + 68294 @@ -16356,12 +16374,12 @@ 1 2 - 1259139 + 1258602 2 651 - 67126 + 67097 @@ -16371,22 +16389,22 @@ type_def - 1158256 + 1157787 id - 1158256 + 1157787 type_decl_top - 672531 + 672534 type_decl - 672531 + 672534 @@ -16466,11 +16484,11 @@ namespace_decls - 430961 + 430963 id - 430961 + 430963 namespace_id @@ -16478,11 +16496,11 @@ location - 430961 + 430963 bodylocation - 430961 + 430963 @@ -16496,7 +16514,7 @@ 1 2 - 430961 + 430963 @@ -16512,7 +16530,7 @@ 1 2 - 430961 + 430963 @@ -16528,7 +16546,7 @@ 1 2 - 430961 + 430963 @@ -16742,7 +16760,7 @@ 1 2 - 430961 + 430963 @@ -16758,7 +16776,7 @@ 1 2 - 430961 + 430963 @@ -16774,7 +16792,7 @@ 1 2 - 430961 + 430963 @@ -16790,7 +16808,7 @@ 1 2 - 430961 + 430963 @@ -16806,7 +16824,7 @@ 1 2 - 430961 + 430963 @@ -16822,7 +16840,7 @@ 1 2 - 430961 + 430963 @@ -16832,19 +16850,19 @@ usings - 311355 + 311428 id - 311355 + 311428 element_id - 67416 + 67593 location - 30744 + 30731 kind @@ -16862,7 +16880,7 @@ 1 2 - 311355 + 311428 @@ -16878,7 +16896,7 @@ 1 2 - 311355 + 311428 @@ -16894,7 +16912,7 @@ 1 2 - 311355 + 311428 @@ -16910,17 +16928,17 @@ 1 2 - 58562 + 58743 2 5 - 6168 + 6165 5 134 - 2685 + 2683 @@ -16936,17 +16954,17 @@ 1 2 - 58562 + 58743 2 5 - 6168 + 6165 5 134 - 2685 + 2683 @@ -16962,7 +16980,7 @@ 1 2 - 67416 + 67593 @@ -16978,21 +16996,21 @@ 1 2 - 24250 + 24239 2 4 - 2624 + 2635 4 132 - 2237 + 2224 145 - 365 + 367 1632 @@ -17009,21 +17027,21 @@ 1 2 - 24250 + 24239 2 4 - 2624 + 2635 4 132 - 2237 + 2224 145 - 365 + 367 1632 @@ -17040,7 +17058,7 @@ 1 2 - 30744 + 30731 @@ -17059,8 +17077,8 @@ 12 - 25350 - 25351 + 25367 + 25368 12 @@ -17080,8 +17098,8 @@ 12 - 5360 - 5361 + 5377 + 5378 12 @@ -17113,15 +17131,15 @@ using_container - 662697 + 662620 parent - 24250 + 24275 child - 311355 + 311428 @@ -17135,42 +17153,42 @@ 1 2 - 11236 + 11231 2 3 - 1790 + 1789 3 6 - 2056 + 2055 6 7 - 2588 + 2623 7 27 - 1850 + 1849 27 136 - 943 + 942 145 146 - 2999 + 2998 146 437 - 786 + 785 @@ -17186,27 +17204,27 @@ 1 2 - 111017 + 111176 2 3 - 137723 + 137664 3 4 - 22532 + 22522 4 5 - 30563 + 30550 5 65 - 9518 + 9514 @@ -17216,15 +17234,15 @@ static_asserts - 183513 + 183514 id - 183513 + 183514 condition - 183513 + 183514 message @@ -17250,7 +17268,7 @@ 1 2 - 183513 + 183514 @@ -17266,7 +17284,7 @@ 1 2 - 183513 + 183514 @@ -17282,7 +17300,7 @@ 1 2 - 183513 + 183514 @@ -17298,7 +17316,7 @@ 1 2 - 183513 + 183514 @@ -17314,7 +17332,7 @@ 1 2 - 183513 + 183514 @@ -17330,7 +17348,7 @@ 1 2 - 183513 + 183514 @@ -17346,7 +17364,7 @@ 1 2 - 183513 + 183514 @@ -17362,7 +17380,7 @@ 1 2 - 183513 + 183514 @@ -17378,7 +17396,7 @@ 1 2 - 30235 + 30236 2 @@ -17419,7 +17437,7 @@ 1 2 - 30235 + 30236 2 @@ -17481,7 +17499,7 @@ 1 2 - 32169 + 32170 2 @@ -17824,15 +17842,15 @@ params - 6984148 + 6984184 id - 6957539 + 6957575 function - 3365898 + 3365915 index @@ -17840,7 +17858,7 @@ type_id - 1225405 + 1225411 @@ -17854,7 +17872,7 @@ 1 2 - 6957539 + 6957575 @@ -17870,7 +17888,7 @@ 1 2 - 6957539 + 6957575 @@ -17886,7 +17904,7 @@ 1 2 - 6930930 + 6930965 2 @@ -17907,27 +17925,27 @@ 1 2 - 1462890 + 1462898 2 3 - 908716 + 908721 3 4 - 561170 + 561173 4 5 - 277337 + 277338 5 65 - 155783 + 155784 @@ -17943,27 +17961,27 @@ 1 2 - 1462890 + 1462898 2 3 - 908716 + 908721 3 4 - 561170 + 561173 4 5 - 277337 + 277338 5 65 - 155783 + 155784 @@ -17979,22 +17997,22 @@ 1 2 - 1763464 + 1763473 2 3 - 1008407 + 1008413 3 4 - 436993 + 436995 4 11 - 157032 + 157033 @@ -18133,22 +18151,22 @@ 1 2 - 740814 + 740818 2 3 - 241982 + 241984 3 5 - 93819 + 93820 5 13 - 93694 + 93695 13 @@ -18169,12 +18187,12 @@ 1 2 - 823141 + 823145 2 3 - 181143 + 181144 3 @@ -18184,7 +18202,7 @@ 6 27 - 92445 + 92446 27 @@ -18205,17 +18223,17 @@ 1 2 - 1000037 + 1000042 2 3 - 167026 + 167027 3 65 - 58340 + 58341 @@ -18225,11 +18243,11 @@ overrides - 169820 + 169821 new - 160564 + 160565 old @@ -18247,7 +18265,7 @@ 1 2 - 151317 + 151318 2 @@ -18303,19 +18321,19 @@ membervariables - 1495845 + 1495853 id - 1493394 + 1493401 type_id - 455127 + 455129 name - 640718 + 640722 @@ -18329,7 +18347,7 @@ 1 2 - 1491051 + 1491059 2 @@ -18350,7 +18368,7 @@ 1 2 - 1493394 + 1493401 @@ -18366,7 +18384,7 @@ 1 2 - 337736 + 337738 2 @@ -18397,7 +18415,7 @@ 1 2 - 355276 + 355278 2 @@ -18428,12 +18446,12 @@ 1 2 - 420972 + 420974 2 3 - 122129 + 122130 3 @@ -18459,7 +18477,7 @@ 1 2 - 523709 + 523712 2 @@ -18469,7 +18487,7 @@ 3 658 - 44504 + 44505 @@ -18479,11 +18497,11 @@ globalvariables - 488088 + 488090 id - 488088 + 488090 type_id @@ -18491,7 +18509,7 @@ name - 112433 + 112434 @@ -18505,7 +18523,7 @@ 1 2 - 488088 + 488090 @@ -18521,7 +18539,7 @@ 1 2 - 488088 + 488090 @@ -18665,19 +18683,19 @@ localvariables - 725943 + 726100 id - 725943 + 726100 type_id - 53416 + 53424 name - 101515 + 101537 @@ -18691,7 +18709,7 @@ 1 2 - 725943 + 726100 @@ -18707,7 +18725,7 @@ 1 2 - 725943 + 726100 @@ -18723,32 +18741,32 @@ 1 2 - 28884 + 28887 2 3 - 7824 + 7826 3 4 - 4024 + 4025 4 6 - 4048 + 4049 6 12 - 4148 + 4149 12 166 - 4008 + 4009 168 @@ -18769,22 +18787,22 @@ 1 2 - 38363 + 38367 2 3 - 6699 + 6701 3 5 - 4465 + 4466 5 3502 - 3888 + 3889 @@ -18800,32 +18818,32 @@ 1 2 - 62454 + 62468 2 3 - 16042 + 16045 3 4 - 6531 + 6532 4 8 - 8129 + 8130 8 135 - 7616 + 7618 135 7544 - 740 + 741 @@ -18841,17 +18859,17 @@ 1 2 - 84471 + 84490 2 3 - 8417 + 8419 3 15 - 7672 + 7674 15 @@ -18866,11 +18884,11 @@ autoderivation - 229240 + 229241 var - 229240 + 229241 derivation_type @@ -18888,7 +18906,7 @@ 1 2 - 229240 + 229241 @@ -18934,11 +18952,11 @@ orphaned_variables - 44331 + 44332 var - 44331 + 44332 function @@ -18956,7 +18974,7 @@ 1 2 - 44331 + 44332 @@ -18987,11 +19005,11 @@ enumconstants - 344763 + 344765 id - 344763 + 344765 parent @@ -19007,11 +19025,11 @@ name - 344382 + 344383 location - 317363 + 317364 @@ -19025,7 +19043,7 @@ 1 2 - 344763 + 344765 @@ -19041,7 +19059,7 @@ 1 2 - 344763 + 344765 @@ -19057,7 +19075,7 @@ 1 2 - 344763 + 344765 @@ -19073,7 +19091,7 @@ 1 2 - 344763 + 344765 @@ -19089,7 +19107,7 @@ 1 2 - 344763 + 344765 @@ -19150,7 +19168,7 @@ 17 64 - 3104 + 3105 79 @@ -19216,7 +19234,7 @@ 17 64 - 3104 + 3105 79 @@ -19298,7 +19316,7 @@ 17 64 - 3104 + 3105 79 @@ -19359,12 +19377,12 @@ 11 18 - 3104 + 3105 18 257 - 3104 + 3105 @@ -19420,7 +19438,7 @@ 58 759 - 1034 + 1035 @@ -19476,7 +19494,7 @@ 58 759 - 1034 + 1035 @@ -19548,7 +19566,7 @@ 58 756 - 1034 + 1035 @@ -19604,7 +19622,7 @@ 58 759 - 1034 + 1035 @@ -19700,7 +19718,7 @@ 1 2 - 344000 + 344002 2 @@ -19721,7 +19739,7 @@ 1 2 - 344000 + 344002 2 @@ -19742,7 +19760,7 @@ 1 2 - 344382 + 344383 @@ -19758,7 +19776,7 @@ 1 2 - 344382 + 344383 @@ -19774,7 +19792,7 @@ 1 2 - 344000 + 344002 2 @@ -19795,12 +19813,12 @@ 1 2 - 316328 + 316329 2 205 - 1034 + 1035 @@ -19816,7 +19834,7 @@ 1 2 - 317363 + 317364 @@ -19832,12 +19850,12 @@ 1 2 - 316328 + 316329 2 205 - 1034 + 1035 @@ -19853,7 +19871,7 @@ 1 2 - 317363 + 317364 @@ -19869,12 +19887,12 @@ 1 2 - 316328 + 316329 2 205 - 1034 + 1035 @@ -19884,19 +19902,19 @@ builtintypes - 7120 + 7245 id - 7120 + 7245 name - 7120 + 7245 kind - 7120 + 7245 size @@ -19922,7 +19940,7 @@ 1 2 - 7120 + 7245 @@ -19938,7 +19956,7 @@ 1 2 - 7120 + 7245 @@ -19954,7 +19972,7 @@ 1 2 - 7120 + 7245 @@ -19970,7 +19988,7 @@ 1 2 - 7120 + 7245 @@ -19986,7 +20004,7 @@ 1 2 - 7120 + 7245 @@ -20002,7 +20020,7 @@ 1 2 - 7120 + 7245 @@ -20018,7 +20036,7 @@ 1 2 - 7120 + 7245 @@ -20034,7 +20052,7 @@ 1 2 - 7120 + 7245 @@ -20050,7 +20068,7 @@ 1 2 - 7120 + 7245 @@ -20066,7 +20084,7 @@ 1 2 - 7120 + 7245 @@ -20082,7 +20100,7 @@ 1 2 - 7120 + 7245 @@ -20098,7 +20116,7 @@ 1 2 - 7120 + 7245 @@ -20114,7 +20132,7 @@ 1 2 - 7120 + 7245 @@ -20130,7 +20148,7 @@ 1 2 - 7120 + 7245 @@ -20146,7 +20164,7 @@ 1 2 - 7120 + 7245 @@ -20159,15 +20177,10 @@ 12 - - 1 - 2 - 124 - 2 3 - 124 + 249 8 @@ -20205,15 +20218,10 @@ 12 - - 1 - 2 - 124 - 2 3 - 124 + 249 8 @@ -20251,15 +20259,10 @@ 12 - - 1 - 2 - 124 - 2 3 - 124 + 249 8 @@ -20350,8 +20353,8 @@ 124 - 39 - 40 + 40 + 41 124 @@ -20376,8 +20379,8 @@ 124 - 39 - 40 + 40 + 41 124 @@ -20402,8 +20405,8 @@ 124 - 39 - 40 + 40 + 41 124 @@ -20459,15 +20462,10 @@ 9 124 - - 9 - 10 - 124 - 10 11 - 124 + 249 13 @@ -20495,15 +20493,10 @@ 9 124 - - 9 - 10 - 124 - 10 11 - 124 + 249 13 @@ -20531,15 +20524,10 @@ 9 124 - - 9 - 10 - 124 - 10 11 - 124 + 249 13 @@ -20591,15 +20579,15 @@ derivedtypes - 3044337 + 3044352 id - 3044337 + 3044352 name - 1474259 + 1474266 kind @@ -20607,7 +20595,7 @@ type_id - 1947731 + 1947741 @@ -20621,7 +20609,7 @@ 1 2 - 3044337 + 3044352 @@ -20637,7 +20625,7 @@ 1 2 - 3044337 + 3044352 @@ -20653,7 +20641,7 @@ 1 2 - 3044337 + 3044352 @@ -20669,12 +20657,12 @@ 1 2 - 1357327 + 1357334 2 30 - 110809 + 110810 30 @@ -20695,7 +20683,7 @@ 1 2 - 1474259 + 1474266 @@ -20711,7 +20699,7 @@ 1 2 - 1357452 + 1357459 2 @@ -20860,22 +20848,22 @@ 1 2 - 1315602 + 1315609 2 3 - 378152 + 378154 3 4 - 122802 + 122803 4 135 - 131172 + 131173 @@ -20891,22 +20879,22 @@ 1 2 - 1317101 + 1317108 2 3 - 378152 + 378154 3 4 - 121303 + 121304 4 135 - 131172 + 131173 @@ -20922,22 +20910,22 @@ 1 2 - 1317476 + 1317483 2 3 - 379027 + 379029 3 4 - 122802 + 122803 4 6 - 128424 + 128425 @@ -20947,11 +20935,11 @@ pointerishsize - 2250303 + 2250315 id - 2250303 + 2250315 size @@ -20973,7 +20961,7 @@ 1 2 - 2250303 + 2250315 @@ -20989,7 +20977,7 @@ 1 2 - 2250303 + 2250315 @@ -21073,11 +21061,11 @@ arraysizes - 88572 + 88573 id - 88572 + 88573 num_elements @@ -21103,7 +21091,7 @@ 1 2 - 88572 + 88573 @@ -21119,7 +21107,7 @@ 1 2 - 88572 + 88573 @@ -21135,7 +21123,7 @@ 1 2 - 88572 + 88573 @@ -21462,17 +21450,65 @@ + + tupleelements + 1 + + + id + 1 + + + num_elements + 1 + + + + + id + num_elements + + + 12 + + + 1 + 2 + 1 + + + + + + + num_elements + id + + + 12 + + + 1 + 2 + 1 + + + + + + + typedefbase - 1827993 + 1828181 id - 1827993 + 1828181 type_id - 885785 + 885722 @@ -21486,7 +21522,7 @@ 1 2 - 1827993 + 1828181 @@ -21502,22 +21538,22 @@ 1 2 - 706685 + 706481 2 3 - 83828 + 83914 3 7 - 74588 + 74580 7 4525 - 20682 + 20745 @@ -21527,7 +21563,7 @@ decltypes - 814471 + 814475 id @@ -21535,7 +21571,7 @@ expr - 814471 + 814475 kind @@ -21665,7 +21701,7 @@ 1 2 - 814471 + 814475 @@ -21681,7 +21717,7 @@ 1 2 - 814471 + 814475 @@ -21697,7 +21733,7 @@ 1 2 - 814471 + 814475 @@ -21713,7 +21749,7 @@ 1 2 - 814471 + 814475 @@ -22291,15 +22327,15 @@ usertypes - 4459321 + 4458594 id - 4459321 + 4458594 name - 964062 + 963652 kind @@ -22317,7 +22353,7 @@ 1 2 - 4459321 + 4458594 @@ -22333,7 +22369,7 @@ 1 2 - 4459321 + 4458594 @@ -22349,22 +22385,22 @@ 1 2 - 667498 + 667093 2 3 - 176378 + 176423 3 7 - 76801 + 76769 7 30282 - 43383 + 43365 @@ -22380,12 +22416,12 @@ 1 2 - 904810 + 904425 2 10 - 59252 + 59227 @@ -22419,8 +22455,8 @@ 12 - 1562 - 1563 + 1563 + 1564 12 @@ -22434,13 +22470,13 @@ 12 - 19665 - 19666 + 19666 + 19667 12 - 20069 - 20070 + 20075 + 20076 12 @@ -22449,13 +22485,13 @@ 12 - 85998 - 85999 + 86007 + 86008 12 - 151139 - 151140 + 151219 + 151220 12 @@ -22537,15 +22573,15 @@ usertypesize - 1463274 + 1462784 id - 1463274 + 1462784 size - 1693 + 1692 alignment @@ -22563,7 +22599,7 @@ 1 2 - 1463274 + 1462784 @@ -22579,7 +22615,7 @@ 1 2 - 1463274 + 1462784 @@ -22595,7 +22631,7 @@ 1 2 - 532 + 531 2 @@ -22615,31 +22651,31 @@ 6 8 - 133 + 132 8 14 - 133 + 132 14 26 - 133 + 132 26 86 - 133 + 132 96 - 1588 - 133 + 1592 + 132 1733 - 93157 + 93158 60 @@ -22705,18 +22741,18 @@ 12 - 2045 - 2046 + 2046 + 2047 12 - 10475 - 10476 + 10484 + 10485 12 - 108343 - 108344 + 108344 + 108345 12 @@ -22837,11 +22873,11 @@ usertype_alias_kind - 1827993 + 1828181 id - 1827993 + 1828181 alias_kind @@ -22859,7 +22895,7 @@ 1 2 - 1827993 + 1828181 @@ -22873,13 +22909,13 @@ 12 - 36585 - 36586 + 36597 + 36598 12 - 114554 - 114555 + 114622 + 114623 12 @@ -22890,18 +22926,18 @@ nontype_template_parameters - 766417 + 766422 id - 766417 + 766422 type_template_type_constraint - 27152 + 27151 id @@ -22909,7 +22945,7 @@ constraint - 26012 + 26011 @@ -22974,15 +23010,15 @@ mangled_name - 7826029 + 7826069 id - 7826029 + 7826069 mangled_name - 6330532 + 6330564 is_complete @@ -23000,7 +23036,7 @@ 1 2 - 7826029 + 7826069 @@ -23016,7 +23052,7 @@ 1 2 - 7826029 + 7826069 @@ -23032,12 +23068,12 @@ 1 2 - 6000976 + 6001006 2 1127 - 329556 + 329558 @@ -23053,7 +23089,7 @@ 1 2 - 6330532 + 6330564 @@ -23105,59 +23141,59 @@ is_pod_class - 593861 + 593865 id - 593861 + 593865 is_standard_layout_class - 1205789 + 1205360 id - 1205789 + 1205360 is_complete - 1443608 + 1443114 id - 1443608 + 1443114 is_class_template - 260848 + 260749 id - 260848 + 260749 class_instantiation - 1190271 + 1189945 to - 1186788 + 1186464 from - 81905 + 81870 @@ -23171,12 +23207,12 @@ 1 2 - 1184345 + 1184021 2 8 - 2443 + 2442 @@ -23192,47 +23228,47 @@ 1 2 - 23802 + 23792 2 3 - 14816 + 14809 3 4 - 8103 + 8100 4 5 - 5357 + 5355 5 7 - 6906 + 6903 7 10 - 6265 + 6262 10 17 - 6627 + 6625 17 53 - 6204 + 6201 53 4219 - 3821 + 3820 @@ -23242,11 +23278,11 @@ class_template_argument - 3136346 + 3135288 type_id - 1461871 + 1461382 index @@ -23254,7 +23290,7 @@ arg_type - 925359 + 925001 @@ -23268,27 +23304,27 @@ 1 2 - 608427 + 608192 2 3 - 439439 + 439349 3 4 - 276994 + 276876 4 7 - 110800 + 110765 7 113 - 26209 + 26198 @@ -23304,22 +23340,22 @@ 1 2 - 639838 + 639589 2 3 - 452659 + 452563 3 4 - 275192 + 275075 4 113 - 94182 + 94154 @@ -23359,12 +23395,12 @@ 643 - 6818 + 6819 108 - 11328 - 120866 + 11329 + 120877 48 @@ -23410,7 +23446,7 @@ 10075 - 43770 + 43772 36 @@ -23427,27 +23463,27 @@ 1 2 - 580609 + 580362 2 3 - 189791 + 189734 3 4 - 55575 + 55563 4 11 - 70403 + 70373 11 - 11632 - 28979 + 11634 + 28966 @@ -23463,17 +23499,17 @@ 1 2 - 815732 + 815421 2 3 - 88860 + 88822 3 22 - 20766 + 20757 @@ -23483,11 +23519,11 @@ class_template_argument_value - 510172 + 510176 type_id - 205847 + 205849 index @@ -23495,7 +23531,7 @@ arg_value - 510036 + 510039 @@ -23509,7 +23545,7 @@ 1 2 - 155825 + 155826 2 @@ -23535,7 +23571,7 @@ 1 2 - 147954 + 147955 2 @@ -23678,7 +23714,7 @@ 1 2 - 509900 + 509903 2 @@ -23699,7 +23735,7 @@ 1 2 - 510036 + 510039 @@ -23709,15 +23745,15 @@ is_proxy_class_for - 55466 + 55443 id - 55466 + 55443 templ_param_id - 52406 + 52384 @@ -23731,7 +23767,7 @@ 1 2 - 55466 + 55443 @@ -23747,7 +23783,7 @@ 1 2 - 51584 + 51562 2 @@ -23762,19 +23798,19 @@ type_mentions - 5828677 + 5828707 id - 5828677 + 5828707 type_id - 276017 + 276019 location - 5782974 + 5783003 kind @@ -23792,7 +23828,7 @@ 1 2 - 5828677 + 5828707 @@ -23808,7 +23844,7 @@ 1 2 - 5828677 + 5828707 @@ -23824,7 +23860,7 @@ 1 2 - 5828677 + 5828707 @@ -23840,7 +23876,7 @@ 1 2 - 136510 + 136511 2 @@ -23865,7 +23901,7 @@ 7 12 - 21843 + 21844 12 @@ -23891,7 +23927,7 @@ 1 2 - 136510 + 136511 2 @@ -23916,7 +23952,7 @@ 7 12 - 21843 + 21844 12 @@ -23942,7 +23978,7 @@ 1 2 - 276017 + 276019 @@ -23958,7 +23994,7 @@ 1 2 - 5737270 + 5737300 2 @@ -23979,7 +24015,7 @@ 1 2 - 5737270 + 5737300 2 @@ -24000,7 +24036,7 @@ 1 2 - 5782974 + 5783003 @@ -24058,26 +24094,26 @@ is_function_template - 1335965 + 1335972 id - 1335965 + 1335972 function_instantiation - 973151 + 973157 to - 973151 + 973157 from - 182574 + 182575 @@ -24091,7 +24127,7 @@ 1 2 - 973151 + 973157 @@ -24107,7 +24143,7 @@ 1 2 - 111050 + 111051 2 @@ -24137,11 +24173,11 @@ function_template_argument - 2485235 + 2485251 function_id - 1453542 + 1453551 index @@ -24149,7 +24185,7 @@ arg_type - 298055 + 298057 @@ -24163,17 +24199,17 @@ 1 2 - 783148 + 783153 2 3 - 413229 + 413231 3 4 - 171840 + 171841 4 @@ -24194,22 +24230,22 @@ 1 2 - 802298 + 802303 2 3 - 411320 + 411323 3 4 - 169660 + 169661 4 9 - 70262 + 70263 @@ -24347,7 +24383,7 @@ 1 2 - 174805 + 174806 2 @@ -24362,7 +24398,7 @@ 4 6 - 22659 + 22660 6 @@ -24393,17 +24429,17 @@ 1 2 - 256858 + 256859 2 3 - 32132 + 32133 3 15 - 9063 + 9064 @@ -24413,11 +24449,11 @@ function_template_argument_value - 452858 + 452861 function_id - 196817 + 196819 index @@ -24425,7 +24461,7 @@ arg_value - 450166 + 450169 @@ -24439,7 +24475,7 @@ 1 2 - 151429 + 151430 2 @@ -24465,12 +24501,12 @@ 1 2 - 144512 + 144513 2 3 - 36698 + 36699 3 @@ -24618,7 +24654,7 @@ 1 2 - 447474 + 447477 2 @@ -24639,7 +24675,7 @@ 1 2 - 450166 + 450169 @@ -24660,11 +24696,11 @@ variable_instantiation - 421502 + 421504 to - 421502 + 421504 from @@ -24682,7 +24718,7 @@ 1 2 - 421502 + 421504 @@ -24748,11 +24784,11 @@ variable_template_argument - 768923 + 768927 variable_id - 400764 + 400766 index @@ -24760,7 +24796,7 @@ arg_type - 256849 + 256850 @@ -24774,12 +24810,12 @@ 1 2 - 155908 + 155909 2 3 - 190138 + 190139 3 @@ -24805,12 +24841,12 @@ 1 2 - 170899 + 170900 2 3 - 180269 + 180270 3 @@ -24938,7 +24974,7 @@ 1 2 - 176021 + 176022 2 @@ -24969,7 +25005,7 @@ 1 2 - 228365 + 228367 2 @@ -25150,15 +25186,15 @@ template_template_instantiation - 6640 + 6637 to - 6228 + 6226 from - 4402 + 4400 @@ -25172,12 +25208,12 @@ 1 2 - 6095 + 6093 2 15 - 133 + 132 @@ -25193,7 +25229,7 @@ 1 2 - 2878 + 2877 2 @@ -25213,11 +25249,11 @@ template_template_argument - 11078 + 11074 type_id - 7002 + 6999 index @@ -25225,7 +25261,7 @@ arg_type - 10401 + 10397 @@ -25239,7 +25275,7 @@ 1 2 - 5745 + 5742 2 @@ -25270,17 +25306,17 @@ 1 2 - 5769 + 5766 2 4 - 641 + 640 4 10 - 532 + 531 10 @@ -25423,7 +25459,7 @@ 1 2 - 10365 + 10360 3 @@ -25444,7 +25480,7 @@ 1 2 - 10377 + 10372 2 @@ -25501,7 +25537,7 @@ 1 2 - 520 + 519 2 @@ -25711,11 +25747,11 @@ concept_instantiation - 90429 + 90427 to - 90429 + 90427 from @@ -25733,7 +25769,7 @@ 1 2 - 90429 + 90427 @@ -25840,11 +25876,11 @@ concept_template_argument - 113041 + 113040 concept_id - 76379 + 76378 index @@ -25852,7 +25888,7 @@ arg_type - 21429 + 21428 @@ -25866,12 +25902,12 @@ 1 2 - 46473 + 46472 2 3 - 24678 + 24677 3 @@ -25897,7 +25933,7 @@ 2 3 - 22376 + 22375 3 @@ -26202,15 +26238,15 @@ routinetypes - 604424 + 604428 id - 604424 + 604428 return_type - 283913 + 283915 @@ -26224,7 +26260,7 @@ 1 2 - 604424 + 604428 @@ -26240,7 +26276,7 @@ 1 2 - 234266 + 234267 2 @@ -26260,11 +26296,11 @@ routinetypeargs - 1169167 + 1169173 routine - 413236 + 413238 index @@ -26272,7 +26308,7 @@ type_id - 111398 + 111399 @@ -26296,12 +26332,12 @@ 3 4 - 107149 + 107150 4 5 - 48753 + 48754 5 @@ -26311,7 +26347,7 @@ 7 19 - 16559 + 16560 @@ -26332,12 +26368,12 @@ 2 3 - 138417 + 138418 3 4 - 113849 + 113850 4 @@ -26606,7 +26642,7 @@ 2 3 - 17594 + 17595 3 @@ -26626,19 +26662,19 @@ ptrtomembers - 11030 + 11025 id - 11030 + 11025 type_id - 9071 + 9067 class_id - 5466 + 5464 @@ -26652,7 +26688,7 @@ 1 2 - 11030 + 11025 @@ -26668,7 +26704,7 @@ 1 2 - 11030 + 11025 @@ -26684,7 +26720,7 @@ 1 2 - 8817 + 8813 2 @@ -26705,7 +26741,7 @@ 1 2 - 8817 + 8813 2 @@ -26726,7 +26762,7 @@ 1 2 - 4354 + 4352 2 @@ -26757,7 +26793,7 @@ 1 2 - 4354 + 4352 2 @@ -26830,11 +26866,11 @@ typespecifiers - 888530 + 888515 type_id - 882640 + 882627 spec_id @@ -26852,12 +26888,12 @@ 1 2 - 876750 + 876739 2 3 - 5890 + 5887 @@ -26886,8 +26922,8 @@ 12 - 529 - 530 + 532 + 533 12 @@ -26901,18 +26937,18 @@ 12 - 4147 - 4148 + 4150 + 4151 12 - 17494 - 17495 + 17496 + 17497 12 - 48302 - 48303 + 48324 + 48325 12 @@ -26923,11 +26959,11 @@ funspecifiers - 9688310 + 9688610 func_id - 3970168 + 3970813 spec_id @@ -26945,27 +26981,27 @@ 1 2 - 1483628 + 1484261 2 3 - 506577 + 506954 3 4 - 1038015 + 1037645 4 5 - 696216 + 696219 5 8 - 245730 + 245731 @@ -27069,8 +27105,8 @@ 124 - 22425 - 22426 + 22427 + 22428 124 @@ -27081,11 +27117,11 @@ varspecifiers - 3073070 + 3073086 var_id - 2315015 + 2315027 spec_id @@ -27103,17 +27139,17 @@ 1 2 - 1659650 + 1659658 2 3 - 553175 + 553177 3 5 - 102189 + 102190 @@ -27227,11 +27263,11 @@ attributes - 651117 + 651120 id - 651117 + 651120 kind @@ -27247,7 +27283,7 @@ location - 644996 + 644999 @@ -27261,7 +27297,7 @@ 1 2 - 651117 + 651120 @@ -27277,7 +27313,7 @@ 1 2 - 651117 + 651120 @@ -27293,7 +27329,7 @@ 1 2 - 651117 + 651120 @@ -27309,7 +27345,7 @@ 1 2 - 651117 + 651120 @@ -27717,7 +27753,7 @@ 1 2 - 639124 + 639127 2 @@ -27738,7 +27774,7 @@ 1 2 - 644996 + 644999 @@ -27754,12 +27790,12 @@ 1 2 - 639874 + 639877 2 3 - 5121 + 5122 @@ -27775,7 +27811,7 @@ 1 2 - 644996 + 644999 @@ -27785,11 +27821,11 @@ attribute_args - 90662 + 90623 id - 90662 + 90623 kind @@ -27797,7 +27833,7 @@ attribute - 78543 + 78510 index @@ -27805,7 +27841,7 @@ location - 84445 + 84409 @@ -27819,7 +27855,7 @@ 1 2 - 90662 + 90623 @@ -27835,7 +27871,7 @@ 1 2 - 90662 + 90623 @@ -27851,7 +27887,7 @@ 1 2 - 90662 + 90623 @@ -27867,7 +27903,7 @@ 1 2 - 90662 + 90623 @@ -28002,17 +28038,17 @@ 1 2 - 71455 + 71425 2 5 - 5902 + 5899 5 18 - 1185 + 1184 @@ -28028,12 +28064,12 @@ 1 2 - 76487 + 76454 2 3 - 2056 + 2055 @@ -28049,12 +28085,12 @@ 1 2 - 72931 + 72900 2 6 - 5611 + 5609 @@ -28070,12 +28106,12 @@ 1 2 - 74370 + 74339 2 6 - 4172 + 4170 @@ -28225,12 +28261,12 @@ 1 2 - 82304 + 82269 2 23 - 2140 + 2139 @@ -28246,7 +28282,7 @@ 1 2 - 84252 + 84216 2 @@ -28267,7 +28303,7 @@ 1 2 - 84082 + 84047 2 @@ -28288,7 +28324,7 @@ 1 2 - 83949 + 83914 2 @@ -28459,15 +28495,15 @@ attribute_arg_constant - 82159 + 82124 arg - 82159 + 82124 constant - 82159 + 82124 @@ -28481,7 +28517,7 @@ 1 2 - 82159 + 82124 @@ -28497,7 +28533,7 @@ 1 2 - 82159 + 82124 @@ -28507,15 +28543,15 @@ attribute_arg_expr - 1608 + 1607 arg - 1608 + 1607 expr - 1608 + 1607 @@ -28529,7 +28565,7 @@ 1 2 - 1608 + 1607 @@ -28545,7 +28581,7 @@ 1 2 - 1608 + 1607 @@ -28608,11 +28644,11 @@ typeattributes - 92195 + 92196 type_id - 90571 + 90572 spec_id @@ -28630,7 +28666,7 @@ 1 2 - 88947 + 88948 2 @@ -28671,15 +28707,15 @@ funcattributes - 844878 + 844883 func_id - 800030 + 800034 spec_id - 617137 + 617140 @@ -28693,7 +28729,7 @@ 1 2 - 759678 + 759682 2 @@ -28714,7 +28750,7 @@ 1 2 - 571414 + 571417 2 @@ -28918,15 +28954,15 @@ unspecifiedtype - 7468031 + 7467739 type_id - 7468031 + 7467739 unspecified_type_id - 4300698 + 4300051 @@ -28940,7 +28976,7 @@ 1 2 - 7468031 + 7467739 @@ -28956,17 +28992,17 @@ 1 2 - 2870853 + 2870392 2 3 - 1169674 + 1169405 3 6277 - 260170 + 260253 @@ -28976,11 +29012,11 @@ member - 4200783 + 4200804 parent - 544555 + 544558 index @@ -28988,7 +29024,7 @@ child - 4195536 + 4195557 @@ -29007,12 +29043,12 @@ 2 3 - 83450 + 83451 3 4 - 32605 + 32606 4 @@ -29042,7 +29078,7 @@ 13 18 - 41100 + 41101 18 @@ -29073,7 +29109,7 @@ 2 3 - 83575 + 83576 3 @@ -29088,7 +29124,7 @@ 5 6 - 42599 + 42600 6 @@ -29108,17 +29144,17 @@ 13 18 - 41225 + 41226 18 42 - 40975 + 40976 42 265 - 11992 + 11993 @@ -29266,7 +29302,7 @@ 1 2 - 4195536 + 4195557 @@ -29282,7 +29318,7 @@ 1 2 - 4190289 + 4190310 2 @@ -29335,7 +29371,7 @@ 1 2 - 49340 + 49341 2 @@ -29360,15 +29396,15 @@ derivations - 476983 + 476986 derivation - 476983 + 476986 sub - 455243 + 455246 index @@ -29376,7 +29412,7 @@ super - 235595 + 235596 location @@ -29394,7 +29430,7 @@ 1 2 - 476983 + 476986 @@ -29410,7 +29446,7 @@ 1 2 - 476983 + 476986 @@ -29426,7 +29462,7 @@ 1 2 - 476983 + 476986 @@ -29442,7 +29478,7 @@ 1 2 - 476983 + 476986 @@ -29458,7 +29494,7 @@ 1 2 - 438717 + 438720 2 @@ -29479,7 +29515,7 @@ 1 2 - 438717 + 438720 2 @@ -29500,7 +29536,7 @@ 1 2 - 438717 + 438720 2 @@ -29521,7 +29557,7 @@ 1 2 - 438717 + 438720 2 @@ -29681,7 +29717,7 @@ 1 2 - 225781 + 225783 2 @@ -29702,7 +29738,7 @@ 1 2 - 225781 + 225783 2 @@ -29723,7 +29759,7 @@ 1 2 - 235152 + 235153 2 @@ -29744,7 +29780,7 @@ 1 2 - 230245 + 230247 2 @@ -29878,11 +29914,11 @@ derspecifiers - 478755 + 478758 der_id - 476540 + 476543 spec_id @@ -29900,7 +29936,7 @@ 1 2 - 474325 + 474328 2 @@ -29946,11 +29982,11 @@ direct_base_offsets - 450064 + 450067 der_id - 450064 + 450067 offset @@ -29968,7 +30004,7 @@ 1 2 - 450064 + 450067 @@ -30165,11 +30201,11 @@ frienddecls - 700584 + 700589 id - 700584 + 700589 type_id @@ -30177,7 +30213,7 @@ decl_id - 77861 + 77759 location @@ -30195,7 +30231,7 @@ 1 2 - 700584 + 700589 @@ -30211,7 +30247,7 @@ 1 2 - 700584 + 700589 @@ -30227,7 +30263,7 @@ 1 2 - 700584 + 700589 @@ -30376,12 +30412,12 @@ 1 2 - 48079 + 47875 2 3 - 5963 + 6065 3 @@ -30417,12 +30453,12 @@ 1 2 - 48079 + 47875 2 3 - 5963 + 6065 3 @@ -30458,7 +30494,7 @@ 1 2 - 77180 + 77078 2 @@ -30525,7 +30561,7 @@ 2 - 2132 + 2129 340 @@ -30536,19 +30572,19 @@ comments - 11220785 + 11220843 id - 11220785 + 11220843 contents - 4291355 + 4291377 location - 11220785 + 11220843 @@ -30562,7 +30598,7 @@ 1 2 - 11220785 + 11220843 @@ -30578,7 +30614,7 @@ 1 2 - 11220785 + 11220843 @@ -30594,12 +30630,12 @@ 1 2 - 3917324 + 3917344 2 6 - 321935 + 321937 6 @@ -30620,12 +30656,12 @@ 1 2 - 3917324 + 3917344 2 6 - 321935 + 321937 6 @@ -30646,7 +30682,7 @@ 1 2 - 11220785 + 11220843 @@ -30662,7 +30698,7 @@ 1 2 - 11220785 + 11220843 @@ -30672,15 +30708,15 @@ commentbinding - 3838371 + 3838390 id - 3351531 + 3351549 element - 3672343 + 3672362 @@ -30694,12 +30730,12 @@ 1 2 - 3295314 + 3295331 2 1706 - 56216 + 56217 @@ -30715,12 +30751,12 @@ 1 2 - 3506316 + 3506333 2 3 - 166027 + 166028 @@ -30730,15 +30766,15 @@ exprconv - 9633039 + 9633089 converted - 9632934 + 9632983 conversion - 9633039 + 9633089 @@ -30752,7 +30788,7 @@ 1 2 - 9632828 + 9632878 2 @@ -30773,7 +30809,7 @@ 1 2 - 9633039 + 9633089 @@ -30783,22 +30819,22 @@ compgenerated - 9893080 + 9891516 id - 9893080 + 9891516 synthetic_destructor_call - 1671616 + 1671589 element - 1244902 + 1244881 i @@ -30806,7 +30842,7 @@ destructor_call - 1671616 + 1671589 @@ -30820,12 +30856,12 @@ 1 2 - 828643 + 828630 2 3 - 409459 + 409452 3 @@ -30846,12 +30882,12 @@ 1 2 - 828643 + 828630 2 3 - 409459 + 409452 3 @@ -31004,7 +31040,7 @@ 1 2 - 1671616 + 1671589 @@ -31020,7 +31056,7 @@ 1 2 - 1671616 + 1671589 @@ -31030,15 +31066,15 @@ namespaces - 9905 + 9901 id - 9905 + 9901 name - 5237 + 5234 @@ -31052,7 +31088,7 @@ 1 2 - 9905 + 9901 @@ -31068,7 +31104,7 @@ 1 2 - 4281 + 4279 2 @@ -31099,7 +31135,7 @@ namespacembrs - 2042050 + 2042061 parentid @@ -31107,7 +31143,7 @@ memberid - 2042050 + 2042061 @@ -31197,7 +31233,7 @@ 1 2 - 2042050 + 2042061 @@ -31207,19 +31243,19 @@ exprparents - 19454117 + 19454216 expr_id - 19454117 + 19454216 child_index - 20034 + 20035 parent_id - 12939921 + 12939987 @@ -31233,7 +31269,7 @@ 1 2 - 19454117 + 19454216 @@ -31249,7 +31285,7 @@ 1 2 - 19454117 + 19454216 @@ -31367,17 +31403,17 @@ 1 2 - 7394719 + 7394757 2 3 - 5082654 + 5082680 3 712 - 462548 + 462550 @@ -31393,17 +31429,17 @@ 1 2 - 7394719 + 7394757 2 3 - 5082654 + 5082680 3 712 - 462548 + 462550 @@ -31413,11 +31449,11 @@ expr_isload - 6853100 + 6853135 expr_id - 6853100 + 6853135 @@ -31502,11 +31538,11 @@ iscall - 5802529 + 5802435 caller - 5802529 + 5802435 kind @@ -31524,7 +31560,7 @@ 1 2 - 5802529 + 5802435 @@ -31560,11 +31596,11 @@ numtemplatearguments - 625757 + 625760 expr_id - 625757 + 625760 num @@ -31582,7 +31618,7 @@ 1 2 - 625757 + 625760 @@ -31666,23 +31702,23 @@ namequalifiers - 3041824 + 3041775 id - 3041824 + 3041775 qualifiableelement - 3041824 + 3041775 qualifyingelement - 47484 + 47483 location - 552429 + 552420 @@ -31696,7 +31732,7 @@ 1 2 - 3041824 + 3041775 @@ -31712,7 +31748,7 @@ 1 2 - 3041824 + 3041775 @@ -31728,7 +31764,7 @@ 1 2 - 3041824 + 3041775 @@ -31744,7 +31780,7 @@ 1 2 - 3041824 + 3041775 @@ -31760,7 +31796,7 @@ 1 2 - 3041824 + 3041775 @@ -31776,7 +31812,7 @@ 1 2 - 3041824 + 3041775 @@ -31864,7 +31900,7 @@ 1 2 - 34403 + 34402 2 @@ -31895,7 +31931,7 @@ 1 2 - 79133 + 79132 2 @@ -31905,12 +31941,12 @@ 6 7 - 398981 + 398974 7 192 - 36210 + 36209 @@ -31926,7 +31962,7 @@ 1 2 - 79133 + 79132 2 @@ -31936,12 +31972,12 @@ 6 7 - 398981 + 398974 7 192 - 36210 + 36209 @@ -31957,7 +31993,7 @@ 1 2 - 111535 + 111533 2 @@ -31967,7 +32003,7 @@ 4 5 - 415290 + 415283 5 @@ -31982,15 +32018,15 @@ varbind - 8254589 + 8254631 expr - 8254589 + 8254631 var - 1050370 + 1050376 @@ -32004,7 +32040,7 @@ 1 2 - 8254589 + 8254631 @@ -32025,7 +32061,7 @@ 2 3 - 188699 + 188700 3 @@ -32035,12 +32071,12 @@ 4 5 - 116635 + 116636 5 6 - 83150 + 83151 6 @@ -32055,12 +32091,12 @@ 9 13 - 81574 + 81575 13 27 - 79126 + 79127 27 @@ -32075,15 +32111,15 @@ funbind - 5812232 + 5812138 expr - 5809758 + 5809664 fun - 275934 + 275930 @@ -32097,7 +32133,7 @@ 1 2 - 5807284 + 5807189 2 @@ -32118,12 +32154,12 @@ 1 2 - 181439 + 181436 2 3 - 38835 + 38834 3 @@ -32148,11 +32184,11 @@ expr_allocator - 45251 + 45252 expr - 45251 + 45252 func @@ -32174,7 +32210,7 @@ 1 2 - 45251 + 45252 @@ -32190,7 +32226,7 @@ 1 2 - 45251 + 45252 @@ -32274,11 +32310,11 @@ expr_deallocator - 53838 + 53839 expr - 53838 + 53839 func @@ -32300,7 +32336,7 @@ 1 2 - 53838 + 53839 @@ -32316,7 +32352,7 @@ 1 2 - 53838 + 53839 @@ -32421,15 +32457,15 @@ expr_cond_guard - 897875 + 897880 cond - 897875 + 897880 guard - 897875 + 897880 @@ -32443,7 +32479,7 @@ 1 2 - 897875 + 897880 @@ -32459,7 +32495,7 @@ 1 2 - 897875 + 897880 @@ -32469,15 +32505,15 @@ expr_cond_true - 897871 + 897876 cond - 897871 + 897876 true - 897871 + 897876 @@ -32491,7 +32527,7 @@ 1 2 - 897871 + 897876 @@ -32507,7 +32543,7 @@ 1 2 - 897871 + 897876 @@ -32517,15 +32553,15 @@ expr_cond_false - 897875 + 897880 cond - 897875 + 897880 false - 897875 + 897880 @@ -32539,7 +32575,7 @@ 1 2 - 897875 + 897880 @@ -32555,7 +32591,7 @@ 1 2 - 897875 + 897880 @@ -32565,15 +32601,15 @@ values - 13474536 + 13474605 id - 13474536 + 13474605 str - 114565 + 114566 @@ -32587,7 +32623,7 @@ 1 2 - 13474536 + 13474605 @@ -32633,11 +32669,11 @@ valuetext - 6647484 + 6647456 id - 6647484 + 6647456 text @@ -32655,7 +32691,7 @@ 1 2 - 6647484 + 6647456 @@ -32685,7 +32721,7 @@ 7 - 593553 + 593555 27950 @@ -32696,15 +32732,15 @@ valuebind - 13583118 + 13583188 val - 13474536 + 13474605 expr - 13583118 + 13583188 @@ -32718,7 +32754,7 @@ 1 2 - 13383982 + 13384050 2 @@ -32739,7 +32775,7 @@ 1 2 - 13583118 + 13583188 @@ -32749,11 +32785,11 @@ fieldoffsets - 1493394 + 1493401 id - 1493394 + 1493401 byteoffset @@ -32775,7 +32811,7 @@ 1 2 - 1493394 + 1493401 @@ -32791,7 +32827,7 @@ 1 2 - 1493394 + 1493401 @@ -32807,7 +32843,7 @@ 1 2 - 17703 + 17704 2 @@ -33136,23 +33172,23 @@ initialisers - 2340619 + 2340631 init - 2340619 + 2340631 var - 991147 + 991152 expr - 2340619 + 2340631 location - 539239 + 539242 @@ -33166,7 +33202,7 @@ 1 2 - 2340619 + 2340631 @@ -33182,7 +33218,7 @@ 1 2 - 2340619 + 2340631 @@ -33198,7 +33234,7 @@ 1 2 - 2340619 + 2340631 @@ -33214,7 +33250,7 @@ 1 2 - 874088 + 874093 2 @@ -33240,7 +33276,7 @@ 1 2 - 874088 + 874093 2 @@ -33266,7 +33302,7 @@ 1 2 - 991138 + 991143 2 @@ -33287,7 +33323,7 @@ 1 2 - 2340619 + 2340631 @@ -33303,7 +33339,7 @@ 1 2 - 2340619 + 2340631 @@ -33319,7 +33355,7 @@ 1 2 - 2340619 + 2340631 @@ -33335,12 +33371,12 @@ 1 2 - 439284 + 439287 2 3 - 33067 + 33068 3 @@ -33366,7 +33402,7 @@ 1 2 - 470418 + 470421 2 @@ -33392,12 +33428,12 @@ 1 2 - 439284 + 439287 2 3 - 33067 + 33068 3 @@ -33417,26 +33453,26 @@ braced_initialisers - 68480 + 68469 init - 68480 + 68469 expr_ancestor - 1677598 + 1677570 exp - 1677598 + 1677570 ancestor - 839616 + 839603 @@ -33450,7 +33486,7 @@ 1 2 - 1677598 + 1677570 @@ -33466,12 +33502,12 @@ 1 2 - 17083 + 17082 2 3 - 812464 + 812451 3 @@ -33486,11 +33522,11 @@ exprs - 25210446 + 25210575 id - 25210446 + 25210575 kind @@ -33498,7 +33534,7 @@ location - 10582616 + 10582670 @@ -33512,7 +33548,7 @@ 1 2 - 25210446 + 25210575 @@ -33528,7 +33564,7 @@ 1 2 - 25210446 + 25210575 @@ -33706,17 +33742,17 @@ 1 2 - 8900655 + 8900701 2 3 - 820604 + 820608 3 16 - 797195 + 797199 16 @@ -33737,17 +33773,17 @@ 1 2 - 9040056 + 9040103 2 3 - 774269 + 774273 3 32 - 768290 + 768294 @@ -33757,15 +33793,15 @@ expr_reuse - 846996 + 846982 reuse - 846996 + 846982 original - 846996 + 846982 value_category @@ -33783,7 +33819,7 @@ 1 2 - 846996 + 846982 @@ -33799,7 +33835,7 @@ 1 2 - 846996 + 846982 @@ -33815,7 +33851,7 @@ 1 2 - 846996 + 846982 @@ -33831,7 +33867,7 @@ 1 2 - 846996 + 846982 @@ -33883,15 +33919,15 @@ expr_types - 25210446 + 25210575 id - 25210446 + 25210575 typeid - 214201 + 214202 value_category @@ -33909,7 +33945,7 @@ 1 2 - 25210446 + 25210575 @@ -33925,7 +33961,7 @@ 1 2 - 25210446 + 25210575 @@ -33941,7 +33977,7 @@ 1 2 - 52511 + 52512 2 @@ -34002,7 +34038,7 @@ 1 2 - 185912 + 185913 2 @@ -34070,11 +34106,11 @@ new_allocated_type - 46205 + 46206 expr - 46205 + 46206 type_id @@ -34092,7 +34128,7 @@ 1 2 - 46205 + 46206 @@ -34113,7 +34149,7 @@ 2 3 - 14481 + 14482 3 @@ -35527,15 +35563,15 @@ condition_decl_bind - 408900 + 408893 expr - 408900 + 408893 decl - 408900 + 408893 @@ -35549,7 +35585,7 @@ 1 2 - 408900 + 408893 @@ -35565,7 +35601,7 @@ 1 2 - 408900 + 408893 @@ -35686,11 +35722,11 @@ sizeof_bind - 242025 + 242027 expr - 242025 + 242027 type_id @@ -35708,7 +35744,7 @@ 1 2 - 242025 + 242027 @@ -37198,7 +37234,7 @@ 1 2 - 17664 + 17665 2 @@ -37245,7 +37281,7 @@ 1 2 - 18372 + 18373 2 @@ -37402,11 +37438,11 @@ stmts - 6259629 + 6259661 id - 6259629 + 6259661 kind @@ -37414,7 +37450,7 @@ location - 2755003 + 2755017 @@ -37428,7 +37464,7 @@ 1 2 - 6259629 + 6259661 @@ -37444,7 +37480,7 @@ 1 2 - 6259629 + 6259661 @@ -37682,17 +37718,17 @@ 1 2 - 2353172 + 2353184 2 4 - 239107 + 239108 4 1581 - 162723 + 162724 @@ -37708,7 +37744,7 @@ 1 2 - 2668284 + 2668298 2 @@ -37878,15 +37914,15 @@ if_then - 990209 + 990214 if_stmt - 990209 + 990214 then_id - 990209 + 990214 @@ -37900,7 +37936,7 @@ 1 2 - 990209 + 990214 @@ -37916,7 +37952,7 @@ 1 2 - 990209 + 990214 @@ -37926,15 +37962,15 @@ if_else - 437085 + 437078 if_stmt - 437085 + 437078 else_id - 437085 + 437078 @@ -37948,7 +37984,7 @@ 1 2 - 437085 + 437078 @@ -37964,7 +38000,7 @@ 1 2 - 437085 + 437078 @@ -38262,15 +38298,15 @@ do_body - 233640 + 233641 do_stmt - 233640 + 233641 body_id - 233640 + 233641 @@ -38284,7 +38320,7 @@ 1 2 - 233640 + 233641 @@ -38300,7 +38336,7 @@ 1 2 - 233640 + 233641 @@ -38358,11 +38394,11 @@ switch_case - 836109 + 836096 switch_stmt - 411847 + 411840 index @@ -38370,7 +38406,7 @@ case_id - 836109 + 836096 @@ -38389,7 +38425,7 @@ 2 3 - 408964 + 408957 3 @@ -38415,7 +38451,7 @@ 2 3 - 408964 + 408957 3 @@ -38578,7 +38614,7 @@ 1 2 - 836109 + 836096 @@ -38594,7 +38630,7 @@ 1 2 - 836109 + 836096 @@ -38604,15 +38640,15 @@ switch_body - 411847 + 411840 switch_stmt - 411847 + 411840 body_id - 411847 + 411840 @@ -38626,7 +38662,7 @@ 1 2 - 411847 + 411840 @@ -38642,7 +38678,7 @@ 1 2 - 411847 + 411840 @@ -38652,15 +38688,15 @@ for_initialization - 73245 + 73246 for_stmt - 73245 + 73246 init_id - 73245 + 73246 @@ -38674,7 +38710,7 @@ 1 2 - 73245 + 73246 @@ -38690,7 +38726,7 @@ 1 2 - 73245 + 73246 @@ -38700,15 +38736,15 @@ for_condition - 76340 + 76341 for_stmt - 76340 + 76341 condition_id - 76340 + 76341 @@ -38722,7 +38758,7 @@ 1 2 - 76340 + 76341 @@ -38738,7 +38774,7 @@ 1 2 - 76340 + 76341 @@ -38796,15 +38832,15 @@ for_body - 84388 + 84389 for_stmt - 84388 + 84389 body_id - 84388 + 84389 @@ -38818,7 +38854,7 @@ 1 2 - 84388 + 84389 @@ -38834,7 +38870,7 @@ 1 2 - 84388 + 84389 @@ -38844,11 +38880,11 @@ stmtparents - 5524434 + 5524463 id - 5524434 + 5524463 index @@ -38856,7 +38892,7 @@ parent - 2342622 + 2342634 @@ -38870,7 +38906,7 @@ 1 2 - 5524434 + 5524463 @@ -38886,7 +38922,7 @@ 1 2 - 5524434 + 5524463 @@ -39024,22 +39060,22 @@ 1 2 - 1344593 + 1344600 2 3 - 507829 + 507832 3 4 - 144134 + 144135 4 6 - 151438 + 151439 6 @@ -39065,22 +39101,22 @@ 1 2 - 1344593 + 1344600 2 3 - 507829 + 507832 3 4 - 144134 + 144135 4 6 - 151438 + 151439 6 @@ -39100,22 +39136,22 @@ ishandler - 43754 + 43747 block - 43754 + 43747 stmt_decl_bind - 721438 + 721594 stmt - 681485 + 681632 num @@ -39123,7 +39159,7 @@ decl - 721370 + 721526 @@ -39137,12 +39173,12 @@ 1 2 - 659540 + 659683 2 32 - 21944 + 21949 @@ -39158,12 +39194,12 @@ 1 2 - 659540 + 659683 2 32 - 21944 + 21949 @@ -39301,7 +39337,7 @@ 1 2 - 721346 + 721502 2 @@ -39322,7 +39358,7 @@ 1 2 - 721370 + 721526 @@ -39332,11 +39368,11 @@ stmt_decl_entry_bind - 721438 + 721594 stmt - 681485 + 681632 num @@ -39344,7 +39380,7 @@ decl_entry - 721438 + 721594 @@ -39358,12 +39394,12 @@ 1 2 - 659540 + 659683 2 32 - 21944 + 21949 @@ -39379,12 +39415,12 @@ 1 2 - 659540 + 659683 2 32 - 21944 + 21949 @@ -39522,7 +39558,7 @@ 1 2 - 721438 + 721594 @@ -39538,7 +39574,7 @@ 1 2 - 721438 + 721594 @@ -39548,15 +39584,15 @@ blockscope - 1762465 + 1762474 block - 1762465 + 1762474 enclosing - 1507364 + 1507372 @@ -39570,7 +39606,7 @@ 1 2 - 1762465 + 1762474 @@ -39586,17 +39622,17 @@ 1 2 - 1336215 + 1336222 2 3 - 128549 + 128550 3 28 - 42599 + 42600 @@ -39606,11 +39642,11 @@ jumpinfo - 348319 + 348320 id - 348319 + 348320 str @@ -39618,7 +39654,7 @@ target - 72705 + 72706 @@ -39632,7 +39668,7 @@ 1 2 - 348319 + 348320 @@ -39648,7 +39684,7 @@ 1 2 - 348319 + 348320 @@ -39777,7 +39813,7 @@ 1 2 - 72705 + 72706 @@ -39787,11 +39823,11 @@ preprocdirects - 5401328 + 5401355 id - 5401328 + 5401355 kind @@ -39799,7 +39835,7 @@ location - 5398080 + 5398107 @@ -39813,7 +39849,7 @@ 1 2 - 5401328 + 5401355 @@ -39829,7 +39865,7 @@ 1 2 - 5401328 + 5401355 @@ -39977,7 +40013,7 @@ 1 2 - 5397955 + 5397982 27 @@ -39998,7 +40034,7 @@ 1 2 - 5398080 + 5398107 @@ -40008,15 +40044,15 @@ preprocpair - 1139955 + 1139961 begin - 885604 + 885609 elseelifend - 1139955 + 1139961 @@ -40030,12 +40066,12 @@ 1 2 - 644871 + 644874 2 3 - 231114 + 231115 3 @@ -40056,7 +40092,7 @@ 1 2 - 1139955 + 1139961 @@ -40066,41 +40102,41 @@ preproctrue - 437243 + 437245 branch - 437243 + 437245 preprocfalse - 284333 + 284334 branch - 284333 + 284334 preproctext - 4347447 + 4347469 id - 4347447 + 4347469 head - 2951391 + 2951406 body - 1679388 + 1679397 @@ -40114,7 +40150,7 @@ 1 2 - 4347447 + 4347469 @@ -40130,7 +40166,7 @@ 1 2 - 4347447 + 4347469 @@ -40146,12 +40182,12 @@ 1 2 - 2754882 + 2754896 2 798 - 196509 + 196510 @@ -40167,7 +40203,7 @@ 1 2 - 2871813 + 2871828 2 @@ -40188,7 +40224,7 @@ 1 2 - 1530975 + 1530983 2 @@ -40214,7 +40250,7 @@ 1 2 - 1535223 + 1535231 2 @@ -40234,15 +40270,15 @@ includes - 364863 + 364707 id - 364863 + 364707 included - 67210 + 67182 @@ -40256,7 +40292,7 @@ 1 2 - 364863 + 364707 @@ -40272,32 +40308,32 @@ 1 2 - 33260 + 33246 2 3 - 10812 + 10808 3 4 - 5672 + 5670 4 6 - 6132 + 6129 6 11 - 5176 + 5174 11 47 - 5043 + 5041 47 @@ -40360,11 +40396,11 @@ link_parent - 30397565 + 30397762 element - 3866129 + 3866154 link_target @@ -40382,7 +40418,7 @@ 1 2 - 530549 + 530553 2 @@ -40392,7 +40428,7 @@ 9 10 - 3308626 + 3308647 diff --git a/cpp/ql/lib/upgrades/9baef67d1ffc1551429dbe1c1130815693e28218/old.dbscheme b/cpp/ql/lib/upgrades/9baef67d1ffc1551429dbe1c1130815693e28218/old.dbscheme new file mode 100644 index 000000000000..9baef67d1ffc --- /dev/null +++ b/cpp/ql/lib/upgrades/9baef67d1ffc1551429dbe1c1130815693e28218/old.dbscheme @@ -0,0 +1,2499 @@ + +/** + * 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 +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +/* +case @function.kind of + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; +*/ + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +; + +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 or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @type_operator.kind of +| 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; +*/ + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +/* +case @usertype.kind of +| 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; +*/ + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_expr ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_expr ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_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 +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/9baef67d1ffc1551429dbe1c1130815693e28218/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/9baef67d1ffc1551429dbe1c1130815693e28218/semmlecode.cpp.dbscheme new file mode 100644 index 000000000000..e38346051783 --- /dev/null +++ b/cpp/ql/lib/upgrades/9baef67d1ffc1551429dbe1c1130815693e28218/semmlecode.cpp.dbscheme @@ -0,0 +1,2506 @@ + +/** + * 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 +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +/* +case @function.kind of + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; +*/ + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @type_operator.kind of +| 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; +*/ + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +/* +case @usertype.kind of +| 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; +*/ + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_expr ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_expr ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_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 +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/9baef67d1ffc1551429dbe1c1130815693e28218/upgrade.properties b/cpp/ql/lib/upgrades/9baef67d1ffc1551429dbe1c1130815693e28218/upgrade.properties new file mode 100644 index 000000000000..f0abb02d32cc --- /dev/null +++ b/cpp/ql/lib/upgrades/9baef67d1ffc1551429dbe1c1130815693e28218/upgrade.properties @@ -0,0 +1,2 @@ +description: Arm scalable vector type support +compatibility: full diff --git a/cpp/ql/test/library-tests/templates/type_instantiations/types.expected b/cpp/ql/test/library-tests/templates/type_instantiations/types.expected index a86ab5e7bbd5..548f5f101892 100644 --- a/cpp/ql/test/library-tests/templates/type_instantiations/types.expected +++ b/cpp/ql/test/library-tests/templates/type_instantiations/types.expected @@ -21,6 +21,7 @@ | file://:0:0:0:0 | _Imaginary double | | file://:0:0:0:0 | _Imaginary float | | file://:0:0:0:0 | _Imaginary long double | +| file://:0:0:0:0 | __SVCount_t | | file://:0:0:0:0 | __bf16 | | file://:0:0:0:0 | __float128 | | file://:0:0:0:0 | __fp16 | diff --git a/cpp/ql/test/library-tests/type_sizes/type_sizes.expected b/cpp/ql/test/library-tests/type_sizes/type_sizes.expected index 08e8b26f5256..c77aadc8f4f6 100644 --- a/cpp/ql/test/library-tests/type_sizes/type_sizes.expected +++ b/cpp/ql/test/library-tests/type_sizes/type_sizes.expected @@ -41,6 +41,7 @@ | file://:0:0:0:0 | _Imaginary double | 8 | | file://:0:0:0:0 | _Imaginary float | 4 | | file://:0:0:0:0 | _Imaginary long double | 16 | +| file://:0:0:0:0 | __SVCount_t | 0 | | file://:0:0:0:0 | __attribute((vector_size(16))) int | 16 | | file://:0:0:0:0 | __bf16 | 2 | | file://:0:0:0:0 | __float128 | 16 | diff --git a/cpp/ql/test/library-tests/unspecified_type/types/unspecified_type.expected b/cpp/ql/test/library-tests/unspecified_type/types/unspecified_type.expected index 2e5091754b99..94185a66899d 100644 --- a/cpp/ql/test/library-tests/unspecified_type/types/unspecified_type.expected +++ b/cpp/ql/test/library-tests/unspecified_type/types/unspecified_type.expected @@ -23,6 +23,7 @@ | file://:0:0:0:0 | _Imaginary double | _Imaginary double | | file://:0:0:0:0 | _Imaginary float | _Imaginary float | | file://:0:0:0:0 | _Imaginary long double | _Imaginary long double | +| file://:0:0:0:0 | __SVCount_t | __SVCount_t | | file://:0:0:0:0 | __bf16 | __bf16 | | file://:0:0:0:0 | __float128 | __float128 | | file://:0:0:0:0 | __fp16 | __fp16 | diff --git a/cpp/ql/test/library-tests/variables/variables/types.expected b/cpp/ql/test/library-tests/variables/variables/types.expected index 1d091ac2571b..362ab5c64334 100644 --- a/cpp/ql/test/library-tests/variables/variables/types.expected +++ b/cpp/ql/test/library-tests/variables/variables/types.expected @@ -22,6 +22,7 @@ | _Imaginary double | BinaryFloatingPointType, ImaginaryNumberType | | | | | | _Imaginary float | BinaryFloatingPointType, ImaginaryNumberType | | | | | | _Imaginary long double | BinaryFloatingPointType, ImaginaryNumberType | | | | | +| __SVCount_t | ScalableVectorCount | | | | | | __bf16 | BinaryFloatingPointType, RealNumberType | | | | | | __float128 | Float128Type | | | | | | __fp16 | BinaryFloatingPointType, RealNumberType | | | | |