diff --git a/cpp/downgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/exprs.ql b/cpp/downgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/exprs.ql new file mode 100644 index 000000000000..3af03b1d60b2 --- /dev/null +++ b/cpp/downgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/exprs.ql @@ -0,0 +1,17 @@ +class Expr extends @expr { + string toString() { none() } +} + +class Location extends @location_default { + string toString() { none() } +} + +predicate isExprWithNewBuiltin(Expr expr) { + exists(int kind | exprs(expr, kind, _) | 397 <= kind and kind <= 403) +} + +from Expr expr, int kind, int kind_new, Location location +where + exprs(expr, kind, location) and + if isExprWithNewBuiltin(expr) then kind_new = 1 else kind_new = kind +select expr, kind_new, location diff --git a/cpp/downgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/old.dbscheme b/cpp/downgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/old.dbscheme new file mode 100644 index 000000000000..293904928d85 --- /dev/null +++ b/cpp/downgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/old.dbscheme @@ -0,0 +1,2602 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +/** + * Gives the TRAP filename that `trap` is associated with. + * For debugging only. + */ +trap_filename( + int trap: @trap, + string filename: string ref +); + +/** + * Gives the tag name for `tag`. + * For debugging only. + */ +tag_name( + int tag: @tag, + string name: string ref +); + +@trap_or_tag = @tag | @trap; + +/** + * Gives the name for the source file. + */ +source_file_name( + int sf: @source_file, + string name: string ref +); + +/** + * In `build-mode: none` overlay mode, indicates that `source_file` + * (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the + * TRAP file corresponding to `foo.c`, something it transitively + * includes, or a template instantiation it transitively uses. + */ +source_file_uses_trap( + int source_file: @source_file ref, + int trap_file: @trap ref +); + +/** + * In `build-mode: none` overlay mode, indicates that the TRAP file + * `trap_file` uses tag `tag`. + */ +trap_uses_tag( + int trap_file: @trap ref, + int tag: @tag ref +); + +/** + * Holds if there is a definition of `element` in TRAP file or tag `t`. + */ +in_trap_or_tag( + int element: @element ref, + int t: @trap_or_tag ref +); + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +// ... 40 _Decimal32 +// ... 41 _Decimal64 +// ... 42 _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +| 67 = @bit_precise_int // _BitInt(N) +| 68 = @unsigned_bit_precise_int // unsigned _BitInt(N) +| 69 = @signed_bit_precise_int // signed _BitInt(N) +; + +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 +); + +bit_precise_int_types( + unique int id: @builtintype ref, + int bit_width: 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 +); +class_template_generated_from( + unique int template: @usertype ref, + int from: @usertype ref +) + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); +function_template_generated_from( + unique int template: @function ref, + int from: @function 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 +); +variable_template_generated_from( + unique int template: @variable ref, + int from: @variable ref +); + +is_alias_template(unique int id: @usertype ref); +alias_instantiation( + unique int to: @usertype ref, + int from: @usertype ref +); +alias_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +alias_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); +alias_template_generated_from( + unique int template: @usertype ref, + int from: @usertype ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype + | @derivedtype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +| 394 = @isinvocable +| 395 = @isnothrowinvocable +| 396 = @isbitwisecloneable +| 397 = @isvirtualbaseof +| 398 = @isimplicitlifetime +| 399 = @ltsynthesizesfromspaceship +| 400 = @gtsynthesizesfromspaceship +| 401 = @lesynthesizesfromspaceship +| 402 = @gesynthesizesfromspaceship +| 403 = @isstructural +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + | @isinvocable + | @isnothrowinvocable + | @isbitwisecloneable + | @isvirtualbaseof + | @isimplicitlifetime + | @ltsynthesizesfromspaceship + | @gtsynthesizesfromspaceship + | @lesynthesizesfromspaceship + | @gesynthesizesfromspaceship + | @isstructural + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +param_ref_to_this( + int expr: @param_ref ref +) + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 17 = @ppd_embed +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +embeds( + unique int id: @ppd_embed ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/downgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/semmlecode.cpp.dbscheme b/cpp/downgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/semmlecode.cpp.dbscheme new file mode 100644 index 000000000000..6aec212e408f --- /dev/null +++ b/cpp/downgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/semmlecode.cpp.dbscheme @@ -0,0 +1,2588 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +/** + * Gives the TRAP filename that `trap` is associated with. + * For debugging only. + */ +trap_filename( + int trap: @trap, + string filename: string ref +); + +/** + * Gives the tag name for `tag`. + * For debugging only. + */ +tag_name( + int tag: @tag, + string name: string ref +); + +@trap_or_tag = @tag | @trap; + +/** + * Gives the name for the source file. + */ +source_file_name( + int sf: @source_file, + string name: string ref +); + +/** + * In `build-mode: none` overlay mode, indicates that `source_file` + * (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the + * TRAP file corresponding to `foo.c`, something it transitively + * includes, or a template instantiation it transitively uses. + */ +source_file_uses_trap( + int source_file: @source_file ref, + int trap_file: @trap ref +); + +/** + * In `build-mode: none` overlay mode, indicates that the TRAP file + * `trap_file` uses tag `tag`. + */ +trap_uses_tag( + int trap_file: @trap ref, + int tag: @tag ref +); + +/** + * Holds if there is a definition of `element` in TRAP file or tag `t`. + */ +in_trap_or_tag( + int element: @element ref, + int t: @trap_or_tag ref +); + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +// ... 40 _Decimal32 +// ... 41 _Decimal64 +// ... 42 _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +| 67 = @bit_precise_int // _BitInt(N) +| 68 = @unsigned_bit_precise_int // unsigned _BitInt(N) +| 69 = @signed_bit_precise_int // signed _BitInt(N) +; + +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 +); + +bit_precise_int_types( + unique int id: @builtintype ref, + int bit_width: 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 +); +class_template_generated_from( + unique int template: @usertype ref, + int from: @usertype ref +) + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); +function_template_generated_from( + unique int template: @function ref, + int from: @function 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 +); +variable_template_generated_from( + unique int template: @variable ref, + int from: @variable ref +); + +is_alias_template(unique int id: @usertype ref); +alias_instantiation( + unique int to: @usertype ref, + int from: @usertype ref +); +alias_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +alias_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); +alias_template_generated_from( + unique int template: @usertype ref, + int from: @usertype ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype + | @derivedtype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +| 394 = @isinvocable +| 395 = @isnothrowinvocable +| 396 = @isbitwisecloneable +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + | @isinvocable + | @isnothrowinvocable + | @isbitwisecloneable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +param_ref_to_this( + int expr: @param_ref ref +) + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 17 = @ppd_embed +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +embeds( + unique int id: @ppd_embed ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/downgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/upgrade.properties b/cpp/downgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/upgrade.properties new file mode 100644 index 000000000000..d697a16a42fd --- /dev/null +++ b/cpp/downgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/upgrade.properties @@ -0,0 +1,3 @@ +description: Add new builtin operations +compatibility: partial +exprs.rel: run exprs.qlo diff --git a/cpp/ql/lib/change-notes/2026-10-16-builtins.md b/cpp/ql/lib/change-notes/2026-10-16-builtins.md new file mode 100644 index 000000000000..2434e465cd5a --- /dev/null +++ b/cpp/ql/lib/change-notes/2026-10-16-builtins.md @@ -0,0 +1,4 @@ +--- +category: feature +--- +* Added support for the `__builtin_lt_synthesizes_from_spaceship`, `__builtin_gt_synthesizes_from_spaceship`, `__builtin_le_synthesizes_from_spaceship`, `__builtin_ge_synthesizes_from_spaceship`, `__builtin_is_implicit_lifetime`, `__builtin_is_structural`, and `__builtin_is_virtual_base_of` builtin operations. diff --git a/cpp/ql/lib/semmle/code/cpp/exprs/BuiltInOperations.qll b/cpp/ql/lib/semmle/code/cpp/exprs/BuiltInOperations.qll index 2246a887b9c1..be7636fdadee 100644 --- a/cpp/ql/lib/semmle/code/cpp/exprs/BuiltInOperations.qll +++ b/cpp/ql/lib/semmle/code/cpp/exprs/BuiltInOperations.qll @@ -353,6 +353,21 @@ class BuiltInOperationIsBaseOf extends BuiltInOperation, @isbaseofexpr { override string getAPrimaryQlClass() { result = "BuiltInOperationIsBaseOf" } } +/** + * A C++ `__builtin_is_virtual_base_of` built-in operation (used by some implementations of the + * `` header). + * + * Returns `true` if the first type is a virtual base class of the second type. + * ``` + * bool v = __builtin_is_virtual_base_of(MyType, OtherType); + * ``` + */ +class BuiltInOperationIsVirtualBaseOf extends BuiltInOperation, @isvirtualbaseof { + override string toString() { result = "__builtin_is_virtual_base_of" } + + override string getAPrimaryQlClass() { result = "BuiltInOperationIsVirtualBaseOf" } +} + /** * A C++ `__is_class` built-in operation (used by some implementations of the * `` header). @@ -1999,3 +2014,105 @@ class BuiltInOperationIsNothrowInvocable extends BuiltInOperation, @isnothrowinv override string getAPrimaryQlClass() { result = "BuiltInOperationIsNothrowInvocable" } } + +/** + * A C++ `__builtin_is_implicit_lifetime` built-in operation (used by some implementations + * of the `` header). + * + * Returns `true` if a type `_Tp` is an implicit lifetime type. + * + * ``` + * template + * constexpr bool is_implicit_lifetime = __builtin_is_implicit_lifetime(_Tp); + * ``` + */ +class BuiltInOperationIsImplicitLifetime extends BuiltInOperation, @isimplicitlifetime { + override string toString() { result = "__builtin_is_implicit_lifetime" } + + override string getAPrimaryQlClass() { result = "BuiltInOperationIsImplicitLifetime" } +} + +/** + * A C++ `__builtin_is_structural` built-in operation (used by some implementations + * of the `` header). + * + * Returns `true` if a type `_Tp` is structural type. + * + * ``` + * template + * constexpr bool is_structural = __builtin_is_structural(_Tp); + * ``` + */ +class BuiltInOperationIsStructural extends BuiltInOperation, @isstructural { + override string toString() { result = "__builtin_is_structural" } + + override string getAPrimaryQlClass() { result = "BuiltInOperationIsStructural" } +} + +/** + * A C++ `__builtin_lt_synthesizes_from_spaceship` built-in operation (used by some container + * implementations). + * + * Returns `true` if the `<` operator is synthesized from the spaceship operator `<=>`. + * + * ``` + * bool v = __builtin_lt_synthesizes_from_spaceship(MyType, OtherType); + */ +class BuiltInOperationLtSynthesizesFromSpaceship extends BuiltInOperation, + @ltsynthesizesfromspaceship +{ + override string toString() { result = "__builtin_lt_synthesizes_from_spaceship" } + + override string getAPrimaryQlClass() { result = "BuiltInOperationLtSynthesizesFromSpaceship" } +} + +/** + * A C++ `__builtin_gt_synthesizes_from_spaceship` built-in operation (used by some container + * implementations). + * + * Returns `true` if the `>` operator is synthesized from the spaceship operator `<=>`. + * + * ``` + * bool v = __builtin_gt_synthesizes_from_spaceship(MyType, OtherType); + */ +class BuiltInOperationGtSynthesizesFromSpaceship extends BuiltInOperation, + @gtsynthesizesfromspaceship +{ + override string toString() { result = "__builtin_gt_synthesizes_from_spaceship" } + + override string getAPrimaryQlClass() { result = "BuiltInOperationGtSynthesizesFromSpaceship" } +} + +/** + * A C++ `__builtin_le_synthesizes_from_spaceship` built-in operation (used by some container + * implementations). + * + * Returns `true` if the `<=` operator is synthesized from the spaceship operator `<=>`. + * + * ``` + * bool v = __builtin_le_synthesizes_from_spaceship(MyType, OtherType); + */ +class BuiltInOperationLeSynthesizesFromSpaceship extends BuiltInOperation, + @lesynthesizesfromspaceship +{ + override string toString() { result = "__builtin_le_synthesizes_from_spaceship" } + + override string getAPrimaryQlClass() { result = "BuiltInOperationLeSynthesizesFromSpaceship" } +} + +/** + * A C++ `__builtin_ge_synthesizes_from_spaceship` built-in operation (used by some container + * implementations). + * + * Returns `true` if the `>=` operator is synthesized from the spaceship operator `<=>`. + * + * ``` + * bool v = __builtin_ge_synthesizes_from_spaceship(MyType, OtherType); + */ +class BuiltInOperationGeSynthesizesFromSpaceship extends BuiltInOperation, + @gesynthesizesfromspaceship +{ + override string toString() { result = "__builtin_ge_synthesizes_from_spaceship" } + + override string getAPrimaryQlClass() { result = "BuiltInOperationGeSynthesizesFromSpaceship" } +} diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme index 6aec212e408f..293904928d85 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme @@ -2004,6 +2004,13 @@ case @expr.kind of | 394 = @isinvocable | 395 = @isnothrowinvocable | 396 = @isbitwisecloneable +| 397 = @isvirtualbaseof +| 398 = @isimplicitlifetime +| 399 = @ltsynthesizesfromspaceship +| 400 = @gtsynthesizesfromspaceship +| 401 = @lesynthesizesfromspaceship +| 402 = @gesynthesizesfromspaceship +| 403 = @isstructural ; @var_args_expr = @vastartexpr @@ -2123,6 +2130,13 @@ case @expr.kind of | @isinvocable | @isnothrowinvocable | @isbitwisecloneable + | @isvirtualbaseof + | @isimplicitlifetime + | @ltsynthesizesfromspaceship + | @gtsynthesizesfromspaceship + | @lesynthesizesfromspaceship + | @gesynthesizesfromspaceship + | @isstructural ; compound_requirement_is_noexcept( diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats index 8f5c157b1ae7..90a3250189fb 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats @@ -2,7 +2,7 @@ @compilation - 12799 + 12794 @externalDataElement @@ -10,11 +10,11 @@ @file - 66019 + 65994 @folder - 12543 + 12538 @diagnostic @@ -22,7 +22,7 @@ @location_default - 46369281 + 46368911 @trap @@ -42,15 +42,15 @@ @macro_expansion - 40292589 + 40292268 @other_macro_reference - 300524 + 300521 @normal_function - 2699603 + 2699581 @unknown_function @@ -58,11 +58,11 @@ @constructor - 692625 + 692574 @destructor - 84842 + 84841 @conversion_function @@ -70,7 +70,7 @@ @operator - 647305 + 647300 @user_defined_literal @@ -82,23 +82,23 @@ @fun_decl - 4149410 + 4149377 @var_decl - 9411101 + 9411026 @type_decl - 1639750 + 1639737 @namespace_decl - 406675 + 406672 @using_declaration - 270974 + 271344 @using_directive @@ -110,27 +110,27 @@ @static_assert - 172120 + 172118 @parameter - 6932137 + 6932082 @membervariable - 1502215 + 1502203 @globalvariable - 634536 + 634531 @localvariable - 733038 + 733187 @enumconstant - 347913 + 347910 @errortype @@ -366,11 +366,11 @@ @bit_precise_int - 3 + 4 @unsigned_bit_precise_int - 4 + 6 @signed_bit_precise_int @@ -378,23 +378,23 @@ @pointer - 449258 + 449255 @type_with_specifiers - 686964 + 686958 @array - 89630 + 89629 @routineptr - 678207 + 678157 @reference - 959048 + 959040 @gnu_vector @@ -406,7 +406,7 @@ @rvalue_reference - 286941 + 286938 @block @@ -416,10 +416,6 @@ @scalable_vector 1 - - @decltype - 101803 - @typeof 811 @@ -498,15 +494,19 @@ @remove_reference - 5694 + 5695 + + + @decltype + 101802 @struct - 1056586 + 1056347 @union - 20750 + 20749 @enum @@ -514,11 +514,11 @@ @template_parameter - 879786 + 879462 @alias - 1791267 + 1791463 @unknown_usertype @@ -526,15 +526,15 @@ @class - 320951 + 320949 @template_template_parameter - 6191 + 6189 @proxy_class - 51198 + 51179 @scoped_enum @@ -542,7 +542,7 @@ @template_struct - 214653 + 214585 @template_class @@ -554,11 +554,11 @@ @mangledname - 6345485 + 6345435 @type_mention - 5937930 + 5937883 @concept_template @@ -566,11 +566,11 @@ @routinetype - 599125 + 599081 @ptrtomember - 9837 + 9834 @specifier @@ -582,11 +582,11 @@ @stdattribute - 347840 + 347838 @declspec - 330275 + 330272 @msattribute @@ -598,11 +598,11 @@ @attribute_arg_token - 16545 + 16544 @attribute_arg_constant_expr - 72691 + 72665 @attribute_arg_expr @@ -622,19 +622,19 @@ @derivation - 494887 + 494850 @frienddecl - 765587 + 765911 @comment - 11058465 + 11058376 @namespace - 8757 + 8754 @specialnamequalifyingelement @@ -642,15 +642,15 @@ @namequalifier - 3044887 + 3044942 @value - 13539325 + 13539217 @initialiser - 2292690 + 2292672 @address_of @@ -658,19 +658,19 @@ @indirect - 401768 + 401764 @array_to_pointer - 1953190 + 1953174 @parexpr - 4913791 + 4913752 @arithnegexpr - 586365 + 586361 @unaryplusexpr @@ -678,23 +678,23 @@ @complementexpr - 38173 + 38172 @notexpr - 355664 + 355661 @postincrexpr - 84542 + 84541 @postdecrexpr - 57376 + 57375 @preincrexpr - 96686 + 96685 @predecrexpr @@ -702,55 +702,55 @@ @conditionalexpr - 897622 + 897615 @addexpr - 580708 + 580703 @subexpr - 466665 + 466661 @mulexpr - 445292 + 445289 @divexpr - 52369 + 52368 @remexpr - 15870 + 15869 @paddexpr - 118586 + 118585 @psubexpr - 67993 + 67992 @pdiffexpr - 43833 + 43832 @lshiftexpr - 552173 + 552169 @rshiftexpr - 201367 + 201365 @andexpr - 483452 + 483448 @orexpr - 193999 + 193997 @xorexpr @@ -758,19 +758,19 @@ @eqexpr - 643188 + 643183 @neexpr - 411752 + 411749 @gtexpr - 111117 + 111116 @ltexpr - 139389 + 139388 @geexpr @@ -778,11 +778,11 @@ @leexpr - 291831 + 291828 @assignexpr - 1280779 + 1280769 @assignaddexpr @@ -794,7 +794,7 @@ @assignmulexpr - 11324 + 11319 @assigndivexpr @@ -834,23 +834,23 @@ @andlogicalexpr - 346490 + 346487 @orlogicalexpr - 1103221 + 1103212 @commaexpr - 165264 + 165262 @subscriptexpr - 435018 + 435015 @callexpr - 263482 + 263463 @vastartexpr @@ -870,39 +870,39 @@ @varaccess - 8252279 + 8252213 @runtime_sizeof - 401589 + 401586 @runtime_alignof - 50650 + 50646 @expr_stmt - 147584 + 147583 @routineexpr - 5708751 + 5708855 @type_operand - 1404979 + 1404968 @offsetofexpr - 148494 + 148493 @typescompexpr - 701742 + 701736 @literal - 8035745 + 8036394 @aggregateliteral @@ -910,27 +910,27 @@ @c_style_cast - 6023777 + 6023782 @temp_init - 984852 + 985294 @errorexpr - 45078 + 45075 @reference_to - 1891026 + 1890439 @ref_indirect - 2091992 + 2091838 @vacuous_destructor_call - 7766 + 7765 @assume @@ -986,31 +986,31 @@ @thisaccess - 1554385 + 1554373 @new_expr - 45787 + 45784 @delete_expr - 11379 + 11378 @throw_expr - 23913 + 23918 @condition_decl - 406885 + 406893 @braced_init_list - 2114 + 2115 @type_id - 47476 + 47472 @sizeof_pack @@ -1118,7 +1118,7 @@ @ctordirectinit - 111802 + 111793 @ctorvirtualinit @@ -1126,7 +1126,7 @@ @ctorfieldinit - 204063 + 204061 @ctordelegatinginit @@ -1134,7 +1134,7 @@ @dtordirectdestruct - 39102 + 39099 @dtorvirtualdestruct @@ -1142,11 +1142,11 @@ @dtorfielddestruct - 39473 + 39470 @static_cast - 348331 + 348329 @reinterpret_cast @@ -1154,7 +1154,7 @@ @const_cast - 24244 + 24242 @dynamic_cast @@ -1166,11 +1166,11 @@ @param_ref - 165240 + 165342 @noopexpr - 113 + 89 @istriviallyconstructibleexpr @@ -1266,11 +1266,11 @@ @isfinalexpr - 9319 + 9318 @noexceptexpr - 30482 + 30501 @builtinshufflevector @@ -1326,7 +1326,7 @@ @builtinshuffle - 620 + 619 @blockassignexpr @@ -1442,7 +1442,7 @@ @reuseexpr - 842823 + 842839 @istriviallycopyassignable @@ -1554,7 +1554,7 @@ @concept_id - 90176 + 90178 @isinvocable @@ -1568,17 +1568,45 @@ @isbitwisecloneable 2 + + @isvirtualbaseof + 2 + + + @isimplicitlifetime + 2 + + + @ltsynthesizesfromspaceship + 2 + + + @gtsynthesizesfromspaceship + 2 + + + @lesynthesizesfromspaceship + 2 + + + @gesynthesizesfromspaceship + 2 + + + @isstructural + 2 + @lambdacapture 31901 @stmt_expr - 2031035 + 2031019 @stmt_if - 989932 + 989924 @stmt_while @@ -1586,35 +1614,35 @@ @stmt_goto - 159862 + 159803 @stmt_label - 79011 + 78982 @stmt_return - 1257082 + 1257325 @stmt_block - 1707526 + 1707512 @stmt_end_test_while - 232395 + 232393 @stmt_for - 84365 + 84364 @stmt_switch_case - 831947 + 831962 @stmt_switch - 409797 + 409804 @stmt_asm @@ -1622,11 +1650,11 @@ @stmt_decl - 772377 + 772371 @stmt_empty - 427267 + 427275 @stmt_continue @@ -1634,11 +1662,11 @@ @stmt_break - 137610 + 137609 @stmt_try_block - 26563 + 26569 @stmt_microsoft_try @@ -1658,15 +1686,15 @@ @stmt_range_based_for - 6221 + 6225 @stmt_handler - 43492 + 43502 @stmt_constexpr_if - 103259 + 103258 @stmt_co_return @@ -1686,43 +1714,43 @@ @ppd_if - 581617 + 581612 @ppd_ifdef - 214302 + 214300 @ppd_ifndef - 160319 + 160318 @ppd_elif - 22188 + 22180 @ppd_else - 231198 + 231196 @ppd_endif - 874943 + 874936 @ppd_plain_include - 322504 + 322385 @ppd_define - 2706601 + 2706580 @ppd_undef - 98839 + 98838 @ppd_pragma - 399777 + 399774 @ppd_include_next @@ -1730,7 +1758,7 @@ @ppd_line - 18996 + 19000 @ppd_error @@ -1792,11 +1820,11 @@ compilations - 12799 + 12794 id - 12799 + 12794 cwd @@ -1814,7 +1842,7 @@ 1 2 - 12799 + 12794 @@ -1840,19 +1868,19 @@ compilation_args - 1024731 + 1024354 id - 12799 + 12794 num - 1486 + 1485 arg - 29630 + 29619 @@ -1871,12 +1899,12 @@ 42 43 - 1112 + 1111 43 44 - 727 + 726 44 @@ -1911,7 +1939,7 @@ 98 99 - 1358 + 1357 100 @@ -1926,7 +1954,7 @@ 104 119 - 1080 + 1079 120 @@ -1957,7 +1985,7 @@ 38 39 - 1518 + 1517 39 @@ -1967,7 +1995,7 @@ 40 42 - 1101 + 1100 42 @@ -1992,7 +2020,7 @@ 67 68 - 1422 + 1421 68 @@ -2002,7 +2030,7 @@ 70 71 - 1422 + 1421 73 @@ -2012,7 +2040,7 @@ 79 89 - 1144 + 1143 89 @@ -2180,17 +2208,17 @@ 1 2 - 13569 + 13564 2 3 - 12842 + 12837 3 103 - 2224 + 2223 104 @@ -2211,17 +2239,17 @@ 1 2 - 19621 + 19614 2 3 - 8832 + 8829 3 62 - 1176 + 1175 @@ -2231,19 +2259,19 @@ compilation_expanded_args - 1024731 + 1024354 id - 12799 + 12794 num - 1486 + 1485 arg - 29630 + 29619 @@ -2262,12 +2290,12 @@ 42 43 - 1112 + 1111 43 44 - 727 + 726 44 @@ -2302,7 +2330,7 @@ 98 99 - 1358 + 1357 100 @@ -2317,7 +2345,7 @@ 104 119 - 1080 + 1079 120 @@ -2348,7 +2376,7 @@ 38 39 - 1518 + 1517 39 @@ -2358,7 +2386,7 @@ 40 42 - 1101 + 1100 42 @@ -2383,7 +2411,7 @@ 67 68 - 1422 + 1421 68 @@ -2393,7 +2421,7 @@ 70 71 - 1422 + 1421 73 @@ -2403,7 +2431,7 @@ 79 89 - 1144 + 1143 89 @@ -2571,17 +2599,17 @@ 1 2 - 13569 + 13564 2 3 - 12842 + 12837 3 103 - 2224 + 2223 104 @@ -2602,17 +2630,17 @@ 1 2 - 19621 + 19614 2 3 - 8832 + 8829 3 62 - 1176 + 1175 @@ -2916,7 +2944,7 @@ compilation_time - 62930 + 62929 id @@ -2932,7 +2960,7 @@ seconds - 22646 + 19434 @@ -3013,27 +3041,22 @@ 3 4 - 326 + 381 4 5 - 1034 + 979 6 - 7 - 163 - - - 8 - 10 - 163 + 9 + 217 - 10 + 9 11 - 108 + 217 11 @@ -3041,23 +3064,23 @@ 217 - 12 + 13 18 - 163 + 217 18 - 20 - 217 + 21 + 163 21 - 40 + 45 217 - 60 - 152 + 52 + 137 108 @@ -3126,42 +3149,47 @@ 3 4 - 925 + 1034 4 5 - 1469 + 1415 5 6 - 108 + 272 6 7 - 653 + 272 7 + 8 + 435 + + + 8 9 - 381 + 163 9 - 11 + 12 381 - 12 - 31 + 13 + 43 381 - 42 - 98 - 217 + 44 + 95 + 163 @@ -3206,24 +3234,19 @@ 12 - - 4 - 5 - 54 - 5 6 - 54 + 108 - 226 - 227 + 198 + 199 54 - 230 - 231 + 201 + 202 54 @@ -3240,17 +3263,22 @@ 1 2 - 17583 + 13446 2 3 - 3701 + 3919 3 - 46 - 1360 + 5 + 1578 + + + 5 + 45 + 489 @@ -3266,22 +3294,22 @@ 1 2 - 16494 + 12738 2 3 - 4191 + 3701 3 - 8 - 1742 + 4 + 1687 - 12 - 71 - 217 + 4 + 65 + 1306 @@ -3297,12 +3325,12 @@ 1 2 - 19978 + 16603 2 3 - 2667 + 2830 @@ -3578,19 +3606,19 @@ compilation_finished - 12799 + 12794 id - 12799 + 12794 cpu_seconds - 8843 + 9791 elapsed_seconds - 149 + 256 @@ -3604,7 +3632,7 @@ 1 2 - 12799 + 12794 @@ -3620,7 +3648,7 @@ 1 2 - 12799 + 12794 @@ -3636,17 +3664,17 @@ 1 2 - 7078 + 8316 2 3 - 1186 + 1004 3 - 34 - 577 + 20 + 470 @@ -3662,12 +3690,12 @@ 1 2 - 8009 + 9182 2 3 - 834 + 609 @@ -3683,17 +3711,12 @@ 1 2 - 32 + 74 2 3 - 10 - - - 3 - 4 - 10 + 21 4 @@ -3701,39 +3724,39 @@ 10 - 15 - 16 + 6 + 7 21 - 24 - 25 - 10 + 8 + 12 + 21 - 30 - 31 - 10 + 13 + 14 + 21 - 37 - 38 - 10 + 16 + 30 + 21 - 235 - 236 - 10 + 41 + 98 + 21 - 411 - 412 - 10 + 157 + 229 + 21 - 418 - 419 - 10 + 268 + 290 + 21 @@ -3749,17 +3772,12 @@ 1 2 - 32 + 74 2 3 - 10 - - - 3 - 4 - 10 + 21 4 @@ -3767,39 +3785,39 @@ 10 - 15 - 16 + 6 + 7 21 - 24 - 25 - 10 + 8 + 12 + 21 - 30 - 31 - 10 + 13 + 14 + 21 - 37 - 38 - 10 + 16 + 30 + 21 - 200 - 201 - 10 + 41 + 96 + 21 - 216 - 217 - 10 + 134 + 152 + 21 - 356 - 357 - 10 + 204 + 232 + 21 @@ -4036,11 +4054,11 @@ locations_default - 46369281 + 46368911 id - 46369281 + 46368911 file @@ -4048,7 +4066,7 @@ beginLine - 7382992 + 7382933 beginColumn @@ -4056,7 +4074,7 @@ endLine - 7383974 + 7383915 endColumn @@ -4074,7 +4092,7 @@ 1 2 - 46369281 + 46368911 @@ -4090,7 +4108,7 @@ 1 2 - 46369281 + 46368911 @@ -4106,7 +4124,7 @@ 1 2 - 46369281 + 46368911 @@ -4122,7 +4140,7 @@ 1 2 - 46369281 + 46368911 @@ -4138,7 +4156,7 @@ 1 2 - 46369281 + 46368911 @@ -4539,27 +4557,27 @@ 1 2 - 4879594 + 4879555 2 3 - 768245 + 768239 3 4 - 535451 + 535447 4 12 - 558166 + 558161 12 97 - 555342 + 555337 97 @@ -4580,27 +4598,27 @@ 1 2 - 4940984 + 4940945 2 3 - 1200560 + 1200550 3 6 - 629747 + 629742 6 56 - 554973 + 554969 56 329 - 56725 + 56724 @@ -4616,27 +4634,27 @@ 1 2 - 5554157 + 5554112 2 3 - 476638 + 476635 3 7 - 569093 + 569089 7 25 - 557061 + 557056 25 94 - 226041 + 226039 @@ -4652,12 +4670,12 @@ 1 2 - 6923297 + 6923241 2 85 - 459695 + 459691 @@ -4673,27 +4691,27 @@ 1 2 - 4947124 + 4947084 2 3 - 731165 + 731159 3 4 - 528207 + 528203 4 12 - 576214 + 576210 12 71 - 554605 + 554600 71 @@ -5094,32 +5112,32 @@ 1 2 - 4877384 + 4877345 2 3 - 771560 + 771554 3 4 - 534714 + 534710 4 12 - 557061 + 557056 12 94 - 553868 + 553864 94 622 - 89385 + 89384 @@ -5135,27 +5153,27 @@ 1 2 - 4938038 + 4937998 2 3 - 1204121 + 1204111 3 6 - 622258 + 622253 6 51 - 554850 + 554846 51 329 - 64706 + 64705 @@ -5171,12 +5189,12 @@ 1 2 - 6940118 + 6940062 2 15 - 443856 + 443852 @@ -5192,27 +5210,27 @@ 1 2 - 5552806 + 5552762 2 3 - 475165 + 475161 3 7 - 573268 + 573263 7 25 - 559762 + 559757 25 89 - 222971 + 222969 @@ -5228,27 +5246,27 @@ 1 2 - 4945650 + 4945611 2 3 - 736322 + 736316 3 4 - 526611 + 526606 4 12 - 578056 + 578052 12 72 - 554359 + 554355 72 @@ -5563,15 +5581,15 @@ files - 66019 + 65994 id - 66019 + 65994 name - 66019 + 65994 @@ -5585,7 +5603,7 @@ 1 2 - 66019 + 65994 @@ -5601,7 +5619,7 @@ 1 2 - 66019 + 65994 @@ -5611,15 +5629,15 @@ folders - 12543 + 12538 id - 12543 + 12538 name - 12543 + 12538 @@ -5633,7 +5651,7 @@ 1 2 - 12543 + 12538 @@ -5649,7 +5667,7 @@ 1 2 - 12543 + 12538 @@ -5659,15 +5677,15 @@ containerparent - 78540 + 78512 parent - 12543 + 12538 child - 78540 + 78512 @@ -5681,7 +5699,7 @@ 1 2 - 6105 + 6103 2 @@ -5732,7 +5750,7 @@ 1 2 - 78540 + 78512 @@ -5742,15 +5760,15 @@ numlines - 794398 + 794391 element_id - 793293 + 793286 num_lines - 38799 + 38798 num_code @@ -5772,7 +5790,7 @@ 1 2 - 792188 + 792181 2 @@ -5793,7 +5811,7 @@ 1 2 - 792188 + 792181 2 @@ -5814,7 +5832,7 @@ 1 2 - 793047 + 793041 2 @@ -5907,7 +5925,7 @@ 1 2 - 26398 + 26397 2 @@ -5984,7 +6002,7 @@ 1 2 - 21855 + 21854 2 @@ -7508,11 +7526,11 @@ fileannotations - 4252500 + 4250935 id - 5838 + 5836 kind @@ -7520,11 +7538,11 @@ name - 59443 + 59421 value - 40002 + 39988 @@ -7543,7 +7561,7 @@ 2 3 - 5635 + 5633 @@ -7569,7 +7587,7 @@ 212 291 - 449 + 448 291 @@ -7594,7 +7612,7 @@ 550 551 - 1347 + 1346 553 @@ -7609,7 +7627,7 @@ 753 1231 - 449 + 448 1234 @@ -7645,12 +7663,12 @@ 352 434 - 449 + 448 434 490 - 449 + 448 490 @@ -7665,7 +7683,7 @@ 706 707 - 1347 + 1346 710 @@ -7769,62 +7787,62 @@ 1 2 - 11163 + 11159 2 3 - 4416 + 4414 3 5 - 5122 + 5120 5 7 - 4148 + 4147 7 9 - 4651 + 4649 9 16 - 4384 + 4382 16 19 - 4950 + 4949 19 27 - 4309 + 4307 27 47 - 4897 + 4895 47 128 - 4982 + 4981 128 459 - 4683 + 4681 459 546 - 1732 + 1731 @@ -7840,7 +7858,7 @@ 1 2 - 59443 + 59421 @@ -7856,57 +7874,57 @@ 1 2 - 11730 + 11726 2 3 - 7784 + 7781 3 4 - 4148 + 4147 4 6 - 4116 + 4115 6 8 - 3464 + 3463 8 11 - 4801 + 4799 11 17 - 5464 + 5462 17 23 - 4758 + 4756 23 41 - 4737 + 4735 41 95 - 4523 + 4521 95 1726 - 3913 + 3912 @@ -7922,27 +7940,27 @@ 1 2 - 3400 + 3399 2 4 - 1657 + 1656 4 5 - 3229 + 3228 5 8 - 2491 + 2490 8 14 - 3004 + 3003 14 @@ -7952,42 +7970,42 @@ 17 24 - 3079 + 3078 24 51 - 3582 + 3580 51 58 - 3068 + 3067 58 80 - 3015 + 3014 81 151 - 3122 + 3121 151 334 - 3015 + 3014 334 473 - 3036 + 3035 473 547 - 2341 + 2340 @@ -8003,7 +8021,7 @@ 1 2 - 39992 + 39977 2 @@ -8024,67 +8042,67 @@ 1 2 - 3443 + 3441 2 4 - 1935 + 1934 4 5 - 3090 + 3089 5 8 - 2512 + 2511 8 14 - 3528 + 3527 14 18 - 3496 + 3495 18 28 - 3240 + 3238 28 34 - 3186 + 3185 34 41 - 3240 + 3238 41 66 - 3026 + 3025 66 92 - 3111 + 3110 92 113 - 3026 + 3025 113 145 - 3068 + 3067 145 @@ -8099,15 +8117,15 @@ inmacroexpansion - 149973979 + 149972783 id - 24663860 + 24663663 inv - 3704596 + 3704566 @@ -8121,37 +8139,37 @@ 1 3 - 2207729 + 2207711 3 5 - 1468685 + 1468674 5 6 - 1626701 + 1626688 6 7 - 6580830 + 6580777 7 8 - 8716496 + 8716427 8 9 - 3556027 + 3555999 9 22 - 507389 + 507385 @@ -8167,32 +8185,32 @@ 1 2 - 529077 + 529073 2 3 - 740947 + 740941 3 4 - 480815 + 480811 4 7 - 280651 + 280649 7 8 - 282072 + 282069 8 9 - 330155 + 330153 9 @@ -8202,22 +8220,22 @@ 10 11 - 444522 + 444519 11 337 - 307708 + 307705 339 423 - 281674 + 281672 423 7616 - 23928 + 23927 @@ -8227,15 +8245,15 @@ affectedbymacroexpansion - 48637828 + 48637440 id - 7021712 + 7021656 inv - 3802035 + 3802004 @@ -8249,37 +8267,37 @@ 1 2 - 3845602 + 3845572 2 3 - 766084 + 766078 3 4 - 361737 + 361735 4 5 - 751511 + 751505 5 12 - 535006 + 535002 12 50 - 556107 + 556103 50 9900 - 205660 + 205658 @@ -8295,62 +8313,62 @@ 1 4 - 313742 + 313740 4 7 - 319104 + 319101 7 9 - 300107 + 300104 9 12 - 342542 + 342540 12 13 - 460448 + 460444 13 14 - 224633 + 224631 14 15 - 409403 + 409400 15 16 - 165317 + 165315 16 17 - 377187 + 377184 17 18 - 202389 + 202387 18 20 - 342019 + 342016 20 26 - 297274 + 297272 26 @@ -8365,19 +8383,19 @@ macroinvocations - 40373865 + 40373543 id - 40373865 + 40373543 macro_id - 182367 + 182365 location - 5923123 + 5923076 kind @@ -8395,7 +8413,7 @@ 1 2 - 40373865 + 40373543 @@ -8411,7 +8429,7 @@ 1 2 - 40373865 + 40373543 @@ -8427,7 +8445,7 @@ 1 2 - 40373865 + 40373543 @@ -8443,12 +8461,12 @@ 1 2 - 61079 + 61078 2 3 - 27600 + 27599 3 @@ -8499,7 +8517,7 @@ 1 2 - 77628 + 77627 2 @@ -8550,7 +8568,7 @@ 1 2 - 177848 + 177847 2 @@ -8571,17 +8589,17 @@ 1 2 - 5259361 + 5259319 2 4 - 429406 + 429403 4 72214 - 234355 + 234353 @@ -8597,7 +8615,7 @@ 1 2 - 5900967 + 5900919 2 @@ -8618,7 +8636,7 @@ 1 2 - 5923123 + 5923076 @@ -8691,15 +8709,15 @@ macroparent - 33673531 + 33673263 id - 33673531 + 33673263 parent_id - 15935844 + 15935717 @@ -8713,7 +8731,7 @@ 1 2 - 33673531 + 33673263 @@ -8729,27 +8747,27 @@ 1 2 - 7812284 + 7812221 2 3 - 1595250 + 1595237 3 4 - 4705781 + 4705743 4 5 - 1296657 + 1296647 5 205 - 525870 + 525866 @@ -8759,15 +8777,15 @@ macrolocationbind - 6014601 + 6014113 id - 4204073 + 4203558 location - 2268452 + 2268486 @@ -8781,12 +8799,12 @@ 1 2 - 3282337 + 3281808 2 3 - 488105 + 488113 3 @@ -8796,7 +8814,7 @@ 4 5 - 411988 + 411994 5 @@ -8817,27 +8835,27 @@ 1 2 - 1330299 + 1330319 2 3 - 480271 + 480278 3 4 - 7812 + 7813 4 5 - 426051 + 426058 5 522 - 24016 + 24017 @@ -8847,11 +8865,11 @@ macro_argument_unexpanded - 83523288 + 83492408 invocation - 26610301 + 26600368 argument_index @@ -8859,7 +8877,7 @@ text - 347515 + 347387 @@ -8873,22 +8891,22 @@ 1 2 - 9798055 + 9794310 2 3 - 9894700 + 9891058 3 4 - 5064942 + 5063078 4 67 - 1852603 + 1851921 @@ -8904,22 +8922,22 @@ 1 2 - 9982950 + 9979137 2 3 - 9912504 + 9908855 3 4 - 4906299 + 4904493 4 67 - 1808547 + 1807881 @@ -8935,7 +8953,7 @@ 46457 46458 - 620 + 619 46659 @@ -8944,7 +8962,7 @@ 646916 - 2488547 + 2488534 32 @@ -8961,7 +8979,7 @@ 2 3 - 620 + 619 13 @@ -8987,57 +9005,57 @@ 1 2 - 40195 + 40180 2 3 - 63078 + 63055 3 4 - 21247 + 21239 4 5 - 35126 + 35113 5 6 - 39746 + 39731 6 9 - 31191 + 31180 9 15 - 29331 + 29320 15 26 - 26198 + 26188 26 57 - 27481 + 27471 57 517 - 26337 + 26327 518 486640 - 7581 + 7578 @@ -9053,17 +9071,17 @@ 1 2 - 246187 + 246096 2 3 - 90987 + 90954 3 9 - 10340 + 10336 @@ -9073,11 +9091,11 @@ macro_argument_expanded - 83523288 + 83492408 invocation - 26610301 + 26600368 argument_index @@ -9085,7 +9103,7 @@ text - 210472 + 210395 @@ -9099,22 +9117,22 @@ 1 2 - 9798055 + 9794310 2 3 - 9894700 + 9891058 3 4 - 5064942 + 5063078 4 67 - 1852603 + 1851921 @@ -9130,22 +9148,22 @@ 1 2 - 12794618 + 12789770 2 3 - 8535135 + 8531993 3 4 - 4277907 + 4276333 4 9 - 1002639 + 1002270 @@ -9161,7 +9179,7 @@ 46457 46458 - 620 + 619 46659 @@ -9170,7 +9188,7 @@ 646916 - 2488547 + 2488534 32 @@ -9213,57 +9231,57 @@ 1 2 - 22102 + 22094 2 3 - 27139 + 27129 3 4 - 44012 + 43996 4 5 - 16253 + 16247 5 6 - 3314 + 3313 6 7 - 18520 + 18513 7 10 - 19194 + 19187 10 19 - 18541 + 18535 19 51 - 15964 + 15958 51 251 - 15793 + 15787 251 - 1169187 - 9634 + 1169174 + 9630 @@ -9279,17 +9297,17 @@ 1 2 - 106353 + 106314 2 3 - 90014 + 89981 3 66 - 14104 + 14099 @@ -9299,15 +9317,15 @@ functions - 3995810 + 3995778 id - 3995810 + 3995778 name - 1666640 + 1666626 kind @@ -9325,7 +9343,7 @@ 1 2 - 3995810 + 3995778 @@ -9341,7 +9359,7 @@ 1 2 - 3995810 + 3995778 @@ -9357,17 +9375,17 @@ 1 2 - 1422058 + 1422047 2 4 - 138497 + 138496 4 3162 - 106083 + 106082 @@ -9383,7 +9401,7 @@ 1 2 - 1663816 + 1663802 2 @@ -9490,26 +9508,26 @@ builtin_functions - 31213 + 31201 id - 31213 + 31201 function_entry_point - 1131527 + 1131444 id - 1128150 + 1128067 entry_point - 1131527 + 1131444 @@ -9523,7 +9541,7 @@ 1 2 - 1125314 + 1125231 2 @@ -9544,7 +9562,7 @@ 1 2 - 1131527 + 1131444 @@ -9554,15 +9572,15 @@ function_return_type - 4012877 + 4012845 id - 3995810 + 3995778 return_type - 611084 + 611080 @@ -9576,7 +9594,7 @@ 1 2 - 3978744 + 3978712 2 @@ -9597,12 +9615,12 @@ 1 2 - 304867 + 304864 2 3 - 211921 + 211919 3 @@ -9897,44 +9915,44 @@ purefunctions - 131114 + 131113 id - 131114 + 131113 function_deleted - 87628 + 87630 id - 87628 + 87630 function_defaulted - 51425 + 51426 id - 51425 + 51426 function_prototyped - 3994337 + 3994305 id - 3994337 + 3994305 @@ -10014,15 +10032,15 @@ member_function_this_type - 670714 + 671002 id - 670714 + 671002 this_type - 227880 + 227957 @@ -10036,7 +10054,7 @@ 1 2 - 670714 + 671002 @@ -10052,32 +10070,32 @@ 1 2 - 100108 + 100146 2 3 - 59175 + 59164 3 4 - 22091 + 22137 4 5 - 13879 + 13853 5 8 - 18520 + 18535 8 152 - 14104 + 14120 @@ -10087,27 +10105,27 @@ fun_decls - 4155304 + 4155271 id - 4149410 + 4149377 function - 3975060 + 3975028 type_id - 604209 + 604204 name - 1665166 + 1665153 location - 2768852 + 2768830 @@ -10121,7 +10139,7 @@ 1 2 - 4149410 + 4149377 @@ -10137,7 +10155,7 @@ 1 2 - 4143517 + 4143484 2 @@ -10158,7 +10176,7 @@ 1 2 - 4149410 + 4149377 @@ -10174,7 +10192,7 @@ 1 2 - 4149410 + 4149377 @@ -10190,12 +10208,12 @@ 1 2 - 3815567 + 3815536 2 5 - 159493 + 159492 @@ -10211,7 +10229,7 @@ 1 2 - 3957011 + 3956980 2 @@ -10232,7 +10250,7 @@ 1 2 - 3975060 + 3975028 @@ -10248,12 +10266,12 @@ 1 2 - 3836562 + 3836532 2 4 - 138497 + 138496 @@ -10269,22 +10287,22 @@ 1 2 - 290256 + 290253 2 3 - 219288 + 219286 3 5 - 48376 + 48375 5 506 - 45429 + 45428 555 @@ -10305,17 +10323,17 @@ 1 2 - 300815 + 300812 2 3 - 210447 + 210446 3 5 - 47639 + 47638 5 @@ -10336,17 +10354,17 @@ 1 2 - 486093 + 486089 2 3 - 52305 + 52304 3 7 - 49358 + 49357 7 @@ -10367,7 +10385,7 @@ 1 2 - 449258 + 449255 2 @@ -10382,7 +10400,7 @@ 6 4756 - 30327 + 30326 @@ -10398,17 +10416,17 @@ 1 2 - 1310327 + 1310316 2 3 - 190925 + 190924 3 11 - 127693 + 127692 11 @@ -10429,17 +10447,17 @@ 1 2 - 1421567 + 1421556 2 4 - 138988 + 138987 4 3162 - 104610 + 104609 @@ -10455,7 +10473,7 @@ 1 2 - 1576763 + 1576751 2 @@ -10476,17 +10494,17 @@ 1 2 - 1345688 + 1345677 2 3 - 205045 + 205043 3 1592 - 114432 + 114431 @@ -10502,17 +10520,17 @@ 1 2 - 2376564 + 2376545 2 3 - 251948 + 251946 3 211 - 140339 + 140338 @@ -10528,17 +10546,17 @@ 1 2 - 2396332 + 2396313 2 3 - 232671 + 232669 3 211 - 139848 + 139847 @@ -10554,12 +10572,12 @@ 1 2 - 2655893 + 2655871 2 211 - 112959 + 112958 @@ -10575,7 +10593,7 @@ 1 2 - 2730298 + 2730276 2 @@ -10590,11 +10608,11 @@ fun_def - 1397747 + 1397736 id - 1397747 + 1397736 @@ -10623,11 +10641,11 @@ fun_decl_specifiers - 4215835 + 4215802 id - 1724347 + 1724333 name @@ -10645,17 +10663,17 @@ 1 2 - 360855 + 360852 2 3 - 258087 + 258085 3 4 - 1082812 + 1082804 4 @@ -10857,26 +10875,26 @@ fun_decl_empty_throws - 434681 + 434678 fun_decl - 434681 + 434678 fun_decl_noexcept - 140571 + 140561 fun_decl - 140571 + 140561 constant - 140132 + 140122 @@ -10890,7 +10908,7 @@ 1 2 - 140571 + 140561 @@ -10906,7 +10924,7 @@ 1 2 - 139693 + 139683 2 @@ -10921,11 +10939,11 @@ fun_decl_empty_noexcept - 1156481 + 1156472 fun_decl - 1156481 + 1156472 @@ -11030,7 +11048,7 @@ fun_requires - 28966 + 28967 id @@ -11160,7 +11178,7 @@ 1 2 - 28495 + 28496 2 @@ -11191,19 +11209,19 @@ param_decl_bind - 7220306 + 7220248 id - 7220306 + 7220248 index - 7858 + 7857 fun_decl - 3489335 + 3489307 @@ -11217,7 +11235,7 @@ 1 2 - 7220306 + 7220248 @@ -11233,7 +11251,7 @@ 1 2 - 7220306 + 7220248 @@ -11249,7 +11267,7 @@ 2 3 - 3929 + 3928 6 @@ -11290,7 +11308,7 @@ 2 3 - 3929 + 3928 6 @@ -11331,27 +11349,27 @@ 1 2 - 1486764 + 1486752 2 3 - 972677 + 972669 3 4 - 592544 + 592540 4 5 - 285958 + 285956 5 65 - 151389 + 151388 @@ -11367,27 +11385,27 @@ 1 2 - 1486764 + 1486752 2 3 - 972677 + 972669 3 4 - 592544 + 592540 4 5 - 285958 + 285956 5 65 - 151389 + 151388 @@ -11397,27 +11415,27 @@ var_decls - 9417486 + 9417411 id - 9411101 + 9411026 variable - 9072837 + 9072765 type_id - 1441089 + 1441078 name - 839090 + 839084 location - 6177029 + 6176980 @@ -11431,7 +11449,7 @@ 1 2 - 9411101 + 9411026 @@ -11447,7 +11465,7 @@ 1 2 - 9404717 + 9404642 2 @@ -11468,7 +11486,7 @@ 1 2 - 9411101 + 9411026 @@ -11484,7 +11502,7 @@ 1 2 - 9411101 + 9411026 @@ -11500,12 +11518,12 @@ 1 2 - 8752254 + 8752184 2 5 - 320583 + 320580 @@ -11521,12 +11539,12 @@ 1 2 - 9020532 + 9020460 2 3 - 52305 + 52304 @@ -11542,12 +11560,12 @@ 1 2 - 8969087 + 8969015 2 4 - 103750 + 103749 @@ -11563,12 +11581,12 @@ 1 2 - 8831448 + 8831378 2 4 - 241389 + 241387 @@ -11584,27 +11602,27 @@ 1 2 - 839213 + 839206 2 3 - 280556 + 280554 3 5 - 127570 + 127569 5 11 - 112836 + 112835 11 2786 - 80913 + 80912 @@ -11620,22 +11638,22 @@ 1 2 - 860454 + 860447 2 3 - 265699 + 265697 3 5 - 122413 + 122412 5 11 - 112468 + 112467 11 @@ -11656,22 +11674,22 @@ 1 2 - 1105036 + 1105027 2 3 - 191048 + 191046 3 7 - 116397 + 116396 7 1038 - 28608 + 28607 @@ -11687,22 +11705,22 @@ 1 2 - 974519 + 974511 2 3 - 215236 + 215234 3 5 - 104610 + 104609 5 15 - 109889 + 109888 15 @@ -11723,12 +11741,12 @@ 1 2 - 457239 + 457235 2 3 - 162194 + 162193 3 @@ -11738,12 +11756,12 @@ 4 7 - 64583 + 64582 7 24 - 63969 + 63968 24 @@ -11764,27 +11782,27 @@ 1 2 - 468166 + 468163 2 3 - 162194 + 162193 3 4 - 55129 + 55128 4 8 - 70845 + 70844 8 43 - 63355 + 63354 43 @@ -11805,7 +11823,7 @@ 1 2 - 642885 + 642880 2 @@ -11815,7 +11833,7 @@ 3 11 - 64092 + 64091 11 @@ -11836,12 +11854,12 @@ 1 2 - 484865 + 484861 2 3 - 180980 + 180978 3 @@ -11851,12 +11869,12 @@ 4 8 - 63969 + 63968 8 22619 - 57953 + 57952 @@ -11872,12 +11890,12 @@ 1 2 - 5668589 + 5668544 2 16 - 468780 + 468777 16 @@ -11898,12 +11916,12 @@ 1 2 - 5749257 + 5749211 2 2935 - 427771 + 427768 @@ -11919,12 +11937,12 @@ 1 2 - 5876213 + 5876167 2 2555 - 300815 + 300812 @@ -11940,7 +11958,7 @@ 1 2 - 6164873 + 6164824 2 @@ -11955,11 +11973,11 @@ var_def - 3684804 + 3684775 id - 3684804 + 3684775 @@ -11977,11 +11995,11 @@ var_decl_specifiers - 481672 + 481669 id - 481672 + 481669 name @@ -11999,7 +12017,7 @@ 1 2 - 481672 + 481669 @@ -12109,19 +12127,19 @@ type_decls - 1639750 + 1639737 id - 1639750 + 1639737 type_id - 1621088 + 1621075 location - 1543612 + 1543600 @@ -12135,7 +12153,7 @@ 1 2 - 1639750 + 1639737 @@ -12151,7 +12169,7 @@ 1 2 - 1639750 + 1639737 @@ -12167,7 +12185,7 @@ 1 2 - 1605003 + 1604990 2 @@ -12188,7 +12206,7 @@ 1 2 - 1605126 + 1605113 2 @@ -12209,7 +12227,7 @@ 1 2 - 1513531 + 1513519 2 @@ -12230,7 +12248,7 @@ 1 2 - 1513653 + 1513641 2 @@ -12245,22 +12263,22 @@ type_def - 1092512 + 1092503 id - 1092512 + 1092503 type_decl_top - 676228 + 676223 type_decl - 676228 + 676223 @@ -12340,11 +12358,11 @@ namespace_decls - 406675 + 406672 id - 406675 + 406672 namespace_id @@ -12352,11 +12370,11 @@ location - 406675 + 406672 bodylocation - 406675 + 406672 @@ -12370,7 +12388,7 @@ 1 2 - 406675 + 406672 @@ -12386,7 +12404,7 @@ 1 2 - 406675 + 406672 @@ -12402,7 +12420,7 @@ 1 2 - 406675 + 406672 @@ -12616,7 +12634,7 @@ 1 2 - 406675 + 406672 @@ -12632,7 +12650,7 @@ 1 2 - 406675 + 406672 @@ -12648,7 +12666,7 @@ 1 2 - 406675 + 406672 @@ -12664,7 +12682,7 @@ 1 2 - 406675 + 406672 @@ -12680,7 +12698,7 @@ 1 2 - 406675 + 406672 @@ -12696,7 +12714,7 @@ 1 2 - 406675 + 406672 @@ -12706,19 +12724,19 @@ usings - 275176 + 275545 id - 275176 + 275545 element_id - 59517 + 59966 location - 27181 + 27171 kind @@ -12736,7 +12754,7 @@ 1 2 - 275176 + 275545 @@ -12752,7 +12770,7 @@ 1 2 - 275176 + 275545 @@ -12768,7 +12786,7 @@ 1 2 - 275176 + 275545 @@ -12784,17 +12802,17 @@ 1 2 - 51701 + 52152 2 5 - 5442 + 5440 5 134 - 2373 + 2372 @@ -12810,17 +12828,17 @@ 1 2 - 51701 + 52152 2 5 - 5442 + 5440 5 134 - 2373 + 2372 @@ -12836,7 +12854,7 @@ 1 2 - 59517 + 59966 @@ -12852,21 +12870,21 @@ 1 2 - 21450 + 21442 2 4 - 2320 + 2319 4 132 - 1967 + 1966 145 - 364 + 370 1443 @@ -12883,21 +12901,21 @@ 1 2 - 21450 + 21442 2 4 - 2320 + 2319 4 132 - 1967 + 1966 145 - 364 + 370 1443 @@ -12914,7 +12932,7 @@ 1 2 - 27181 + 27171 @@ -12933,8 +12951,8 @@ 10 - 25341 - 25342 + 25385 + 25386 10 @@ -12954,8 +12972,8 @@ 10 - 5352 - 5353 + 5396 + 5397 10 @@ -12987,15 +13005,15 @@ using_container - 582165 + 582421 parent - 20541 + 20619 child - 275176 + 275545 @@ -13009,27 +13027,27 @@ 1 2 - 9131 + 9139 2 3 - 1625 + 1614 3 6 - 1785 + 1795 6 7 - 2288 + 2362 7 26 - 1550 + 1549 26 @@ -13039,12 +13057,12 @@ 145 146 - 2651 + 2650 146 437 - 695 + 694 @@ -13060,27 +13078,27 @@ 1 2 - 98184 + 98618 2 3 - 121848 + 121803 3 4 - 19964 + 19956 4 5 - 26839 + 26829 5 65 - 8340 + 8337 @@ -13090,15 +13108,15 @@ static_asserts - 172120 + 172118 id - 172120 + 172118 condition - 172120 + 172118 message @@ -13106,11 +13124,11 @@ location - 22499 + 22498 enclosing - 6220 + 6219 @@ -13124,7 +13142,7 @@ 1 2 - 172120 + 172118 @@ -13140,7 +13158,7 @@ 1 2 - 172120 + 172118 @@ -13156,7 +13174,7 @@ 1 2 - 172120 + 172118 @@ -13172,7 +13190,7 @@ 1 2 - 172120 + 172118 @@ -13188,7 +13206,7 @@ 1 2 - 172120 + 172118 @@ -13204,7 +13222,7 @@ 1 2 - 172120 + 172118 @@ -13220,7 +13238,7 @@ 1 2 - 172120 + 172118 @@ -13236,7 +13254,7 @@ 1 2 - 172120 + 172118 @@ -13272,7 +13290,7 @@ 12 17 - 3110 + 3109 17 @@ -13313,7 +13331,7 @@ 12 17 - 3110 + 3109 17 @@ -13698,23 +13716,23 @@ params - 6972041 + 6971985 id - 6932137 + 6932082 function - 3362133 + 3362107 index - 7858 + 7857 type_id - 1206945 + 1206935 @@ -13728,7 +13746,7 @@ 1 2 - 6932137 + 6932082 @@ -13744,7 +13762,7 @@ 1 2 - 6932137 + 6932082 @@ -13760,12 +13778,12 @@ 1 2 - 6892233 + 6892178 2 3 - 39904 + 39903 @@ -13781,27 +13799,27 @@ 1 2 - 1450912 + 1450900 2 3 - 920495 + 920487 3 4 - 570198 + 570194 4 5 - 276504 + 276502 5 65 - 144023 + 144021 @@ -13817,27 +13835,27 @@ 1 2 - 1450912 + 1450900 2 3 - 920495 + 920487 3 4 - 570198 + 570194 4 5 - 276504 + 276502 5 65 - 144023 + 144021 @@ -13853,22 +13871,22 @@ 1 2 - 1757744 + 1757730 2 3 - 1020071 + 1020063 3 4 - 431455 + 431451 4 11 - 152863 + 152862 @@ -13884,7 +13902,7 @@ 2 3 - 3929 + 3928 6 @@ -13925,7 +13943,7 @@ 2 3 - 3929 + 3928 6 @@ -13966,7 +13984,7 @@ 1 2 - 3929 + 3928 2 @@ -14007,12 +14025,12 @@ 1 2 - 728832 + 728826 2 3 - 237091 + 237089 3 @@ -14022,12 +14040,12 @@ 5 13 - 93559 + 93558 13 2574 - 54515 + 54514 @@ -14043,22 +14061,22 @@ 1 2 - 810850 + 810844 2 3 - 175823 + 175822 3 6 - 107065 + 107064 6 27 - 90858 + 90857 27 @@ -14079,17 +14097,17 @@ 1 2 - 981886 + 981878 2 3 - 167719 + 167718 3 65 - 57339 + 57338 @@ -14099,11 +14117,11 @@ overrides - 160157 + 160156 new - 151386 + 151385 old @@ -14121,7 +14139,7 @@ 1 2 - 142623 + 142622 2 @@ -14147,7 +14165,7 @@ 2 3 - 2373 + 2372 3 @@ -14177,19 +14195,19 @@ membervariables - 1504665 + 1504653 id - 1502215 + 1502203 type_id - 457823 + 457819 name - 644001 + 643996 @@ -14203,7 +14221,7 @@ 1 2 - 1499874 + 1499862 2 @@ -14224,7 +14242,7 @@ 1 2 - 1502215 + 1502203 @@ -14240,7 +14258,7 @@ 1 2 - 339692 + 339690 2 @@ -14271,7 +14289,7 @@ 1 2 - 357276 + 357273 2 @@ -14302,22 +14320,22 @@ 1 2 - 423200 + 423197 2 3 - 122539 + 122538 3 5 - 58085 + 58084 5 664 - 40175 + 40174 @@ -14333,17 +14351,17 @@ 1 2 - 526197 + 526193 2 3 - 73273 + 73272 3 668 - 44530 + 44529 @@ -14353,11 +14371,11 @@ globalvariables - 634536 + 634531 id - 634536 + 634531 type_id @@ -14365,7 +14383,7 @@ name - 110749 + 110748 @@ -14379,7 +14397,7 @@ 1 2 - 634536 + 634531 @@ -14395,7 +14413,7 @@ 1 2 - 634536 + 634531 @@ -14493,7 +14511,7 @@ 1 2 - 92700 + 92699 2 @@ -14524,7 +14542,7 @@ 1 2 - 93928 + 93927 2 @@ -14544,19 +14562,19 @@ localvariables - 733038 + 733187 id - 733038 + 733187 type_id - 53913 + 53924 name - 102626 + 102647 @@ -14570,7 +14588,7 @@ 1 2 - 733038 + 733187 @@ -14586,7 +14604,7 @@ 1 2 - 733038 + 733187 @@ -14602,22 +14620,22 @@ 1 2 - 29150 + 29156 2 3 - 7879 + 7881 3 4 - 4081 + 4082 4 6 - 4105 + 4106 6 @@ -14627,7 +14645,7 @@ 12 162 - 4044 + 4045 162 @@ -14648,22 +14666,22 @@ 1 2 - 38683 + 38691 2 3 - 6784 + 6786 3 5 - 4521 + 4522 5 3509 - 3923 + 3924 @@ -14679,27 +14697,27 @@ 1 2 - 63151 + 63163 2 3 - 16195 + 16199 3 4 - 6602 + 6604 4 8 - 8235 + 8237 8 137 - 7705 + 7707 137 @@ -14720,17 +14738,17 @@ 1 2 - 85412 + 85429 2 3 - 8493 + 8495 3 15 - 7758 + 7760 15 @@ -14745,11 +14763,11 @@ autoderivation - 224076 + 224074 var - 224076 + 224074 derivation_type @@ -14767,7 +14785,7 @@ 1 2 - 224076 + 224074 @@ -14813,15 +14831,15 @@ orphaned_variables - 43930 + 43927 var - 43930 + 43927 function - 40689 + 40686 @@ -14835,7 +14853,7 @@ 1 2 - 43930 + 43927 @@ -14851,7 +14869,7 @@ 1 2 - 39844 + 39841 2 @@ -14866,11 +14884,11 @@ enumconstants - 347913 + 347910 id - 347913 + 347910 parent @@ -14886,11 +14904,11 @@ name - 347531 + 347529 location - 320530 + 320528 @@ -14904,7 +14922,7 @@ 1 2 - 347913 + 347910 @@ -14920,7 +14938,7 @@ 1 2 - 347913 + 347910 @@ -14936,7 +14954,7 @@ 1 2 - 347913 + 347910 @@ -14952,7 +14970,7 @@ 1 2 - 347913 + 347910 @@ -14968,7 +14986,7 @@ 1 2 - 347913 + 347910 @@ -15584,7 +15602,7 @@ 1 2 - 347150 + 347148 2 @@ -15605,7 +15623,7 @@ 1 2 - 347150 + 347148 2 @@ -15626,7 +15644,7 @@ 1 2 - 347531 + 347529 @@ -15642,7 +15660,7 @@ 1 2 - 347531 + 347529 @@ -15658,7 +15676,7 @@ 1 2 - 347150 + 347148 2 @@ -15679,7 +15697,7 @@ 1 2 - 319496 + 319493 2 @@ -15700,7 +15718,7 @@ 1 2 - 320530 + 320528 @@ -15716,7 +15734,7 @@ 1 2 - 319496 + 319493 2 @@ -15737,7 +15755,7 @@ 1 2 - 320530 + 320528 @@ -15753,7 +15771,7 @@ 1 2 - 319496 + 319493 2 @@ -16460,15 +16478,15 @@ bit_precise_int_types - 8 + 11 id - 8 + 11 bit_width - 4 + 6 @@ -16482,7 +16500,7 @@ 1 2 - 8 + 11 @@ -16498,12 +16516,12 @@ 1 2 - 1 + 2 2 3 - 2 + 3 3 @@ -16518,15 +16536,15 @@ derivedtypes - 2998331 + 2998307 id - 2998331 + 2998307 name - 1445632 + 1445621 kind @@ -16534,7 +16552,7 @@ type_id - 1926078 + 1926062 @@ -16548,7 +16566,7 @@ 1 2 - 2998331 + 2998307 @@ -16564,7 +16582,7 @@ 1 2 - 2998331 + 2998307 @@ -16580,7 +16598,7 @@ 1 2 - 2998331 + 2998307 @@ -16596,12 +16614,12 @@ 1 2 - 1328130 + 1328120 2 23 - 108784 + 108783 23 @@ -16622,7 +16640,7 @@ 1 2 - 1445632 + 1445621 @@ -16638,7 +16656,7 @@ 1 2 - 1328253 + 1328242 2 @@ -16787,22 +16805,22 @@ 1 2 - 1303205 + 1303195 2 3 - 372519 + 372516 3 4 - 121676 + 121675 4 137 - 128675 + 128674 @@ -16818,22 +16836,22 @@ 1 2 - 1304679 + 1304668 2 3 - 372519 + 372516 3 4 - 120203 + 120202 4 137 - 128675 + 128674 @@ -16849,22 +16867,22 @@ 1 2 - 1305047 + 1305037 2 3 - 373133 + 373130 3 4 - 121922 + 121921 4 6 - 125974 + 125973 @@ -16874,11 +16892,11 @@ pointerishsize - 2221736 + 2221718 id - 2221736 + 2221718 size @@ -16900,7 +16918,7 @@ 1 2 - 2221736 + 2221718 @@ -16916,7 +16934,7 @@ 1 2 - 2221736 + 2221718 @@ -17000,11 +17018,11 @@ arraysizes - 79317 + 79316 id - 79317 + 79316 num_elements @@ -17030,7 +17048,7 @@ 1 2 - 79317 + 79316 @@ -17046,7 +17064,7 @@ 1 2 - 79317 + 79316 @@ -17062,7 +17080,7 @@ 1 2 - 79317 + 79316 @@ -17083,7 +17101,7 @@ 2 3 - 10682 + 10681 3 @@ -17129,7 +17147,7 @@ 2 3 - 3929 + 3928 3 @@ -17160,7 +17178,7 @@ 2 3 - 3929 + 3928 3 @@ -17263,7 +17281,7 @@ 1 2 - 14611 + 14610 2 @@ -17439,15 +17457,15 @@ typedefbase - 1791267 + 1791463 id - 1791267 + 1791463 type_id - 851342 + 851307 @@ -17461,7 +17479,7 @@ 1 2 - 1791267 + 1791463 @@ -17477,22 +17495,22 @@ 1 2 - 673623 + 673460 2 3 - 82048 + 82124 3 6 - 64928 + 64968 6 4525 - 30742 + 30752 @@ -17502,7 +17520,7 @@ decltypes - 814253 + 814246 id @@ -17510,7 +17528,7 @@ expr - 814253 + 814246 kind @@ -17640,7 +17658,7 @@ 1 2 - 814253 + 814246 @@ -17656,7 +17674,7 @@ 1 2 - 814253 + 814246 @@ -17672,7 +17690,7 @@ 1 2 - 814253 + 814246 @@ -17688,7 +17706,7 @@ 1 2 - 814253 + 814246 @@ -18070,7 +18088,7 @@ 1 2 - 7172 + 7171 2 @@ -18189,7 +18207,7 @@ 2 3 - 942 + 941 3 @@ -18266,15 +18284,15 @@ usertypes - 4280805 + 4280384 id - 4280805 + 4280384 name - 966486 + 966130 kind @@ -18292,7 +18310,7 @@ 1 2 - 4280805 + 4280384 @@ -18308,7 +18326,7 @@ 1 2 - 4280805 + 4280384 @@ -18324,22 +18342,22 @@ 1 2 - 692667 + 692231 2 3 - 163369 + 163458 3 8 - 73996 + 74001 8 33429 - 36452 + 36439 @@ -18355,12 +18373,12 @@ 1 2 - 913640 + 913304 2 10 - 52845 + 52825 @@ -18394,8 +18412,8 @@ 10 - 1557 - 1558 + 1559 + 1560 10 @@ -18409,13 +18427,13 @@ 10 - 20074 - 20075 + 20075 + 20076 10 - 21713 - 21714 + 21724 + 21725 10 @@ -18424,13 +18442,13 @@ 10 - 98810 - 98811 + 98824 + 98825 10 - 167516 - 167517 + 167596 + 167597 10 @@ -18512,15 +18530,15 @@ usertypesize - 1445377 + 1444984 id - 1445377 + 1444984 size - 1497 + 1496 alignment @@ -18538,7 +18556,7 @@ 1 2 - 1445377 + 1444984 @@ -18554,7 +18572,7 @@ 1 2 - 1445377 + 1444984 @@ -18609,12 +18627,12 @@ 118 - 1731 + 1735 117 1840 - 105869 + 105871 53 @@ -18631,7 +18649,7 @@ 1 2 - 1219 + 1218 2 @@ -18680,18 +18698,18 @@ 10 - 2042 - 2043 + 2044 + 2045 10 - 11942 - 11943 + 11951 + 11952 10 - 121064 - 121065 + 121066 + 121067 10 @@ -18767,7 +18785,7 @@ uuid - 47209 + 47208 @@ -18812,11 +18830,11 @@ usertype_alias_kind - 1791267 + 1791463 id - 1791267 + 1791463 alias_kind @@ -18834,7 +18852,7 @@ 1 2 - 1791267 + 1791463 @@ -18848,13 +18866,13 @@ 12 - 36937 - 36938 + 36949 + 36950 10 - 130579 - 130580 + 130647 + 130648 10 @@ -18865,18 +18883,18 @@ nontype_template_parameters - 758842 + 758786 id - 758842 + 758786 type_template_type_constraint - 27018 + 27019 id @@ -18884,7 +18902,7 @@ constraint - 25883 + 25884 @@ -18949,15 +18967,15 @@ mangled_name - 8178495 + 8178430 id - 8178495 + 8178430 mangled_name - 6345485 + 6345435 is_complete @@ -18975,7 +18993,7 @@ 1 2 - 8178495 + 8178430 @@ -18991,7 +19009,7 @@ 1 2 - 8178495 + 8178430 @@ -19007,12 +19025,12 @@ 1 2 - 5990769 + 5990721 2 1120 - 354716 + 354713 @@ -19028,7 +19046,7 @@ 1 2 - 6345485 + 6345435 @@ -19080,59 +19098,59 @@ is_pod_class - 611214 + 611169 id - 611214 + 611169 is_standard_layout_class - 1203445 + 1203088 id - 1203445 + 1203088 is_complete - 1428043 + 1427635 id - 1428043 + 1427635 is_class_template - 235013 + 234937 id - 235013 + 234937 class_instantiation - 1203980 + 1203697 to - 1200900 + 1200629 from - 73130 + 73103 @@ -19146,12 +19164,12 @@ 1 2 - 1198740 + 1198481 2 8 - 2160 + 2148 @@ -19167,47 +19185,47 @@ 1 2 - 20787 + 20779 2 3 - 13034 + 13030 3 4 - 7217 + 7215 4 5 - 4758 + 4756 5 7 - 6330 + 6327 7 10 - 5752 + 5750 10 17 - 5956 + 5964 17 53 - 5560 + 5547 53 4358 - 3731 + 3730 @@ -19217,11 +19235,11 @@ class_template_argument - 3054583 + 3053715 type_id - 1448328 + 1447923 index @@ -19229,7 +19247,7 @@ arg_type - 860881 + 860596 @@ -19243,27 +19261,27 @@ 1 2 - 609999 + 609806 2 3 - 442010 + 441933 3 4 - 268054 + 267956 4 8 - 109807 + 109777 8 113 - 18456 + 18449 @@ -19279,22 +19297,22 @@ 1 2 - 639063 + 638860 2 3 - 456788 + 456705 3 4 - 268151 + 268052 4 113 - 84325 + 84305 @@ -19315,7 +19333,7 @@ 4 5 - 759 + 758 5 @@ -19334,12 +19352,12 @@ 643 - 7142 + 7143 96 - 11996 - 135434 + 11997 + 135446 42 @@ -19361,7 +19379,7 @@ 4 5 - 759 + 758 5 @@ -19385,7 +19403,7 @@ 11131 - 46219 + 46221 32 @@ -19402,27 +19420,27 @@ 1 2 - 534431 + 534234 2 3 - 178008 + 177964 3 5 - 79385 + 79356 5 46 - 64693 + 64680 46 - 13875 - 4362 + 13877 + 4361 @@ -19438,17 +19456,17 @@ 1 2 - 752067 + 751823 2 3 - 89169 + 89137 3 22 - 19643 + 19636 @@ -19458,11 +19476,11 @@ class_template_argument_value - 511973 + 511935 type_id - 210401 + 210385 index @@ -19470,7 +19488,7 @@ arg_value - 511838 + 511800 @@ -19484,12 +19502,12 @@ 1 2 - 160831 + 160819 2 3 - 42985 + 42982 3 @@ -19510,17 +19528,17 @@ 1 2 - 153031 + 153020 2 3 - 40115 + 40112 3 52 - 16005 + 16004 54 @@ -19653,7 +19671,7 @@ 1 2 - 511703 + 511665 2 @@ -19674,7 +19692,7 @@ 1 2 - 511838 + 511800 @@ -19684,15 +19702,15 @@ class_template_generated_from - 62608 + 62595 template - 62608 + 62595 from - 3806 + 3805 @@ -19706,7 +19724,7 @@ 1 2 - 62608 + 62595 @@ -19772,15 +19790,15 @@ is_proxy_class_for - 51198 + 51179 id - 51198 + 51179 templ_param_id - 47830 + 47812 @@ -19794,7 +19812,7 @@ 1 2 - 51198 + 51179 @@ -19810,7 +19828,7 @@ 1 2 - 47060 + 47043 2 @@ -19825,19 +19843,19 @@ type_mentions - 5937930 + 5937883 id - 5937930 + 5937883 type_id - 277905 + 277903 location - 5881641 + 5881594 kind @@ -19855,7 +19873,7 @@ 1 2 - 5937930 + 5937883 @@ -19871,7 +19889,7 @@ 1 2 - 5937930 + 5937883 @@ -19887,7 +19905,7 @@ 1 2 - 5937930 + 5937883 @@ -19903,7 +19921,7 @@ 1 2 - 137401 + 137400 2 @@ -19933,7 +19951,7 @@ 12 28 - 21013 + 21012 28 @@ -19954,7 +19972,7 @@ 1 2 - 137401 + 137400 2 @@ -19984,7 +20002,7 @@ 12 28 - 21013 + 21012 28 @@ -20005,7 +20023,7 @@ 1 2 - 277905 + 277903 @@ -20021,7 +20039,7 @@ 1 2 - 5835968 + 5835921 2 @@ -20042,7 +20060,7 @@ 1 2 - 5835968 + 5835921 2 @@ -20063,7 +20081,7 @@ 1 2 - 5881641 + 5881594 @@ -20121,26 +20139,26 @@ is_function_template - 1311677 + 1311667 id - 1311677 + 1311667 function_instantiation - 965225 + 965154 to - 965225 + 965154 from - 181057 + 181044 @@ -20154,7 +20172,7 @@ 1 2 - 965225 + 965154 @@ -20170,27 +20188,27 @@ 1 2 - 109539 + 109531 2 3 - 42444 + 42441 3 9 - 14317 + 14316 9 104 - 13608 + 13607 119 1531 - 1148 + 1147 @@ -20200,11 +20218,11 @@ function_template_argument - 2479028 + 2478845 function_id - 1456567 + 1456460 index @@ -20212,7 +20230,7 @@ arg_type - 295324 + 295303 @@ -20226,22 +20244,22 @@ 1 2 - 792170 + 792112 2 3 - 409524 + 409494 3 4 - 170320 + 170307 4 15 - 84552 + 84546 @@ -20257,22 +20275,22 @@ 1 2 - 811147 + 811087 2 3 - 407633 + 407603 3 4 - 168158 + 168146 4 9 - 69627 + 69622 @@ -20410,37 +20428,37 @@ 1 2 - 173224 + 173211 2 3 - 26034 + 26032 3 4 - 19652 + 19650 4 6 - 22590 + 22588 6 11 - 23096 + 23094 11 76 - 23096 + 23094 79 2452 - 7631 + 7630 @@ -20456,12 +20474,12 @@ 1 2 - 254467 + 254448 2 3 - 31875 + 31873 3 @@ -20476,11 +20494,11 @@ function_template_argument_value - 456494 + 456460 function_id - 194969 + 194955 index @@ -20488,7 +20506,7 @@ arg_value - 453826 + 453793 @@ -20502,12 +20520,12 @@ 1 2 - 149992 + 149981 2 3 - 42512 + 42509 3 @@ -20528,17 +20546,17 @@ 1 2 - 143137 + 143127 2 3 - 36299 + 36296 3 54 - 14756 + 14755 54 @@ -20681,7 +20699,7 @@ 1 2 - 451159 + 451125 2 @@ -20702,7 +20720,7 @@ 1 2 - 453826 + 453793 @@ -20712,15 +20730,15 @@ function_template_generated_from - 869530 + 869466 template - 869530 + 869466 from - 22286 + 22284 @@ -20734,7 +20752,7 @@ 1 2 - 869530 + 869466 @@ -20750,7 +20768,7 @@ 1 2 - 3613 + 3612 2 @@ -20775,7 +20793,7 @@ 16 20 - 1587 + 1586 20 @@ -20815,22 +20833,22 @@ is_variable_template - 57707 + 57706 id - 57707 + 57706 variable_instantiation - 566269 + 566265 to - 566269 + 566265 from @@ -20848,7 +20866,7 @@ 1 2 - 566269 + 566265 @@ -20914,11 +20932,11 @@ variable_template_argument - 1073726 + 1073718 variable_id - 548711 + 548707 index @@ -20926,7 +20944,7 @@ arg_type - 461782 + 461778 @@ -20940,12 +20958,12 @@ 1 2 - 179998 + 179996 2 3 - 272698 + 272696 3 @@ -20971,17 +20989,17 @@ 1 2 - 196205 + 196203 2 3 - 261402 + 261400 3 4 - 75633 + 75632 4 @@ -21104,12 +21122,12 @@ 1 2 - 361101 + 361098 2 3 - 56234 + 56233 3 @@ -21135,7 +21153,7 @@ 1 2 - 429367 + 429364 2 @@ -21202,7 +21220,7 @@ 2 3 - 3929 + 3928 4 @@ -21359,26 +21377,26 @@ is_alias_template - 108155 + 108147 id - 108155 + 108147 alias_instantiation - 462909 + 462875 to - 462909 + 462875 from - 92858 + 92852 @@ -21392,7 +21410,7 @@ 1 2 - 462909 + 462875 @@ -21408,27 +21426,27 @@ 1 2 - 16647 + 16645 2 3 - 16917 + 16915 3 4 - 20158 + 20157 4 5 - 12561 + 12560 5 7 - 6753 + 6752 7 @@ -21458,11 +21476,11 @@ alias_template_argument - 1000106 + 1000033 type_id - 570997 + 570955 index @@ -21470,7 +21488,7 @@ arg_type - 128617 + 128608 @@ -21484,22 +21502,22 @@ 1 2 - 278137 + 278117 2 3 - 183624 + 183610 3 4 - 87523 + 87517 4 10 - 21712 + 21710 @@ -21515,22 +21533,22 @@ 1 2 - 279387 + 279366 2 3 - 182408 + 182395 3 4 - 88975 + 88969 4 10 - 20226 + 20224 @@ -21658,27 +21676,27 @@ 1 2 - 78710 + 78704 2 3 - 20428 + 20427 3 4 - 5470 + 5469 4 6 - 10535 + 10534 6 76 - 10906 + 10905 84 @@ -21699,12 +21717,12 @@ 1 2 - 109573 + 109565 2 3 - 17423 + 17422 3 @@ -21719,11 +21737,11 @@ alias_template_argument_value - 174405 + 174393 type_id - 161743 + 161731 index @@ -21731,7 +21749,7 @@ arg_value - 174405 + 174393 @@ -21745,7 +21763,7 @@ 1 2 - 160493 + 160482 2 @@ -21766,7 +21784,7 @@ 1 2 - 159818 + 159806 2 @@ -21849,7 +21867,7 @@ 1 2 - 174405 + 174393 @@ -21865,7 +21883,7 @@ 1 2 - 174405 + 174393 @@ -21875,11 +21893,11 @@ alias_template_generated_from - 100523 + 100516 template - 100523 + 100516 from @@ -21897,7 +21915,7 @@ 1 2 - 100523 + 100516 @@ -21983,15 +22001,15 @@ template_template_instantiation - 6116 + 6114 to - 5720 + 5718 from - 3977 + 3976 @@ -22005,7 +22023,7 @@ 1 2 - 5603 + 5601 2 @@ -22026,7 +22044,7 @@ 1 2 - 2491 + 2490 2 @@ -22046,11 +22064,11 @@ template_template_argument - 9794 + 9791 type_id - 6191 + 6189 index @@ -22058,7 +22076,7 @@ arg_type - 9196 + 9192 @@ -22072,7 +22090,7 @@ 1 2 - 5079 + 5077 2 @@ -22103,7 +22121,7 @@ 1 2 - 5100 + 5098 2 @@ -22256,7 +22274,7 @@ 1 2 - 9163 + 9160 3 @@ -22277,7 +22295,7 @@ 1 2 - 9174 + 9171 2 @@ -22524,11 +22542,11 @@ concept_instantiation - 90176 + 90178 to - 90176 + 90178 from @@ -22546,7 +22564,7 @@ 1 2 - 90176 + 90178 @@ -22653,11 +22671,11 @@ concept_template_argument - 112784 + 112786 concept_id - 76196 + 76197 index @@ -22679,7 +22697,7 @@ 1 2 - 46351 + 46352 2 @@ -22705,7 +22723,7 @@ 1 2 - 49948 + 49949 2 @@ -22813,7 +22831,7 @@ 1 2 - 10554 + 10555 2 @@ -23015,15 +23033,15 @@ routinetypes - 599125 + 599081 id - 599125 + 599081 return_type - 281345 + 281324 @@ -23037,7 +23055,7 @@ 1 2 - 599125 + 599081 @@ -23053,17 +23071,17 @@ 1 2 - 232012 + 231995 2 3 - 34914 + 34912 3 4676 - 14418 + 14417 @@ -23073,11 +23091,11 @@ routinetypeargs - 1178092 + 1178082 routine - 415851 + 415848 index @@ -23085,7 +23103,7 @@ type_id - 112033 + 112032 @@ -23099,22 +23117,22 @@ 1 2 - 82909 + 82908 2 3 - 126023 + 126022 3 4 - 107841 + 107840 4 5 - 49266 + 49265 5 @@ -23124,7 +23142,7 @@ 7 19 - 16658 + 16657 @@ -23140,12 +23158,12 @@ 1 2 - 88897 + 88896 2 3 - 138653 + 138652 3 @@ -23414,12 +23432,12 @@ 1 2 - 79370 + 79369 2 3 - 17529 + 17528 3 @@ -23439,19 +23457,19 @@ ptrtomembers - 9837 + 9834 id - 9837 + 9834 type_id - 8073 + 8070 class_id - 4929 + 4927 @@ -23465,7 +23483,7 @@ 1 2 - 9837 + 9834 @@ -23481,7 +23499,7 @@ 1 2 - 9837 + 9834 @@ -23497,7 +23515,7 @@ 1 2 - 7859 + 7856 2 @@ -23518,7 +23536,7 @@ 1 2 - 7859 + 7856 2 @@ -23539,7 +23557,7 @@ 1 2 - 3956 + 3954 2 @@ -23570,7 +23588,7 @@ 1 2 - 3956 + 3954 2 @@ -23643,11 +23661,11 @@ typespecifiers - 868922 + 868944 type_id - 863725 + 863749 spec_id @@ -23665,12 +23683,12 @@ 1 2 - 858528 + 858554 2 3 - 5196 + 5194 @@ -23699,8 +23717,8 @@ 10 - 530 - 531 + 533 + 534 10 @@ -23714,18 +23732,18 @@ 10 - 4192 - 4193 + 4195 + 4196 10 - 18328 - 18329 + 18331 + 18332 10 - 55214 - 55215 + 55237 + 55238 10 @@ -23736,11 +23754,11 @@ funspecifiers - 9572191 + 9572483 func_id - 3955783 + 3955752 spec_id @@ -23758,27 +23776,27 @@ 1 2 - 1511321 + 1511309 2 3 - 501195 + 500822 3 4 - 1019334 + 1019694 4 5 - 682052 + 682047 5 8 - 241880 + 241878 @@ -23882,8 +23900,8 @@ 122 - 22794 - 22795 + 22797 + 22798 122 @@ -23894,11 +23912,11 @@ varspecifiers - 3148493 + 3148468 var_id - 2429115 + 2429095 spec_id @@ -23916,17 +23934,17 @@ 1 2 - 1807839 + 1807824 2 3 - 523664 + 523660 3 5 - 97611 + 97610 @@ -24040,11 +24058,11 @@ attributes - 644113 + 644108 id - 644113 + 644108 kind @@ -24060,7 +24078,7 @@ location - 638096 + 638091 @@ -24074,7 +24092,7 @@ 1 2 - 644113 + 644108 @@ -24090,7 +24108,7 @@ 1 2 - 644113 + 644108 @@ -24106,7 +24124,7 @@ 1 2 - 644113 + 644108 @@ -24122,7 +24140,7 @@ 1 2 - 644113 + 644108 @@ -24525,7 +24543,7 @@ 1 2 - 632326 + 632321 2 @@ -24546,7 +24564,7 @@ 1 2 - 638096 + 638091 @@ -24562,7 +24580,7 @@ 1 2 - 633062 + 633057 2 @@ -24583,7 +24601,7 @@ 1 2 - 638096 + 638091 @@ -24593,11 +24611,11 @@ attribute_args - 82122 + 82121 id - 82122 + 82121 kind @@ -24627,7 +24645,7 @@ 1 2 - 82122 + 82121 @@ -24643,7 +24661,7 @@ 1 2 - 82122 + 82121 @@ -24659,7 +24677,7 @@ 1 2 - 82122 + 82121 @@ -24675,7 +24693,7 @@ 1 2 - 82122 + 82121 @@ -24821,7 +24839,7 @@ 1 2 - 69371 + 69370 2 @@ -24863,7 +24881,7 @@ 1 2 - 68381 + 68380 2 @@ -25053,7 +25071,7 @@ 2 3 - 11795 + 11794 3 @@ -25121,7 +25139,7 @@ 1 2 - 56632 + 56631 2 @@ -25136,11 +25154,11 @@ attribute_arg_value - 16545 + 16544 arg - 16545 + 16544 value @@ -25158,7 +25176,7 @@ 1 2 - 16545 + 16544 @@ -25292,15 +25310,15 @@ attribute_arg_constant - 72691 + 72665 arg - 72691 + 72665 constant - 72691 + 72665 @@ -25314,7 +25332,7 @@ 1 2 - 72691 + 72665 @@ -25330,7 +25348,7 @@ 1 2 - 72691 + 72665 @@ -25441,11 +25459,11 @@ typeattributes - 94787 + 94786 type_id - 93068 + 93067 spec_id @@ -25463,7 +25481,7 @@ 1 2 - 91349 + 91348 2 @@ -25484,7 +25502,7 @@ 1 2 - 27503 + 27502 2 @@ -25504,15 +25522,15 @@ funcattributes - 834547 + 834541 func_id - 788873 + 788866 spec_id - 607647 + 607642 @@ -25526,7 +25544,7 @@ 1 2 - 747618 + 747612 2 @@ -25547,7 +25565,7 @@ 1 2 - 561358 + 561353 2 @@ -25756,15 +25774,15 @@ unspecifiedtype - 7365434 + 7365375 type_id - 7365434 + 7365375 unspecified_type_id - 4133203 + 4133170 @@ -25778,7 +25796,7 @@ 1 2 - 7365434 + 7365375 @@ -25794,17 +25812,17 @@ 1 2 - 2667188 + 2667167 2 3 - 1105036 + 1105027 3 8 - 311742 + 311740 8 @@ -25819,19 +25837,19 @@ member - 4121662 + 4121629 parent - 532872 + 532868 index - 29222 + 29221 child - 4117119 + 4117086 @@ -25845,7 +25863,7 @@ 1 2 - 126710 + 126709 2 @@ -25865,7 +25883,7 @@ 5 6 - 41623 + 41622 6 @@ -25875,7 +25893,7 @@ 7 9 - 41623 + 41622 9 @@ -25911,12 +25929,12 @@ 1 2 - 126465 + 126464 2 3 - 80667 + 80666 3 @@ -25926,12 +25944,12 @@ 4 5 - 44447 + 44446 5 6 - 41623 + 41622 6 @@ -26109,7 +26127,7 @@ 1 2 - 4117119 + 4117086 @@ -26125,7 +26143,7 @@ 1 2 - 4112576 + 4112543 2 @@ -26148,7 +26166,7 @@ parent - 70189 + 70206 @@ -26178,22 +26196,22 @@ 1 2 - 38046 + 38074 2 3 - 24882 + 24873 3 5 - 6159 + 6156 5 45 - 1101 + 1100 @@ -26203,15 +26221,15 @@ derivations - 494887 + 494850 derivation - 494887 + 494850 sub - 473343 + 473309 index @@ -26219,11 +26237,11 @@ super - 240926 + 240908 location - 35083 + 35081 @@ -26237,7 +26255,7 @@ 1 2 - 494887 + 494850 @@ -26253,7 +26271,7 @@ 1 2 - 494887 + 494850 @@ -26269,7 +26287,7 @@ 1 2 - 494887 + 494850 @@ -26285,7 +26303,7 @@ 1 2 - 494887 + 494850 @@ -26301,12 +26319,12 @@ 1 2 - 456966 + 456933 2 9 - 16376 + 16375 @@ -26322,12 +26340,12 @@ 1 2 - 456966 + 456933 2 8 - 16376 + 16375 @@ -26343,12 +26361,12 @@ 1 2 - 456966 + 456933 2 9 - 16376 + 16375 @@ -26364,12 +26382,12 @@ 1 2 - 456966 + 456933 2 8 - 16376 + 16375 @@ -26524,12 +26542,12 @@ 1 2 - 231269 + 231252 2 1758 - 9657 + 9656 @@ -26545,12 +26563,12 @@ 1 2 - 231269 + 231252 2 1758 - 9657 + 9656 @@ -26566,7 +26584,7 @@ 1 2 - 240487 + 240469 2 @@ -26587,7 +26605,7 @@ 1 2 - 235658 + 235641 2 @@ -26608,7 +26626,7 @@ 1 2 - 26000 + 25998 2 @@ -26644,7 +26662,7 @@ 1 2 - 26000 + 25998 2 @@ -26680,7 +26698,7 @@ 1 2 - 35083 + 35081 @@ -26696,12 +26714,12 @@ 1 2 - 28330 + 28328 2 4 - 2600 + 2599 4 @@ -26721,11 +26739,11 @@ derspecifiers - 496643 + 496606 der_id - 494448 + 494411 spec_id @@ -26743,7 +26761,7 @@ 1 2 - 492253 + 492217 2 @@ -26789,11 +26807,11 @@ direct_base_offsets - 468211 + 468176 der_id - 468211 + 468176 offset @@ -26811,7 +26829,7 @@ 1 2 - 468211 + 468176 @@ -26872,11 +26890,11 @@ virtual_base_offsets - 5774 + 5773 sub - 5774 + 5773 super @@ -26898,7 +26916,7 @@ 1 2 - 5774 + 5773 @@ -26914,7 +26932,7 @@ 1 2 - 5774 + 5773 @@ -27008,23 +27026,23 @@ frienddecls - 765587 + 765911 id - 765587 + 765911 type_id - 54229 + 54225 decl_id - 100489 + 100482 location - 6044 + 6043 @@ -27038,7 +27056,7 @@ 1 2 - 765587 + 765911 @@ -27054,7 +27072,7 @@ 1 2 - 765587 + 765911 @@ -27070,7 +27088,7 @@ 1 2 - 765587 + 765911 @@ -27091,22 +27109,22 @@ 2 3 - 24953 + 24951 3 8 - 4794 + 4760 8 17 - 4693 + 4727 17 27 - 4457 + 4456 27 @@ -27142,22 +27160,22 @@ 2 3 - 24953 + 24951 3 8 - 4794 + 4760 8 17 - 4693 + 4727 17 27 - 4457 + 4456 27 @@ -27188,7 +27206,7 @@ 1 2 - 52878 + 52875 2 @@ -27209,32 +27227,32 @@ 1 2 - 67431 + 67359 2 3 - 7968 + 8103 3 9 - 9252 + 9183 9 24 - 7597 + 7596 24 - 135 - 7597 + 136 + 7630 - 135 + 137 191 - 641 + 607 @@ -27250,32 +27268,32 @@ 1 2 - 67431 + 67359 2 3 - 7968 + 8103 3 9 - 9252 + 9183 9 24 - 7597 + 7596 24 - 135 - 7597 + 136 + 7630 - 135 + 137 191 - 641 + 607 @@ -27291,7 +27309,7 @@ 1 2 - 99273 + 99267 2 @@ -27316,7 +27334,7 @@ 2 - 22484 + 22495 371 @@ -27333,7 +27351,7 @@ 1 2 - 5909 + 5908 2 @@ -27369,19 +27387,19 @@ comments - 11058465 + 11058376 id - 11058465 + 11058376 contents - 4237445 + 4237411 location - 11058465 + 11058376 @@ -27395,7 +27413,7 @@ 1 2 - 11058465 + 11058376 @@ -27411,7 +27429,7 @@ 1 2 - 11058465 + 11058376 @@ -27427,12 +27445,12 @@ 1 2 - 3867994 + 3867964 2 6 - 318495 + 318493 6 @@ -27453,12 +27471,12 @@ 1 2 - 3867994 + 3867964 2 6 - 318495 + 318493 6 @@ -27479,7 +27497,7 @@ 1 2 - 11058465 + 11058376 @@ -27495,7 +27513,7 @@ 1 2 - 11058465 + 11058376 @@ -27505,15 +27523,15 @@ commentbinding - 3860014 + 3859983 id - 3297919 + 3297892 element - 3697082 + 3697053 @@ -27527,7 +27545,7 @@ 1 2 - 3230266 + 3230240 2 @@ -27548,12 +27566,12 @@ 1 2 - 3534151 + 3534122 2 3 - 162931 + 162930 @@ -27563,15 +27581,15 @@ exprconv - 9630323 + 9630246 converted - 9630218 + 9630141 conversion - 9630323 + 9630246 @@ -27585,7 +27603,7 @@ 1 2 - 9630112 + 9630035 2 @@ -27606,7 +27624,7 @@ 1 2 - 9630323 + 9630246 @@ -27616,22 +27634,22 @@ compgenerated - 9856495 + 9855321 id - 9856495 + 9855321 synthetic_destructor_call - 1663253 + 1663283 element - 1238704 + 1238727 i @@ -27639,7 +27657,7 @@ destructor_call - 1663253 + 1663283 @@ -27653,12 +27671,12 @@ 1 2 - 824561 + 824576 2 3 - 407377 + 407385 3 @@ -27679,12 +27697,12 @@ 1 2 - 824561 + 824576 2 3 - 407377 + 407385 3 @@ -27837,7 +27855,7 @@ 1 2 - 1663253 + 1663283 @@ -27853,7 +27871,7 @@ 1 2 - 1663253 + 1663283 @@ -27863,15 +27881,15 @@ namespaces - 8757 + 8754 id - 8757 + 8754 name - 4630 + 4628 @@ -27885,7 +27903,7 @@ 1 2 - 8757 + 8754 @@ -27901,7 +27919,7 @@ 1 2 - 3785 + 3783 2 @@ -27911,7 +27929,7 @@ 3 149 - 310 + 309 @@ -27932,15 +27950,15 @@ namespacembrs - 2457354 + 2457335 parentid - 3929 + 3928 memberid - 2457354 + 2457335 @@ -28030,7 +28048,7 @@ 1 2 - 2457354 + 2457335 @@ -28040,11 +28058,11 @@ exprparents - 19448700 + 19448545 expr_id - 19448700 + 19448545 child_index @@ -28052,7 +28070,7 @@ parent_id - 12936328 + 12936225 @@ -28066,7 +28084,7 @@ 1 2 - 19448700 + 19448545 @@ -28082,7 +28100,7 @@ 1 2 - 19448700 + 19448545 @@ -28200,17 +28218,17 @@ 1 2 - 7392678 + 7392619 2 3 - 5081231 + 5081191 3 712 - 462418 + 462414 @@ -28226,17 +28244,17 @@ 1 2 - 7392678 + 7392619 2 3 - 5081231 + 5081191 3 712 - 462418 + 462414 @@ -28246,22 +28264,22 @@ expr_isload - 6890637 + 6890582 expr_id - 6890637 + 6890582 conversionkinds - 6047233 + 6047238 expr_id - 6047233 + 6047238 kind @@ -28279,7 +28297,7 @@ 1 2 - 6047233 + 6047238 @@ -28323,8 +28341,8 @@ 1 - 5828722 - 5828723 + 5828727 + 5828728 1 @@ -28335,11 +28353,11 @@ iscall - 5777667 + 5777774 caller - 5777667 + 5777774 kind @@ -28357,7 +28375,7 @@ 1 2 - 5777667 + 5777774 @@ -28393,11 +28411,11 @@ numtemplatearguments - 684876 + 684871 expr_id - 684876 + 684871 num @@ -28415,7 +28433,7 @@ 1 2 - 684876 + 684871 @@ -28524,23 +28542,23 @@ namequalifiers - 3044887 + 3044942 id - 3044887 + 3044942 qualifiableelement - 3044887 + 3044942 qualifyingelement - 54379 + 54380 location - 557008 + 557018 @@ -28554,7 +28572,7 @@ 1 2 - 3044887 + 3044942 @@ -28570,7 +28588,7 @@ 1 2 - 3044887 + 3044942 @@ -28586,7 +28604,7 @@ 1 2 - 3044887 + 3044942 @@ -28602,7 +28620,7 @@ 1 2 - 3044887 + 3044942 @@ -28618,7 +28636,7 @@ 1 2 - 3044887 + 3044942 @@ -28634,7 +28652,7 @@ 1 2 - 3044887 + 3044942 @@ -28712,7 +28730,7 @@ 1 2 - 41234 + 41235 2 @@ -28743,22 +28761,22 @@ 1 2 - 84417 + 84418 2 6 - 39007 + 39008 6 7 - 397208 + 397215 7 192 - 36374 + 36375 @@ -28774,22 +28792,22 @@ 1 2 - 84417 + 84418 2 6 - 39007 + 39008 6 7 - 397208 + 397215 7 192 - 36374 + 36375 @@ -28805,17 +28823,17 @@ 1 2 - 117045 + 117047 2 4 - 14065 + 14066 4 5 - 413479 + 413487 5 @@ -28830,15 +28848,15 @@ varbind - 8252279 + 8252213 expr - 8252279 + 8252213 var - 1050076 + 1050068 @@ -28852,7 +28870,7 @@ 1 2 - 8252279 + 8252213 @@ -28868,27 +28886,27 @@ 1 2 - 171487 + 171485 2 3 - 188646 + 188645 3 4 - 145606 + 145605 4 5 - 116603 + 116602 5 6 - 83127 + 83126 6 @@ -28898,7 +28916,7 @@ 7 9 - 80792 + 80791 9 @@ -28908,12 +28926,12 @@ 13 27 - 79104 + 79103 27 5137 - 37358 + 37357 @@ -28923,15 +28941,15 @@ funbind - 5788265 + 5788371 expr - 5785803 + 5785909 fun - 275046 + 275051 @@ -28945,7 +28963,7 @@ 1 2 - 5783341 + 5783447 2 @@ -28966,7 +28984,7 @@ 1 2 - 180845 + 180848 2 @@ -28996,11 +29014,11 @@ expr_allocator - 44842 + 44839 expr - 44842 + 44839 func @@ -29022,7 +29040,7 @@ 1 2 - 44842 + 44839 @@ -29038,7 +29056,7 @@ 1 2 - 44842 + 44839 @@ -29122,11 +29140,11 @@ expr_deallocator - 53351 + 53347 expr - 53351 + 53347 func @@ -29148,7 +29166,7 @@ 1 2 - 53351 + 53347 @@ -29164,7 +29182,7 @@ 1 2 - 53351 + 53347 @@ -29269,15 +29287,15 @@ expr_cond_guard - 897622 + 897615 cond - 897622 + 897615 guard - 897622 + 897615 @@ -29291,7 +29309,7 @@ 1 2 - 897622 + 897615 @@ -29307,7 +29325,7 @@ 1 2 - 897622 + 897615 @@ -29317,15 +29335,15 @@ expr_cond_true - 897618 + 897611 cond - 897618 + 897611 true - 897618 + 897611 @@ -29339,7 +29357,7 @@ 1 2 - 897618 + 897611 @@ -29355,7 +29373,7 @@ 1 2 - 897618 + 897611 @@ -29365,15 +29383,15 @@ expr_cond_false - 897622 + 897615 cond - 897622 + 897615 false - 897622 + 897615 @@ -29387,7 +29405,7 @@ 1 2 - 897622 + 897615 @@ -29403,7 +29421,7 @@ 1 2 - 897622 + 897615 @@ -29413,15 +29431,15 @@ values - 13539325 + 13539217 id - 13539325 + 13539217 str - 113961 + 113960 @@ -29435,7 +29453,7 @@ 1 2 - 13539325 + 13539217 @@ -29481,11 +29499,11 @@ valuetext - 6632066 + 6631932 id - 6632066 + 6631932 text @@ -29503,7 +29521,7 @@ 1 2 - 6632066 + 6631932 @@ -29533,7 +29551,7 @@ 7 - 594514 + 594510 27811 @@ -29544,15 +29562,15 @@ valuebind - 13647524 + 13647415 val - 13539325 + 13539217 expr - 13647524 + 13647415 @@ -29566,12 +29584,12 @@ 1 2 - 13449127 + 13449020 2 6 - 90198 + 90197 @@ -29587,7 +29605,7 @@ 1 2 - 13647524 + 13647415 @@ -29597,11 +29615,11 @@ fieldoffsets - 1502215 + 1502203 id - 1502215 + 1502203 byteoffset @@ -29623,7 +29641,7 @@ 1 2 - 1502215 + 1502203 @@ -29639,7 +29657,7 @@ 1 2 - 1502215 + 1502203 @@ -29989,23 +30007,23 @@ initialisers - 2292690 + 2292672 init - 2292690 + 2292672 var - 998340 + 998332 expr - 2292690 + 2292672 location - 526645 + 526641 @@ -30019,7 +30037,7 @@ 1 2 - 2292690 + 2292672 @@ -30035,7 +30053,7 @@ 1 2 - 2292690 + 2292672 @@ -30051,7 +30069,7 @@ 1 2 - 2292690 + 2292672 @@ -30067,17 +30085,17 @@ 1 2 - 874360 + 874353 2 15 - 51218 + 51217 16 25 - 72761 + 72760 @@ -30093,17 +30111,17 @@ 1 2 - 874360 + 874353 2 15 - 51218 + 51217 16 25 - 72761 + 72760 @@ -30119,7 +30137,7 @@ 1 2 - 998332 + 998324 2 @@ -30140,7 +30158,7 @@ 1 2 - 2292690 + 2292672 @@ -30156,7 +30174,7 @@ 1 2 - 2292690 + 2292672 @@ -30172,7 +30190,7 @@ 1 2 - 2292690 + 2292672 @@ -30188,7 +30206,7 @@ 1 2 - 415900 + 415896 2 @@ -30219,7 +30237,7 @@ 1 2 - 454329 + 454326 2 @@ -30245,7 +30263,7 @@ 1 2 - 415900 + 415896 2 @@ -30270,26 +30288,26 @@ braced_initialisers - 67888 + 67930 init - 67888 + 67930 expr_ancestor - 1669204 + 1669235 exp - 1669204 + 1669235 ancestor - 835480 + 835495 @@ -30303,7 +30321,7 @@ 1 2 - 1669204 + 1669235 @@ -30324,7 +30342,7 @@ 2 3 - 808504 + 808519 3 @@ -30339,11 +30357,11 @@ exprs - 25203419 + 25203218 id - 25203419 + 25203218 kind @@ -30351,7 +30369,7 @@ location - 10582678 + 10582593 @@ -30365,7 +30383,7 @@ 1 2 - 25203419 + 25203218 @@ -30381,7 +30399,7 @@ 1 2 - 25203419 + 25203218 @@ -30559,22 +30577,22 @@ 1 2 - 8901168 + 8901097 2 3 - 820384 + 820377 3 16 - 796981 + 796974 16 71733 - 64144 + 64143 @@ -30590,17 +30608,17 @@ 1 2 - 9040532 + 9040460 2 3 - 774061 + 774055 3 32 - 768084 + 768078 @@ -30610,15 +30628,15 @@ expr_reuse - 842823 + 842839 reuse - 842823 + 842839 original - 842823 + 842839 value_category @@ -30636,7 +30654,7 @@ 1 2 - 842823 + 842839 @@ -30652,7 +30670,7 @@ 1 2 - 842823 + 842839 @@ -30668,7 +30686,7 @@ 1 2 - 842823 + 842839 @@ -30684,7 +30702,7 @@ 1 2 - 842823 + 842839 @@ -30736,15 +30754,15 @@ expr_types - 25203419 + 25203218 id - 25203419 + 25203218 typeid - 214144 + 214142 value_category @@ -30762,7 +30780,7 @@ 1 2 - 25203419 + 25203218 @@ -30778,7 +30796,7 @@ 1 2 - 25203419 + 25203218 @@ -30819,7 +30837,7 @@ 8 14 - 17382 + 17381 14 @@ -30855,7 +30873,7 @@ 1 2 - 185862 + 185861 2 @@ -30923,15 +30941,15 @@ new_allocated_type - 45787 + 45784 expr - 45787 + 45784 type_id - 27148 + 27146 @@ -30945,7 +30963,7 @@ 1 2 - 45787 + 45784 @@ -30961,12 +30979,12 @@ 1 2 - 11413 + 11412 2 3 - 14350 + 14349 3 @@ -31044,11 +31062,11 @@ param_ref_to_this - 25267 + 25272 expr - 25267 + 25272 @@ -32391,15 +32409,15 @@ condition_decl_bind - 406885 + 406893 expr - 406885 + 406893 decl - 406885 + 406893 @@ -32413,7 +32431,7 @@ 1 2 - 406885 + 406893 @@ -32429,7 +32447,7 @@ 1 2 - 406885 + 406893 @@ -32439,15 +32457,15 @@ typeid_bind - 47476 + 47472 expr - 47476 + 47472 type_id - 15802 + 15801 @@ -32461,7 +32479,7 @@ 1 2 - 47476 + 47472 @@ -32545,11 +32563,11 @@ sizeof_bind - 241939 + 241937 expr - 241939 + 241937 type_id @@ -32567,7 +32585,7 @@ 1 2 - 241939 + 241937 @@ -32930,7 +32948,7 @@ lambda - 15469 + 15468 index @@ -34010,7 +34028,7 @@ 1 2 - 15712 + 15711 2 @@ -34036,7 +34054,7 @@ 1 2 - 16287 + 16286 2 @@ -34083,7 +34101,7 @@ 1 2 - 15712 + 15711 2 @@ -34109,7 +34127,7 @@ 1 2 - 17915 + 17914 2 @@ -34266,11 +34284,11 @@ stmts - 6328636 + 6328585 id - 6328636 + 6328585 kind @@ -34278,7 +34296,7 @@ location - 2676389 + 2676368 @@ -34292,7 +34310,7 @@ 1 2 - 6328636 + 6328585 @@ -34308,7 +34326,7 @@ 1 2 - 6328636 + 6328585 @@ -34546,22 +34564,22 @@ 1 2 - 2225153 + 2225135 2 3 - 177732 + 177731 3 11 - 203471 + 203469 11 1816 - 70032 + 70031 @@ -34577,7 +34595,7 @@ 1 2 - 2599926 + 2599906 2 @@ -34747,15 +34765,15 @@ if_then - 989932 + 989924 if_stmt - 989932 + 989924 then_id - 989932 + 989924 @@ -34769,7 +34787,7 @@ 1 2 - 989932 + 989924 @@ -34785,7 +34803,7 @@ 1 2 - 989932 + 989924 @@ -34795,15 +34813,15 @@ if_else - 434910 + 434918 if_stmt - 434910 + 434918 else_id - 434910 + 434918 @@ -34817,7 +34835,7 @@ 1 2 - 434910 + 434918 @@ -34833,7 +34851,7 @@ 1 2 - 434910 + 434918 @@ -34891,15 +34909,15 @@ constexpr_if_then - 103259 + 103258 constexpr_if_stmt - 103259 + 103258 then_id - 103259 + 103258 @@ -34913,7 +34931,7 @@ 1 2 - 103259 + 103258 @@ -34929,7 +34947,7 @@ 1 2 - 103259 + 103258 @@ -34939,15 +34957,15 @@ constexpr_if_else - 74037 + 74036 constexpr_if_stmt - 74037 + 74036 else_id - 74037 + 74036 @@ -34961,7 +34979,7 @@ 1 2 - 74037 + 74036 @@ -34977,7 +34995,7 @@ 1 2 - 74037 + 74036 @@ -35131,15 +35149,15 @@ do_body - 232395 + 232393 do_stmt - 232395 + 232393 body_id - 232395 + 232393 @@ -35153,7 +35171,7 @@ 1 2 - 232395 + 232393 @@ -35169,7 +35187,7 @@ 1 2 - 232395 + 232393 @@ -35227,11 +35245,11 @@ switch_case - 831947 + 831962 switch_stmt - 409797 + 409804 index @@ -35239,7 +35257,7 @@ case_id - 831947 + 831962 @@ -35258,7 +35276,7 @@ 2 3 - 406928 + 406935 3 @@ -35284,7 +35302,7 @@ 2 3 - 406928 + 406935 3 @@ -35447,7 +35465,7 @@ 1 2 - 831947 + 831962 @@ -35463,7 +35481,7 @@ 1 2 - 831947 + 831962 @@ -35473,15 +35491,15 @@ switch_body - 409797 + 409804 switch_stmt - 409797 + 409804 body_id - 409797 + 409804 @@ -35495,7 +35513,7 @@ 1 2 - 409797 + 409804 @@ -35511,7 +35529,7 @@ 1 2 - 409797 + 409804 @@ -35521,15 +35539,15 @@ for_initialization - 73225 + 73224 for_stmt - 73225 + 73224 init_id - 73225 + 73224 @@ -35543,7 +35561,7 @@ 1 2 - 73225 + 73224 @@ -35559,7 +35577,7 @@ 1 2 - 73225 + 73224 @@ -35665,15 +35683,15 @@ for_body - 84365 + 84364 for_stmt - 84365 + 84364 body_id - 84365 + 84364 @@ -35687,7 +35705,7 @@ 1 2 - 84365 + 84364 @@ -35703,7 +35721,7 @@ 1 2 - 84365 + 84364 @@ -35713,11 +35731,11 @@ stmtparents - 5605702 + 5605658 id - 5605702 + 5605658 index @@ -35725,7 +35743,7 @@ parent - 2362374 + 2362355 @@ -35739,7 +35757,7 @@ 1 2 - 5605702 + 5605658 @@ -35755,7 +35773,7 @@ 1 2 - 5605702 + 5605658 @@ -35893,27 +35911,27 @@ 1 2 - 1342037 + 1342027 2 3 - 516011 + 516007 3 4 - 151119 + 151118 4 6 - 155274 + 155272 6 16 - 179012 + 179010 16 @@ -35934,27 +35952,27 @@ 1 2 - 1342037 + 1342027 2 3 - 516011 + 516007 3 4 - 151119 + 151118 4 6 - 155274 + 155272 6 16 - 179012 + 179010 16 @@ -35969,22 +35987,22 @@ ishandler - 43492 + 43502 block - 43492 + 43502 stmt_decl_bind - 728504 + 728652 stmt - 688131 + 688271 num @@ -35992,7 +36010,7 @@ decl - 728435 + 728583 @@ -36006,12 +36024,12 @@ 1 2 - 665975 + 666111 2 32 - 22156 + 22160 @@ -36027,12 +36045,12 @@ 1 2 - 665975 + 666111 2 32 - 22156 + 22160 @@ -36170,7 +36188,7 @@ 1 2 - 728411 + 728559 2 @@ -36191,7 +36209,7 @@ 1 2 - 728435 + 728583 @@ -36201,11 +36219,11 @@ stmt_decl_entry_bind - 728504 + 728652 stmt - 688131 + 688271 num @@ -36213,7 +36231,7 @@ decl_entry - 728504 + 728652 @@ -36227,12 +36245,12 @@ 1 2 - 665975 + 666111 2 32 - 22156 + 22160 @@ -36248,12 +36266,12 @@ 1 2 - 665975 + 666111 2 32 - 22156 + 22160 @@ -36391,7 +36409,7 @@ 1 2 - 728504 + 728652 @@ -36407,7 +36425,7 @@ 1 2 - 728504 + 728652 @@ -36417,15 +36435,15 @@ blockscope - 1625753 + 1625740 block - 1625753 + 1625740 enclosing - 1404746 + 1404735 @@ -36439,7 +36457,7 @@ 1 2 - 1625753 + 1625740 @@ -36455,12 +36473,12 @@ 1 2 - 1267599 + 1267589 2 4 - 122045 + 122044 4 @@ -36475,11 +36493,11 @@ jumpinfo - 348076 + 348073 id - 348076 + 348073 str @@ -36487,7 +36505,7 @@ target - 72655 + 72654 @@ -36501,7 +36519,7 @@ 1 2 - 348076 + 348073 @@ -36517,7 +36535,7 @@ 1 2 - 348076 + 348073 @@ -36558,7 +36576,7 @@ 10 25 - 2188 + 2187 25 @@ -36646,7 +36664,7 @@ 1 2 - 72655 + 72654 @@ -36656,11 +36674,11 @@ preprocdirects - 5322959 + 5322916 id - 5322959 + 5322916 kind @@ -36668,7 +36686,7 @@ location - 5319889 + 5319847 @@ -36682,7 +36700,7 @@ 1 2 - 5322959 + 5322916 @@ -36698,7 +36716,7 @@ 1 2 - 5322959 + 5322916 @@ -36846,7 +36864,7 @@ 1 2 - 5319766 + 5319724 26 @@ -36867,7 +36885,7 @@ 1 2 - 5319889 + 5319847 @@ -36877,15 +36895,15 @@ preprocpair - 1123207 + 1123198 begin - 874943 + 874936 elseelifend - 1123207 + 1123198 @@ -36899,12 +36917,12 @@ 1 2 - 639324 + 639319 2 3 - 226777 + 226776 3 @@ -36925,7 +36943,7 @@ 1 2 - 1123207 + 1123198 @@ -36935,41 +36953,41 @@ preproctrue - 432314 + 432311 branch - 432314 + 432311 preprocfalse - 280801 + 280799 branch - 280801 + 280799 preproctext - 4283611 + 4283577 id - 4283611 + 4283577 head - 2908455 + 2908431 body - 1656817 + 1656804 @@ -36983,7 +37001,7 @@ 1 2 - 4283611 + 4283577 @@ -36999,7 +37017,7 @@ 1 2 - 4283611 + 4283577 @@ -37015,12 +37033,12 @@ 1 2 - 2712986 + 2712964 2 798 - 195468 + 195467 @@ -37036,7 +37054,7 @@ 1 2 - 2828524 + 2828501 2 @@ -37057,12 +37075,12 @@ 1 2 - 1510952 + 1510940 2 10 - 125237 + 125236 10 @@ -37083,17 +37101,17 @@ 1 2 - 1515127 + 1515115 2 12 - 124869 + 124868 12 3246 - 16821 + 16820 @@ -37103,15 +37121,15 @@ includes - 322579 + 322460 id - 322579 + 322460 included - 59421 + 59399 @@ -37125,7 +37143,7 @@ 1 2 - 322579 + 322460 @@ -37141,32 +37159,32 @@ 1 2 - 29406 + 29395 2 3 - 9559 + 9556 3 4 - 5015 + 5013 4 6 - 5421 + 5419 6 11 - 4576 + 4574 11 47 - 4459 + 4457 47 @@ -37277,11 +37295,11 @@ link_parent - 31164351 + 31162056 element - 3960481 + 3960190 link_target @@ -37299,17 +37317,17 @@ 1 2 - 540607 + 540567 2 9 - 27182 + 27180 9 10 - 3392691 + 3392442 diff --git a/cpp/ql/lib/upgrades/6aec212e408fad907b19368a3376a4d9837783d2/old.dbscheme b/cpp/ql/lib/upgrades/6aec212e408fad907b19368a3376a4d9837783d2/old.dbscheme new file mode 100644 index 000000000000..6aec212e408f --- /dev/null +++ b/cpp/ql/lib/upgrades/6aec212e408fad907b19368a3376a4d9837783d2/old.dbscheme @@ -0,0 +1,2588 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +/** + * Gives the TRAP filename that `trap` is associated with. + * For debugging only. + */ +trap_filename( + int trap: @trap, + string filename: string ref +); + +/** + * Gives the tag name for `tag`. + * For debugging only. + */ +tag_name( + int tag: @tag, + string name: string ref +); + +@trap_or_tag = @tag | @trap; + +/** + * Gives the name for the source file. + */ +source_file_name( + int sf: @source_file, + string name: string ref +); + +/** + * In `build-mode: none` overlay mode, indicates that `source_file` + * (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the + * TRAP file corresponding to `foo.c`, something it transitively + * includes, or a template instantiation it transitively uses. + */ +source_file_uses_trap( + int source_file: @source_file ref, + int trap_file: @trap ref +); + +/** + * In `build-mode: none` overlay mode, indicates that the TRAP file + * `trap_file` uses tag `tag`. + */ +trap_uses_tag( + int trap_file: @trap ref, + int tag: @tag ref +); + +/** + * Holds if there is a definition of `element` in TRAP file or tag `t`. + */ +in_trap_or_tag( + int element: @element ref, + int t: @trap_or_tag ref +); + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +// ... 40 _Decimal32 +// ... 41 _Decimal64 +// ... 42 _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +| 67 = @bit_precise_int // _BitInt(N) +| 68 = @unsigned_bit_precise_int // unsigned _BitInt(N) +| 69 = @signed_bit_precise_int // signed _BitInt(N) +; + +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 +); + +bit_precise_int_types( + unique int id: @builtintype ref, + int bit_width: 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 +); +class_template_generated_from( + unique int template: @usertype ref, + int from: @usertype ref +) + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); +function_template_generated_from( + unique int template: @function ref, + int from: @function 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 +); +variable_template_generated_from( + unique int template: @variable ref, + int from: @variable ref +); + +is_alias_template(unique int id: @usertype ref); +alias_instantiation( + unique int to: @usertype ref, + int from: @usertype ref +); +alias_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +alias_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); +alias_template_generated_from( + unique int template: @usertype ref, + int from: @usertype ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype + | @derivedtype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +| 394 = @isinvocable +| 395 = @isnothrowinvocable +| 396 = @isbitwisecloneable +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + | @isinvocable + | @isnothrowinvocable + | @isbitwisecloneable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +param_ref_to_this( + int expr: @param_ref ref +) + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 17 = @ppd_embed +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +embeds( + unique int id: @ppd_embed ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/6aec212e408fad907b19368a3376a4d9837783d2/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/6aec212e408fad907b19368a3376a4d9837783d2/semmlecode.cpp.dbscheme new file mode 100644 index 000000000000..293904928d85 --- /dev/null +++ b/cpp/ql/lib/upgrades/6aec212e408fad907b19368a3376a4d9837783d2/semmlecode.cpp.dbscheme @@ -0,0 +1,2602 @@ + +/*- Compilations -*/ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * The expanded arguments that were passed to the extractor for a + * compiler invocation. This is similar to `compilation_args`, but + * for a `@someFile` argument, it includes the arguments from that + * file, rather than just taking the argument literally. + */ +#keyset[id, num] +compilation_expanded_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + +/*- External data -*/ + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Lines of code -*/ + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- C++ dbscheme -*/ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +/** + * Gives the TRAP filename that `trap` is associated with. + * For debugging only. + */ +trap_filename( + int trap: @trap, + string filename: string ref +); + +/** + * Gives the tag name for `tag`. + * For debugging only. + */ +tag_name( + int tag: @tag, + string name: string ref +); + +@trap_or_tag = @tag | @trap; + +/** + * Gives the name for the source file. + */ +source_file_name( + int sf: @source_file, + string name: string ref +); + +/** + * In `build-mode: none` overlay mode, indicates that `source_file` + * (`/path/to/foo.c`) uses the TRAP file `trap_file`; i.e. it is the + * TRAP file corresponding to `foo.c`, something it transitively + * includes, or a template instantiation it transitively uses. + */ +source_file_uses_trap( + int source_file: @source_file ref, + int trap_file: @trap ref +); + +/** + * In `build-mode: none` overlay mode, indicates that the TRAP file + * `trap_file` uses tag `tag`. + */ +trap_uses_tag( + int trap_file: @trap ref, + int tag: @tag ref +); + +/** + * Holds if there is a definition of `element` in TRAP file or tag `t`. + */ +in_trap_or_tag( + int element: @element ref, + int t: @trap_or_tag ref +); + +pch_uses( + int pch: @pch ref, + int compilation: @compilation ref, + int id: @file ref +) + +#keyset[pch, compilation] +pch_creations( + int pch: @pch, + int compilation: @compilation ref, + int from: @file ref +) + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location_default ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +case @function.kind of + 0 = @unknown_function +| 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +// ... 6 = @builtin_function deprecated // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +builtin_functions( + int id: @function ref +) + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +// ... 40 _Decimal32 +// ... 41 _Decimal64 +// ... 42 _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +| 67 = @bit_precise_int // _BitInt(N) +| 68 = @unsigned_bit_precise_int // unsigned _BitInt(N) +| 69 = @signed_bit_precise_int // signed _BitInt(N) +; + +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 +); + +bit_precise_int_types( + unique int id: @builtintype ref, + int bit_width: 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 +); +class_template_generated_from( + unique int template: @usertype ref, + int from: @usertype ref +) + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location_default ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); +function_template_generated_from( + unique int template: @function ref, + int from: @function 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 +); +variable_template_generated_from( + unique int template: @variable ref, + int from: @variable ref +); + +is_alias_template(unique int id: @usertype ref); +alias_instantiation( + unique int to: @usertype ref, + int from: @usertype ref +); +alias_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +alias_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); +alias_template_generated_from( + unique int template: @usertype ref, + int from: @usertype ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype + | @decltype + | @derivedtype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_default ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_default ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +| 394 = @isinvocable +| 395 = @isnothrowinvocable +| 396 = @isbitwisecloneable +| 397 = @isvirtualbaseof +| 398 = @isimplicitlifetime +| 399 = @ltsynthesizesfromspaceship +| 400 = @gtsynthesizesfromspaceship +| 401 = @lesynthesizesfromspaceship +| 402 = @gesynthesizesfromspaceship +| 403 = @isstructural +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + | @isinvocable + | @isnothrowinvocable + | @isbitwisecloneable + | @isvirtualbaseof + | @isimplicitlifetime + | @ltsynthesizesfromspaceship + | @gtsynthesizesfromspaceship + | @lesynthesizesfromspaceship + | @gesynthesizesfromspaceship + | @isstructural + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +param_ref_to_this( + int expr: @param_ref ref +) + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_default ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 17 = @ppd_embed +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +embeds( + unique int id: @ppd_embed ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + +/*- XML Files -*/ + +xmlEncoding( + unique int id: @file ref, + string encoding: string ref +); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/6aec212e408fad907b19368a3376a4d9837783d2/upgrade.properties b/cpp/ql/lib/upgrades/6aec212e408fad907b19368a3376a4d9837783d2/upgrade.properties new file mode 100644 index 000000000000..db0e7e92d0e9 --- /dev/null +++ b/cpp/ql/lib/upgrades/6aec212e408fad907b19368a3376a4d9837783d2/upgrade.properties @@ -0,0 +1,2 @@ +description: Add new builtin operations +compatibility: backwards diff --git a/cpp/ql/test/library-tests/builtins/builtins/builtins.expected b/cpp/ql/test/library-tests/builtins/builtins/builtins.expected index 48007d6b0e18..2e8e7fd247d6 100644 --- a/cpp/ql/test/library-tests/builtins/builtins/builtins.expected +++ b/cpp/ql/test/library-tests/builtins/builtins/builtins.expected @@ -1,4 +1,12 @@ | choose_expr.c:3:13:3:42 | __builtin_choose_expr | +| spaceship.cpp:22:41:22:101 | __builtin_lt_synthesizes_from_spaceship | +| spaceship.cpp:23:41:23:89 | __builtin_lt_synthesizes_from_spaceship | +| spaceship.cpp:24:41:24:101 | __builtin_gt_synthesizes_from_spaceship | +| spaceship.cpp:25:41:25:89 | __builtin_gt_synthesizes_from_spaceship | +| spaceship.cpp:26:41:26:101 | __builtin_le_synthesizes_from_spaceship | +| spaceship.cpp:27:41:27:89 | __builtin_le_synthesizes_from_spaceship | +| spaceship.cpp:28:41:28:101 | __builtin_ge_synthesizes_from_spaceship | +| spaceship.cpp:29:41:29:89 | __builtin_ge_synthesizes_from_spaceship | | types.c:4:9:4:57 | __builtin_types_compatible_p | | types.c:6:16:6:65 | __builtin_types_compatible_p | | varargs.c:7:5:7:32 | __builtin_va_start | diff --git a/cpp/ql/test/library-tests/builtins/builtins/expr.expected b/cpp/ql/test/library-tests/builtins/builtins/expr.expected new file mode 100644 index 000000000000..a642c211d5c5 --- /dev/null +++ b/cpp/ql/test/library-tests/builtins/builtins/expr.expected @@ -0,0 +1,106 @@ +| atomic.cpp:3:10:3:27 | call to __atomic_fetch_add_4 | ptr,1,0 | | +| atomic.cpp:3:10:3:38 | (int)... | | | +| atomic.cpp:3:29:3:31 | (volatile void *)... | | | +| atomic.cpp:3:29:3:31 | ptr | | | +| atomic.cpp:3:34:3:34 | 1 | | 1 | +| atomic.cpp:3:34:3:34 | (unsigned int)... | | 1 | +| atomic.cpp:3:37:3:37 | 0 | | 0 | +| atomic.cpp:8:10:8:27 | call to __atomic_fetch_add_1 | ptr,1,0 | | +| atomic.cpp:8:10:8:38 | (char)... | | | +| atomic.cpp:8:10:8:38 | (double)... | | | +| atomic.cpp:8:29:8:31 | (volatile void *)... | | | +| atomic.cpp:8:29:8:31 | ptr | | | +| atomic.cpp:8:34:8:34 | 1 | | 1 | +| atomic.cpp:8:34:8:34 | (unsigned char)... | | 1 | +| atomic.cpp:8:37:8:37 | 0 | | 0 | +| atomic.cpp:13:10:13:29 | call to __atomic_fetch_add_4 | ptr,1,0 | | +| atomic.cpp:13:10:13:40 | (int)... | | | +| atomic.cpp:13:31:13:33 | (volatile void *)... | | | +| atomic.cpp:13:31:13:33 | ptr | | | +| atomic.cpp:13:36:13:36 | 1 | | 1 | +| atomic.cpp:13:36:13:36 | (unsigned int)... | | 1 | +| atomic.cpp:13:39:13:39 | 0 | | 0 | +| atomic.cpp:18:10:18:29 | call to __atomic_fetch_add_1 | ptr,1,0 | | +| atomic.cpp:18:10:18:40 | (char)... | | | +| atomic.cpp:18:31:18:33 | (volatile void *)... | | | +| atomic.cpp:18:31:18:33 | ptr | | | +| atomic.cpp:18:36:18:36 | 1 | | 1 | +| atomic.cpp:18:36:18:36 | (unsigned char)... | | 1 | +| atomic.cpp:18:39:18:39 | 0 | | 0 | +| choose_expr.c:3:13:3:42 | __builtin_choose_expr | 1,5,6 | | +| choose_expr.c:3:35:3:35 | 1 | | 1 | +| choose_expr.c:3:38:3:38 | 5 | | 5 | +| choose_expr.c:3:41:3:41 | 6 | | 6 | +| spaceship.cpp:6:45:6:45 | n | this | | +| spaceship.cpp:6:45:6:45 | this | | | +| spaceship.cpp:9:53:9:56 | {...} | - ... | | +| spaceship.cpp:9:54:9:55 | - ... | 1 | -1 | +| spaceship.cpp:9:55:9:55 | 1 | | 1 | +| spaceship.cpp:10:54:10:56 | {...} | 0 | | +| spaceship.cpp:10:55:10:55 | 0 | | 0 | +| spaceship.cpp:11:56:11:58 | {...} | 1 | | +| spaceship.cpp:11:57:11:57 | 1 | | 1 | +| spaceship.cpp:18:12:18:14 | rhs | | | +| spaceship.cpp:18:12:18:24 | ... <=> ... | rhs,i | | +| spaceship.cpp:18:20:18:22 | lhs | | | +| spaceship.cpp:18:24:18:24 | i | lhs | | +| spaceship.cpp:22:41:22:101 | __builtin_lt_synthesizes_from_spaceship | const S &,const int & | 1 | +| spaceship.cpp:22:41:22:101 | const S & | | | +| spaceship.cpp:22:41:22:101 | const int & | | | +| spaceship.cpp:23:41:23:89 | __builtin_lt_synthesizes_from_spaceship | int,int | 0 | +| spaceship.cpp:23:41:23:89 | int | | | +| spaceship.cpp:23:41:23:89 | int | | | +| spaceship.cpp:24:41:24:101 | __builtin_gt_synthesizes_from_spaceship | const S &,const int & | 1 | +| spaceship.cpp:24:41:24:101 | const S & | | | +| spaceship.cpp:24:41:24:101 | const int & | | | +| spaceship.cpp:25:41:25:89 | __builtin_gt_synthesizes_from_spaceship | int,int | 0 | +| spaceship.cpp:25:41:25:89 | int | | | +| spaceship.cpp:25:41:25:89 | int | | | +| spaceship.cpp:26:41:26:101 | __builtin_le_synthesizes_from_spaceship | const S &,const int & | 1 | +| spaceship.cpp:26:41:26:101 | const S & | | | +| spaceship.cpp:26:41:26:101 | const int & | | | +| spaceship.cpp:27:41:27:89 | __builtin_le_synthesizes_from_spaceship | int,int | 0 | +| spaceship.cpp:27:41:27:89 | int | | | +| spaceship.cpp:27:41:27:89 | int | | | +| spaceship.cpp:28:41:28:101 | __builtin_ge_synthesizes_from_spaceship | const S &,const int & | 1 | +| spaceship.cpp:28:41:28:101 | const S & | | | +| spaceship.cpp:28:41:28:101 | const int & | | | +| spaceship.cpp:29:41:29:89 | __builtin_ge_synthesizes_from_spaceship | int,int | 0 | +| spaceship.cpp:29:41:29:89 | int | | | +| spaceship.cpp:29:41:29:89 | int | | | +| types.c:4:9:4:57 | __builtin_types_compatible_p | typeof(...),long | 0 | +| types.c:4:9:4:57 | long | | | +| types.c:4:9:4:57 | typeof(...) | | | +| types.c:4:49:4:49 | s | | | +| types.c:5:9:5:12 | call to puts | long | | +| types.c:5:14:5:19 | array to pointer conversion | | | +| types.c:5:14:5:19 | long | | long | +| types.c:6:16:6:65 | __builtin_types_compatible_p | typeof(...),char * | 1 | +| types.c:6:16:6:65 | char * | | | +| types.c:6:16:6:65 | typeof(...) | | | +| types.c:6:56:6:56 | s | | | +| types.c:7:9:7:12 | call to puts | str | | +| types.c:7:14:7:18 | array to pointer conversion | | | +| types.c:7:14:7:18 | str | | str | +| types.c:9:12:9:14 | (...) | | 0 | +| types.c:9:13:9:13 | 0 | | 0 | +| varargs.c:7:5:7:32 | __builtin_va_start | ap,args | | +| varargs.c:7:24:7:25 | ap | | | +| varargs.c:7:24:7:25 | array to pointer conversion | | | +| varargs.c:7:28:7:31 | args | | | +| varargs.c:8:10:8:10 | i | | | +| varargs.c:8:10:8:14 | ... = ... | i,0 | | +| varargs.c:8:14:8:14 | 0 | | 0 | +| varargs.c:8:17:8:17 | i | | | +| varargs.c:8:17:8:24 | ... < ... | i,args | | +| varargs.c:8:21:8:24 | args | | | +| varargs.c:8:27:8:27 | i | | | +| varargs.c:8:27:8:29 | ... ++ | i | | +| varargs.c:9:9:9:9 | j | | | +| varargs.c:9:9:9:37 | ... = ... | j,__builtin_va_arg | | +| varargs.c:9:13:9:37 | __builtin_va_arg | ap | | +| varargs.c:9:30:9:31 | ap | | | +| varargs.c:9:30:9:31 | array to pointer conversion | | | +| varargs.c:11:5:11:24 | __builtin_va_end | ap | | +| varargs.c:11:22:11:23 | ap | | | +| varargs.c:11:22:11:23 | array to pointer conversion | | | diff --git a/cpp/ql/test/library-tests/builtins/builtins/expr.ql b/cpp/ql/test/library-tests/builtins/builtins/expr.ql new file mode 100644 index 000000000000..c638cf501562 --- /dev/null +++ b/cpp/ql/test/library-tests/builtins/builtins/expr.ql @@ -0,0 +1,5 @@ +import cpp + +from Expr e, string value +where if exists(e.getValue()) then value = e.getValue().toString() else value = "" +select e, concat(int i | | e.getChild(i).toString(), "," order by i), value diff --git a/cpp/ql/test/library-tests/builtins/builtins/spaceship.cpp b/cpp/ql/test/library-tests/builtins/builtins/spaceship.cpp new file mode 100644 index 000000000000..94f978587b1f --- /dev/null +++ b/cpp/ql/test/library-tests/builtins/builtins/spaceship.cpp @@ -0,0 +1,29 @@ +// semmle-extractor-options: --clang --clang_version 240000 -std=c++23 + +namespace std { + struct strong_ordering { + int n; + constexpr operator int() const { return n; } + static const strong_ordering less, equal, greater; + }; + constexpr strong_ordering strong_ordering::less = {-1}; + constexpr strong_ordering strong_ordering::equal = {0}; + constexpr strong_ordering strong_ordering::greater = {1}; +} + +struct S { + int i; + + friend auto operator<=>(S lhs, int rhs) { + return rhs <=> lhs.i; + } +}; + +bool b_lt_synthesizes_from_spaceship1 = __builtin_lt_synthesizes_from_spaceship(const S&, const int&); +bool b_lt_synthesizes_from_spaceship2 = __builtin_lt_synthesizes_from_spaceship(int, int); +bool b_gt_synthesizes_from_spaceship1 = __builtin_gt_synthesizes_from_spaceship(const S&, const int&); +bool b_gt_synthesizes_from_spaceship2 = __builtin_gt_synthesizes_from_spaceship(int, int); +bool b_le_synthesizes_from_spaceship1 = __builtin_le_synthesizes_from_spaceship(const S&, const int&); +bool b_le_synthesizes_from_spaceship2 = __builtin_le_synthesizes_from_spaceship(int, int); +bool b_ge_synthesizes_from_spaceship1 = __builtin_ge_synthesizes_from_spaceship(const S&, const int&); +bool b_ge_synthesizes_from_spaceship2 = __builtin_ge_synthesizes_from_spaceship(int, int); diff --git a/cpp/ql/test/library-tests/builtins/type_traits/clang.cpp b/cpp/ql/test/library-tests/builtins/type_traits/clang.cpp index 3db47a824ede..67664754f4e5 100644 --- a/cpp/ql/test/library-tests/builtins/type_traits/clang.cpp +++ b/cpp/ql/test/library-tests/builtins/type_traits/clang.cpp @@ -122,10 +122,20 @@ bool b_is_scoped_enum2 = __is_scoped_enum(int); bool b_is_trivially_relocatable1 = __is_trivially_relocatable(int); bool b_is_trivially_relocatable2 = __is_trivially_relocatable(void); -struct S3{ +struct S3 { S3(S3 &); S3& operator=(S3&); }; -bool bok_is_bitwise_cloneable1 = __is_bitwise_cloneable(int); -bool bok_is_bitwise_cloneable2 = __is_bitwise_cloneable(S3); +bool b_is_bitwise_cloneable1 = __is_bitwise_cloneable(int); +bool b_is_bitwise_cloneable2 = __is_bitwise_cloneable(S3); + +struct S4 : virtual S3 { + ~S4() = delete; +}; + +bool b_is_virtual_base_of1 = __builtin_is_virtual_base_of(int, S4); +bool b_is_virtual_base_of2 = __builtin_is_virtual_base_of(S3, S4); + +bool b_is_implicit_lifetime1 = __builtin_is_implicit_lifetime(int); +bool b_is_implicit_lifetime2 = __builtin_is_implicit_lifetime(S4); diff --git a/cpp/ql/test/library-tests/builtins/type_traits/expr.expected b/cpp/ql/test/library-tests/builtins/type_traits/expr.expected index 1728a48f4237..1580d5dba959 100644 --- a/cpp/ql/test/library-tests/builtins/type_traits/expr.expected +++ b/cpp/ql/test/library-tests/builtins/type_traits/expr.expected @@ -165,10 +165,20 @@ | clang.cpp:122:36:122:66 | int | | | | clang.cpp:123:36:123:67 | __is_trivially_relocatable | void | 0 | | clang.cpp:123:36:123:67 | void | | | -| clang.cpp:130:34:130:60 | __is_bitwise_cloneable | int | 1 | -| clang.cpp:130:34:130:60 | int | | | -| clang.cpp:131:34:131:59 | S3 | | | -| clang.cpp:131:34:131:59 | __is_bitwise_cloneable | S3 | 0 | +| clang.cpp:130:32:130:58 | __is_bitwise_cloneable | int | 1 | +| clang.cpp:130:32:130:58 | int | | | +| clang.cpp:131:32:131:57 | S3 | | | +| clang.cpp:131:32:131:57 | __is_bitwise_cloneable | S3 | 0 | +| clang.cpp:137:30:137:66 | S4 | | | +| clang.cpp:137:30:137:66 | __builtin_is_virtual_base_of | int,S4 | 0 | +| clang.cpp:137:30:137:66 | int | | | +| clang.cpp:138:30:138:65 | S3 | | | +| clang.cpp:138:30:138:65 | S4 | | | +| clang.cpp:138:30:138:65 | __builtin_is_virtual_base_of | S3,S4 | 1 | +| clang.cpp:140:32:140:66 | __builtin_is_implicit_lifetime | int | 1 | +| clang.cpp:140:32:140:66 | int | | | +| clang.cpp:141:32:141:65 | S4 | | | +| clang.cpp:141:32:141:65 | __builtin_is_implicit_lifetime | S4 | 0 | | file://:0:0:0:0 | 0 | | 0 | | file://:0:0:0:0 | 0 | | 0 | | file://:0:0:0:0 | 1 | | 1 | @@ -225,6 +235,10 @@ | gcc.cpp:37:32:37:67 | __is_nothrow_invocable | f_type,bool | 0 | | gcc.cpp:37:32:37:67 | bool | | | | gcc.cpp:37:32:37:67 | f_type | | | +| gcc.cpp:39:25:39:52 | __builtin_is_structural | int | 1 | +| gcc.cpp:39:25:39:52 | int | | | +| gcc.cpp:40:25:40:54 | __builtin_is_structural | int && | 0 | +| gcc.cpp:40:25:40:54 | int && | | | | ms.cpp:38:41:38:45 | 0 | | 0 | | ms.cpp:88:27:88:45 | __has_assign | empty | 0 | | ms.cpp:88:27:88:45 | empty | | | diff --git a/cpp/ql/test/library-tests/builtins/type_traits/expr.ql b/cpp/ql/test/library-tests/builtins/type_traits/expr.ql index a7d2b436ebde..c638cf501562 100644 --- a/cpp/ql/test/library-tests/builtins/type_traits/expr.ql +++ b/cpp/ql/test/library-tests/builtins/type_traits/expr.ql @@ -1,15 +1,5 @@ import cpp -string childrenFrom(Expr e, int i) { - ( - if i = 0 - then result = e.getChild(i).toString() + childrenFrom(e, i + 1) - else result = "," + e.getChild(i).toString() + childrenFrom(e, i + 1) - ) - or - i = e.getNumChild() and result = "" -} - from Expr e, string value where if exists(e.getValue()) then value = e.getValue().toString() else value = "" -select e, childrenFrom(e, 0), value +select e, concat(int i | | e.getChild(i).toString(), "," order by i), value diff --git a/cpp/ql/test/library-tests/builtins/type_traits/gcc.cpp b/cpp/ql/test/library-tests/builtins/type_traits/gcc.cpp index 15f59812d2e9..7c6189b81aff 100644 --- a/cpp/ql/test/library-tests/builtins/type_traits/gcc.cpp +++ b/cpp/ql/test/library-tests/builtins/type_traits/gcc.cpp @@ -1,4 +1,4 @@ -// semmle-extractor-options: --gnu_version 150000 +// semmle-extractor-options: --gnu_version 170000 __attribute__ ((aligned(8))) int v; bool b_has_attribute1 = __builtin_has_attribute(v, aligned); @@ -35,3 +35,6 @@ bool b_is_invocable2 = __is_invocable(f_type, bool); bool b_is_nothrow_invocable1 = __is_nothrow_invocable(f_type); bool b_is_nothrow_invocable2 = __is_nothrow_invocable(f_type, bool); + +bool b_is_structural1 = __builtin_is_structural(int); +bool b_is_structural2 = __builtin_is_structural(int&&);