diff --git a/cpp/downgrades/a765f5c5abd3e27f76d5c48fbd09c1b2e4c3febc/fileannotations.ql b/cpp/downgrades/a765f5c5abd3e27f76d5c48fbd09c1b2e4c3febc/fileannotations.ql new file mode 100644 index 000000000000..fc0bd1cfa56c --- /dev/null +++ b/cpp/downgrades/a765f5c5abd3e27f76d5c48fbd09c1b2e4c3febc/fileannotations.ql @@ -0,0 +1,7 @@ +class File extends @file { + string toString() { none() } +} + +from File id, int kind, string name, string value +where fileannotations(id, _, kind, name, value) +select id, kind, name, value diff --git a/cpp/downgrades/a765f5c5abd3e27f76d5c48fbd09c1b2e4c3febc/old.dbscheme b/cpp/downgrades/a765f5c5abd3e27f76d5c48fbd09c1b2e4c3febc/old.dbscheme new file mode 100644 index 000000000000..a765f5c5abd3 --- /dev/null +++ b/cpp/downgrades/a765f5c5abd3e27f76d5c48fbd09c1b2e4c3febc/old.dbscheme @@ -0,0 +1,2603 @@ + +/*- 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 compilation: @compilation 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/a765f5c5abd3e27f76d5c48fbd09c1b2e4c3febc/semmlecode.cpp.dbscheme b/cpp/downgrades/a765f5c5abd3e27f76d5c48fbd09c1b2e4c3febc/semmlecode.cpp.dbscheme new file mode 100644 index 000000000000..293904928d85 --- /dev/null +++ b/cpp/downgrades/a765f5c5abd3e27f76d5c48fbd09c1b2e4c3febc/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/downgrades/a765f5c5abd3e27f76d5c48fbd09c1b2e4c3febc/upgrade.properties b/cpp/downgrades/a765f5c5abd3e27f76d5c48fbd09c1b2e4c3febc/upgrade.properties new file mode 100644 index 000000000000..23ae67f5e1c7 --- /dev/null +++ b/cpp/downgrades/a765f5c5abd3e27f76d5c48fbd09c1b2e4c3febc/upgrade.properties @@ -0,0 +1,3 @@ +description: Specify the compilation in fileannotations +compatibility: full +fileannotations.rel: run fileannotations.qlo diff --git a/cpp/ql/lib/semmle/code/cpp/File.qll b/cpp/ql/lib/semmle/code/cpp/File.qll index 950368bf984a..04f657f0ed4e 100644 --- a/cpp/ql/lib/semmle/code/cpp/File.qll +++ b/cpp/ql/lib/semmle/code/cpp/File.qll @@ -71,10 +71,12 @@ class File extends Container, Locatable, Impl::File { } /** Holds if this file was compiled as C (at any point). */ - predicate compiledAsC() { fileannotations(underlyingElement(this), 1, "compiled as c", "1") } + predicate compiledAsC() { fileannotations(underlyingElement(this), _, 1, "compiled as c", "1") } /** Holds if this file was compiled as C++ (at any point). */ - predicate compiledAsCpp() { fileannotations(underlyingElement(this), 1, "compiled as c++", "1") } + predicate compiledAsCpp() { + fileannotations(underlyingElement(this), _, 1, "compiled as c++", "1") + } /** * Holds if this file was compiled by a Microsoft compiler (at any point). diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme index 293904928d85..a765f5c5abd3 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme @@ -310,6 +310,7 @@ pch_creations( fileannotations( int id: @file ref, + int compilation: @compilation ref, int kind: int ref, string name: string ref, string value: string ref diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats index 90a3250189fb..dcc65d509ee1 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats @@ -2,7 +2,7 @@ @compilation - 12794 + 12795 @externalDataElement @@ -10,7 +10,7 @@ @file - 65994 + 65995 @folder @@ -20,10 +20,6 @@ @diagnostic 363 - - @location_default - 46368911 - @trap 1 @@ -36,13 +32,17 @@ @source_file 1 + + @location_default + 46368878 + @pch 245 @macro_expansion - 40292268 + 40312231 @other_macro_reference @@ -50,7 +50,7 @@ @normal_function - 2699581 + 2699579 @unknown_function @@ -58,7 +58,7 @@ @constructor - 692574 + 692610 @destructor @@ -70,7 +70,7 @@ @operator - 647300 + 647299 @user_defined_literal @@ -82,23 +82,23 @@ @fun_decl - 4149377 + 4149251 @var_decl - 9411026 + 9410651 @type_decl - 1639737 + 1639736 @namespace_decl - 406672 + 407394 @using_declaration - 271344 + 271090 @using_directive @@ -110,27 +110,27 @@ @static_assert - 172118 + 172102 @parameter - 6932082 + 6932077 @membervariable - 1502203 + 1510690 @globalvariable - 634531 + 634530 @localvariable - 733187 + 733223 @enumconstant - 347910 + 349437 @errortype @@ -366,11 +366,11 @@ @bit_precise_int - 4 + 5 @unsigned_bit_precise_int - 6 + 7 @signed_bit_precise_int @@ -378,7 +378,7 @@ @pointer - 449255 + 449254 @type_with_specifiers @@ -390,7 +390,7 @@ @routineptr - 678157 + 678192 @reference @@ -466,7 +466,7 @@ @remove_cv - 2098 + 2097 @remove_cvref @@ -494,7 +494,7 @@ @remove_reference - 5695 + 5694 @decltype @@ -502,7 +502,7 @@ @struct - 1056347 + 1056345 @union @@ -510,15 +510,15 @@ @enum - 41590 + 41747 @template_parameter - 879462 + 879470 @alias - 1791463 + 1791478 @unknown_usertype @@ -526,7 +526,7 @@ @class - 320949 + 320948 @template_template_parameter @@ -534,7 +534,7 @@ @proxy_class - 51179 + 51180 @scoped_enum @@ -542,7 +542,7 @@ @template_struct - 214585 + 214587 @template_class @@ -554,11 +554,11 @@ @mangledname - 6345435 + 6345430 @type_mention - 5937883 + 5946477 @concept_template @@ -566,7 +566,7 @@ @routinetype - 599081 + 599112 @ptrtomember @@ -582,11 +582,11 @@ @stdattribute - 347838 + 347837 @declspec - 330272 + 330768 @msattribute @@ -598,11 +598,11 @@ @attribute_arg_token - 16544 + 16545 @attribute_arg_constant_expr - 72665 + 72676 @attribute_arg_expr @@ -622,15 +622,15 @@ @derivation - 494850 + 494876 @frienddecl - 765911 + 765072 @comment - 11058376 + 11058369 @namespace @@ -642,15 +642,15 @@ @namequalifier - 3044942 + 3044679 @value - 13539217 + 13539207 @initialiser - 2292672 + 2293973 @address_of @@ -662,19 +662,19 @@ @array_to_pointer - 1953174 + 1953173 @parexpr - 4913752 + 4913748 @arithnegexpr - 586361 + 586360 @unaryplusexpr - 4158 + 4159 @complementexpr @@ -686,7 +686,7 @@ @postincrexpr - 84541 + 84529 @postdecrexpr @@ -702,7 +702,7 @@ @conditionalexpr - 897615 + 897614 @addexpr @@ -714,15 +714,15 @@ @mulexpr - 445289 + 445288 @divexpr - 52368 + 52361 @remexpr - 15869 + 15870 @paddexpr @@ -730,7 +730,7 @@ @psubexpr - 67992 + 67982 @pdiffexpr @@ -738,7 +738,7 @@ @lshiftexpr - 552169 + 552168 @rshiftexpr @@ -754,7 +754,7 @@ @xorexpr - 73926 + 73915 @eqexpr @@ -762,7 +762,7 @@ @neexpr - 411749 + 411748 @gtexpr @@ -774,7 +774,7 @@ @geexpr - 81275 + 81263 @leexpr @@ -782,7 +782,7 @@ @assignexpr - 1280769 + 1280768 @assignaddexpr @@ -798,7 +798,7 @@ @assigndivexpr - 6804 + 6803 @assignremexpr @@ -850,11 +850,11 @@ @callexpr - 263463 + 263477 @vastartexpr - 5021 + 5020 @vaargexpr @@ -870,7 +870,7 @@ @varaccess - 8252213 + 8252207 @runtime_sizeof @@ -878,7 +878,7 @@ @runtime_alignof - 50646 + 50649 @expr_stmt @@ -886,15 +886,15 @@ @routineexpr - 5708855 + 5708362 @type_operand - 1404968 + 1404967 @offsetofexpr - 148493 + 148492 @typescompexpr @@ -902,7 +902,7 @@ @literal - 8036394 + 8035492 @aggregateliteral @@ -910,27 +910,27 @@ @c_style_cast - 6023782 + 6023778 @temp_init - 985294 + 985077 @errorexpr - 45075 + 45077 @reference_to - 1890439 + 1890438 @ref_indirect - 2091838 + 2091946 @vacuous_destructor_call - 7765 + 7766 @assume @@ -986,15 +986,15 @@ @thisaccess - 1554373 + 1554222 @new_expr - 45784 + 45786 @delete_expr - 11378 + 11379 @throw_expr @@ -1002,15 +1002,15 @@ @condition_decl - 406893 + 406857 @braced_init_list - 2115 + 2114 @type_id - 47472 + 47475 @sizeof_pack @@ -1066,7 +1066,7 @@ @isclassexpr - 2381 + 2380 @isconvtoexpr @@ -1102,7 +1102,7 @@ @uuidof - 26289 + 26351 @delete_array_expr @@ -1118,7 +1118,7 @@ @ctordirectinit - 111793 + 111799 @ctorvirtualinit @@ -1134,7 +1134,7 @@ @dtordirectdestruct - 39099 + 39101 @dtorvirtualdestruct @@ -1142,19 +1142,19 @@ @dtorfielddestruct - 39470 + 39472 @static_cast - 348329 + 348328 @reinterpret_cast - 39547 + 39543 @const_cast - 24242 + 24244 @dynamic_cast @@ -1162,15 +1162,15 @@ @lambdaexpr - 19024 + 19022 @param_ref - 165342 + 165278 @noopexpr - 89 + 48 @istriviallyconstructibleexpr @@ -1266,11 +1266,11 @@ @isfinalexpr - 9318 + 9319 @noexceptexpr - 30501 + 30489 @builtinshufflevector @@ -1442,7 +1442,7 @@ @reuseexpr - 842839 + 842766 @istriviallycopyassignable @@ -1542,7 +1542,7 @@ @requires_expr - 16421 + 16419 @nested_requirement @@ -1550,11 +1550,11 @@ @compound_requirement - 10897 + 10896 @concept_id - 90178 + 90170 @isinvocable @@ -1598,15 +1598,15 @@ @lambdacapture - 31901 + 31898 @stmt_expr - 2031019 + 2031017 @stmt_if - 989924 + 989923 @stmt_while @@ -1614,11 +1614,11 @@ @stmt_goto - 159803 + 159804 @stmt_label - 78982 + 78983 @stmt_return @@ -1626,7 +1626,7 @@ @stmt_block - 1707512 + 1707511 @stmt_end_test_while @@ -1638,11 +1638,11 @@ @stmt_switch_case - 831962 + 831891 @stmt_switch - 409804 + 409769 @stmt_asm @@ -1650,11 +1650,11 @@ @stmt_decl - 772371 + 772297 @stmt_empty - 427275 + 427238 @stmt_continue @@ -1662,7 +1662,7 @@ @stmt_break - 137609 + 137595 @stmt_try_block @@ -1686,7 +1686,7 @@ @stmt_range_based_for - 6225 + 6223 @stmt_handler @@ -1722,7 +1722,7 @@ @ppd_ifndef - 160318 + 160349 @ppd_elif @@ -1734,15 +1734,15 @@ @ppd_endif - 874936 + 874935 @ppd_plain_include - 322385 + 322388 @ppd_define - 2706580 + 2706578 @ppd_undef @@ -1758,7 +1758,7 @@ @ppd_line - 19000 + 19001 @ppd_error @@ -1820,11 +1820,11 @@ compilations - 12794 + 12795 id - 12794 + 12795 cwd @@ -1842,7 +1842,7 @@ 1 2 - 12794 + 12795 @@ -1868,11 +1868,11 @@ compilation_args - 1024354 + 1024363 id - 12794 + 12795 num @@ -2259,11 +2259,11 @@ compilation_expanded_args - 1024354 + 1024363 id - 12794 + 12795 num @@ -2698,7 +2698,7 @@ compilation_compiling_files - 15732 + 15730 id @@ -2706,11 +2706,11 @@ num - 4518 + 4517 file - 13663 + 13661 @@ -2826,7 +2826,7 @@ 1 2 - 2395 + 2394 2 @@ -2862,7 +2862,7 @@ 1 2 - 2395 + 2394 2 @@ -2898,7 +2898,7 @@ 1 2 - 12302 + 12301 2 @@ -2924,7 +2924,7 @@ 1 2 - 12520 + 12518 2 @@ -2944,7 +2944,7 @@ compilation_time - 62929 + 62920 id @@ -2952,7 +2952,7 @@ num - 4518 + 4517 kind @@ -2960,7 +2960,7 @@ seconds - 19434 + 14097 @@ -3041,47 +3041,47 @@ 3 4 - 381 + 598 4 5 - 979 + 762 6 - 9 + 7 + 163 + + + 8 + 10 217 - 9 + 10 11 - 217 + 108 11 - 12 + 13 217 - 13 + 14 18 217 18 - 21 - 163 - - - 21 - 45 + 22 217 - 52 - 137 - 108 + 24 + 107 + 217 @@ -3097,7 +3097,7 @@ 1 2 - 2395 + 2394 2 @@ -3133,7 +3133,7 @@ 4 5 - 4518 + 4517 @@ -3149,32 +3149,32 @@ 3 4 - 1034 + 1088 4 5 - 1415 + 1360 5 6 - 272 + 326 6 7 - 272 + 326 7 8 - 435 + 272 8 9 - 163 + 217 9 @@ -3182,13 +3182,13 @@ 381 - 13 - 43 + 12 + 41 381 - 44 - 95 + 43 + 94 163 @@ -3235,18 +3235,18 @@ 12 - 5 - 6 + 4 + 5 108 - 198 - 199 + 128 + 129 54 - 201 - 202 + 158 + 159 54 @@ -3263,22 +3263,27 @@ 1 2 - 13446 + 7456 2 3 - 3919 + 2993 3 - 5 - 1578 + 4 + 2394 - 5 - 45 - 489 + 4 + 7 + 1088 + + + 15 + 48 + 163 @@ -3294,22 +3299,32 @@ 1 2 - 12738 + 6858 2 3 - 3701 + 2394 3 4 - 1687 + 2286 4 - 65 - 1306 + 5 + 1088 + + + 5 + 7 + 1143 + + + 7 + 75 + 326 @@ -3325,12 +3340,12 @@ 1 2 - 16603 + 12192 2 3 - 2830 + 1905 @@ -3606,15 +3621,15 @@ compilation_finished - 12794 + 12795 id - 12794 + 12795 cpu_seconds - 9791 + 9994 elapsed_seconds @@ -3632,7 +3647,7 @@ 1 2 - 12794 + 12795 @@ -3648,7 +3663,7 @@ 1 2 - 12794 + 12795 @@ -3664,17 +3679,17 @@ 1 2 - 8316 + 8733 2 3 - 1004 + 823 3 - 20 - 470 + 24 + 438 @@ -3690,12 +3705,12 @@ 1 2 - 9182 + 9427 2 3 - 609 + 566 @@ -3711,21 +3726,21 @@ 1 2 - 74 + 53 2 3 - 21 - - - 4 - 5 - 10 + 32 6 7 + 32 + + + 7 + 8 21 @@ -3735,28 +3750,28 @@ 13 - 14 + 18 21 - 16 - 30 + 31 + 53 21 - 41 - 98 + 98 + 145 21 - 157 - 229 + 222 + 279 21 - 268 - 290 - 21 + 280 + 281 + 10 @@ -3772,21 +3787,21 @@ 1 2 - 74 + 53 2 3 - 21 - - - 4 - 5 - 10 + 32 6 7 + 32 + + + 7 + 8 21 @@ -3796,27 +3811,27 @@ 13 - 14 + 18 21 - 16 - 30 + 31 + 52 21 - 41 - 96 - 21 + 96 + 97 + 10 - 134 - 152 + 139 + 140 21 - 204 - 232 + 211 + 230 21 @@ -4054,11 +4069,11 @@ locations_default - 46368911 + 46368878 id - 46368911 + 46368878 file @@ -4066,7 +4081,7 @@ beginLine - 7382933 + 7382927 beginColumn @@ -4074,7 +4089,7 @@ endLine - 7383915 + 7383910 endColumn @@ -4092,7 +4107,7 @@ 1 2 - 46368911 + 46368878 @@ -4108,7 +4123,7 @@ 1 2 - 46368911 + 46368878 @@ -4124,7 +4139,7 @@ 1 2 - 46368911 + 46368878 @@ -4140,7 +4155,7 @@ 1 2 - 46368911 + 46368878 @@ -4156,7 +4171,7 @@ 1 2 - 46368911 + 46368878 @@ -4557,7 +4572,7 @@ 1 2 - 4879555 + 4879551 2 @@ -4567,7 +4582,7 @@ 3 4 - 535447 + 535446 4 @@ -4598,12 +4613,12 @@ 1 2 - 4940945 + 4940942 2 3 - 1200550 + 1200549 3 @@ -4613,7 +4628,7 @@ 6 56 - 554969 + 554968 56 @@ -4634,17 +4649,17 @@ 1 2 - 5554112 + 5554109 2 3 - 476635 + 476634 3 7 - 569089 + 569088 7 @@ -4670,7 +4685,7 @@ 1 2 - 6923241 + 6923236 2 @@ -4691,7 +4706,7 @@ 1 2 - 4947084 + 4947081 2 @@ -4701,12 +4716,12 @@ 3 4 - 528203 + 528202 4 12 - 576210 + 576209 12 @@ -5112,7 +5127,7 @@ 1 2 - 4877345 + 4877341 2 @@ -5132,7 +5147,7 @@ 12 94 - 553864 + 553863 94 @@ -5153,17 +5168,17 @@ 1 2 - 4937998 + 4937995 2 3 - 1204111 + 1204110 3 6 - 622253 + 622252 6 @@ -5189,7 +5204,7 @@ 1 2 - 6940062 + 6940057 2 @@ -5210,7 +5225,7 @@ 1 2 - 5552762 + 5552758 2 @@ -5246,7 +5261,7 @@ 1 2 - 4945611 + 4945607 2 @@ -5261,12 +5276,12 @@ 4 12 - 578052 + 578051 12 72 - 554355 + 554354 72 @@ -5581,15 +5596,15 @@ files - 65994 + 65995 id - 65994 + 65995 name - 65994 + 65995 @@ -5603,7 +5618,7 @@ 1 2 - 65994 + 65995 @@ -5619,7 +5634,7 @@ 1 2 - 65994 + 65995 @@ -5832,7 +5847,7 @@ 1 2 - 793041 + 793040 2 @@ -7526,12 +7541,16 @@ fileannotations - 4250935 + 8670129 id 5836 + + compilation + 12741 + kind 21 @@ -7546,6 +7565,32 @@ + + id + compilation + + + 12 + + + 1 + 2 + 149 + + + 2 + 3 + 5665 + + + 28 + 91 + 21 + + + + + id kind @@ -7714,6 +7759,195 @@ + + compilation + id + + + 12 + + + 1 + 2 + 12741 + + + + + + + compilation + kind + + + 12 + + + 1 + 2 + 288 + + + 2 + 3 + 12452 + + + + + + + compilation + name + + + 12 + + + 1 + 77 + 609 + + + 79 + 80 + 983 + + + 80 + 179 + 1036 + + + 180 + 283 + 972 + + + 284 + 350 + 962 + + + 355 + 404 + 962 + + + 404 + 498 + 983 + + + 499 + 549 + 363 + + + 550 + 551 + 2693 + + + 553 + 642 + 962 + + + 642 + 858 + 972 + + + 866 + 1426 + 962 + + + 1438 + 2155 + 277 + + + + + + + compilation + value + + + 12 + + + 1 + 88 + 609 + + + 90 + 91 + 983 + + + 91 + 244 + 972 + + + 244 + 356 + 929 + + + 356 + 425 + 983 + + + 427 + 490 + 1026 + + + 490 + 664 + 962 + + + 669 + 702 + 42 + + + 706 + 707 + 2693 + + + 710 + 943 + 1004 + + + 943 + 1115 + 972 + + + 1115 + 1897 + 962 + + + 1897 + 3742 + 598 + + + + + kind id @@ -7735,6 +7969,27 @@ + + kind + compilation + + + 12 + + + 1165 + 1166 + 10 + + + 1192 + 1193 + 10 + + + + + kind name @@ -7848,6 +8103,82 @@ + + name + compilation + + + 12 + + + 1 + 2 + 32 + + + 2 + 3 + 11116 + + + 3 + 6 + 4457 + + + 6 + 9 + 5077 + + + 9 + 13 + 4147 + + + 14 + 17 + 4649 + + + 17 + 32 + 4468 + + + 32 + 37 + 4874 + + + 37 + 54 + 4339 + + + 54 + 111 + 4628 + + + 116 + 255 + 5216 + + + 255 + 916 + 4681 + + + 917 + 1191 + 1731 + + + + + name kind @@ -8011,6 +8342,87 @@ + + value + compilation + + + 12 + + + 2 + 3 + 3399 + + + 4 + 7 + 1656 + + + 8 + 9 + 3228 + + + 10 + 15 + 2490 + + + 16 + 27 + 3003 + + + 28 + 33 + 1956 + + + 34 + 47 + 3078 + + + 48 + 101 + 3580 + + + 102 + 115 + 3067 + + + 116 + 158 + 3014 + + + 161 + 300 + 3121 + + + 301 + 666 + 3014 + + + 667 + 969 + 3035 + + + 970 + 1193 + 2340 + + + + + value kind @@ -8117,15 +8529,15 @@ inmacroexpansion - 149972783 + 149972676 id - 24663663 + 24663645 inv - 3704566 + 3704563 @@ -8139,37 +8551,37 @@ 1 3 - 2207711 + 2207710 3 5 - 1468674 + 1468673 5 6 - 1626688 + 1626687 6 7 - 6580777 + 6580772 7 8 - 8716427 + 8716421 8 9 - 3555999 + 3555996 9 22 - 507385 + 507384 @@ -8195,7 +8607,7 @@ 3 4 - 480811 + 480810 4 @@ -8220,7 +8632,7 @@ 10 11 - 444519 + 444518 11 @@ -8245,15 +8657,15 @@ affectedbymacroexpansion - 48637440 + 48637405 id - 7021656 + 7021651 inv - 3802004 + 3802002 @@ -8267,7 +8679,7 @@ 1 2 - 3845572 + 3845569 2 @@ -8277,7 +8689,7 @@ 3 4 - 361735 + 361734 4 @@ -8292,7 +8704,7 @@ 12 50 - 556103 + 556102 50 @@ -8313,7 +8725,7 @@ 1 4 - 313740 + 313739 4 @@ -8328,7 +8740,7 @@ 9 12 - 342540 + 342539 12 @@ -8353,7 +8765,7 @@ 16 17 - 377184 + 377183 17 @@ -8368,7 +8780,7 @@ 20 26 - 297272 + 297271 26 @@ -8383,19 +8795,19 @@ macroinvocations - 40373543 + 40393331 id - 40373543 + 40393331 macro_id - 182365 + 182502 location - 5923076 + 5926229 kind @@ -8413,7 +8825,7 @@ 1 2 - 40373543 + 40393331 @@ -8429,7 +8841,7 @@ 1 2 - 40373543 + 40393331 @@ -8445,7 +8857,7 @@ 1 2 - 40373543 + 40393331 @@ -8461,47 +8873,47 @@ 1 2 - 61078 + 61233 2 3 - 27599 + 27595 3 4 - 18073 + 18070 4 5 - 10016 + 10015 5 7 - 13827 + 13825 7 13 - 14589 + 14587 13 33 - 13718 + 13716 33 - 187 - 13718 + 188 + 13716 190 - 72214 - 9744 + 72264 + 9742 @@ -8517,42 +8929,42 @@ 1 2 - 77627 + 77779 2 3 - 30648 + 30643 3 4 - 14371 + 14369 4 5 - 10288 + 10287 5 8 - 14044 + 14042 8 18 - 14099 + 14097 18 90 - 13718 + 13716 90 - 12207 - 7566 + 12215 + 7565 @@ -8568,12 +8980,12 @@ 1 2 - 177847 + 177984 2 3 - 4518 + 4517 @@ -8589,17 +9001,17 @@ 1 2 - 5259319 + 5262244 2 4 - 429403 + 429666 4 - 72214 - 234353 + 72264 + 234319 @@ -8615,12 +9027,12 @@ 1 2 - 5900919 + 5904076 2 37 - 22156 + 22152 @@ -8636,7 +9048,7 @@ 1 2 - 5923076 + 5926229 @@ -8650,13 +9062,13 @@ 12 - 1493 - 1494 + 1490 + 1491 54 - 740156 - 740157 + 740632 + 740633 54 @@ -8676,8 +9088,8 @@ 54 - 3144 - 3145 + 3147 + 3148 54 @@ -8692,13 +9104,13 @@ 12 - 1075 - 1076 + 1074 + 1075 54 - 107730 - 107731 + 107805 + 107806 54 @@ -8709,15 +9121,15 @@ macroparent - 33673263 + 33689575 id - 33673263 + 33689575 parent_id - 15935717 + 15944197 @@ -8731,7 +9143,7 @@ 1 2 - 33673263 + 33689575 @@ -8747,27 +9159,27 @@ 1 2 - 7812221 + 7816239 2 3 - 1595237 + 1596308 3 4 - 4705743 + 4708968 4 5 - 1296647 + 1296891 5 205 - 525866 + 525788 @@ -8777,15 +9189,15 @@ macrolocationbind - 6014113 + 6012788 id - 4203558 + 4202110 location - 2268486 + 2268640 @@ -8799,27 +9211,27 @@ 1 2 - 3281808 + 3280298 2 3 - 488113 + 488146 3 4 - 8647 + 8648 4 5 - 411994 + 412022 5 17 - 12993 + 12994 @@ -8835,12 +9247,12 @@ 1 2 - 1330319 + 1330409 2 3 - 480278 + 480311 3 @@ -8850,12 +9262,12 @@ 4 5 - 426058 + 426087 5 522 - 24017 + 24018 @@ -8865,11 +9277,11 @@ macro_argument_unexpanded - 83492408 + 83493277 invocation - 26600368 + 26600747 argument_index @@ -8877,7 +9289,7 @@ text - 347387 + 347390 @@ -8891,22 +9303,22 @@ 1 2 - 9794310 + 9794544 2 3 - 9891058 + 9891143 3 4 - 5063078 + 5063121 4 67 - 1851921 + 1851937 @@ -8922,22 +9334,22 @@ 1 2 - 9979137 + 9979372 2 3 - 9908855 + 9908941 3 4 - 4904493 + 4904535 4 67 - 1807881 + 1807897 @@ -8962,7 +9374,7 @@ 646916 - 2488534 + 2488548 32 @@ -9020,12 +9432,12 @@ 4 5 - 35113 + 35114 5 6 - 39731 + 39732 6 @@ -9071,7 +9483,7 @@ 1 2 - 246096 + 246099 2 @@ -9091,11 +9503,11 @@ macro_argument_expanded - 83492408 + 83493277 invocation - 26600368 + 26600747 argument_index @@ -9103,7 +9515,7 @@ text - 210395 + 210396 @@ -9117,22 +9529,22 @@ 1 2 - 9794310 + 9794544 2 3 - 9891058 + 9891143 3 4 - 5063078 + 5063121 4 67 - 1851921 + 1851937 @@ -9148,22 +9560,22 @@ 1 2 - 12789770 + 12790030 2 3 - 8531993 + 8532067 3 4 - 4276333 + 4276370 4 9 - 1002270 + 1002279 @@ -9188,7 +9600,7 @@ 646916 - 2488534 + 2488548 32 @@ -9241,7 +9653,7 @@ 3 4 - 43996 + 43997 4 @@ -9271,17 +9683,17 @@ 19 51 - 15958 + 15959 51 251 - 15787 + 15788 251 - 1169174 - 9630 + 1169188 + 9631 @@ -9297,12 +9709,12 @@ 1 2 - 106314 + 106315 2 3 - 89981 + 89982 3 @@ -9317,15 +9729,15 @@ functions - 3995778 + 3995776 id - 3995778 + 3995776 name - 1666626 + 1666625 kind @@ -9343,7 +9755,7 @@ 1 2 - 3995778 + 3995776 @@ -9359,7 +9771,7 @@ 1 2 - 3995778 + 3995776 @@ -9375,7 +9787,7 @@ 1 2 - 1422047 + 1422046 2 @@ -9401,7 +9813,7 @@ 1 2 - 1663802 + 1663801 2 @@ -9519,15 +9931,15 @@ function_entry_point - 1131444 + 1131502 id - 1128067 + 1128126 entry_point - 1131444 + 1131502 @@ -9541,7 +9953,7 @@ 1 2 - 1125231 + 1125289 2 @@ -9562,7 +9974,7 @@ 1 2 - 1131444 + 1131502 @@ -9572,15 +9984,15 @@ function_return_type - 4012845 + 4012842 id - 3995778 + 3995776 return_type - 611080 + 611079 @@ -9594,7 +10006,7 @@ 1 2 - 3978712 + 3978709 2 @@ -9630,7 +10042,7 @@ 5 464 - 45920 + 45919 475 @@ -9915,44 +10327,44 @@ purefunctions - 131113 + 131562 id - 131113 + 131562 function_deleted - 87630 + 87622 id - 87630 + 87622 function_defaulted - 51426 + 51421 id - 51426 + 51421 function_prototyped - 3994305 + 3994302 id - 3994305 + 3994302 @@ -10032,15 +10444,15 @@ member_function_this_type - 671002 + 670997 id - 671002 + 670997 this_type - 227957 + 227959 @@ -10054,7 +10466,7 @@ 1 2 - 671002 + 670997 @@ -10070,32 +10482,32 @@ 1 2 - 100146 + 100137 2 3 - 59164 + 59197 3 4 - 22137 + 22094 4 5 - 13853 + 13874 5 8 - 18535 + 18545 8 152 - 14120 + 14109 @@ -10105,27 +10517,27 @@ fun_decls - 4155271 + 4155145 id - 4149377 + 4149251 function - 3975028 + 3975026 type_id - 604204 + 604203 name - 1665153 + 1665152 location - 2768830 + 2768828 @@ -10139,7 +10551,7 @@ 1 2 - 4149377 + 4149251 @@ -10155,7 +10567,7 @@ 1 2 - 4143484 + 4143358 2 @@ -10176,7 +10588,7 @@ 1 2 - 4149377 + 4149251 @@ -10192,7 +10604,7 @@ 1 2 - 4149377 + 4149251 @@ -10208,12 +10620,12 @@ 1 2 - 3815536 + 3815656 2 5 - 159492 + 159369 @@ -10229,7 +10641,7 @@ 1 2 - 3956980 + 3956977 2 @@ -10250,7 +10662,7 @@ 1 2 - 3975028 + 3975026 @@ -10266,12 +10678,12 @@ 1 2 - 3836532 + 3836652 2 4 - 138496 + 138373 @@ -10306,7 +10718,7 @@ 555 - 10333 + 10332 859 @@ -10354,7 +10766,7 @@ 1 2 - 486089 + 486088 2 @@ -10385,7 +10797,7 @@ 1 2 - 449255 + 449254 2 @@ -10416,7 +10828,7 @@ 1 2 - 1310316 + 1310315 2 @@ -10426,12 +10838,12 @@ 3 11 - 127692 + 127814 11 3169 - 36220 + 36097 @@ -10447,7 +10859,7 @@ 1 2 - 1421556 + 1421555 2 @@ -10473,7 +10885,7 @@ 1 2 - 1576751 + 1576750 2 @@ -10494,7 +10906,7 @@ 1 2 - 1345677 + 1345676 2 @@ -10520,12 +10932,12 @@ 1 2 - 2376545 + 2376666 2 3 - 251946 + 251823 3 @@ -10546,12 +10958,12 @@ 1 2 - 2396313 + 2396434 2 3 - 232669 + 232546 3 @@ -10572,7 +10984,7 @@ 1 2 - 2655871 + 2655869 2 @@ -10593,7 +11005,7 @@ 1 2 - 2730276 + 2730275 2 @@ -10608,22 +11020,22 @@ fun_def - 1397736 + 1397735 id - 1397736 + 1397735 fun_specialized - 7864 + 7863 id - 7864 + 7863 @@ -10641,11 +11053,11 @@ fun_decl_specifiers - 4215802 + 4215799 id - 1724333 + 1724332 name @@ -10673,7 +11085,7 @@ 3 4 - 1082804 + 1082803 4 @@ -10875,26 +11287,26 @@ fun_decl_empty_throws - 434678 + 436118 fun_decl - 434678 + 436118 fun_decl_noexcept - 140561 + 140568 fun_decl - 140561 + 140568 constant - 140122 + 140129 @@ -10908,7 +11320,7 @@ 1 2 - 140561 + 140568 @@ -10924,7 +11336,7 @@ 1 2 - 139683 + 139690 2 @@ -10939,11 +11351,11 @@ fun_decl_empty_noexcept - 1156472 + 1156348 fun_decl - 1156472 + 1156348 @@ -11048,11 +11460,11 @@ fun_requires - 28967 + 28964 id - 10062 + 10061 kind @@ -11060,7 +11472,7 @@ constraint - 28731 + 28729 @@ -11074,7 +11486,7 @@ 1 2 - 9998 + 9997 2 @@ -11095,7 +11507,7 @@ 1 2 - 7236 + 7235 2 @@ -11178,7 +11590,7 @@ 1 2 - 28496 + 28493 2 @@ -11199,7 +11611,7 @@ 1 2 - 28731 + 28729 @@ -11209,11 +11621,11 @@ param_decl_bind - 7220248 + 7219875 id - 7220248 + 7219875 index @@ -11221,7 +11633,7 @@ fun_decl - 3489307 + 3489182 @@ -11235,7 +11647,7 @@ 1 2 - 7220248 + 7219875 @@ -11251,7 +11663,7 @@ 1 2 - 7220248 + 7219875 @@ -11286,12 +11698,12 @@ 343 - 16311 + 16310 613 - 28419 - 28420 + 28418 + 28419 122 @@ -11327,12 +11739,12 @@ 343 - 16311 + 16310 613 - 28419 - 28420 + 28418 + 28419 122 @@ -11349,17 +11761,17 @@ 1 2 - 1486752 + 1486751 2 3 - 972669 + 972668 3 4 - 592540 + 592417 4 @@ -11385,17 +11797,17 @@ 1 2 - 1486752 + 1486751 2 3 - 972669 + 972668 3 4 - 592540 + 592417 4 @@ -11415,27 +11827,27 @@ var_decls - 9417411 + 9417036 id - 9411026 + 9410651 variable - 9072765 + 9072759 type_id - 1441078 + 1441077 name - 839084 + 839083 location - 6176980 + 6176975 @@ -11449,7 +11861,7 @@ 1 2 - 9411026 + 9410651 @@ -11465,7 +11877,7 @@ 1 2 - 9404642 + 9404267 2 @@ -11486,7 +11898,7 @@ 1 2 - 9411026 + 9410651 @@ -11502,7 +11914,7 @@ 1 2 - 9411026 + 9410651 @@ -11518,12 +11930,12 @@ 1 2 - 8752184 + 8752546 2 5 - 320580 + 320212 @@ -11539,7 +11951,7 @@ 1 2 - 9020460 + 9020454 2 @@ -11560,7 +11972,7 @@ 1 2 - 8969015 + 8969009 2 @@ -11581,12 +11993,12 @@ 1 2 - 8831378 + 8831740 2 4 - 241387 + 241018 @@ -11607,7 +12019,7 @@ 2 3 - 280554 + 280553 3 @@ -11674,7 +12086,7 @@ 1 2 - 1105027 + 1105026 2 @@ -11705,7 +12117,7 @@ 1 2 - 974511 + 974510 2 @@ -11782,7 +12194,7 @@ 1 2 - 468163 + 468162 2 @@ -11823,12 +12235,12 @@ 1 2 - 642880 + 642879 2 3 - 110871 + 110870 3 @@ -11890,12 +12302,12 @@ 1 2 - 5668544 + 5668908 2 16 - 468777 + 468408 16 @@ -11916,12 +12328,12 @@ 1 2 - 5749211 + 5749575 2 2935 - 427768 + 427399 @@ -11937,7 +12349,7 @@ 1 2 - 5876167 + 5876162 2 @@ -11958,7 +12370,7 @@ 1 2 - 6164824 + 6164820 2 @@ -11973,11 +12385,11 @@ var_def - 3684775 + 3684772 id - 3684775 + 3684772 @@ -11995,11 +12407,11 @@ var_decl_specifiers - 481669 + 481668 id - 481669 + 481668 name @@ -12017,7 +12429,7 @@ 1 2 - 481669 + 481668 @@ -12058,11 +12470,11 @@ is_structured_binding - 942 + 941 id - 942 + 941 @@ -12127,19 +12539,19 @@ type_decls - 1639737 + 1639736 id - 1639737 + 1639736 type_id - 1621075 + 1621073 location - 1543600 + 1543599 @@ -12153,7 +12565,7 @@ 1 2 - 1639737 + 1639736 @@ -12169,7 +12581,7 @@ 1 2 - 1639737 + 1639736 @@ -12185,7 +12597,7 @@ 1 2 - 1604990 + 1604989 2 @@ -12206,7 +12618,7 @@ 1 2 - 1605113 + 1605112 2 @@ -12227,7 +12639,7 @@ 1 2 - 1513519 + 1513518 2 @@ -12248,7 +12660,7 @@ 1 2 - 1513641 + 1513640 2 @@ -12263,29 +12675,29 @@ type_def - 1092503 + 1092502 id - 1092503 + 1092502 type_decl_top - 676223 + 681076 type_decl - 676223 + 681076 type_requires - 7643 + 7642 id @@ -12343,7 +12755,7 @@ 1 2 - 7600 + 7599 2 @@ -12358,11 +12770,11 @@ namespace_decls - 406672 + 407394 id - 406672 + 407394 namespace_id @@ -12370,11 +12782,11 @@ location - 406672 + 407394 bodylocation - 406672 + 407394 @@ -12388,7 +12800,7 @@ 1 2 - 406672 + 407394 @@ -12404,7 +12816,7 @@ 1 2 - 406672 + 407394 @@ -12420,7 +12832,7 @@ 1 2 - 406672 + 407394 @@ -12479,13 +12891,13 @@ 137 - 189 + 191 431 137 448 - 12466 + 12494 121 @@ -12545,13 +12957,13 @@ 137 - 189 + 191 431 137 448 - 12466 + 12494 121 @@ -12611,13 +13023,13 @@ 137 - 189 + 191 431 137 448 - 12466 + 12494 121 @@ -12634,7 +13046,7 @@ 1 2 - 406672 + 407394 @@ -12650,7 +13062,7 @@ 1 2 - 406672 + 407394 @@ -12666,7 +13078,7 @@ 1 2 - 406672 + 407394 @@ -12682,7 +13094,7 @@ 1 2 - 406672 + 407394 @@ -12698,7 +13110,7 @@ 1 2 - 406672 + 407394 @@ -12714,7 +13126,7 @@ 1 2 - 406672 + 407394 @@ -12724,19 +13136,19 @@ usings - 275545 + 275291 id - 275545 + 275291 element_id - 59966 + 59710 location - 27171 + 27172 kind @@ -12754,7 +13166,7 @@ 1 2 - 275545 + 275291 @@ -12770,7 +13182,7 @@ 1 2 - 275545 + 275291 @@ -12786,7 +13198,7 @@ 1 2 - 275545 + 275291 @@ -12802,7 +13214,7 @@ 1 2 - 52152 + 51896 2 @@ -12812,7 +13224,7 @@ 5 134 - 2372 + 2373 @@ -12828,7 +13240,7 @@ 1 2 - 52152 + 51896 2 @@ -12838,7 +13250,7 @@ 5 134 - 2372 + 2373 @@ -12854,7 +13266,7 @@ 1 2 - 59966 + 59710 @@ -12875,16 +13287,16 @@ 2 4 - 2319 + 2308 4 132 - 1966 + 1977 145 - 370 + 366 1443 @@ -12906,16 +13318,16 @@ 2 4 - 2319 + 2308 4 132 - 1966 + 1977 145 - 370 + 366 1443 @@ -12932,7 +13344,7 @@ 1 2 - 27171 + 27172 @@ -12951,8 +13363,8 @@ 10 - 25385 - 25386 + 25361 + 25362 10 @@ -12972,8 +13384,8 @@ 10 - 5396 - 5397 + 5372 + 5373 10 @@ -13005,15 +13417,15 @@ using_container - 582421 + 582169 parent - 20619 + 20566 child - 275545 + 275291 @@ -13027,7 +13439,7 @@ 1 2 - 9139 + 9128 2 @@ -13042,7 +13454,7 @@ 6 7 - 2362 + 2319 7 @@ -13078,12 +13490,12 @@ 1 2 - 98618 + 98362 2 3 - 121803 + 121804 3 @@ -13093,7 +13505,7 @@ 4 5 - 26829 + 26830 5 @@ -13108,23 +13520,23 @@ static_asserts - 172118 + 172102 id - 172118 + 172102 condition - 172118 + 172102 message - 38591 + 38587 location - 22498 + 22496 enclosing @@ -13142,7 +13554,7 @@ 1 2 - 172118 + 172102 @@ -13158,7 +13570,7 @@ 1 2 - 172118 + 172102 @@ -13174,7 +13586,7 @@ 1 2 - 172118 + 172102 @@ -13190,7 +13602,7 @@ 1 2 - 172118 + 172102 @@ -13206,7 +13618,7 @@ 1 2 - 172118 + 172102 @@ -13222,7 +13634,7 @@ 1 2 - 172118 + 172102 @@ -13238,7 +13650,7 @@ 1 2 - 172118 + 172102 @@ -13254,7 +13666,7 @@ 1 2 - 172118 + 172102 @@ -13270,7 +13682,7 @@ 1 2 - 28411 + 28408 2 @@ -13285,7 +13697,7 @@ 4 10 - 2049 + 2048 12 @@ -13311,7 +13723,7 @@ 1 2 - 28411 + 28408 2 @@ -13326,7 +13738,7 @@ 4 10 - 2049 + 2048 12 @@ -13352,7 +13764,7 @@ 1 2 - 35781 + 35777 2 @@ -13373,7 +13785,7 @@ 1 2 - 30233 + 30230 2 @@ -13383,7 +13795,7 @@ 3 4 - 3361 + 3360 4 @@ -13409,17 +13821,17 @@ 1 2 - 4268 + 4267 2 3 - 3701 + 3700 3 4 - 1725 + 1724 4 @@ -13439,7 +13851,7 @@ 14 15 - 2640 + 2639 16 @@ -13454,7 +13866,7 @@ 19 52 - 494 + 493 @@ -13470,17 +13882,17 @@ 1 2 - 4268 + 4267 2 3 - 3701 + 3700 3 4 - 1725 + 1724 4 @@ -13500,7 +13912,7 @@ 14 15 - 2640 + 2639 16 @@ -13515,7 +13927,7 @@ 19 52 - 494 + 493 @@ -13536,7 +13948,7 @@ 2 3 - 7653 + 7652 3 @@ -13567,7 +13979,7 @@ 2 3 - 8042 + 8041 3 @@ -13587,7 +13999,7 @@ 13 14 - 2640 + 2639 16 @@ -13608,7 +14020,7 @@ 1 2 - 5167 + 5166 2 @@ -13639,7 +14051,7 @@ 1 2 - 5167 + 5166 2 @@ -13670,7 +14082,7 @@ 1 2 - 5321 + 5320 2 @@ -13701,7 +14113,7 @@ 2 3 - 494 + 493 3 @@ -13716,15 +14128,15 @@ params - 6971985 + 6971980 id - 6932082 + 6932077 function - 3362107 + 3362104 index @@ -13732,7 +14144,7 @@ type_id - 1206935 + 1206934 @@ -13746,7 +14158,7 @@ 1 2 - 6932082 + 6932077 @@ -13762,7 +14174,7 @@ 1 2 - 6932082 + 6932077 @@ -13778,7 +14190,7 @@ 1 2 - 6892178 + 6892173 2 @@ -13799,7 +14211,7 @@ 1 2 - 1450900 + 1450899 2 @@ -13809,7 +14221,7 @@ 3 4 - 570194 + 570193 4 @@ -13835,7 +14247,7 @@ 1 2 - 1450900 + 1450899 2 @@ -13845,7 +14257,7 @@ 3 4 - 570194 + 570193 4 @@ -13871,12 +14283,12 @@ 1 2 - 1757730 + 1757728 2 3 - 1020063 + 1020062 3 @@ -14061,7 +14473,7 @@ 1 2 - 810844 + 810843 2 @@ -14097,7 +14509,7 @@ 1 2 - 981878 + 981877 2 @@ -14117,15 +14529,15 @@ overrides - 160156 + 160141 new - 151385 + 151370 old - 17501 + 17500 @@ -14139,12 +14551,12 @@ 1 2 - 142622 + 142608 2 4 - 8763 + 8762 @@ -14160,7 +14572,7 @@ 1 2 - 9419 + 9418 2 @@ -14195,19 +14607,19 @@ membervariables - 1504653 + 1513140 id - 1502203 + 1510690 type_id - 457819 + 460582 name - 643996 + 647547 @@ -14221,7 +14633,7 @@ 1 2 - 1499862 + 1508350 2 @@ -14242,7 +14654,7 @@ 1 2 - 1502203 + 1510690 @@ -14258,22 +14670,22 @@ 1 2 - 339690 + 342089 2 3 - 72565 + 72717 3 10 - 35384 + 35542 10 - 4445 - 10179 + 4509 + 10232 @@ -14289,22 +14701,22 @@ 1 2 - 357273 + 359996 2 3 - 64726 + 64771 3 - 57 - 34350 + 72 + 34562 - 60 - 2186 - 1469 + 73 + 2212 + 1251 @@ -14320,22 +14732,22 @@ 1 2 - 423197 + 426183 2 3 - 122538 + 122303 3 5 - 58084 + 58729 5 664 - 40174 + 40332 @@ -14351,17 +14763,17 @@ 1 2 - 526193 + 529544 2 3 - 73272 + 73425 3 668 - 44529 + 44577 @@ -14371,11 +14783,11 @@ globalvariables - 634531 + 634530 id - 634531 + 634530 type_id @@ -14397,7 +14809,7 @@ 1 2 - 634531 + 634530 @@ -14413,7 +14825,7 @@ 1 2 - 634531 + 634530 @@ -14562,19 +14974,19 @@ localvariables - 733187 + 733223 id - 733187 + 733223 type_id - 53924 + 53927 name - 102647 + 102653 @@ -14588,7 +15000,7 @@ 1 2 - 733187 + 733223 @@ -14604,7 +15016,7 @@ 1 2 - 733187 + 733223 @@ -14620,7 +15032,7 @@ 1 2 - 29156 + 29158 2 @@ -14640,7 +15052,7 @@ 6 12 - 4154 + 4155 12 @@ -14666,7 +15078,7 @@ 1 2 - 38691 + 38693 2 @@ -14697,12 +15109,12 @@ 1 2 - 63163 + 63167 2 3 - 16199 + 16200 3 @@ -14738,12 +15150,12 @@ 1 2 - 85429 + 85434 2 3 - 8495 + 8496 3 @@ -14831,15 +15243,15 @@ orphaned_variables - 43927 + 43929 var - 43927 + 43929 function - 40686 + 40688 @@ -14853,7 +15265,7 @@ 1 2 - 43927 + 43929 @@ -14869,7 +15281,7 @@ 1 2 - 39841 + 39844 2 @@ -14884,19 +15296,19 @@ enumconstants - 347910 + 349437 id - 347910 + 349437 parent - 41590 + 41747 index - 13936 + 13933 type_id @@ -14904,11 +15316,11 @@ name - 347529 + 349056 location - 320528 + 322059 @@ -14922,7 +15334,7 @@ 1 2 - 347910 + 349437 @@ -14938,7 +15350,7 @@ 1 2 - 347910 + 349437 @@ -14954,7 +15366,7 @@ 1 2 - 347910 + 349437 @@ -14970,7 +15382,7 @@ 1 2 - 347910 + 349437 @@ -14986,7 +15398,7 @@ 1 2 - 347910 + 349437 @@ -15007,22 +15419,22 @@ 2 3 - 5824 + 5878 3 4 - 8710 + 8763 4 5 - 5552 + 5497 5 6 - 4572 + 4626 6 @@ -15037,17 +15449,17 @@ 8 10 - 2994 + 2993 10 15 - 3429 + 3483 15 33 - 3157 + 3156 33 @@ -15073,22 +15485,22 @@ 2 3 - 5824 + 5878 3 4 - 8710 + 8763 4 5 - 5552 + 5497 5 6 - 4572 + 4626 6 @@ -15103,17 +15515,17 @@ 8 10 - 2994 + 2993 10 15 - 3429 + 3483 15 33 - 3157 + 3156 33 @@ -15134,7 +15546,7 @@ 1 2 - 41590 + 41747 @@ -15155,22 +15567,22 @@ 2 3 - 5824 + 5878 3 4 - 8710 + 8763 4 5 - 5552 + 5497 5 6 - 4572 + 4626 6 @@ -15185,17 +15597,17 @@ 8 10 - 2994 + 2993 10 15 - 3429 + 3483 15 33 - 3157 + 3156 33 @@ -15216,57 +15628,52 @@ 1 2 - 2123 + 2122 2 3 - 6042 + 6096 3 4 - 8764 + 8817 4 5 - 5498 + 5442 5 6 - 4572 + 4626 6 7 - 2504 + 2503 7 - 8 - 1850 + 9 + 3864 - 8 - 11 - 3810 + 9 + 13 + 3156 - 11 - 17 + 13 + 24 3211 - 17 - 165 - 3157 - - - 256 + 24 257 - 54 + 1905 @@ -15282,7 +15689,7 @@ 1 2 - 2776 + 2775 2 @@ -15310,7 +15717,7 @@ 1088 - 12 + 13 20 1143 @@ -15321,7 +15728,7 @@ 64 - 765 + 768 979 @@ -15338,7 +15745,7 @@ 1 2 - 2776 + 2775 2 @@ -15366,7 +15773,7 @@ 1088 - 12 + 13 20 1143 @@ -15377,7 +15784,7 @@ 64 - 765 + 768 979 @@ -15394,7 +15801,7 @@ 1 2 - 13936 + 13933 @@ -15410,7 +15817,7 @@ 1 2 - 2776 + 2775 2 @@ -15438,7 +15845,7 @@ 1088 - 12 + 13 20 1143 @@ -15449,7 +15856,7 @@ 64 - 762 + 765 979 @@ -15466,7 +15873,7 @@ 1 2 - 2776 + 2775 2 @@ -15494,7 +15901,7 @@ 1088 - 12 + 13 20 1143 @@ -15505,7 +15912,7 @@ 64 - 765 + 768 979 @@ -15520,8 +15927,8 @@ 12 - 6391 - 6392 + 6420 + 6421 54 @@ -15536,8 +15943,8 @@ 12 - 764 - 765 + 767 + 768 54 @@ -15568,8 +15975,8 @@ 12 - 6384 - 6385 + 6413 + 6414 54 @@ -15584,8 +15991,8 @@ 12 - 5888 - 5889 + 5917 + 5918 54 @@ -15602,7 +16009,7 @@ 1 2 - 347148 + 348675 2 @@ -15623,7 +16030,7 @@ 1 2 - 347148 + 348675 2 @@ -15644,7 +16051,7 @@ 1 2 - 347529 + 349056 @@ -15660,7 +16067,7 @@ 1 2 - 347529 + 349056 @@ -15676,7 +16083,7 @@ 1 2 - 347148 + 348675 2 @@ -15697,7 +16104,7 @@ 1 2 - 319493 + 321025 2 @@ -15718,7 +16125,7 @@ 1 2 - 320528 + 322059 @@ -15734,7 +16141,7 @@ 1 2 - 319493 + 321025 2 @@ -15755,7 +16162,7 @@ 1 2 - 320528 + 322059 @@ -15771,7 +16178,7 @@ 1 2 - 319493 + 321025 2 @@ -16478,15 +16885,15 @@ bit_precise_int_types - 11 + 13 id - 11 + 13 bit_width - 6 + 7 @@ -16500,7 +16907,7 @@ 1 2 - 11 + 13 @@ -16521,7 +16928,7 @@ 2 3 - 3 + 4 3 @@ -16536,15 +16943,15 @@ derivedtypes - 2998307 + 2998305 id - 2998307 + 2998305 name - 1445621 + 1445620 kind @@ -16552,7 +16959,7 @@ type_id - 1926062 + 1926061 @@ -16566,7 +16973,7 @@ 1 2 - 2998307 + 2998305 @@ -16582,7 +16989,7 @@ 1 2 - 2998307 + 2998305 @@ -16598,7 +17005,7 @@ 1 2 - 2998307 + 2998305 @@ -16614,7 +17021,7 @@ 1 2 - 1328120 + 1328119 2 @@ -16640,7 +17047,7 @@ 1 2 - 1445621 + 1445620 @@ -16656,12 +17063,12 @@ 1 2 - 1328242 + 1328241 2 23 - 108661 + 108660 23 @@ -16805,7 +17212,7 @@ 1 2 - 1303195 + 1303194 2 @@ -16867,7 +17274,7 @@ 1 2 - 1305037 + 1305036 2 @@ -16892,11 +17299,11 @@ pointerishsize - 2221718 + 2221717 id - 2221718 + 2221717 size @@ -16918,7 +17325,7 @@ 1 2 - 2221718 + 2221717 @@ -16934,7 +17341,7 @@ 1 2 - 2221718 + 2221717 @@ -17457,15 +17864,15 @@ typedefbase - 1791463 + 1791478 id - 1791463 + 1791478 type_id - 851307 + 851314 @@ -17479,7 +17886,7 @@ 1 2 - 1791463 + 1791478 @@ -17495,22 +17902,22 @@ 1 2 - 673460 + 673466 2 3 - 82124 + 82125 3 6 - 64968 + 64969 6 4525 - 30752 + 30753 @@ -17968,11 +18375,11 @@ type_operators - 7964 + 7963 id - 7964 + 7963 arg_type @@ -17998,7 +18405,7 @@ 1 2 - 7964 + 7963 @@ -18014,7 +18421,7 @@ 1 2 - 7964 + 7963 @@ -18030,7 +18437,7 @@ 1 2 - 7964 + 7963 @@ -18233,7 +18640,7 @@ 1 2 - 3725 + 3724 2 @@ -18284,15 +18691,15 @@ usertypes - 4280384 + 4280399 id - 4280384 + 4280399 name - 966130 + 966138 kind @@ -18310,7 +18717,7 @@ 1 2 - 4280384 + 4280399 @@ -18326,7 +18733,7 @@ 1 2 - 4280384 + 4280399 @@ -18342,12 +18749,12 @@ 1 2 - 692231 + 692247 2 3 - 163458 + 163449 3 @@ -18373,12 +18780,12 @@ 1 2 - 913304 + 913312 2 10 - 52825 + 52826 @@ -18412,8 +18819,8 @@ 10 - 1559 - 1560 + 1558 + 1559 10 @@ -18442,8 +18849,8 @@ 10 - 98824 - 98825 + 98823 + 98824 10 @@ -18530,11 +18937,11 @@ usertypesize - 1444984 + 1444975 id - 1444984 + 1444975 size @@ -18556,7 +18963,7 @@ 1 2 - 1444984 + 1444975 @@ -18572,7 +18979,7 @@ 1 2 - 1444984 + 1444975 @@ -18632,7 +19039,7 @@ 1840 - 105871 + 105870 53 @@ -18698,8 +19105,8 @@ 10 - 2044 - 2045 + 2043 + 2044 10 @@ -18708,8 +19115,8 @@ 10 - 121066 - 121067 + 121065 + 121066 10 @@ -18777,15 +19184,15 @@ usertype_uuid - 47751 + 47900 id - 47751 + 47900 uuid - 47208 + 47358 @@ -18799,7 +19206,7 @@ 1 2 - 47751 + 47900 @@ -18815,7 +19222,7 @@ 1 2 - 46666 + 46815 2 @@ -18830,11 +19237,11 @@ usertype_alias_kind - 1791463 + 1791478 id - 1791463 + 1791478 alias_kind @@ -18852,7 +19259,7 @@ 1 2 - 1791463 + 1791478 @@ -18883,26 +19290,26 @@ nontype_template_parameters - 758786 + 758825 id - 758786 + 758825 type_template_type_constraint - 27019 + 27016 id - 13316 + 13315 constraint - 25884 + 25882 @@ -18916,7 +19323,7 @@ 1 2 - 10169 + 10168 2 @@ -18952,7 +19359,7 @@ 1 2 - 24749 + 24747 2 @@ -18967,15 +19374,15 @@ mangled_name - 8178430 + 8178424 id - 8178430 + 8178424 mangled_name - 6345435 + 6345430 is_complete @@ -18993,7 +19400,7 @@ 1 2 - 8178430 + 8178424 @@ -19009,7 +19416,7 @@ 1 2 - 8178430 + 8178424 @@ -19025,7 +19432,7 @@ 1 2 - 5990721 + 5990717 2 @@ -19046,7 +19453,7 @@ 1 2 - 6345435 + 6345430 @@ -19098,51 +19505,51 @@ is_pod_class - 611169 + 611200 id - 611169 + 611200 is_standard_layout_class - 1203088 + 1203087 id - 1203088 + 1203087 is_complete - 1427635 + 1427637 id - 1427635 + 1427637 is_class_template - 234937 + 234939 id - 234937 + 234939 class_instantiation - 1203697 + 1203707 to @@ -19164,12 +19571,12 @@ 1 2 - 1198481 + 1198470 2 8 - 2148 + 2159 @@ -19205,7 +19612,7 @@ 5 7 - 6327 + 6328 7 @@ -19215,12 +19622,12 @@ 10 17 - 5964 + 5953 17 53 - 5547 + 5558 53 @@ -19235,11 +19642,11 @@ class_template_argument - 3053715 + 3053731 type_id - 1447923 + 1447925 index @@ -19247,7 +19654,7 @@ arg_type - 860596 + 860603 @@ -19261,22 +19668,22 @@ 1 2 - 609806 + 609801 2 3 - 441933 + 441937 3 4 - 267956 + 267958 4 8 - 109777 + 109778 8 @@ -19297,22 +19704,22 @@ 1 2 - 638860 + 638854 2 3 - 456705 + 456709 3 4 - 268052 + 268054 4 113 - 84305 + 84306 @@ -19357,7 +19764,7 @@ 11997 - 135446 + 135445 42 @@ -19420,17 +19827,17 @@ 1 2 - 534234 + 534238 2 3 - 177964 + 177965 3 5 - 79356 + 79357 5 @@ -19456,7 +19863,7 @@ 1 2 - 751823 + 751829 2 @@ -19476,11 +19883,11 @@ class_template_argument_value - 511935 + 511961 type_id - 210385 + 210396 index @@ -19488,7 +19895,7 @@ arg_value - 511800 + 511826 @@ -19502,12 +19909,12 @@ 1 2 - 160819 + 160828 2 3 - 42982 + 42984 3 @@ -19528,17 +19935,17 @@ 1 2 - 153020 + 153028 2 3 - 40112 + 40114 3 52 - 16004 + 16005 54 @@ -19671,7 +20078,7 @@ 1 2 - 511665 + 511691 2 @@ -19692,7 +20099,7 @@ 1 2 - 511800 + 511826 @@ -19702,11 +20109,11 @@ class_template_generated_from - 62595 + 62596 template - 62595 + 62596 from @@ -19724,7 +20131,7 @@ 1 2 - 62595 + 62596 @@ -19790,15 +20197,15 @@ is_proxy_class_for - 51179 + 51180 id - 51179 + 51180 templ_param_id - 47812 + 47813 @@ -19812,7 +20219,7 @@ 1 2 - 51179 + 51180 @@ -19843,19 +20250,19 @@ type_mentions - 5937883 + 5946477 id - 5937883 + 5946477 type_id - 277903 + 279223 location - 5881594 + 5890197 kind @@ -19873,7 +20280,7 @@ 1 2 - 5937883 + 5946477 @@ -19889,7 +20296,7 @@ 1 2 - 5937883 + 5946477 @@ -19905,7 +20312,7 @@ 1 2 - 5937883 + 5946477 @@ -19921,42 +20328,42 @@ 1 2 - 137400 + 138359 2 3 - 31192 + 31351 3 4 - 11649 + 11756 4 5 - 14970 + 15022 5 - 7 - 19924 + 8 + 25854 - 7 - 12 - 21775 + 8 + 15 + 21880 - 12 - 28 - 21012 + 15 + 43 + 21173 - 28 - 8941 - 19978 + 43 + 9010 + 13825 @@ -19972,42 +20379,42 @@ 1 2 - 137400 + 138359 2 3 - 31192 + 31351 3 4 - 11649 + 11756 4 5 - 14970 + 15022 5 - 7 - 19924 + 8 + 25854 - 7 - 12 - 21775 + 8 + 15 + 21880 - 12 - 28 - 21012 + 15 + 43 + 21173 - 28 - 8941 - 19978 + 43 + 9010 + 13825 @@ -20023,7 +20430,7 @@ 1 2 - 277903 + 279223 @@ -20039,12 +20446,12 @@ 1 2 - 5835921 + 5844531 2 4 - 45673 + 45666 @@ -20060,12 +20467,12 @@ 1 2 - 5835921 + 5844531 2 4 - 45673 + 45666 @@ -20081,7 +20488,7 @@ 1 2 - 5881594 + 5890197 @@ -20095,8 +20502,8 @@ 12 - 109077 - 109078 + 109251 + 109252 54 @@ -20111,8 +20518,8 @@ 12 - 5105 - 5106 + 5130 + 5131 54 @@ -20127,8 +20534,8 @@ 12 - 108043 - 108044 + 108217 + 108218 54 @@ -20139,26 +20546,26 @@ is_function_template - 1311667 + 1311666 id - 1311667 + 1311666 function_instantiation - 965154 + 965204 to - 965154 + 965204 from - 181044 + 181053 @@ -20172,7 +20579,7 @@ 1 2 - 965154 + 965204 @@ -20188,12 +20595,12 @@ 1 2 - 109531 + 109537 2 3 - 42441 + 42444 3 @@ -20208,7 +20615,7 @@ 119 1531 - 1147 + 1148 @@ -20218,11 +20625,11 @@ function_template_argument - 2478845 + 2478973 function_id - 1456460 + 1456535 index @@ -20230,7 +20637,7 @@ arg_type - 295303 + 295318 @@ -20244,22 +20651,22 @@ 1 2 - 792112 + 792153 2 3 - 409494 + 409515 3 4 - 170307 + 170316 4 15 - 84546 + 84550 @@ -20275,22 +20682,22 @@ 1 2 - 811087 + 811129 2 3 - 407603 + 407624 3 4 - 168146 + 168155 4 9 - 69622 + 69625 @@ -20428,37 +20835,37 @@ 1 2 - 173211 + 173220 2 3 - 26032 + 26033 3 4 - 19650 + 19651 4 6 - 22588 + 22589 6 11 - 23094 + 23096 11 76 - 23094 + 23096 79 2452 - 7630 + 7631 @@ -20474,12 +20881,12 @@ 1 2 - 254448 + 254461 2 3 - 31873 + 31875 3 @@ -20494,11 +20901,11 @@ function_template_argument_value - 456460 + 456484 function_id - 194955 + 194965 index @@ -20506,7 +20913,7 @@ arg_value - 453793 + 453816 @@ -20520,12 +20927,12 @@ 1 2 - 149981 + 149989 2 3 - 42509 + 42511 3 @@ -20546,12 +20953,12 @@ 1 2 - 143127 + 143134 2 3 - 36296 + 36298 3 @@ -20699,7 +21106,7 @@ 1 2 - 451125 + 451149 2 @@ -20720,7 +21127,7 @@ 1 2 - 453793 + 453816 @@ -20730,15 +21137,15 @@ function_template_generated_from - 869466 + 869511 template - 869466 + 869511 from - 22284 + 22285 @@ -20752,7 +21159,7 @@ 1 2 - 869466 + 869511 @@ -20793,7 +21200,7 @@ 16 20 - 1586 + 1587 20 @@ -20844,11 +21251,11 @@ variable_instantiation - 566265 + 566264 to - 566265 + 566264 from @@ -20866,7 +21273,7 @@ 1 2 - 566265 + 566264 @@ -20932,7 +21339,7 @@ variable_template_argument - 1073718 + 1073717 variable_id @@ -20963,7 +21370,7 @@ 2 3 - 272696 + 272695 3 @@ -21377,26 +21784,26 @@ is_alias_template - 108147 + 108152 id - 108147 + 108152 alias_instantiation - 462875 + 462899 to - 462875 + 462899 from - 92852 + 92856 @@ -21410,7 +21817,7 @@ 1 2 - 462875 + 462899 @@ -21426,17 +21833,17 @@ 1 2 - 16645 + 16646 2 3 - 16915 + 16916 3 4 - 20157 + 20158 4 @@ -21446,7 +21853,7 @@ 5 7 - 6752 + 6753 7 @@ -21476,11 +21883,11 @@ alias_template_argument - 1000033 + 1000084 type_id - 570955 + 570985 index @@ -21488,7 +21895,7 @@ arg_type - 128608 + 128615 @@ -21502,22 +21909,22 @@ 1 2 - 278117 + 278131 2 3 - 183610 + 183620 3 4 - 87517 + 87521 4 10 - 21710 + 21711 @@ -21533,22 +21940,22 @@ 1 2 - 279366 + 279380 2 3 - 182395 + 182404 3 4 - 88969 + 88973 4 10 - 20224 + 20225 @@ -21676,27 +22083,27 @@ 1 2 - 78704 + 78708 2 3 - 20427 + 20428 3 4 - 5469 + 5470 4 6 - 10534 + 10535 6 76 - 10905 + 10906 84 @@ -21717,12 +22124,12 @@ 1 2 - 109565 + 109571 2 3 - 17422 + 17423 3 @@ -21737,11 +22144,11 @@ alias_template_argument_value - 174393 + 174402 type_id - 161731 + 161739 index @@ -21749,7 +22156,7 @@ arg_value - 174393 + 174402 @@ -21763,7 +22170,7 @@ 1 2 - 160482 + 160490 2 @@ -21784,7 +22191,7 @@ 1 2 - 159806 + 159815 2 @@ -21867,7 +22274,7 @@ 1 2 - 174393 + 174402 @@ -21883,7 +22290,7 @@ 1 2 - 174393 + 174402 @@ -21893,11 +22300,11 @@ alias_template_generated_from - 100516 + 100521 template - 100516 + 100521 from @@ -21915,7 +22322,7 @@ 1 2 - 100516 + 100521 @@ -22542,11 +22949,11 @@ concept_instantiation - 90178 + 90170 to - 90178 + 90170 from @@ -22564,7 +22971,7 @@ 1 2 - 90178 + 90170 @@ -22660,22 +23067,22 @@ is_type_constraint - 36717 + 36714 concept_id - 36717 + 36714 concept_template_argument - 112786 + 112777 concept_id - 76197 + 76190 index @@ -22683,7 +23090,7 @@ arg_type - 21516 + 21514 @@ -22697,12 +23104,12 @@ 1 2 - 46352 + 46348 2 3 - 24642 + 24640 3 @@ -22723,12 +23130,12 @@ 1 2 - 49949 + 49944 2 3 - 22351 + 22349 3 @@ -22831,7 +23238,7 @@ 1 2 - 10555 + 10554 2 @@ -22882,7 +23289,7 @@ 1 2 - 18112 + 18111 2 @@ -23033,15 +23440,15 @@ routinetypes - 599081 + 599112 id - 599081 + 599112 return_type - 281324 + 281339 @@ -23055,7 +23462,7 @@ 1 2 - 599081 + 599112 @@ -23071,17 +23478,17 @@ 1 2 - 231995 + 232007 2 3 - 34912 + 34914 3 4676 - 14417 + 14418 @@ -23091,11 +23498,11 @@ routinetypeargs - 1178082 + 1177908 routine - 415848 + 415786 index @@ -23103,7 +23510,7 @@ type_id - 112032 + 112015 @@ -23117,32 +23524,32 @@ 1 2 - 82908 + 82896 2 3 - 126022 + 126004 3 4 - 107840 + 107824 4 5 - 49265 + 49258 5 7 - 33152 + 33147 7 19 - 16657 + 16655 @@ -23158,27 +23565,27 @@ 1 2 - 88896 + 88883 2 3 - 138652 + 138631 3 4 - 114591 + 114574 4 5 - 40719 + 40713 5 10 - 32880 + 32875 10 @@ -23376,47 +23783,47 @@ 1 2 - 33261 + 33256 2 3 - 15569 + 15566 3 4 - 13282 + 13280 4 5 - 9798 + 9797 5 6 - 6369 + 6368 6 8 - 9472 + 9470 8 13 - 9526 + 9525 13 26 - 8655 + 8654 26 926 - 6097 + 6096 @@ -23432,22 +23839,22 @@ 1 2 - 79369 + 79358 2 3 - 17528 + 17526 3 5 - 9472 + 9470 5 17 - 5661 + 5660 @@ -23557,7 +23964,7 @@ 1 2 - 3954 + 3955 2 @@ -23588,7 +23995,7 @@ 1 2 - 3954 + 3955 2 @@ -23661,11 +24068,11 @@ typespecifiers - 868944 + 868941 type_id - 863749 + 863746 spec_id @@ -23683,7 +24090,7 @@ 1 2 - 858554 + 858551 2 @@ -23737,8 +24144,8 @@ 10 - 18331 - 18332 + 18330 + 18331 10 @@ -23754,11 +24161,11 @@ funspecifiers - 9572483 + 9572722 func_id - 3955752 + 3955749 spec_id @@ -23776,22 +24183,22 @@ 1 2 - 1511309 + 1511307 2 3 - 500822 + 500577 3 4 - 1019694 + 1019939 4 5 - 682047 + 682046 5 @@ -23900,8 +24307,8 @@ 122 - 22797 - 22798 + 22799 + 22800 122 @@ -23912,11 +24319,11 @@ varspecifiers - 3148468 + 3148466 var_id - 2429095 + 2429093 spec_id @@ -23934,12 +24341,12 @@ 1 2 - 1807824 + 1807823 2 3 - 523660 + 523659 3 @@ -24058,11 +24465,11 @@ attributes - 644108 + 644107 id - 644108 + 644107 kind @@ -24092,7 +24499,7 @@ 1 2 - 644108 + 644107 @@ -24108,7 +24515,7 @@ 1 2 - 644108 + 644107 @@ -24124,7 +24531,7 @@ 1 2 - 644108 + 644107 @@ -24140,7 +24547,7 @@ 1 2 - 644108 + 644107 @@ -24543,7 +24950,7 @@ 1 2 - 632321 + 632320 2 @@ -24623,7 +25030,7 @@ attribute - 70879 + 70878 index @@ -25154,11 +25561,11 @@ attribute_arg_value - 16544 + 16545 arg - 16544 + 16545 value @@ -25176,7 +25583,7 @@ 1 2 - 16544 + 16545 @@ -25310,15 +25717,15 @@ attribute_arg_constant - 72665 + 72676 arg - 72665 + 72676 constant - 72665 + 72676 @@ -25332,7 +25739,7 @@ 1 2 - 72665 + 72676 @@ -25348,7 +25755,7 @@ 1 2 - 72665 + 72676 @@ -25467,7 +25874,7 @@ spec_id - 31923 + 31922 @@ -25522,7 +25929,7 @@ funcattributes - 834541 + 834540 func_id @@ -25530,7 +25937,7 @@ spec_id - 607642 + 607641 @@ -25544,7 +25951,7 @@ 1 2 - 747612 + 747611 2 @@ -25774,15 +26181,15 @@ unspecifiedtype - 7365375 + 7365370 type_id - 7365375 + 7365370 unspecified_type_id - 4133170 + 4133167 @@ -25796,7 +26203,7 @@ 1 2 - 7365375 + 7365370 @@ -25812,12 +26219,12 @@ 1 2 - 2667167 + 2667165 2 3 - 1105027 + 1105026 3 @@ -25837,7 +26244,7 @@ member - 4121629 + 4121626 parent @@ -25849,7 +26256,7 @@ child - 4117086 + 4117083 @@ -25873,7 +26280,7 @@ 3 4 - 31923 + 31922 4 @@ -25964,7 +26371,7 @@ 9 13 - 40886 + 40885 13 @@ -26127,7 +26534,7 @@ 1 2 - 4117086 + 4117083 @@ -26143,7 +26550,7 @@ 1 2 - 4112543 + 4112540 2 @@ -26158,15 +26565,15 @@ enclosingfunction - 116832 + 116833 child - 116832 + 116833 parent - 70206 + 70207 @@ -26180,7 +26587,7 @@ 1 2 - 116832 + 116833 @@ -26196,7 +26603,7 @@ 1 2 - 38074 + 38075 2 @@ -26206,7 +26613,7 @@ 3 5 - 6156 + 6157 5 @@ -26221,15 +26628,15 @@ derivations - 494850 + 494876 derivation - 494850 + 494876 sub - 473309 + 473333 index @@ -26237,11 +26644,11 @@ super - 240908 + 240921 location - 35081 + 35082 @@ -26255,7 +26662,7 @@ 1 2 - 494850 + 494876 @@ -26271,7 +26678,7 @@ 1 2 - 494850 + 494876 @@ -26287,7 +26694,7 @@ 1 2 - 494850 + 494876 @@ -26303,7 +26710,7 @@ 1 2 - 494850 + 494876 @@ -26319,12 +26726,12 @@ 1 2 - 456933 + 456956 2 9 - 16375 + 16376 @@ -26340,12 +26747,12 @@ 1 2 - 456933 + 456956 2 8 - 16375 + 16376 @@ -26361,12 +26768,12 @@ 1 2 - 456933 + 456956 2 9 - 16375 + 16376 @@ -26382,12 +26789,12 @@ 1 2 - 456933 + 456956 2 8 - 16375 + 16376 @@ -26542,12 +26949,12 @@ 1 2 - 231252 + 231264 2 1758 - 9656 + 9657 @@ -26563,12 +26970,12 @@ 1 2 - 231252 + 231264 2 1758 - 9656 + 9657 @@ -26584,7 +26991,7 @@ 1 2 - 240469 + 240482 2 @@ -26605,7 +27012,7 @@ 1 2 - 235641 + 235653 2 @@ -26626,7 +27033,7 @@ 1 2 - 25998 + 25999 2 @@ -26662,7 +27069,7 @@ 1 2 - 25998 + 25999 2 @@ -26698,7 +27105,7 @@ 1 2 - 35081 + 35082 @@ -26714,7 +27121,7 @@ 1 2 - 28328 + 28329 2 @@ -26739,11 +27146,11 @@ derspecifiers - 496606 + 496632 der_id - 494411 + 494437 spec_id @@ -26761,7 +27168,7 @@ 1 2 - 492217 + 492242 2 @@ -26807,11 +27214,11 @@ direct_base_offsets - 468176 + 468201 der_id - 468176 + 468201 offset @@ -26829,7 +27236,7 @@ 1 2 - 468176 + 468201 @@ -26890,11 +27297,11 @@ virtual_base_offsets - 5773 + 5774 sub - 5773 + 5774 super @@ -26916,7 +27323,7 @@ 1 2 - 5773 + 5774 @@ -26932,7 +27339,7 @@ 1 2 - 5773 + 5774 @@ -27026,23 +27433,23 @@ frienddecls - 765911 + 765072 id - 765911 + 765072 type_id - 54225 + 54228 decl_id - 100482 + 100386 location - 6043 + 6044 @@ -27056,7 +27463,7 @@ 1 2 - 765911 + 765072 @@ -27072,7 +27479,7 @@ 1 2 - 765911 + 765072 @@ -27088,7 +27495,7 @@ 1 2 - 765911 + 765072 @@ -27109,22 +27516,22 @@ 2 3 - 24951 + 24953 3 8 - 4760 + 4828 8 17 - 4727 + 4659 17 27 - 4456 + 4457 27 @@ -27160,22 +27567,22 @@ 2 3 - 24951 + 24953 3 8 - 4760 + 4828 8 17 - 4727 + 4659 17 27 - 4456 + 4457 27 @@ -27206,7 +27613,7 @@ 1 2 - 52875 + 52877 2 @@ -27227,32 +27634,32 @@ 1 2 - 67359 + 67160 2 3 - 8103 + 8205 3 9 - 9183 + 9184 9 24 - 7596 + 7597 24 - 136 - 7630 + 127 + 7529 - 137 + 133 191 - 607 + 709 @@ -27268,32 +27675,32 @@ 1 2 - 67359 + 67160 2 3 - 8103 + 8205 3 9 - 9183 + 9184 9 24 - 7596 + 7597 24 - 136 - 7630 + 127 + 7529 - 137 + 133 191 - 607 + 709 @@ -27309,7 +27716,7 @@ 1 2 - 99267 + 99171 2 @@ -27334,7 +27741,7 @@ 2 - 22495 + 22469 371 @@ -27351,7 +27758,7 @@ 1 2 - 5908 + 5909 2 @@ -27376,7 +27783,7 @@ 2 - 2844 + 2841 337 @@ -27387,19 +27794,19 @@ comments - 11058376 + 11058369 id - 11058376 + 11058369 contents - 4237411 + 4237408 location - 11058376 + 11058369 @@ -27413,7 +27820,7 @@ 1 2 - 11058376 + 11058369 @@ -27429,7 +27836,7 @@ 1 2 - 11058376 + 11058369 @@ -27445,7 +27852,7 @@ 1 2 - 3867964 + 3867961 2 @@ -27471,7 +27878,7 @@ 1 2 - 3867964 + 3867961 2 @@ -27497,7 +27904,7 @@ 1 2 - 11058376 + 11058369 @@ -27513,7 +27920,7 @@ 1 2 - 11058376 + 11058369 @@ -27523,15 +27930,15 @@ commentbinding - 3859983 + 3859980 id - 3297892 + 3297890 element - 3697053 + 3697050 @@ -27545,7 +27952,7 @@ 1 2 - 3230240 + 3230238 2 @@ -27566,7 +27973,7 @@ 1 2 - 3534122 + 3534120 2 @@ -27581,15 +27988,15 @@ exprconv - 9630246 + 9630239 converted - 9630141 + 9630134 conversion - 9630246 + 9630239 @@ -27603,7 +28010,7 @@ 1 2 - 9630035 + 9630028 2 @@ -27624,7 +28031,7 @@ 1 2 - 9630246 + 9630239 @@ -27634,22 +28041,22 @@ compgenerated - 9855321 + 9855314 id - 9855321 + 9855314 synthetic_destructor_call - 1663283 + 1663139 element - 1238727 + 1238620 i @@ -27657,7 +28064,7 @@ destructor_call - 1663283 + 1663139 @@ -27671,17 +28078,17 @@ 1 2 - 824576 + 824505 2 3 - 407385 + 407350 3 19 - 6765 + 6764 @@ -27697,17 +28104,17 @@ 1 2 - 824576 + 824505 2 3 - 407385 + 407350 3 19 - 6765 + 6764 @@ -27855,7 +28262,7 @@ 1 2 - 1663283 + 1663139 @@ -27871,7 +28278,7 @@ 1 2 - 1663283 + 1663139 @@ -27919,7 +28326,7 @@ 1 2 - 3783 + 3784 2 @@ -27950,7 +28357,7 @@ namespacembrs - 2457335 + 2457333 parentid @@ -27958,7 +28365,7 @@ memberid - 2457335 + 2457333 @@ -28048,7 +28455,7 @@ 1 2 - 2457335 + 2457333 @@ -28058,11 +28465,11 @@ exprparents - 19448545 + 19448531 expr_id - 19448545 + 19448531 child_index @@ -28070,7 +28477,7 @@ parent_id - 12936225 + 12936216 @@ -28084,7 +28491,7 @@ 1 2 - 19448545 + 19448531 @@ -28100,7 +28507,7 @@ 1 2 - 19448545 + 19448531 @@ -28218,12 +28625,12 @@ 1 2 - 7392619 + 7392613 2 3 - 5081191 + 5081187 3 @@ -28244,12 +28651,12 @@ 1 2 - 7392619 + 7392613 2 3 - 5081191 + 5081187 3 @@ -28264,22 +28671,22 @@ expr_isload - 6890582 + 6890577 expr_id - 6890582 + 6890577 conversionkinds - 6047238 + 6047234 expr_id - 6047238 + 6047234 kind @@ -28297,7 +28704,7 @@ 1 2 - 6047238 + 6047234 @@ -28341,8 +28748,8 @@ 1 - 5828727 - 5828728 + 5828723 + 5828724 1 @@ -28353,11 +28760,11 @@ iscall - 5777774 + 5777274 caller - 5777774 + 5777274 kind @@ -28375,7 +28782,7 @@ 1 2 - 5777774 + 5777274 @@ -28411,11 +28818,11 @@ numtemplatearguments - 684871 + 684870 expr_id - 684871 + 684870 num @@ -28433,7 +28840,7 @@ 1 2 - 684871 + 684870 @@ -28542,23 +28949,23 @@ namequalifiers - 3044942 + 3044679 id - 3044942 + 3044679 qualifiableelement - 3044942 + 3044679 qualifyingelement - 54380 + 54376 location - 557018 + 556970 @@ -28572,7 +28979,7 @@ 1 2 - 3044942 + 3044679 @@ -28588,7 +28995,7 @@ 1 2 - 3044942 + 3044679 @@ -28604,7 +29011,7 @@ 1 2 - 3044942 + 3044679 @@ -28620,7 +29027,7 @@ 1 2 - 3044942 + 3044679 @@ -28636,7 +29043,7 @@ 1 2 - 3044942 + 3044679 @@ -28652,7 +29059,7 @@ 1 2 - 3044942 + 3044679 @@ -28668,17 +29075,17 @@ 1 2 - 37916 + 37913 2 3 - 8435 + 8434 3 5 - 4132 + 4131 5 @@ -28699,17 +29106,17 @@ 1 2 - 37916 + 37913 2 3 - 8435 + 8434 3 5 - 4132 + 4131 5 @@ -28730,7 +29137,7 @@ 1 2 - 41235 + 41231 2 @@ -28740,7 +29147,7 @@ 3 7 - 4132 + 4131 7 @@ -28761,22 +29168,22 @@ 1 2 - 84418 + 84411 2 6 - 39008 + 39005 6 7 - 397215 + 397181 7 192 - 36375 + 36372 @@ -28792,22 +29199,22 @@ 1 2 - 84418 + 84411 2 6 - 39008 + 39005 6 7 - 397215 + 397181 7 192 - 36375 + 36372 @@ -28823,22 +29230,22 @@ 1 2 - 117047 + 117037 2 4 - 14066 + 14065 4 5 - 413487 + 413451 5 60 - 12417 + 12416 @@ -28848,15 +29255,15 @@ varbind - 8252213 + 8252207 expr - 8252213 + 8252207 var - 1050068 + 1050067 @@ -28870,7 +29277,7 @@ 1 2 - 8252213 + 8252207 @@ -28941,15 +29348,15 @@ funbind - 5788371 + 5787871 expr - 5785909 + 5785409 fun - 275051 + 275027 @@ -28963,12 +29370,12 @@ 1 2 - 5783447 + 5782947 2 3 - 2462 + 2461 @@ -28984,27 +29391,27 @@ 1 2 - 180848 + 180832 2 3 - 38237 + 38234 3 4 - 17127 + 17126 4 8 - 23229 + 23227 8 37798 - 15607 + 15606 @@ -29014,11 +29421,11 @@ expr_allocator - 44839 + 44841 expr - 44839 + 44841 func @@ -29040,7 +29447,7 @@ 1 2 - 44839 + 44841 @@ -29056,7 +29463,7 @@ 1 2 - 44839 + 44841 @@ -29140,11 +29547,11 @@ expr_deallocator - 53347 + 53350 expr - 53347 + 53350 func @@ -29166,7 +29573,7 @@ 1 2 - 53347 + 53350 @@ -29182,7 +29589,7 @@ 1 2 - 53347 + 53350 @@ -29287,15 +29694,15 @@ expr_cond_guard - 897615 + 897614 cond - 897615 + 897614 guard - 897615 + 897614 @@ -29309,7 +29716,7 @@ 1 2 - 897615 + 897614 @@ -29325,7 +29732,7 @@ 1 2 - 897615 + 897614 @@ -29335,15 +29742,15 @@ expr_cond_true - 897611 + 897610 cond - 897611 + 897610 true - 897611 + 897610 @@ -29357,7 +29764,7 @@ 1 2 - 897611 + 897610 @@ -29373,7 +29780,7 @@ 1 2 - 897611 + 897610 @@ -29383,15 +29790,15 @@ expr_cond_false - 897615 + 897614 cond - 897615 + 897614 false - 897615 + 897614 @@ -29405,7 +29812,7 @@ 1 2 - 897615 + 897614 @@ -29421,7 +29828,7 @@ 1 2 - 897615 + 897614 @@ -29431,11 +29838,11 @@ values - 13539217 + 13539207 id - 13539217 + 13539207 str @@ -29453,7 +29860,7 @@ 1 2 - 13539217 + 13539207 @@ -29499,11 +29906,11 @@ valuetext - 6631932 + 6632061 id - 6631932 + 6632061 text @@ -29521,7 +29928,7 @@ 1 2 - 6631932 + 6632061 @@ -29551,7 +29958,7 @@ 7 - 594510 + 594514 27811 @@ -29562,15 +29969,15 @@ valuebind - 13647415 + 13647405 val - 13539217 + 13539207 expr - 13647415 + 13647405 @@ -29584,7 +29991,7 @@ 1 2 - 13449020 + 13449010 2 @@ -29605,7 +30012,7 @@ 1 2 - 13647415 + 13647405 @@ -29615,15 +30022,15 @@ fieldoffsets - 1502203 + 1510690 id - 1502203 + 1510690 byteoffset - 31356 + 31405 bitoffset @@ -29641,7 +30048,7 @@ 1 2 - 1502203 + 1510690 @@ -29657,7 +30064,7 @@ 1 2 - 1502203 + 1510690 @@ -29673,36 +30080,36 @@ 1 2 - 17692 + 17744 2 3 - 2449 + 2394 3 5 - 2667 + 2721 5 12 - 2613 + 2612 12 35 - 2395 + 2394 35 200 - 2395 + 2394 - 210 - 5988 + 212 + 6075 1143 @@ -29719,7 +30126,7 @@ 1 2 - 30321 + 30371 2 @@ -29747,11 +30154,6 @@ 37 54 - - 46 - 47 - 54 - 47 48 @@ -29763,18 +30165,23 @@ 54 - 67 - 68 + 52 + 53 54 - 84 - 85 + 74 + 75 + 54 + + + 95 + 96 54 - 27230 - 27231 + 27366 + 27367 54 @@ -29809,8 +30216,8 @@ 108 - 576 - 577 + 577 + 578 54 @@ -29821,19 +30228,19 @@ bitfield - 29835 + 29936 id - 29835 + 29936 bits - 3437 + 1796 declared_bits - 3437 + 1796 @@ -29847,7 +30254,7 @@ 1 2 - 29835 + 29936 @@ -29863,7 +30270,7 @@ 1 2 - 29835 + 29936 @@ -29879,42 +30286,47 @@ 1 2 - 982 + 381 2 3 - 736 + 163 3 4 - 245 + 272 4 5 - 491 + 163 - 5 + 6 7 - 245 + 163 - 8 - 9 - 245 + 7 + 8 + 163 - 9 + 8 11 - 245 + 163 - 13 - 143 - 245 + 11 + 15 + 163 + + + 16 + 371 + 163 @@ -29930,7 +30342,7 @@ 1 2 - 3437 + 1796 @@ -29946,42 +30358,47 @@ 1 2 - 982 + 381 2 3 - 736 + 163 3 4 - 245 + 272 4 5 - 491 + 163 - 5 + 6 7 - 245 + 163 - 8 - 9 - 245 + 7 + 8 + 163 - 9 + 8 11 - 245 + 163 - 13 - 143 - 245 + 11 + 15 + 163 + + + 16 + 371 + 163 @@ -29997,7 +30414,7 @@ 1 2 - 3437 + 1796 @@ -30007,23 +30424,23 @@ initialisers - 2292672 + 2293973 init - 2292672 + 2293973 var - 998332 + 998705 expr - 2292672 + 2293973 location - 526641 + 526995 @@ -30037,7 +30454,7 @@ 1 2 - 2292672 + 2293973 @@ -30053,7 +30470,7 @@ 1 2 - 2292672 + 2293973 @@ -30069,7 +30486,7 @@ 1 2 - 2292672 + 2293973 @@ -30085,17 +30502,17 @@ 1 2 - 874353 + 874657 2 15 - 51217 + 51293 16 25 - 72760 + 72753 @@ -30111,17 +30528,17 @@ 1 2 - 874353 + 874657 2 15 - 51217 + 51293 16 25 - 72760 + 72753 @@ -30137,7 +30554,7 @@ 1 2 - 998324 + 998697 2 @@ -30158,7 +30575,7 @@ 1 2 - 2292672 + 2293973 @@ -30174,7 +30591,7 @@ 1 2 - 2292672 + 2293973 @@ -30190,7 +30607,7 @@ 1 2 - 2292672 + 2293973 @@ -30206,22 +30623,22 @@ 1 2 - 415896 + 416245 2 3 - 33497 + 33493 3 6 - 41612 + 41608 6 - 113696 - 35635 + 113808 + 35648 @@ -30237,17 +30654,17 @@ 1 2 - 454326 + 454687 2 - 3 - 34331 + 4 + 48783 - 3 - 12835 - 37984 + 4 + 12843 + 23525 @@ -30263,22 +30680,22 @@ 1 2 - 415896 + 416245 2 3 - 33497 + 33493 3 6 - 41612 + 41608 6 - 113696 - 35635 + 113808 + 35648 @@ -30288,26 +30705,26 @@ braced_initialisers - 67930 + 67904 init - 67930 + 67904 expr_ancestor - 1669235 + 1669091 exp - 1669235 + 1669091 ancestor - 835495 + 835423 @@ -30321,7 +30738,7 @@ 1 2 - 1669235 + 1669091 @@ -30337,12 +30754,12 @@ 1 2 - 16999 + 16997 2 3 - 808519 + 808449 3 @@ -30357,11 +30774,11 @@ exprs - 25203218 + 25203200 id - 25203218 + 25203200 kind @@ -30369,7 +30786,7 @@ location - 10582593 + 10582586 @@ -30383,7 +30800,7 @@ 1 2 - 25203218 + 25203200 @@ -30399,7 +30816,7 @@ 1 2 - 25203218 + 25203200 @@ -30577,7 +30994,7 @@ 1 2 - 8901097 + 8901091 2 @@ -30608,17 +31025,17 @@ 1 2 - 9040460 + 9040453 2 3 - 774055 + 774054 3 32 - 768078 + 768077 @@ -30628,15 +31045,15 @@ expr_reuse - 842839 + 842766 reuse - 842839 + 842766 original - 842839 + 842766 value_category @@ -30654,7 +31071,7 @@ 1 2 - 842839 + 842766 @@ -30670,7 +31087,7 @@ 1 2 - 842839 + 842766 @@ -30686,7 +31103,7 @@ 1 2 - 842839 + 842766 @@ -30702,7 +31119,7 @@ 1 2 - 842839 + 842766 @@ -30754,11 +31171,11 @@ expr_types - 25203218 + 25203200 id - 25203218 + 25203200 typeid @@ -30780,7 +31197,7 @@ 1 2 - 25203218 + 25203200 @@ -30796,7 +31213,7 @@ 1 2 - 25203218 + 25203200 @@ -30842,7 +31259,7 @@ 14 24 - 16437 + 16436 24 @@ -30941,15 +31358,15 @@ new_allocated_type - 45784 + 45786 expr - 45784 + 45786 type_id - 27146 + 27147 @@ -30963,7 +31380,7 @@ 1 2 - 45784 + 45786 @@ -30984,7 +31401,7 @@ 2 3 - 14349 + 14350 3 @@ -31062,11 +31479,11 @@ param_ref_to_this - 25272 + 25274 expr - 25272 + 25274 @@ -32409,15 +32826,15 @@ condition_decl_bind - 406893 + 406857 expr - 406893 + 406857 decl - 406893 + 406857 @@ -32431,7 +32848,7 @@ 1 2 - 406893 + 406857 @@ -32447,7 +32864,7 @@ 1 2 - 406893 + 406857 @@ -32457,15 +32874,15 @@ typeid_bind - 47472 + 47475 expr - 47472 + 47475 type_id - 15801 + 15802 @@ -32479,7 +32896,7 @@ 1 2 - 47472 + 47475 @@ -32515,15 +32932,15 @@ uuidof_bind - 26289 + 26351 expr - 26289 + 26351 type_id - 26289 + 26351 @@ -32537,7 +32954,7 @@ 1 2 - 26289 + 26351 @@ -32553,7 +32970,7 @@ 1 2 - 26289 + 26351 @@ -32694,11 +33111,11 @@ lambdas - 19024 + 19022 expr - 19024 + 19022 default_capture @@ -32724,7 +33141,7 @@ 1 2 - 19024 + 19022 @@ -32740,7 +33157,7 @@ 1 2 - 19024 + 19022 @@ -32756,7 +33173,7 @@ 1 2 - 19024 + 19022 @@ -32940,15 +33357,15 @@ lambda_capture - 31901 + 31898 id - 31901 + 31898 lambda - 15468 + 15467 index @@ -32956,7 +33373,7 @@ field - 31901 + 31898 captured_by_reference @@ -32968,7 +33385,7 @@ location - 17939 + 17937 @@ -32982,7 +33399,7 @@ 1 2 - 31901 + 31898 @@ -32998,7 +33415,7 @@ 1 2 - 31901 + 31898 @@ -33014,7 +33431,7 @@ 1 2 - 31901 + 31898 @@ -33030,7 +33447,7 @@ 1 2 - 31901 + 31898 @@ -33046,7 +33463,7 @@ 1 2 - 31901 + 31898 @@ -33062,7 +33479,7 @@ 1 2 - 31901 + 31898 @@ -33186,7 +33603,7 @@ 1 2 - 14229 + 14228 2 @@ -33207,7 +33624,7 @@ 1 2 - 15347 + 15346 2 @@ -33228,17 +33645,17 @@ 1 2 - 8771 + 8770 2 3 - 3709 + 3708 3 4 - 1401 + 1400 4 @@ -33690,7 +34107,7 @@ 1 2 - 31901 + 31898 @@ -33706,7 +34123,7 @@ 1 2 - 31901 + 31898 @@ -33722,7 +34139,7 @@ 1 2 - 31901 + 31898 @@ -33738,7 +34155,7 @@ 1 2 - 31901 + 31898 @@ -33754,7 +34171,7 @@ 1 2 - 31901 + 31898 @@ -33770,7 +34187,7 @@ 1 2 - 31901 + 31898 @@ -34028,7 +34445,7 @@ 1 2 - 15711 + 15710 2 @@ -34054,7 +34471,7 @@ 1 2 - 16286 + 16285 2 @@ -34080,7 +34497,7 @@ 1 2 - 17250 + 17249 2 @@ -34101,7 +34518,7 @@ 1 2 - 15711 + 15710 2 @@ -34127,7 +34544,7 @@ 1 2 - 17914 + 17913 2 @@ -34148,7 +34565,7 @@ 1 2 - 17939 + 17937 @@ -34284,11 +34701,11 @@ stmts - 6328585 + 6328264 id - 6328585 + 6328264 kind @@ -34296,7 +34713,7 @@ location - 2676368 + 2676295 @@ -34310,7 +34727,7 @@ 1 2 - 6328585 + 6328264 @@ -34326,7 +34743,7 @@ 1 2 - 6328585 + 6328264 @@ -34425,13 +34842,13 @@ 8 - 117880 - 117881 + 117898 + 117899 8 - 198412 - 198413 + 198430 + 198431 8 @@ -34536,13 +34953,13 @@ 8 - 48381 - 48382 + 48393 + 48394 8 - 85799 - 85800 + 85811 + 85812 8 @@ -34564,22 +34981,22 @@ 1 2 - 2225135 + 2225098 2 3 - 177731 + 177714 3 11 - 203469 + 203450 11 1816 - 70031 + 70032 @@ -34595,7 +35012,7 @@ 1 2 - 2599906 + 2599832 2 @@ -34765,15 +35182,15 @@ if_then - 989924 + 989923 if_stmt - 989924 + 989923 then_id - 989924 + 989923 @@ -34787,7 +35204,7 @@ 1 2 - 989924 + 989923 @@ -34803,7 +35220,7 @@ 1 2 - 989924 + 989923 @@ -34813,15 +35230,15 @@ if_else - 434918 + 434880 if_stmt - 434918 + 434880 else_id - 434918 + 434880 @@ -34835,7 +35252,7 @@ 1 2 - 434918 + 434880 @@ -34851,7 +35268,7 @@ 1 2 - 434918 + 434880 @@ -35245,11 +35662,11 @@ switch_case - 831962 + 831891 switch_stmt - 409804 + 409769 index @@ -35257,7 +35674,7 @@ case_id - 831962 + 831891 @@ -35276,7 +35693,7 @@ 2 3 - 406935 + 406900 3 @@ -35302,7 +35719,7 @@ 2 3 - 406935 + 406900 3 @@ -35465,7 +35882,7 @@ 1 2 - 831962 + 831891 @@ -35481,7 +35898,7 @@ 1 2 - 831962 + 831891 @@ -35491,15 +35908,15 @@ switch_body - 409804 + 409769 switch_stmt - 409804 + 409769 body_id - 409804 + 409769 @@ -35513,7 +35930,7 @@ 1 2 - 409804 + 409769 @@ -35529,7 +35946,7 @@ 1 2 - 409804 + 409769 @@ -35587,15 +36004,15 @@ for_condition - 76319 + 76318 for_stmt - 76319 + 76318 condition_id - 76319 + 76318 @@ -35609,7 +36026,7 @@ 1 2 - 76319 + 76318 @@ -35625,7 +36042,7 @@ 1 2 - 76319 + 76318 @@ -35731,19 +36148,19 @@ stmtparents - 5605658 + 5605261 id - 5605658 + 5605261 index - 15728 + 15726 parent - 2362355 + 2362273 @@ -35757,7 +36174,7 @@ 1 2 - 5605658 + 5605261 @@ -35773,7 +36190,7 @@ 1 2 - 5605658 + 5605261 @@ -35789,7 +36206,7 @@ 1 2 - 5167 + 5166 2 @@ -35809,7 +36226,7 @@ 7 8 - 1312 + 1311 8 @@ -35833,7 +36250,7 @@ 78 - 207983 + 208001 898 @@ -35850,7 +36267,7 @@ 1 2 - 5167 + 5166 2 @@ -35870,7 +36287,7 @@ 7 8 - 1312 + 1311 8 @@ -35894,7 +36311,7 @@ 78 - 207983 + 208001 898 @@ -35911,32 +36328,32 @@ 1 2 - 1342027 + 1342042 2 3 - 516007 + 515957 3 4 - 151118 + 151103 4 6 - 155272 + 155257 6 16 - 179010 + 178993 16 1943 - 18919 + 18917 @@ -35952,32 +36369,32 @@ 1 2 - 1342027 + 1342042 2 3 - 516007 + 515957 3 4 - 151118 + 151103 4 6 - 155272 + 155257 6 16 - 179010 + 178993 16 1943 - 18919 + 18917 @@ -35998,11 +36415,11 @@ stmt_decl_bind - 728652 + 728688 stmt - 688271 + 688305 num @@ -36010,7 +36427,7 @@ decl - 728583 + 728620 @@ -36024,12 +36441,12 @@ 1 2 - 666111 + 666143 2 32 - 22160 + 22161 @@ -36045,12 +36462,12 @@ 1 2 - 666111 + 666143 2 32 - 22160 + 22161 @@ -36110,7 +36527,7 @@ 5483 - 170293 + 170292 8 @@ -36171,7 +36588,7 @@ 5483 - 170276 + 170275 8 @@ -36188,7 +36605,7 @@ 1 2 - 728559 + 728595 2 @@ -36209,7 +36626,7 @@ 1 2 - 728583 + 728620 @@ -36219,11 +36636,11 @@ stmt_decl_entry_bind - 728652 + 728688 stmt - 688271 + 688305 num @@ -36231,7 +36648,7 @@ decl_entry - 728652 + 728688 @@ -36245,12 +36662,12 @@ 1 2 - 666111 + 666143 2 32 - 22160 + 22161 @@ -36266,12 +36683,12 @@ 1 2 - 666111 + 666143 2 32 - 22160 + 22161 @@ -36331,7 +36748,7 @@ 5483 - 170293 + 170292 8 @@ -36392,7 +36809,7 @@ 5483 - 170293 + 170292 8 @@ -36409,7 +36826,7 @@ 1 2 - 728652 + 728688 @@ -36425,7 +36842,7 @@ 1 2 - 728652 + 728688 @@ -36435,15 +36852,15 @@ blockscope - 1625740 + 1625739 block - 1625740 + 1625739 enclosing - 1404735 + 1404734 @@ -36457,7 +36874,7 @@ 1 2 - 1625740 + 1625739 @@ -36473,7 +36890,7 @@ 1 2 - 1267589 + 1267588 2 @@ -36674,11 +37091,11 @@ preprocdirects - 5322916 + 5322912 id - 5322916 + 5322912 kind @@ -36686,7 +37103,7 @@ location - 5319847 + 5319843 @@ -36700,7 +37117,7 @@ 1 2 - 5322916 + 5322912 @@ -36716,7 +37133,7 @@ 1 2 - 5322916 + 5322912 @@ -36864,7 +37281,7 @@ 1 2 - 5319724 + 5319720 26 @@ -36885,7 +37302,7 @@ 1 2 - 5319847 + 5319843 @@ -36899,7 +37316,7 @@ begin - 874936 + 874935 elseelifend @@ -36953,11 +37370,11 @@ preproctrue - 432311 + 432310 branch - 432311 + 432310 @@ -36975,19 +37392,19 @@ preproctext - 4283577 + 4283574 id - 4283577 + 4283574 head - 2908431 + 2908429 body - 1656804 + 1656803 @@ -37001,7 +37418,7 @@ 1 2 - 4283577 + 4283574 @@ -37017,7 +37434,7 @@ 1 2 - 4283577 + 4283574 @@ -37033,12 +37450,12 @@ 1 2 - 2712964 + 2712962 2 798 - 195467 + 195466 @@ -37054,7 +37471,7 @@ 1 2 - 2828501 + 2828499 2 @@ -37075,7 +37492,7 @@ 1 2 - 1510940 + 1510939 2 @@ -37101,7 +37518,7 @@ 1 2 - 1515115 + 1515114 2 @@ -37121,15 +37538,15 @@ includes - 322460 + 322463 id - 322460 + 322463 included - 59399 + 59400 @@ -37143,7 +37560,7 @@ 1 2 - 322460 + 322463 @@ -37179,7 +37596,7 @@ 6 11 - 4574 + 4575 11 @@ -37295,11 +37712,11 @@ link_parent - 31162056 + 31163662 element - 3960190 + 3960394 link_target @@ -37317,17 +37734,17 @@ 1 2 - 540567 + 540595 2 9 - 27180 + 27181 9 10 - 3392442 + 3392617 diff --git a/cpp/ql/lib/upgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/old.dbscheme b/cpp/ql/lib/upgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/old.dbscheme new file mode 100644 index 000000000000..293904928d85 --- /dev/null +++ b/cpp/ql/lib/upgrades/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/ql/lib/upgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/semmlecode.cpp.dbscheme new file mode 100644 index 000000000000..a765f5c5abd3 --- /dev/null +++ b/cpp/ql/lib/upgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/semmlecode.cpp.dbscheme @@ -0,0 +1,2603 @@ + +/*- 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 compilation: @compilation 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/293904928d857b61a44dc0ff34c89c9eccb8a90a/upgrade.properties b/cpp/ql/lib/upgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/upgrade.properties new file mode 100644 index 000000000000..3733251a42a7 --- /dev/null +++ b/cpp/ql/lib/upgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/upgrade.properties @@ -0,0 +1,4 @@ +description: Specify the compilation in fileannotations +compatibility: partial +compilations.rel: run upgrades.ql new_compilations +fileannotations.rel: run upgrades.ql new_fileannotations diff --git a/cpp/ql/lib/upgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/upgrades.ql b/cpp/ql/lib/upgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/upgrades.ql new file mode 100644 index 000000000000..72c602e4208e --- /dev/null +++ b/cpp/ql/lib/upgrades/293904928d857b61a44dc0ff34c89c9eccb8a90a/upgrades.ql @@ -0,0 +1,27 @@ +newtype TCompilation = TPlaceHolderCompilation() + +module Fresh = QlBuiltins::NewEntity; + +class NewCompilationBase = @compilation or Fresh::EntityId; + +class NewCompilation extends NewCompilationBase { + string toString() { none() } +} + +class File extends @file { + string toString() { none() } +} + +query predicate new_compilations(NewCompilation compilation, string cwd) { + compilations(compilation, cwd) + or + compilation = Fresh::map(TPlaceHolderCompilation()) and + cwd = "" +} + +query predicate new_fileannotations( + File id, NewCompilation compilation, int kind, string name, string value +) { + fileannotations(id, kind, name, value) and + compilation = Fresh::map(TPlaceHolderCompilation()) +}