diff --git a/csharp/downgrades/ea7ad33252e550241975676f09fcc7b0a703deab/old.dbscheme b/csharp/downgrades/ea7ad33252e550241975676f09fcc7b0a703deab/old.dbscheme new file mode 100644 index 000000000000..ea7ad33252e5 --- /dev/null +++ b/csharp/downgrades/ea7ad33252e550241975676f09fcc7b0a703deab/old.dbscheme @@ -0,0 +1,1505 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#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.rsp` 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 +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_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( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string 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 +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * Overlay support + */ + +/** + * The CLI will automatically emit the tuple `databaseMetadata("isOverlay", "true")`, + * along with an `overlayChangedFiles` tuple for each new/modified/deleted file, + * when building an overlay database, and these can be used by the discard predicates. + */ +databaseMetadata( + string metadataKey : string ref, + string value : string ref +); + +overlayChangedFiles( + string path : string ref +); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +@locatable = @declaration_with_accessors | @callable_accessor | @declaration_or_directive + | @diagnostic | @extractor_message | @preprocessor_directive | @attribute | @type_mention | @type_parameter_constraints + | @declaration_with_accessors | @callable_accessor | @operator | @method + | @constructor | @destructor | @field | @local_variable | @parameter | @stmt | @expr + | @xmllocatable | @commentline | @commentblock | @asp_element + +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); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type +| 35 = @extension_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type | @extension_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extension_receiver_type( + unique int extension: @extension_type ref, + int receiver_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type | @extension_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, params/array = 3, this = 4, in = 5, ref readonly = 6 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +| 138 = @interpolated_string_insert_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_call_expr = @assign_arith_expr | @assign_bitwise_expr +@assign_op_expr = @assign_op_call_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@add_operation = @add_expr | @assign_add_expr; +@sub_operation = @sub_expr | @assign_sub_expr; +@mul_operation = @mul_expr | @assign_mul_expr; +@div_operation = @div_expr | @assign_div_expr; +@rem_operation = @rem_expr | @assign_rem_expr; +@and_operation = @bit_and_expr | @assign_and_expr; +@xor_operation = @bit_xor_expr | @assign_xor_expr; +@or_operation = @bit_or_expr | @assign_or_expr; +@lshift_operation = @lshift_expr | @assign_lshift_expr; +@rshift_operation = @rshift_expr | @assign_rshift_expr; +@urshift_operation = @urshift_expr | @assign_urshift_expr; +@null_coalescing_operation = @null_coalescing_expr | @assign_coalesce_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @assign_expr | @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@op_invoke_expr = @operator_invocation_expr | @assign_op_call_expr +@call = @method_invocation_expr | @constructor_init_expr | @op_invoke_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @op_invoke_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr + | @assign_op_call_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* 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; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); diff --git a/csharp/downgrades/ea7ad33252e550241975676f09fcc7b0a703deab/semmlecode.csharp.dbscheme b/csharp/downgrades/ea7ad33252e550241975676f09fcc7b0a703deab/semmlecode.csharp.dbscheme new file mode 100644 index 000000000000..19b8cc3e2dc7 --- /dev/null +++ b/csharp/downgrades/ea7ad33252e550241975676f09fcc7b0a703deab/semmlecode.csharp.dbscheme @@ -0,0 +1,1504 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#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.rsp` 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 +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_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( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string 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 +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * Overlay support + */ + +/** + * The CLI will automatically emit the tuple `databaseMetadata("isOverlay", "true")`, + * along with an `overlayChangedFiles` tuple for each new/modified/deleted file, + * when building an overlay database, and these can be used by the discard predicates. + */ +databaseMetadata( + string metadataKey : string ref, + string value : string ref +); + +overlayChangedFiles( + string path : string ref +); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +@locatable = @declaration_with_accessors | @callable_accessor | @declaration_or_directive + | @diagnostic | @extractor_message | @preprocessor_directive | @attribute | @type_mention | @type_parameter_constraints + | @declaration_with_accessors | @callable_accessor | @operator | @method + | @constructor | @destructor | @field | @local_variable | @parameter | @stmt | @expr + | @xmllocatable | @commentline | @commentblock | @asp_element + +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); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type +| 35 = @extension_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type | @extension_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extension_receiver_type( + unique int extension: @extension_type ref, + int receiver_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type | @extension_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, params/array = 3, this = 4, in = 5, ref readonly = 6 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +| 138 = @interpolated_string_insert_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_call_expr = @assign_arith_expr | @assign_bitwise_expr +@assign_op_expr = @assign_op_call_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@add_operation = @add_expr | @assign_add_expr; +@sub_operation = @sub_expr | @assign_sub_expr; +@mul_operation = @mul_expr | @assign_mul_expr; +@div_operation = @div_expr | @assign_div_expr; +@rem_operation = @rem_expr | @assign_rem_expr; +@and_operation = @bit_and_expr | @assign_and_expr; +@xor_operation = @bit_xor_expr | @assign_xor_expr; +@or_operation = @bit_or_expr | @assign_or_expr; +@lshift_operation = @lshift_expr | @assign_lshift_expr; +@rshift_operation = @rshift_expr | @assign_rshift_expr; +@urshift_operation = @urshift_expr | @assign_urshift_expr; +@null_coalescing_operation = @null_coalescing_expr | @assign_coalesce_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @assign_expr | @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@op_invoke_expr = @operator_invocation_expr | @assign_op_call_expr +@call = @method_invocation_expr | @constructor_init_expr | @op_invoke_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @op_invoke_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* 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; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); diff --git a/csharp/downgrades/ea7ad33252e550241975676f09fcc7b0a703deab/upgrade.properties b/csharp/downgrades/ea7ad33252e550241975676f09fcc7b0a703deab/upgrade.properties new file mode 100644 index 000000000000..160cdb12de4c --- /dev/null +++ b/csharp/downgrades/ea7ad33252e550241975676f09fcc7b0a703deab/upgrade.properties @@ -0,0 +1,2 @@ +description: Remove @assign_op_call_expr from @qualifiable_expr. +compatibility: full diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Util/SymbolExtensions.cs b/csharp/extractor/Semmle.Extraction.CSharp.Util/SymbolExtensions.cs index 659b26c2fe99..92d7ecfad6bb 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.Util/SymbolExtensions.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.Util/SymbolExtensions.cs @@ -1,3 +1,5 @@ +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Text.RegularExpressions; using Microsoft.CodeAnalysis; @@ -18,114 +20,68 @@ public static string GetName(this ISymbol symbol, bool useMetadataName = false) return symbol.CanBeReferencedByName ? name : name.Substring(symbol.Name.LastIndexOf('.') + 1); } + private static readonly ReadOnlyDictionary methodToOperator = new(new Dictionary + { + { "op_LogicalNot", "!" }, + { "op_BitwiseAnd", "&" }, + { "op_Equality", "==" }, + { "op_Inequality", "!=" }, + { "op_UnaryPlus", "+" }, + { "op_Addition", "+" }, + { "op_UnaryNegation", "-" }, + { "op_Subtraction", "-" }, + { "op_Multiply", "*" }, + { "op_Multiplication", "*" }, + { "op_Division", "/" }, + { "op_Modulus", "%" }, + { "op_GreaterThan", ">" }, + { "op_GreaterThanOrEqual", ">=" }, + { "op_LessThan", "<" }, + { "op_LessThanOrEqual", "<=" }, + { "op_Decrement", "--" }, + { "op_Increment", "++" }, + { "op_Implicit", "implicit conversion" }, + { "op_Explicit", "explicit conversion" }, + { "op_OnesComplement", "~" }, + { "op_RightShift", ">>" }, + { "op_UnsignedRightShift", ">>>" }, + { "op_LeftShift", "<<" }, + { "op_BitwiseOr", "|" }, + { "op_ExclusiveOr", "^" }, + { "op_True", "true" }, + { "op_False", "false" } + }); + /// /// Convert an operator method name in to a symbolic name. /// A return value indicates whether the conversion succeeded. /// public static bool TryGetOperatorSymbol(this ISymbol symbol, out string operatorName) { - static bool TryGetOperatorSymbolFromName(string methodName, out string operatorName) + var methodName = symbol.GetName(useMetadataName: false); + + // Most common use-case. + if (methodToOperator.TryGetValue(methodName, out var opName)) { - var success = true; - switch (methodName) - { - case "op_LogicalNot": - operatorName = "!"; - break; - case "op_BitwiseAnd": - operatorName = "&"; - break; - case "op_Equality": - operatorName = "=="; - break; - case "op_Inequality": - operatorName = "!="; - break; - case "op_UnaryPlus": - case "op_Addition": - operatorName = "+"; - break; - case "op_UnaryNegation": - case "op_Subtraction": - operatorName = "-"; - break; - case "op_Multiply": - operatorName = "*"; - break; - case "op_Division": - operatorName = "/"; - break; - case "op_Modulus": - operatorName = "%"; - break; - case "op_GreaterThan": - operatorName = ">"; - break; - case "op_GreaterThanOrEqual": - operatorName = ">="; - break; - case "op_LessThan": - operatorName = "<"; - break; - case "op_LessThanOrEqual": - operatorName = "<="; - break; - case "op_Decrement": - operatorName = "--"; - break; - case "op_Increment": - operatorName = "++"; - break; - case "op_Implicit": - operatorName = "implicit conversion"; - break; - case "op_Explicit": - operatorName = "explicit conversion"; - break; - case "op_OnesComplement": - operatorName = "~"; - break; - case "op_RightShift": - operatorName = ">>"; - break; - case "op_UnsignedRightShift": - operatorName = ">>>"; - break; - case "op_LeftShift": - operatorName = "<<"; - break; - case "op_BitwiseOr": - operatorName = "|"; - break; - case "op_ExclusiveOr": - operatorName = "^"; - break; - case "op_True": - operatorName = "true"; - break; - case "op_False": - operatorName = "false"; - break; - default: - var match = CheckedRegex().Match(methodName); - if (match.Success) - { - TryGetOperatorSymbolFromName($"op_{match.Groups[1]}", out var uncheckedName); - operatorName = $"checked {uncheckedName}"; - break; - } - operatorName = methodName; - success = false; - break; - } - return success; + operatorName = opName; + return true; } - var methodName = symbol.GetName(useMetadataName: false); - return TryGetOperatorSymbolFromName(methodName, out operatorName); + // Attempt to parse using a regexp. + var match = OperatorRegex().Match(methodName); + if (match.Success && methodToOperator.TryGetValue($"op_{match.Groups[2]}", out var rawOperatorName)) + { + var prefix = match.Groups[1].Success ? "checked " : ""; + var postfix = match.Groups[3].Success ? "=" : ""; + operatorName = $"{prefix}{rawOperatorName}{postfix}"; + return true; + } + + operatorName = methodName; + return false; } - [GeneratedRegex("^op_Checked(.*)$")] - private static partial Regex CheckedRegex(); + [GeneratedRegex("^op_(Checked)?(.*?)(Assignment)?$")] + private static partial Regex OperatorRegex(); } } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expression.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expression.cs index 93107fc6dab8..4ab90def2c16 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expression.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expression.cs @@ -228,6 +228,41 @@ type.SpecialType is SpecialType.System_IntPtr || return Literal.CreateGenerated(cx, parent, childIndex, type, defaultValue, location); } + /// + /// Given an expression syntax node, attempt to resolve the target method symbol for it. + /// The operation takes extension methods into account. + /// + /// The expression syntax node. + /// Returns the target method symbol, or null if it cannot be resolved. + protected IMethodSymbol? GetTargetSymbol(ExpressionSyntax node) + { + var si = Context.GetSymbolInfo(node); + if (si.Symbol is ISymbol symbol) + { + var method = symbol as IMethodSymbol; + // Case for compiler-generated extension methods. + return method?.TryGetExtensionMethod() ?? method; + } + + if (si.CandidateReason == CandidateReason.OverloadResolutionFailure && node is InvocationExpressionSyntax syntax) + { + // This seems to be a bug in Roslyn + // For some reason, typeof(X).InvokeMember(...) fails to resolve the correct + // InvokeMember() method, even though the number of parameters clearly identifies the correct method + + var candidates = si.CandidateSymbols + .OfType() + .Where(method => method.Parameters.Length >= syntax.ArgumentList.Arguments.Count) + .Where(method => method.Parameters.Count(p => !p.HasExplicitDefaultValue) <= syntax.ArgumentList.Arguments.Count); + + return Context.ExtractionContext.IsStandalone ? + candidates.FirstOrDefault() : + candidates.SingleOrDefault(); + } + + return si.Symbol as IMethodSymbol; + } + /// /// Adapt the operator kind depending on whether it's a dynamic call or a user-operator call. /// @@ -244,10 +279,10 @@ public static ExprKind UnaryOperatorKind(Context cx, ExprKind originalKind, Expr /// name if available. /// /// The expression. - public void OperatorCall(TextWriter trapFile, ExpressionSyntax node) + public void AddOperatorCall(TextWriter trapFile, ExpressionSyntax node) { - var @operator = Context.GetSymbolInfo(node); - if (@operator.Symbol is IMethodSymbol method) + var @operator = GetTargetSymbol(node); + if (@operator is IMethodSymbol method) { var callType = GetCallType(Context, node); if (callType == CallType.Dynamic) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Assignment.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Assignment.cs index 67e49b2919c2..6d869b256c58 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Assignment.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Assignment.cs @@ -24,10 +24,9 @@ protected override void PopulateExpression(TextWriter trapFile) { Create(Context, Syntax.Left, this, 0); Create(Context, Syntax.Right, this, 1); - if (Kind != ExprKind.SIMPLE_ASSIGN && Kind != ExprKind.ASSIGN_COALESCE) { - OperatorCall(trapFile, Syntax); + AddOperatorCall(trapFile, Syntax); } } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Binary.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Binary.cs index d4cc5cc81d58..2bc8c61f21f3 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Binary.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Binary.cs @@ -40,7 +40,7 @@ private void CreateDeferred(Context cx, ExpressionSyntax node, int child) protected override void PopulateExpression(TextWriter trapFile) { - OperatorCall(trapFile, Syntax); + AddOperatorCall(trapFile, Syntax); CreateDeferred(Context, Syntax.Left, 0); CreateDeferred(Context, Syntax.Right, 1); } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Cast.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Cast.cs index 20a5dc611a31..c11711f30926 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Cast.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Cast.cs @@ -25,7 +25,7 @@ protected override void PopulateExpression(TextWriter trapFile) else { // Type conversion - OperatorCall(trapFile, Syntax); + AddOperatorCall(trapFile, Syntax); TypeMention.Create(Context, Syntax.Type, this, Type); } } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Invocation.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Invocation.cs index 2ed7aec9955c..343f288eeafe 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Invocation.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Invocation.cs @@ -44,7 +44,7 @@ protected override void PopulateExpression(TextWriter trapFile) var child = -1; string? memberName = null; - var target = TargetSymbol; + var target = GetTargetSymbol(Syntax); switch (Syntax.Expression) { case MemberAccessExpressionSyntax memberAccess when IsValidMemberAccessKind(): @@ -129,39 +129,6 @@ private static bool IsOperatorLikeCall(ExpressionNodeInfo info) method.TryGetExtensionMethod()?.MethodKind == MethodKind.UserDefinedOperator; } - public IMethodSymbol? TargetSymbol - { - get - { - var si = SymbolInfo; - - if (si.Symbol is ISymbol symbol) - { - var method = symbol as IMethodSymbol; - // Case for compiler-generated extension methods. - return method?.TryGetExtensionMethod() ?? method; - } - - if (si.CandidateReason == CandidateReason.OverloadResolutionFailure) - { - // This seems to be a bug in Roslyn - // For some reason, typeof(X).InvokeMember(...) fails to resolve the correct - // InvokeMember() method, even though the number of parameters clearly identifies the correct method - - var candidates = si.CandidateSymbols - .OfType() - .Where(method => method.Parameters.Length >= Syntax.ArgumentList.Arguments.Count) - .Where(method => method.Parameters.Count(p => !p.HasExplicitDefaultValue) <= Syntax.ArgumentList.Arguments.Count); - - return Context.ExtractionContext.IsStandalone ? - candidates.FirstOrDefault() : - candidates.SingleOrDefault(); - } - - return si.Symbol as IMethodSymbol; - } - } - private static bool IsDelegateLikeCall(ExpressionNodeInfo info) { return IsDelegateLikeCall(info, symbol => IsFunctionPointer(symbol) || IsDelegateInvoke(symbol)); diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/PostfixUnary.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/PostfixUnary.cs index dbe5ecb3d184..051a03e9f8c2 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/PostfixUnary.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/PostfixUnary.cs @@ -25,7 +25,7 @@ protected override void PopulateExpression(TextWriter trapFile) if ((operatorKind == ExprKind.POST_INCR || operatorKind == ExprKind.POST_DECR) && Kind == ExprKind.OPERATOR_INVOCATION) { - OperatorCall(trapFile, Syntax); + AddOperatorCall(trapFile, Syntax); trapFile.mutator_invocation_mode(this, 2); } } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Unary.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Unary.cs index 161fbe62e3f1..699c3810d116 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Unary.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Unary.cs @@ -24,7 +24,7 @@ public static Unary Create(ExpressionNodeInfo info) protected override void PopulateExpression(TextWriter trapFile) { Create(Context, Syntax.Operand, this, 0); - OperatorCall(trapFile, Syntax); + AddOperatorCall(trapFile, Syntax); if ((operatorKind == ExprKind.PRE_INCR || operatorKind == ExprKind.PRE_DECR) && Kind == ExprKind.OPERATOR_INVOCATION) diff --git a/csharp/ql/lib/change-notes/2026-03-06-compound-assignment-operations.md b/csharp/ql/lib/change-notes/2026-03-06-compound-assignment-operations.md new file mode 100644 index 000000000000..f7e68b9b7d73 --- /dev/null +++ b/csharp/ql/lib/change-notes/2026-03-06-compound-assignment-operations.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* C# 14: Added support for user-defined compound assignment operators. diff --git a/csharp/ql/lib/semmle/code/csharp/Assignable.qll b/csharp/ql/lib/semmle/code/csharp/Assignable.qll index af6861349d1c..5cd9ee9ede06 100644 --- a/csharp/ql/lib/semmle/code/csharp/Assignable.qll +++ b/csharp/ql/lib/semmle/code/csharp/Assignable.qll @@ -315,7 +315,8 @@ module AssignableInternal { TAddressOfDefinition(AddressOfExpr aoe) or TPatternDefinition(TopLevelPatternDecl tlpd) or TAssignOperationDefinition(AssignOperation ao) { - ao instanceof AssignCallOperation or + ao instanceof AssignCallOperation and not ao instanceof CompoundAssignmentOperatorCall + or ao instanceof AssignCoalesceExpr } diff --git a/csharp/ql/lib/semmle/code/csharp/Callable.qll b/csharp/ql/lib/semmle/code/csharp/Callable.qll index 7859c7ea1d0e..9416a7d4d9c7 100644 --- a/csharp/ql/lib/semmle/code/csharp/Callable.qll +++ b/csharp/ql/lib/semmle/code/csharp/Callable.qll @@ -611,7 +611,8 @@ class ExtensionOperator extends ExtensionCallableImpl, Operator { class UnaryOperator extends Operator { UnaryOperator() { this.getNumberOfParameters() = 1 and - not this instanceof ConversionOperator + not this instanceof ConversionOperator and + not this instanceof CompoundAssignmentOperator } } @@ -784,7 +785,7 @@ class TrueOperator extends UnaryOperator { * A user-defined binary operator. * * Either an addition operator (`AddOperator`), a checked addition operator - * (`CheckedAddOperator`) a subtraction operator (`SubOperator`), a checked + * (`CheckedAddOperator`), a subtraction operator (`SubOperator`), a checked * subtraction operator (`CheckedSubOperator`), a multiplication operator * (`MulOperator`), a checked multiplication operator (`CheckedMulOperator`), * a division operator (`DivOperator`), a checked division operator @@ -795,10 +796,16 @@ class TrueOperator extends UnaryOperator { * operator(`UnsignedRightShiftOperator`), an equals operator (`EQOperator`), * a not equals operator (`NEOperator`), a lesser than operator (`LTOperator`), * a greater than operator (`GTOperator`), a less than or equals operator - * (`LEOperator`), or a greater than or equals operator (`GEOperator`). + * (`LEOperator`), a greater than or equals operator (`GEOperator`), or + * a compound assignment operator (`CompoundAssignmentOperator`). */ class BinaryOperator extends Operator { - BinaryOperator() { this.getNumberOfParameters() = 2 } + BinaryOperator() { + this.getNumberOfParameters() = 2 + or + // Instance compound assignment operators only have one parameter. + this.getNumberOfParameters() = 1 and not this.isStatic() + } } /** @@ -1184,6 +1191,249 @@ class CheckedExplicitConversionOperator extends ConversionOperator { override string getAPrimaryQlClass() { result = "CheckedExplicitConversionOperator" } } +abstract private class CompoundAssignmentOperatorImpl extends BinaryOperator { } + +/** + * A user-defined compound assignment operator. + * + * Either an addition operator (`AddCompoundAssignmentOperator`), a checked addition operator + * (`CheckedAddCompoundAssignmentOperator`), a subtraction operator (`SubCompoundAssignmentOperator`), a checked + * subtraction operator (`CheckedSubCompoundAssignmentOperator`), a multiplication operator + * (`MulCompoundAssignmentOperator`), a checked multiplication operator (`CheckedMulCompoundAssignmentOperator`), + * a division operator (`DivCompoundAssignmentOperator`), a checked division operator + * (`CheckedDivCompoundAssignmentOperator`), a remainder operator (`RemCompoundAssignmentOperator`), an and + * operator (`AndCompoundAssignmentOperator`), an or operator (`OrCompoundAssignmentOperator`), an xor + * operator (`XorCompoundAssignmentOperator`), a left shift operator (`LeftShiftCompoundAssignmentOperator`), + * a right shift operator (`RightShiftCompoundAssignmentOperator`), or an unsigned right shift + * operator(`UnsignedRightShiftCompoundAssignmentOperator`). + */ +final class CompoundAssignmentOperator = CompoundAssignmentOperatorImpl; + +/** + * A user-defined compound assignment addition operator (`+=`), for example + * + * ```csharp + * public void operator checked +=(Widget w) { + * ... + * } + * ``` + */ +class AddCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + AddCompoundAssignmentOperator() { this.getName() = "+=" } + + override string getAPrimaryQlClass() { result = "AddCompoundAssignmentOperator" } +} + +/** + * A user-defined checked compound assignment addition operator (`checked +=`), for example + * + * ```csharp + * public void operator checked +=(Widget w) { + * ... + * } + * ``` + */ +class CheckedAddCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + CheckedAddCompoundAssignmentOperator() { this.getName() = "checked +=" } + + override string getAPrimaryQlClass() { result = "CheckedAddCompoundAssignmentOperator" } +} + +/** + * A user-defined compound assignment subtraction operator (`-=`), for example + * + * ```csharp + * public void operator -=(Widget w) { + * ... + * } + * ``` + */ +class SubCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + SubCompoundAssignmentOperator() { this.getName() = "-=" } + + override string getAPrimaryQlClass() { result = "SubCompoundAssignmentOperator" } +} + +/** + * A user-defined checked compound assignment subtraction operator (`checked -=`), for example + * + * ```csharp + * public void operator checked -=(Widget w) { + * ... + * } + * ``` + */ +class CheckedSubCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + CheckedSubCompoundAssignmentOperator() { this.getName() = "checked -=" } + + override string getAPrimaryQlClass() { result = "CheckedSubCompoundAssignmentOperator" } +} + +/** + * A user-defined compound assignment multiplication operator (`*=`), for example + * + * ```csharp + * public void operator *=(Widget w) { + * ... + * } + * ``` + */ +class MulCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + MulCompoundAssignmentOperator() { this.getName() = "*=" } + + override string getAPrimaryQlClass() { result = "MulCompoundAssignmentOperator" } +} + +/** + * A user-defined checked compound assignment multiplication operator (`checked *=`), for example + * + * ```csharp + * public void operator checked *=(Widget w) { + * ... + * } + * ``` + */ +class CheckedMulCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + CheckedMulCompoundAssignmentOperator() { this.getName() = "checked *=" } + + override string getAPrimaryQlClass() { result = "CheckedMulCompoundAssignmentOperator" } +} + +/** + * A user-defined compound assignment division operator (`/=`), for example + * + * ```csharp + * public void operator /=(Widget w) { + * ... + * } + * ``` + */ +class DivCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + DivCompoundAssignmentOperator() { this.getName() = "/=" } + + override string getAPrimaryQlClass() { result = "DivCompoundAssignmentOperator" } +} + +/** + * A user-defined checked compound assignment division operator (`checked /=`), for example + * + * ```csharp + * public void operator checked /=(Widget w) { + * ... + * } + * ``` + */ +class CheckedDivCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + CheckedDivCompoundAssignmentOperator() { this.getName() = "checked /=" } + + override string getAPrimaryQlClass() { result = "CheckedDivCompoundAssignmentOperator" } +} + +/** + * A user-defined compound assignment remainder operator (`%=`), for example + * + * ```csharp + * public void operator %=(Widget w) { + * ... + * } + * ``` + */ +class RemCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + RemCompoundAssignmentOperator() { this.getName() = "%=" } + + override string getAPrimaryQlClass() { result = "RemCompoundAssignmentOperator" } +} + +/** + * A user-defined compound assignment and operator (`&=`), for example + * + * ```csharp + * public void operator &=(Widget w) { + * ... + * } + * ``` + */ +class AndCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + AndCompoundAssignmentOperator() { this.getName() = "&=" } + + override string getAPrimaryQlClass() { result = "AndCompoundAssignmentOperator" } +} + +/** + * A user-defined compound assignment or operator (`|=`), for example + * + * ```csharp + * public void operator |=(Widget w) { + * ... + * } + * ``` + */ +class OrCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + OrCompoundAssignmentOperator() { this.getName() = "|=" } + + override string getAPrimaryQlClass() { result = "OrCompoundAssignmentOperator" } +} + +/** + * A user-defined compound assignment xor operator (`^=`), for example + * + * ```csharp + * public void operator ^=(Widget w) { + * ... + * } + * ``` + */ +class XorCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + XorCompoundAssignmentOperator() { this.getName() = "^=" } + + override string getAPrimaryQlClass() { result = "XorCompoundAssignmentOperator" } +} + +/** + * A user-defined compound assignment left shift operator (`<<=`), for example + * + * ```csharp + * public void operator <<=(Widget w) { + * ... + * } + * ``` + */ +class LeftShiftCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + LeftShiftCompoundAssignmentOperator() { this.getName() = "<<=" } + + override string getAPrimaryQlClass() { result = "LeftShiftCompoundAssignmentOperator" } +} + +/** + * A user-defined compound assignment right shift operator (`>>=`), for example + * + * ```csharp + * public void operator >>=(Widget w) { + * ... + * } + * ``` + */ +class RightShiftCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + RightShiftCompoundAssignmentOperator() { this.getName() = ">>=" } + + override string getAPrimaryQlClass() { result = "RightShiftCompoundAssignmentOperator" } +} + +/** + * A user-defined compound assignment unsigned right shift operator (`>>>=`), for example + * + * ```csharp + * public void operator >>>=(Widget w) { + * ... + * } + * ``` + */ +class UnsignedRightShiftCompoundAssignmentOperator extends CompoundAssignmentOperatorImpl { + UnsignedRightShiftCompoundAssignmentOperator() { this.getName() = ">>>=" } + + override string getAPrimaryQlClass() { result = "UnsignedRightShiftCompoundAssignmentOperator" } +} + /** * A local function, defined within the scope of another callable. * For example, `Fac` on lines 2--4 in diff --git a/csharp/ql/lib/semmle/code/csharp/Type.qll b/csharp/ql/lib/semmle/code/csharp/Type.qll index 54bbe9a6219f..7af167cd9bcb 100644 --- a/csharp/ql/lib/semmle/code/csharp/Type.qll +++ b/csharp/ql/lib/semmle/code/csharp/Type.qll @@ -1334,6 +1334,7 @@ class TypeMention extends @type_mention { * ```csharp * static class MyExtensions { * extension(string s) { ... } + * } * ``` */ class ExtensionType extends Parameterizable, @extension_type { diff --git a/csharp/ql/lib/semmle/code/csharp/dispatch/Dispatch.qll b/csharp/ql/lib/semmle/code/csharp/dispatch/Dispatch.qll index 6d535025a195..15a64d12b499 100644 --- a/csharp/ql/lib/semmle/code/csharp/dispatch/Dispatch.qll +++ b/csharp/ql/lib/semmle/code/csharp/dispatch/Dispatch.qll @@ -99,7 +99,11 @@ private module Internal { or ac instanceof AssignableWrite and isRead = false } or - TDispatchOperatorCall(OperatorCall oc) { not oc.isLateBound() } or + TDispatchOperatorCall(OperatorCall oc) { + not oc.isLateBound() and + not oc instanceof CompoundAssignmentOperatorCall + } or + TDispatchCompoundAssignmentOperatorCall(CompoundAssignmentOperatorCall caoc) or TDispatchReflectionCall(MethodCall mc, string name, Expr object, Expr qualifier, int args) { isReflectionCall(mc, name, object, qualifier, args) } or @@ -886,6 +890,20 @@ private module Internal { override Operator getAStaticTarget() { result = this.getCall().getTarget() } } + private class DispatchCompoundAssignmentOperatorCall extends DispatchOverridableCall, + TDispatchCompoundAssignmentOperatorCall + { + override CompoundAssignmentOperatorCall getCall() { + this = TDispatchCompoundAssignmentOperatorCall(result) + } + + override Expr getArgument(int i) { result = this.getCall().getArgument(i) } + + override Expr getQualifier() { result = this.getCall().getQualifier() } + + override Operator getAStaticTarget() { result = this.getCall().getTarget() } + } + /** * A call to an accessor. * diff --git a/csharp/ql/lib/semmle/code/csharp/exprs/Assignment.qll b/csharp/ql/lib/semmle/code/csharp/exprs/Assignment.qll index 8c7dd80da243..f65b13bf8ecb 100644 --- a/csharp/ql/lib/semmle/code/csharp/exprs/Assignment.qll +++ b/csharp/ql/lib/semmle/code/csharp/exprs/Assignment.qll @@ -94,13 +94,17 @@ class AssignOperation extends Assignment, @assign_op_expr { } /** - * A compound assignment operation that implicitly invokes an operator. - * For example, `x += y` assigns the result of `x + y` to `x`. + * A compound assignment operation that invokes an operator. + * + * (1) `x += y` invokes the compound assignment operator `+=` (if it exists). + * (2) `x += y` invokes the operator `+` and assigns `x + y` to `x`. * * Either an arithmetic assignment operation (`AssignArithmeticOperation`) or a bitwise * assignment operation (`AssignBitwiseOperation`). */ -class AssignCallOperation extends AssignOperation, OperatorCall, @assign_op_call_expr { +class AssignCallOperation extends AssignOperation, OperatorCall, QualifiableExpr, + @assign_op_call_expr +{ override string toString() { result = AssignOperation.super.toString() } } diff --git a/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll b/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll index 63bd0c18a75c..9dbf898e2864 100644 --- a/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll +++ b/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll @@ -529,6 +529,19 @@ class ExtensionOperatorCall extends OperatorCall { ExtensionOperatorCall() { this.getTarget() instanceof ExtensionOperator } override string getAPrimaryQlClass() { result = "ExtensionOperatorCall" } + + private predicate isOrdinaryStaticCall() { + not exists(Expr e | e = this.getChildExpr(-1) | not e instanceof TypeAccess) + } + + override Expr getArgument(int i) { + exists(int j | result = this.getChildExpr(j) | + i >= 0 and + if this.isOrdinaryStaticCall() or this.getTarget() instanceof CompoundAssignmentOperator + then j = i + else j = i - 1 + ) + } } /** @@ -557,6 +570,58 @@ class MutatorOperatorCall extends OperatorCall { predicate isPostfix() { mutator_invocation_mode(this, 2) } } +/** + * A call to a compound assignment operator, for example `this += other` + * on line 7 in + * + * ```csharp + * class A { + * public void operator +=(A other) { + * ... + * } + * + * public void Add(A other) { + * this += other; + * } + * } + * ``` + */ +class CompoundAssignmentOperatorCall extends AssignCallOperation { + CompoundAssignmentOperatorCall() { this.getTarget() instanceof CompoundAssignmentOperator } + + override Expr getArgument(int i) { result = this.getChildExpr(i + 1) and i >= 0 } + + /** Gets the qualifier of this compound assignment operator call. */ + override Expr getQualifier() { result = this.getChildExpr(0) } +} + +/** + * A call to a compound assignment extension operator, for example `s1 *= s2` on + * line 9 in + * + * ```csharp + * static class MyExtensions { + * extension(string s) { + * public void operator *=(string other) { ... } + * } + * } + * + * class A { + * void M(string s1, string s2) { + * s1 *= s2; + * } + * } + */ +class ExtensionCompoundAssignmentOperatorCall extends CompoundAssignmentOperatorCall, + ExtensionOperatorCall +{ + override Expr getArgument(int i) { result = ExtensionOperatorCall.super.getArgument(i) } + + override Expr getQualifier() { none() } + + override string getAPrimaryQlClass() { result = "ExtensionCompoundAssignmentOperatorCall" } +} + private class DelegateLikeCall_ = @delegate_invocation_expr or @function_pointer_invocation_expr; /** diff --git a/csharp/ql/lib/semmlecode.csharp.dbscheme b/csharp/ql/lib/semmlecode.csharp.dbscheme index 19b8cc3e2dc7..ea7ad33252e5 100644 --- a/csharp/ql/lib/semmlecode.csharp.dbscheme +++ b/csharp/ql/lib/semmlecode.csharp.dbscheme @@ -1338,7 +1338,8 @@ dynamic_member_name( @qualifiable_expr = @member_access_expr | @method_invocation_expr - | @element_access_expr; + | @element_access_expr + | @assign_op_call_expr; conditional_access( unique int id: @qualifiable_expr ref); diff --git a/csharp/ql/lib/upgrades/19b8cc3e2dc768d4cbc03d6e3773b709bbebd036/old.dbscheme b/csharp/ql/lib/upgrades/19b8cc3e2dc768d4cbc03d6e3773b709bbebd036/old.dbscheme new file mode 100644 index 000000000000..19b8cc3e2dc7 --- /dev/null +++ b/csharp/ql/lib/upgrades/19b8cc3e2dc768d4cbc03d6e3773b709bbebd036/old.dbscheme @@ -0,0 +1,1504 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#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.rsp` 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 +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_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( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string 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 +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * Overlay support + */ + +/** + * The CLI will automatically emit the tuple `databaseMetadata("isOverlay", "true")`, + * along with an `overlayChangedFiles` tuple for each new/modified/deleted file, + * when building an overlay database, and these can be used by the discard predicates. + */ +databaseMetadata( + string metadataKey : string ref, + string value : string ref +); + +overlayChangedFiles( + string path : string ref +); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +@locatable = @declaration_with_accessors | @callable_accessor | @declaration_or_directive + | @diagnostic | @extractor_message | @preprocessor_directive | @attribute | @type_mention | @type_parameter_constraints + | @declaration_with_accessors | @callable_accessor | @operator | @method + | @constructor | @destructor | @field | @local_variable | @parameter | @stmt | @expr + | @xmllocatable | @commentline | @commentblock | @asp_element + +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); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type +| 35 = @extension_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type | @extension_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extension_receiver_type( + unique int extension: @extension_type ref, + int receiver_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type | @extension_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, params/array = 3, this = 4, in = 5, ref readonly = 6 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +| 138 = @interpolated_string_insert_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_call_expr = @assign_arith_expr | @assign_bitwise_expr +@assign_op_expr = @assign_op_call_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@add_operation = @add_expr | @assign_add_expr; +@sub_operation = @sub_expr | @assign_sub_expr; +@mul_operation = @mul_expr | @assign_mul_expr; +@div_operation = @div_expr | @assign_div_expr; +@rem_operation = @rem_expr | @assign_rem_expr; +@and_operation = @bit_and_expr | @assign_and_expr; +@xor_operation = @bit_xor_expr | @assign_xor_expr; +@or_operation = @bit_or_expr | @assign_or_expr; +@lshift_operation = @lshift_expr | @assign_lshift_expr; +@rshift_operation = @rshift_expr | @assign_rshift_expr; +@urshift_operation = @urshift_expr | @assign_urshift_expr; +@null_coalescing_operation = @null_coalescing_expr | @assign_coalesce_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @assign_expr | @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@op_invoke_expr = @operator_invocation_expr | @assign_op_call_expr +@call = @method_invocation_expr | @constructor_init_expr | @op_invoke_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @op_invoke_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* 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; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); diff --git a/csharp/ql/lib/upgrades/19b8cc3e2dc768d4cbc03d6e3773b709bbebd036/semmlecode.csharp.dbscheme b/csharp/ql/lib/upgrades/19b8cc3e2dc768d4cbc03d6e3773b709bbebd036/semmlecode.csharp.dbscheme new file mode 100644 index 000000000000..ea7ad33252e5 --- /dev/null +++ b/csharp/ql/lib/upgrades/19b8cc3e2dc768d4cbc03d6e3773b709bbebd036/semmlecode.csharp.dbscheme @@ -0,0 +1,1505 @@ +/* This is a dummy line to alter the dbscheme, so we can make a database upgrade + * without actually changing any of the dbscheme predicates. It contains a date + * to allow for such updates in the future as well. + * + * 2021-07-14 + * + * DO NOT remove this comment carelessly, since it can revert the dbscheme back to a + * previously seen state (matching a previously seen SHA), which would make the upgrade + * mechanism not work properly. + */ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * csc f1.cs f2.cs f3.cs + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + unique int id : @compilation, + string cwd : string ref +); + +compilation_info( + int id : @compilation ref, + string info_key: string ref, + string info_value: string ref +) + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | --compiler + * 1 | *path to compiler* + * 2 | f1.cs + * 3 | f2.cs + * 4 | f3.cs + */ +#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.rsp` 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 +); + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.cs + * 1 | f2.cs + * 2 | f3.cs + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The references used by a compiler invocation. + * If `id` is for the compiler invocation + * + * csc f1.cs f2.cs f3.cs /r:ref1.dll /r:ref2.dll /r:ref3.dll + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | ref1.dll + * 1 | ref2.dll + * 2 | ref3.dll + */ +#keyset[id, num] +compilation_referencing_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( + unique int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location ref +); + +extractor_messages( + unique int id: @extractor_message, + int severity: int ref, + string origin : string ref, + string text : string ref, + string entity : string ref, + int location: @location ref, + string stack_trace : string 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 +); + +compilation_assembly( + unique int id : @compilation ref, + int assembly: @assembly ref +) + +// Populated by the CSV extractor +externalData( + int id: @externalDataElement, + string path: string ref, + int column: int ref, + string value: string ref); + +sourceLocationPrefix( + string prefix: string ref); + +/* + * Overlay support + */ + +/** + * The CLI will automatically emit the tuple `databaseMetadata("isOverlay", "true")`, + * along with an `overlayChangedFiles` tuple for each new/modified/deleted file, + * when building an overlay database, and these can be used by the discard predicates. + */ +databaseMetadata( + string metadataKey : string ref, + string value : string ref +); + +overlayChangedFiles( + string path : string ref +); + +/* + * C# dbscheme + */ + +/** ELEMENTS **/ + +@element = @declaration | @stmt | @expr | @modifier | @attribute | @namespace_declaration + | @using_directive | @type_parameter_constraints | @externalDataElement + | @xmllocatable | @asp_element | @namespace | @preprocessor_directive; + +@declaration = @callable | @generic | @assignable | @namespace; + +@named_element = @namespace | @declaration; + +@declaration_with_accessors = @property | @indexer | @event; + +@assignable = @variable | @assignable_with_accessors | @event; + +@assignable_with_accessors = @property | @indexer; + +@attributable = @assembly | @field | @parameter | @operator | @method | @constructor + | @destructor | @callable_accessor | @value_or_ref_type | @declaration_with_accessors + | @local_function | @lambda_expr; + +/** LOCATIONS, ASEMMBLIES, MODULES, FILES and FOLDERS **/ + +@location = @location_default | @assembly; + +@locatable = @declaration_with_accessors | @callable_accessor | @declaration_or_directive + | @diagnostic | @extractor_message | @preprocessor_directive | @attribute | @type_mention | @type_parameter_constraints + | @declaration_with_accessors | @callable_accessor | @operator | @method + | @constructor | @destructor | @field | @local_variable | @parameter | @stmt | @expr + | @xmllocatable | @commentline | @commentblock | @asp_element + +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); + +locations_mapped( + unique int id: @location_default ref, + int mapped_to: @location_default ref); + +@sourceline = @file | @callable | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref); + +assemblies( + unique int id: @assembly, + int file: @file ref, + string fullname: string ref, + string name: string ref, + string version: string ref); + +files( + unique int id: @file, + string name: string ref); + +folders( + unique int id: @folder, + string name: string ref); + +@container = @folder | @file ; + +containerparent( + int parent: @container ref, + unique int child: @container ref); + +file_extraction_mode( + unique int file: @file ref, + int mode: int ref + /* 0 = normal, 1 = standalone extractor */ + ); + +/** NAMESPACES **/ + +@type_container = @namespace | @type; + +namespaces( + unique int id: @namespace, + string name: string ref); + +namespace_declarations( + unique int id: @namespace_declaration, + int namespace_id: @namespace ref); + +namespace_declaration_location( + unique int id: @namespace_declaration ref, + int loc: @location ref); + +parent_namespace( + unique int child_id: @type_container ref, + int namespace_id: @namespace ref); + +@declaration_or_directive = @namespace_declaration | @type | @using_directive; + +parent_namespace_declaration( + int child_id: @declaration_or_directive ref, // cannot be unique because of partial classes + int namespace_id: @namespace_declaration ref); + +@using_directive = @using_namespace_directive | @using_static_directive; + +using_global( + unique int id: @using_directive ref +); + +using_namespace_directives( + unique int id: @using_namespace_directive, + int namespace_id: @namespace ref); + +using_static_directives( + unique int id: @using_static_directive, + int type_id: @type_or_ref ref); + +using_directive_location( + unique int id: @using_directive ref, + int loc: @location ref); + +@preprocessor_directive = @pragma_warning | @pragma_checksum | @directive_define | @directive_undefine | @directive_warning + | @directive_error | @directive_nullable | @directive_line | @directive_region | @directive_endregion | @directive_if + | @directive_elif | @directive_else | @directive_endif; + +@conditional_directive = @directive_if | @directive_elif; +@branch_directive = @directive_if | @directive_elif | @directive_else; + +directive_ifs( + unique int id: @directive_if, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref); /* 0: false, 1: true */ + +directive_elifs( + unique int id: @directive_elif, + int branchTaken: int ref, /* 0: false, 1: true */ + int conditionValue: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +directive_elses( + unique int id: @directive_else, + int branchTaken: int ref, /* 0: false, 1: true */ + int parent: @directive_if ref, + int index: int ref); + +#keyset[id, start] +directive_endifs( + unique int id: @directive_endif, + unique int start: @directive_if ref); + +directive_define_symbols( + unique int id: @define_symbol_expr ref, + string name: string ref); + +directive_regions( + unique int id: @directive_region, + string name: string ref); + +#keyset[id, start] +directive_endregions( + unique int id: @directive_endregion, + unique int start: @directive_region ref); + +directive_lines( + unique int id: @directive_line, + int kind: int ref); /* 0: default, 1: hidden, 2: numeric, 3: span */ + +directive_line_value( + unique int id: @directive_line ref, + int line: int ref); + +directive_line_file( + unique int id: @directive_line ref, + int file: @file ref); + +directive_line_offset( + unique int id: @directive_line ref, + int offset: int ref); + +directive_line_span( + unique int id: @directive_line ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref); + +directive_nullables( + unique int id: @directive_nullable, + int setting: int ref, /* 0: disable, 1: enable, 2: restore */ + int target: int ref); /* 0: none, 1: annotations, 2: warnings */ + +directive_warnings( + unique int id: @directive_warning, + string message: string ref); + +directive_errors( + unique int id: @directive_error, + string message: string ref); + +directive_undefines( + unique int id: @directive_undefine, + string name: string ref); + +directive_defines( + unique int id: @directive_define, + string name: string ref); + +pragma_checksums( + unique int id: @pragma_checksum, + int file: @file ref, + string guid: string ref, + string bytes: string ref); + +pragma_warnings( + unique int id: @pragma_warning, + int kind: int ref /* 0 = disable, 1 = restore */); + +#keyset[id, index] +pragma_warning_error_codes( + int id: @pragma_warning ref, + string errorCode: string ref, + int index: int ref); + +preprocessor_directive_location( + unique int id: @preprocessor_directive ref, + int loc: @location ref); + +preprocessor_directive_compilation( + int id: @preprocessor_directive ref, + int compilation: @compilation ref); + +preprocessor_directive_active( + unique int id: @preprocessor_directive ref, + int active: int ref); /* 0: false, 1: true */ + +/** TYPES **/ + +types( + unique int id: @type, + int kind: int ref, + string name: string ref); + +case @type.kind of + 1 = @bool_type +| 2 = @char_type +| 3 = @decimal_type +| 4 = @sbyte_type +| 5 = @short_type +| 6 = @int_type +| 7 = @long_type +| 8 = @byte_type +| 9 = @ushort_type +| 10 = @uint_type +| 11 = @ulong_type +| 12 = @float_type +| 13 = @double_type +| 14 = @enum_type +| 15 = @struct_type +| 17 = @class_type +| 19 = @interface_type +| 20 = @delegate_type +| 21 = @null_type +| 22 = @type_parameter +| 23 = @pointer_type +| 24 = @nullable_type +| 25 = @array_type +| 26 = @void_type +| 27 = @int_ptr_type +| 28 = @uint_ptr_type +| 29 = @dynamic_type +| 30 = @arglist_type +| 31 = @unknown_type +| 32 = @tuple_type +| 33 = @function_pointer_type +| 34 = @inline_array_type +| 35 = @extension_type + ; + +@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type; +@integral_type = @signed_integral_type | @unsigned_integral_type; +@signed_integral_type = @sbyte_type | @short_type | @int_type | @long_type; +@unsigned_integral_type = @byte_type | @ushort_type | @uint_type | @ulong_type; +@floating_point_type = @float_type | @double_type; +@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type + | @uint_ptr_type | @tuple_type | @void_type | @inline_array_type; +@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type + | @dynamic_type | @extension_type; +@value_or_ref_type = @value_type | @ref_type; + +typerefs( + unique int id: @typeref, + string name: string ref); + +typeref_type( + int id: @typeref ref, + unique int typeId: @type ref); + +@type_or_ref = @type | @typeref; + +array_element_type( + unique int array: @array_type ref, + int dimension: int ref, + int rank: int ref, + int element: @type_or_ref ref); + +nullable_underlying_type( + unique int nullable: @nullable_type ref, + int underlying: @type_or_ref ref); + +pointer_referent_type( + unique int pointer: @pointer_type ref, + int referent: @type_or_ref ref); + +enum_underlying_type( + unique int enum_id: @enum_type ref, + int underlying_type_id: @type_or_ref ref); + +delegate_return_type( + unique int delegate_id: @delegate_type ref, + int return_type_id: @type_or_ref ref); + +function_pointer_return_type( + unique int function_pointer_id: @function_pointer_type ref, + int return_type_id: @type_or_ref ref); + +extension_receiver_type( + unique int extension: @extension_type ref, + int receiver_type_id: @type_or_ref ref); + +extend( + int sub: @type ref, + int super: @type_or_ref ref); + +anonymous_types( + unique int id: @type ref); + +@interface_or_ref = @interface_type | @typeref; + +implement( + int sub: @type ref, + int super: @type_or_ref ref); + +type_location( + int id: @type ref, + int loc: @location ref); + +tuple_underlying_type( + unique int tuple: @tuple_type ref, + int struct: @type_or_ref ref); + +#keyset[tuple, index] +tuple_element( + int tuple: @tuple_type ref, + int index: int ref, + unique int field: @field ref); + +attributes( + unique int id: @attribute, + int kind: int ref, + int type_id: @type_or_ref ref, + int target: @attributable ref); + +case @attribute.kind of + 0 = @attribute_default +| 1 = @attribute_return +| 2 = @attribute_assembly +| 3 = @attribute_module +; + +attribute_location( + int id: @attribute ref, + int loc: @location ref); + +@type_mention_parent = @element | @type_mention; + +type_mention( + unique int id: @type_mention, + int type_id: @type_or_ref ref, + int parent: @type_mention_parent ref); + +type_mention_location( + unique int id: @type_mention ref, + int loc: @location ref); + +@has_type_annotation = @assignable | @type_parameter | @callable | @expr | @delegate_type | @generic | @function_pointer_type; + +/** + * A direct annotation on an entity, for example `string? x;`. + * + * Annotations: + * 2 = reftype is not annotated "!" + * 3 = reftype is annotated "?" + * 4 = readonly ref type / in parameter + * 5 = ref type parameter, return or local variable + * 6 = out parameter + * + * Note that the annotation depends on the element it annotates. + * @assignable: The annotation is on the type of the assignable, for example the variable type. + * @type_parameter: The annotation is on the reftype constraint + * @callable: The annotation is on the return type + * @array_type: The annotation is on the element type + */ +type_annotation(int id: @has_type_annotation ref, int annotation: int ref); + +nullability(unique int nullability: @nullability, int kind: int ref); + +case @nullability.kind of + 0 = @oblivious +| 1 = @not_annotated +| 2 = @annotated +; + +#keyset[parent, index] +nullability_parent(int nullability: @nullability ref, int index: int ref, int parent: @nullability ref) + +type_nullability(int id: @has_type_annotation ref, int nullability: @nullability ref); + +/** + * The nullable flow state of an expression, as determined by Roslyn. + * 0 = none (default, not populated) + * 1 = not null + * 2 = maybe null + */ +expr_flowstate(unique int id: @expr ref, int state: int ref); + +/** GENERICS **/ + +@generic = @type | @method | @local_function; + +type_parameters( + unique int id: @type_parameter ref, + int index: int ref, + int generic_id: @generic ref, + int variance: int ref /* none = 0, out = 1, in = 2 */); + +#keyset[constructed_id, index] +type_arguments( + int id: @type_or_ref ref, + int index: int ref, + int constructed_id: @generic_or_ref ref); + +@generic_or_ref = @generic | @typeref; + +constructed_generic( + unique int constructed: @generic ref, + int generic: @generic_or_ref ref); + +type_parameter_constraints( + unique int id: @type_parameter_constraints, + int param_id: @type_parameter ref); + +type_parameter_constraints_location( + int id: @type_parameter_constraints ref, + int loc: @location ref); + +general_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int kind: int ref /* class = 1, struct = 2, new = 3 */); + +specific_type_parameter_constraints( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref); + +specific_type_parameter_nullability( + int id: @type_parameter_constraints ref, + int base_id: @type_or_ref ref, + int nullability: @nullability ref); + +/** FUNCTION POINTERS */ + +function_pointer_calling_conventions( + int id: @function_pointer_type ref, + int kind: int ref); + +#keyset[id, index] +has_unmanaged_calling_conventions( + int id: @function_pointer_type ref, + int index: int ref, + int conv_id: @type_or_ref ref); + +/** MODIFIERS */ + +@modifiable = @modifiable_direct | @event_accessor; + +@modifiable_direct = @member | @accessor | @local_function | @anonymous_function_expr; + +modifiers( + unique int id: @modifier, + string name: string ref); + +has_modifiers( + int id: @modifiable_direct ref, + int mod_id: @modifier ref); + +/** MEMBERS **/ + +@member = @method | @constructor | @destructor | @field | @property | @event | @operator | @indexer | @type; + +@named_exprorstmt = @goto_stmt | @labeled_stmt | @expr; + +@virtualizable = @method | @property | @indexer | @event | @operator; + +exprorstmt_name( + unique int parent_id: @named_exprorstmt ref, + string name: string ref); + +nested_types( + unique int id: @type ref, + int declaring_type_id: @type ref, + int unbound_id: @type ref); + +properties( + unique int id: @property, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @property ref); + +property_location( + int id: @property ref, + int loc: @location ref); + +indexers( + unique int id: @indexer, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @indexer ref); + +indexer_location( + int id: @indexer ref, + int loc: @location ref); + +accessors( + unique int id: @accessor, + int kind: int ref, + string name: string ref, + int declaring_member_id: @member ref, + int unbound_id: @accessor ref); + +case @accessor.kind of + 1 = @getter +| 2 = @setter + ; + +init_only_accessors( + unique int id: @accessor ref); + +accessor_location( + int id: @accessor ref, + int loc: @location ref); + +events( + unique int id: @event, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @event ref); + +event_location( + int id: @event ref, + int loc: @location ref); + +event_accessors( + unique int id: @event_accessor, + int kind: int ref, + string name: string ref, + int declaring_event_id: @event ref, + int unbound_id: @event_accessor ref); + +case @event_accessor.kind of + 1 = @add_event_accessor +| 2 = @remove_event_accessor + ; + +event_accessor_location( + int id: @event_accessor ref, + int loc: @location ref); + +operators( + unique int id: @operator, + string name: string ref, + string symbol: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @operator ref); + +operator_location( + int id: @operator ref, + int loc: @location ref); + +constant_value( + int id: @variable ref, + string value: string ref); + +/** CALLABLES **/ + +@callable = @method | @constructor | @destructor | @operator | @callable_accessor | @anonymous_function_expr | @local_function; + +@callable_accessor = @accessor | @event_accessor; + +methods( + unique int id: @method, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @method ref); + +method_location( + int id: @method ref, + int loc: @location ref); + +constructors( + unique int id: @constructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @constructor ref); + +constructor_location( + int id: @constructor ref, + int loc: @location ref); + +destructors( + unique int id: @destructor, + string name: string ref, + int declaring_type_id: @type ref, + int unbound_id: @destructor ref); + +destructor_location( + int id: @destructor ref, + int loc: @location ref); + +overrides( + int id: @callable ref, + int base_id: @callable ref); + +explicitly_implements( + int id: @member ref, + int interface_id: @interface_or_ref ref); + +local_functions( + unique int id: @local_function, + string name: string ref, + int return_type: @type ref, + int unbound_id: @local_function ref); + +local_function_stmts( + unique int fn: @local_function_stmt ref, + int stmt: @local_function ref); + +/** VARIABLES **/ + +@variable = @local_scope_variable | @field; + +@local_scope_variable = @local_variable | @parameter; + +fields( + unique int id: @field, + int kind: int ref, + string name: string ref, + int declaring_type_id: @type ref, + int type_id: @type_or_ref ref, + int unbound_id: @field ref); + +case @field.kind of + 1 = @addressable_field +| 2 = @constant + ; + +field_location( + int id: @field ref, + int loc: @location ref); + +localvars( + unique int id: @local_variable, + int kind: int ref, + string name: string ref, + int implicitly_typed: int ref /* 0 = no, 1 = yes */, + int type_id: @type_or_ref ref, + int parent_id: @local_var_decl_expr ref); + +case @local_variable.kind of + 1 = @addressable_local_variable +| 2 = @local_constant +| 3 = @local_variable_ref + ; + +localvar_location( + unique int id: @local_variable ref, + int loc: @location ref); + +@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type | @extension_type; + +#keyset[name, parent_id] +#keyset[index, parent_id] +params( + unique int id: @parameter, + string name: string ref, + int type_id: @type_or_ref ref, + int index: int ref, + int mode: int ref, /* value = 0, ref = 1, out = 2, params/array = 3, this = 4, in = 5, ref readonly = 6 */ + int parent_id: @parameterizable ref, + int unbound_id: @parameter ref); + +param_location( + int id: @parameter ref, + int loc: @location ref); + +@has_scoped_annotation = @local_scope_variable + +scoped_annotation( + int id: @has_scoped_annotation ref, + int kind: int ref // scoped ref = 1, scoped value = 2 + ); + +/** STATEMENTS **/ + +@exprorstmt_parent = @control_flow_element | @top_level_exprorstmt_parent; + +statements( + unique int id: @stmt, + int kind: int ref); + +#keyset[index, parent] +stmt_parent( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_stmt_parent = @callable; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +stmt_parent_top_level( + unique int stmt: @stmt ref, + int index: int ref, + int parent: @top_level_stmt_parent ref); + +case @stmt.kind of + 1 = @block_stmt +| 2 = @expr_stmt +| 3 = @if_stmt +| 4 = @switch_stmt +| 5 = @while_stmt +| 6 = @do_stmt +| 7 = @for_stmt +| 8 = @foreach_stmt +| 9 = @break_stmt +| 10 = @continue_stmt +| 11 = @goto_stmt +| 12 = @goto_case_stmt +| 13 = @goto_default_stmt +| 14 = @throw_stmt +| 15 = @return_stmt +| 16 = @yield_stmt +| 17 = @try_stmt +| 18 = @checked_stmt +| 19 = @unchecked_stmt +| 20 = @lock_stmt +| 21 = @using_block_stmt +| 22 = @var_decl_stmt +| 23 = @const_decl_stmt +| 24 = @empty_stmt +| 25 = @unsafe_stmt +| 26 = @fixed_stmt +| 27 = @label_stmt +| 28 = @catch +| 29 = @case_stmt +| 30 = @local_function_stmt +| 31 = @using_decl_stmt + ; + +@using_stmt = @using_block_stmt | @using_decl_stmt; + +@labeled_stmt = @label_stmt | @case; + +@decl_stmt = @var_decl_stmt | @const_decl_stmt | @using_decl_stmt; + +@cond_stmt = @if_stmt | @switch_stmt; + +@loop_stmt = @while_stmt | @do_stmt | @for_stmt | @foreach_stmt; + +@jump_stmt = @break_stmt | @goto_any_stmt | @continue_stmt | @throw_stmt | @return_stmt + | @yield_stmt; + +@goto_any_stmt = @goto_default_stmt | @goto_case_stmt | @goto_stmt; + + +stmt_location( + unique int id: @stmt ref, + int loc: @location ref); + +catch_type( + unique int catch_id: @catch ref, + int type_id: @type_or_ref ref, + int kind: int ref /* explicit = 1, implicit = 2 */); + +foreach_stmt_info( + unique int id: @foreach_stmt ref, + int kind: int ref /* non-async = 1, async = 2 */); + +@foreach_symbol = @method | @property | @type_or_ref; + +#keyset[id, kind] +foreach_stmt_desugar( + int id: @foreach_stmt ref, + int symbol: @foreach_symbol ref, + int kind: int ref /* GetEnumeratorMethod = 1, CurrentProperty = 2, MoveNextMethod = 3, DisposeMethod = 4, ElementType = 5 */); + +/** EXPRESSIONS **/ + +expressions( + unique int id: @expr, + int kind: int ref, + int type_id: @type_or_ref ref); + +#keyset[index, parent] +expr_parent( + unique int expr: @expr ref, + int index: int ref, + int parent: @control_flow_element ref); + +@top_level_expr_parent = @attribute | @field | @property | @indexer | @parameter | @directive_if | @directive_elif; + +@top_level_exprorstmt_parent = @top_level_expr_parent | @top_level_stmt_parent; + +// [index, parent] is not a keyset because the same parent may be compiled multiple times +expr_parent_top_level( + unique int expr: @expr ref, + int index: int ref, + int parent: @top_level_exprorstmt_parent ref); + +case @expr.kind of +/* literal */ + 1 = @bool_literal_expr +| 2 = @char_literal_expr +| 3 = @decimal_literal_expr +| 4 = @int_literal_expr +| 5 = @long_literal_expr +| 6 = @uint_literal_expr +| 7 = @ulong_literal_expr +| 8 = @float_literal_expr +| 9 = @double_literal_expr +| 10 = @utf16_string_literal_expr +| 11 = @null_literal_expr +/* primary & unary */ +| 12 = @this_access_expr +| 13 = @base_access_expr +| 14 = @local_variable_access_expr +| 15 = @parameter_access_expr +| 16 = @field_access_expr +| 17 = @property_access_expr +| 18 = @method_access_expr +| 19 = @event_access_expr +| 20 = @indexer_access_expr +| 21 = @array_access_expr +| 22 = @type_access_expr +| 23 = @typeof_expr +| 24 = @method_invocation_expr +| 25 = @delegate_invocation_expr +| 26 = @operator_invocation_expr +| 27 = @cast_expr +| 28 = @object_creation_expr +| 29 = @explicit_delegate_creation_expr +| 30 = @implicit_delegate_creation_expr +| 31 = @array_creation_expr +| 32 = @default_expr +| 33 = @plus_expr +| 34 = @minus_expr +| 35 = @bit_not_expr +| 36 = @log_not_expr +| 37 = @post_incr_expr +| 38 = @post_decr_expr +| 39 = @pre_incr_expr +| 40 = @pre_decr_expr +/* multiplicative */ +| 41 = @mul_expr +| 42 = @div_expr +| 43 = @rem_expr +/* additive */ +| 44 = @add_expr +| 45 = @sub_expr +/* shift */ +| 46 = @lshift_expr +| 47 = @rshift_expr +/* relational */ +| 48 = @lt_expr +| 49 = @gt_expr +| 50 = @le_expr +| 51 = @ge_expr +/* equality */ +| 52 = @eq_expr +| 53 = @ne_expr +/* logical */ +| 54 = @bit_and_expr +| 55 = @bit_xor_expr +| 56 = @bit_or_expr +| 57 = @log_and_expr +| 58 = @log_or_expr +/* type testing */ +| 59 = @is_expr +| 60 = @as_expr +/* null coalescing */ +| 61 = @null_coalescing_expr +/* conditional */ +| 62 = @conditional_expr +/* assignment */ +| 63 = @simple_assign_expr +| 64 = @assign_add_expr +| 65 = @assign_sub_expr +| 66 = @assign_mul_expr +| 67 = @assign_div_expr +| 68 = @assign_rem_expr +| 69 = @assign_and_expr +| 70 = @assign_xor_expr +| 71 = @assign_or_expr +| 72 = @assign_lshift_expr +| 73 = @assign_rshift_expr +/* more */ +| 74 = @object_init_expr +| 75 = @collection_init_expr +| 76 = @array_init_expr +| 77 = @checked_expr +| 78 = @unchecked_expr +| 79 = @constructor_init_expr +| 80 = @add_event_expr +| 81 = @remove_event_expr +| 82 = @par_expr +| 83 = @local_var_decl_expr +| 84 = @lambda_expr +| 85 = @anonymous_method_expr +| 86 = @namespace_expr +/* dynamic */ +| 92 = @dynamic_element_access_expr +| 93 = @dynamic_member_access_expr +/* unsafe */ +| 100 = @pointer_indirection_expr +| 101 = @address_of_expr +| 102 = @sizeof_expr +/* async */ +| 103 = @await_expr +/* C# 6.0 */ +| 104 = @nameof_expr +| 105 = @interpolated_string_expr +| 106 = @unknown_expr +/* C# 7.0 */ +| 107 = @throw_expr +| 108 = @tuple_expr +| 109 = @local_function_invocation_expr +| 110 = @ref_expr +| 111 = @discard_expr +/* C# 8.0 */ +| 112 = @range_expr +| 113 = @index_expr +| 114 = @switch_expr +| 115 = @recursive_pattern_expr +| 116 = @property_pattern_expr +| 117 = @positional_pattern_expr +| 118 = @switch_case_expr +| 119 = @assign_coalesce_expr +| 120 = @suppress_nullable_warning_expr +| 121 = @namespace_access_expr +/* C# 9.0 */ +| 122 = @lt_pattern_expr +| 123 = @gt_pattern_expr +| 124 = @le_pattern_expr +| 125 = @ge_pattern_expr +| 126 = @not_pattern_expr +| 127 = @and_pattern_expr +| 128 = @or_pattern_expr +| 129 = @function_pointer_invocation_expr +| 130 = @with_expr +/* C# 11.0 */ +| 131 = @list_pattern_expr +| 132 = @slice_pattern_expr +| 133 = @urshift_expr +| 134 = @assign_urshift_expr +| 135 = @utf8_string_literal_expr +/* C# 12.0 */ +| 136 = @collection_expr +| 137 = @spread_element_expr +| 138 = @interpolated_string_insert_expr +/* Preprocessor */ +| 999 = @define_symbol_expr +; + +@switch = @switch_stmt | @switch_expr; +@case = @case_stmt | @switch_case_expr; +@pattern_match = @case | @is_expr; +@unary_pattern_expr = @not_pattern_expr; +@relational_pattern_expr = @gt_pattern_expr | @lt_pattern_expr | @ge_pattern_expr | @le_pattern_expr; +@binary_pattern_expr = @and_pattern_expr | @or_pattern_expr; + +@integer_literal_expr = @int_literal_expr | @long_literal_expr | @uint_literal_expr | @ulong_literal_expr; +@real_literal_expr = @float_literal_expr | @double_literal_expr | @decimal_literal_expr; +@string_literal_expr = @utf16_string_literal_expr | @utf8_string_literal_expr; +@literal_expr = @bool_literal_expr | @char_literal_expr | @integer_literal_expr | @real_literal_expr + | @string_literal_expr | @null_literal_expr; + +@assign_expr = @simple_assign_expr | @assign_op_expr | @local_var_decl_expr; +@assign_op_call_expr = @assign_arith_expr | @assign_bitwise_expr +@assign_op_expr = @assign_op_call_expr | @assign_event_expr | @assign_coalesce_expr; +@assign_event_expr = @add_event_expr | @remove_event_expr; + +@add_operation = @add_expr | @assign_add_expr; +@sub_operation = @sub_expr | @assign_sub_expr; +@mul_operation = @mul_expr | @assign_mul_expr; +@div_operation = @div_expr | @assign_div_expr; +@rem_operation = @rem_expr | @assign_rem_expr; +@and_operation = @bit_and_expr | @assign_and_expr; +@xor_operation = @bit_xor_expr | @assign_xor_expr; +@or_operation = @bit_or_expr | @assign_or_expr; +@lshift_operation = @lshift_expr | @assign_lshift_expr; +@rshift_operation = @rshift_expr | @assign_rshift_expr; +@urshift_operation = @urshift_expr | @assign_urshift_expr; +@null_coalescing_operation = @null_coalescing_expr | @assign_coalesce_expr; + +@assign_arith_expr = @assign_add_expr | @assign_sub_expr | @assign_mul_expr | @assign_div_expr + | @assign_rem_expr +@assign_bitwise_expr = @assign_and_expr | @assign_or_expr | @assign_xor_expr + | @assign_lshift_expr | @assign_rshift_expr | @assign_urshift_expr; + +@member_access_expr = @field_access_expr | @property_access_expr | @indexer_access_expr | @event_access_expr + | @method_access_expr | @type_access_expr | @dynamic_member_access_expr; +@access_expr = @member_access_expr | @this_access_expr | @base_access_expr | @assignable_access_expr | @namespace_access_expr; +@element_access_expr = @indexer_access_expr | @array_access_expr | @dynamic_element_access_expr; + +@local_variable_access = @local_variable_access_expr | @local_var_decl_expr; +@local_scope_variable_access_expr = @parameter_access_expr | @local_variable_access; +@variable_access_expr = @local_scope_variable_access_expr | @field_access_expr; + +@assignable_access_expr = @variable_access_expr | @property_access_expr | @element_access_expr + | @event_access_expr | @dynamic_member_access_expr; + +@objectorcollection_init_expr = @object_init_expr | @collection_init_expr; + +@delegate_creation_expr = @explicit_delegate_creation_expr | @implicit_delegate_creation_expr; + +@bin_arith_op_expr = @mul_expr | @div_expr | @rem_expr | @add_expr | @sub_expr; +@incr_op_expr = @pre_incr_expr | @post_incr_expr; +@decr_op_expr = @pre_decr_expr | @post_decr_expr; +@mut_op_expr = @incr_op_expr | @decr_op_expr; +@un_arith_op_expr = @plus_expr | @minus_expr | @mut_op_expr; +@arith_op_expr = @bin_arith_op_expr | @un_arith_op_expr; + +@ternary_log_op_expr = @conditional_expr; +@bin_log_op_expr = @log_and_expr | @log_or_expr | @null_coalescing_expr; +@un_log_op_expr = @log_not_expr; +@log_expr = @un_log_op_expr | @bin_log_op_expr | @ternary_log_op_expr; + +@bin_bit_op_expr = @bit_and_expr | @bit_or_expr | @bit_xor_expr | @lshift_expr + | @rshift_expr | @urshift_expr; +@un_bit_op_expr = @bit_not_expr; +@bit_expr = @un_bit_op_expr | @bin_bit_op_expr; + +@equality_op_expr = @eq_expr | @ne_expr; +@rel_op_expr = @gt_expr | @lt_expr| @ge_expr | @le_expr; +@comp_expr = @equality_op_expr | @rel_op_expr; + +@op_expr = @un_op | @bin_op | @ternary_op; + +@ternary_op = @ternary_log_op_expr; +@bin_op = @assign_expr | @bin_arith_op_expr | @bin_log_op_expr | @bin_bit_op_expr | @comp_expr; +@un_op = @un_arith_op_expr | @un_log_op_expr | @un_bit_op_expr | @sizeof_expr + | @pointer_indirection_expr | @address_of_expr; + +@anonymous_function_expr = @lambda_expr | @anonymous_method_expr; + +@op_invoke_expr = @operator_invocation_expr | @assign_op_call_expr +@call = @method_invocation_expr | @constructor_init_expr | @op_invoke_expr + | @delegate_invocation_expr | @object_creation_expr | @call_access_expr + | @local_function_invocation_expr | @function_pointer_invocation_expr; + +@call_access_expr = @property_access_expr | @event_access_expr | @indexer_access_expr; + +@late_bindable_expr = @dynamic_element_access_expr | @dynamic_member_access_expr + | @object_creation_expr | @method_invocation_expr | @op_invoke_expr; + +@throw_element = @throw_expr | @throw_stmt; + +@implicitly_typeable_object_creation_expr = @object_creation_expr | @explicit_delegate_creation_expr; + +implicitly_typed_array_creation( + unique int id: @array_creation_expr ref); + +explicitly_sized_array_creation( + unique int id: @array_creation_expr ref); + +stackalloc_array_creation( + unique int id: @array_creation_expr ref); + +implicitly_typed_object_creation( + unique int id: @implicitly_typeable_object_creation_expr ref); + +mutator_invocation_mode( + unique int id: @operator_invocation_expr ref, + int mode: int ref /* prefix = 1, postfix = 2*/); + +expr_value( + unique int id: @expr ref, + string value: string ref); + +expr_call( + unique int caller_id: @expr ref, + int target_id: @callable ref); + +expr_access( + unique int accesser_id: @access_expr ref, + int target_id: @accessible ref); + +@accessible = @method | @assignable | @local_function | @namespace; + +expr_location( + unique int id: @expr ref, + int loc: @location ref); + +dynamic_member_name( + unique int id: @late_bindable_expr ref, + string name: string ref); + +@qualifiable_expr = @member_access_expr + | @method_invocation_expr + | @element_access_expr + | @assign_op_call_expr; + +conditional_access( + unique int id: @qualifiable_expr ref); + +expr_argument( + unique int id: @expr ref, + int mode: int ref); + /* mode is the same as params: value = 0, ref = 1, out = 2 */ + +expr_argument_name( + unique int id: @expr ref, + string name: string ref); + +lambda_expr_return_type( + unique int id: @lambda_expr ref, + int type_id: @type_or_ref ref); + +/* Compiler generated */ + +compiler_generated(unique int id: @element ref); + +/** CONTROL/DATA FLOW **/ + +@control_flow_element = @stmt | @expr; + +/* 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; + +/* Comments */ + +commentline( + unique int id: @commentline, + int kind: int ref, + string text: string ref, + string rawtext: string ref); + +case @commentline.kind of + 0 = @singlelinecomment +| 1 = @xmldoccomment +| 2 = @multilinecomment; + +commentline_location( + unique int id: @commentline ref, + int loc: @location ref); + +commentblock( + unique int id : @commentblock); + +commentblock_location( + unique int id: @commentblock ref, + int loc: @location ref); + +commentblock_binding( + int id: @commentblock ref, + int entity: @element ref, + int bindtype: int ref); /* 0: Parent, 1: Best, 2: Before, 3: After */ + +commentblock_child( + int id: @commentblock ref, + int commentline: @commentline ref, + int index: int ref); + +/* ASP.NET */ + +case @asp_element.kind of + 0=@asp_close_tag +| 1=@asp_code +| 2=@asp_comment +| 3=@asp_data_binding +| 4=@asp_directive +| 5=@asp_open_tag +| 6=@asp_quoted_string +| 7=@asp_text +| 8=@asp_xml_directive; + +@asp_attribute = @asp_code | @asp_data_binding | @asp_quoted_string; + +asp_elements( + unique int id: @asp_element, + int kind: int ref, + int loc: @location ref); + +asp_comment_server(unique int comment: @asp_comment ref); +asp_code_inline(unique int code: @asp_code ref); +asp_directive_attribute( + int directive: @asp_directive ref, + int index: int ref, + string name: string ref, + int value: @asp_quoted_string ref); +asp_directive_name( + unique int directive: @asp_directive ref, + string name: string ref); +asp_element_body( + unique int element: @asp_element ref, + string body: string ref); +asp_tag_attribute( + int tag: @asp_open_tag ref, + int index: int ref, + string name: string ref, + int attribute: @asp_attribute ref); +asp_tag_name( + unique int tag: @asp_open_tag ref, + string name: string ref); +asp_tag_isempty(int tag: @asp_open_tag ref); diff --git a/csharp/ql/lib/upgrades/19b8cc3e2dc768d4cbc03d6e3773b709bbebd036/upgrade.properties b/csharp/ql/lib/upgrades/19b8cc3e2dc768d4cbc03d6e3773b709bbebd036/upgrade.properties new file mode 100644 index 000000000000..1a6c09d74158 --- /dev/null +++ b/csharp/ql/lib/upgrades/19b8cc3e2dc768d4cbc03d6e3773b709bbebd036/upgrade.properties @@ -0,0 +1,2 @@ +description: Add @assign_op_call_expr to @qualifiable_expr. +compatibility: full diff --git a/csharp/ql/test/library-tests/dataflow/extensions/ExtensionFlow.expected b/csharp/ql/test/library-tests/dataflow/extensions/ExtensionFlow.expected index 35a30ac1ffc9..62a8d64a2bf7 100644 --- a/csharp/ql/test/library-tests/dataflow/extensions/ExtensionFlow.expected +++ b/csharp/ql/test/library-tests/dataflow/extensions/ExtensionFlow.expected @@ -6,204 +6,234 @@ edges | extensions.cs:5:22:5:24 | obj : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | provenance | | | extensions.cs:5:22:5:24 | obj : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | provenance | | | extensions.cs:5:22:5:24 | obj : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | provenance | | -| extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:108:18:108:26 | access to property Prop1 : B | provenance | | -| extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:108:18:108:26 | access to property Prop1 : B | provenance | | -| extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | provenance | | -| extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | provenance | | +| extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:116:18:116:26 | access to property Prop1 : B | provenance | | +| extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:116:18:116:26 | access to property Prop1 : B | provenance | | +| extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:119:18:119:44 | call to extension accessor get_Prop1 : B | provenance | | +| extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:119:18:119:44 | call to extension accessor get_Prop1 : B | provenance | | | extensions.cs:13:13:13:15 | value : B | extensions.cs:15:24:15:28 | access to parameter value | provenance | | | extensions.cs:13:13:13:15 | value : B | extensions.cs:15:24:15:28 | access to parameter value | provenance | | -| extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:194:18:194:35 | access to property StaticProp1 : B | provenance | | -| extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:194:18:194:35 | access to property StaticProp1 : B | provenance | | -| extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | provenance | | -| extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | provenance | | +| extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:202:18:202:35 | access to property StaticProp1 : B | provenance | | +| extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:202:18:202:35 | access to property StaticProp1 : B | provenance | | +| extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:205:18:205:47 | call to extension accessor get_StaticProp1 : B | provenance | | +| extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:205:18:205:47 | call to extension accessor get_StaticProp1 : B | provenance | | | extensions.cs:38:13:38:15 | value : B | extensions.cs:40:24:40:28 | access to parameter value | provenance | | | extensions.cs:38:13:38:15 | value : B | extensions.cs:40:24:40:28 | access to parameter value | provenance | | -| extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:127:18:127:25 | call to method M1 : B | provenance | | -| extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:127:18:127:25 | call to method M1 : B | provenance | | -| extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:130:18:130:37 | call to method M1 : B | provenance | | -| extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:130:18:130:37 | call to method M1 : B | provenance | | +| extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:135:18:135:25 | call to method M1 : B | provenance | | +| extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:135:18:135:25 | call to method M1 : B | provenance | | +| extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:138:18:138:37 | call to method M1 : B | provenance | | +| extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:138:18:138:37 | call to method M1 : B | provenance | | | extensions.cs:59:48:59:48 | a : B | extensions.cs:61:20:61:20 | access to parameter a | provenance | | | extensions.cs:59:48:59:48 | a : B | extensions.cs:61:20:61:20 | access to parameter a | provenance | | -| extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:185:18:185:24 | call to operator - : B | provenance | | -| extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:185:18:185:24 | call to operator - : B | provenance | | -| extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:188:18:188:52 | call to operator - : B | provenance | | -| extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:188:18:188:52 | call to operator - : B | provenance | | +| extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:193:18:193:24 | call to operator - : B | provenance | | +| extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:193:18:193:24 | call to operator - : B | provenance | | +| extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:196:18:196:52 | call to operator - : B | provenance | | +| extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:196:18:196:52 | call to operator - : B | provenance | | | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | provenance | | | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | provenance | | | extensions.cs:76:17:76:17 | b : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | provenance | | | extensions.cs:76:17:76:17 | b : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | provenance | | -| extensions.cs:89:20:89:20 | t : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | provenance | | -| extensions.cs:89:20:89:20 | t : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | provenance | | -| extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | provenance | | -| extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | provenance | | -| extensions.cs:108:13:108:14 | access to local variable b1 : B | extensions.cs:109:14:109:15 | access to local variable b1 | provenance | | -| extensions.cs:108:13:108:14 | access to local variable b1 : B | extensions.cs:109:14:109:15 | access to local variable b1 | provenance | | -| extensions.cs:108:18:108:26 | access to property Prop1 : B | extensions.cs:108:13:108:14 | access to local variable b1 : B | provenance | | -| extensions.cs:108:18:108:26 | access to property Prop1 : B | extensions.cs:108:13:108:14 | access to local variable b1 : B | provenance | | -| extensions.cs:111:13:111:14 | access to local variable b2 : B | extensions.cs:112:14:112:15 | access to local variable b2 | provenance | | -| extensions.cs:111:13:111:14 | access to local variable b2 : B | extensions.cs:112:14:112:15 | access to local variable b2 | provenance | | -| extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | extensions.cs:111:13:111:14 | access to local variable b2 : B | provenance | | -| extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | extensions.cs:111:13:111:14 | access to local variable b2 : B | provenance | | -| extensions.cs:118:21:118:32 | call to method Source : B | extensions.cs:13:13:13:15 | value : B | provenance | | -| extensions.cs:118:21:118:32 | call to method Source : B | extensions.cs:13:13:13:15 | value : B | provenance | | -| extensions.cs:120:13:120:13 | access to local variable b : B | extensions.cs:121:37:121:37 | access to local variable b : B | provenance | | -| extensions.cs:120:13:120:13 | access to local variable b : B | extensions.cs:121:37:121:37 | access to local variable b : B | provenance | | -| extensions.cs:120:17:120:30 | call to method Source : B | extensions.cs:120:13:120:13 | access to local variable b : B | provenance | | -| extensions.cs:120:17:120:30 | call to method Source : B | extensions.cs:120:13:120:13 | access to local variable b : B | provenance | | -| extensions.cs:121:37:121:37 | access to local variable b : B | extensions.cs:13:13:13:15 | value : B | provenance | | -| extensions.cs:121:37:121:37 | access to local variable b : B | extensions.cs:13:13:13:15 | value : B | provenance | | -| extensions.cs:127:13:127:14 | access to local variable b1 : B | extensions.cs:128:14:128:15 | access to local variable b1 | provenance | | -| extensions.cs:127:13:127:14 | access to local variable b1 : B | extensions.cs:128:14:128:15 | access to local variable b1 | provenance | | -| extensions.cs:127:18:127:25 | call to method M1 : B | extensions.cs:127:13:127:14 | access to local variable b1 : B | provenance | | -| extensions.cs:127:18:127:25 | call to method M1 : B | extensions.cs:127:13:127:14 | access to local variable b1 : B | provenance | | -| extensions.cs:130:13:130:14 | access to local variable b2 : B | extensions.cs:131:14:131:15 | access to local variable b2 | provenance | | -| extensions.cs:130:13:130:14 | access to local variable b2 : B | extensions.cs:131:14:131:15 | access to local variable b2 | provenance | | -| extensions.cs:130:18:130:37 | call to method M1 : B | extensions.cs:130:13:130:14 | access to local variable b2 : B | provenance | | -| extensions.cs:130:18:130:37 | call to method M1 : B | extensions.cs:130:13:130:14 | access to local variable b2 : B | provenance | | -| extensions.cs:136:13:136:14 | access to local variable b1 : B | extensions.cs:137:9:137:10 | access to local variable b1 : B | provenance | | -| extensions.cs:136:13:136:14 | access to local variable b1 : B | extensions.cs:137:9:137:10 | access to local variable b1 : B | provenance | | -| extensions.cs:136:18:136:29 | call to method Source : B | extensions.cs:136:13:136:14 | access to local variable b1 : B | provenance | | -| extensions.cs:136:18:136:29 | call to method Source : B | extensions.cs:136:13:136:14 | access to local variable b1 : B | provenance | | -| extensions.cs:137:9:137:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | -| extensions.cs:137:9:137:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | -| extensions.cs:139:13:139:14 | access to local variable b2 : B | extensions.cs:140:25:140:26 | access to local variable b2 : B | provenance | | -| extensions.cs:139:13:139:14 | access to local variable b2 : B | extensions.cs:140:25:140:26 | access to local variable b2 : B | provenance | | -| extensions.cs:139:18:139:31 | call to method Source : B | extensions.cs:139:13:139:14 | access to local variable b2 : B | provenance | | -| extensions.cs:139:18:139:31 | call to method Source : B | extensions.cs:139:13:139:14 | access to local variable b2 : B | provenance | | -| extensions.cs:140:25:140:26 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | -| extensions.cs:140:25:140:26 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | -| extensions.cs:145:13:145:14 | access to local variable b1 : B | extensions.cs:146:18:146:19 | access to local variable b1 : B | provenance | | -| extensions.cs:145:13:145:14 | access to local variable b1 : B | extensions.cs:146:18:146:19 | access to local variable b1 : B | provenance | | -| extensions.cs:145:13:145:14 | access to local variable b1 : B | extensions.cs:149:34:149:35 | access to local variable b1 : B | provenance | | -| extensions.cs:145:13:145:14 | access to local variable b1 : B | extensions.cs:149:34:149:35 | access to local variable b1 : B | provenance | | -| extensions.cs:145:18:145:29 | call to method Source : B | extensions.cs:145:13:145:14 | access to local variable b1 : B | provenance | | -| extensions.cs:145:18:145:29 | call to method Source : B | extensions.cs:145:13:145:14 | access to local variable b1 : B | provenance | | -| extensions.cs:146:13:146:14 | access to local variable b2 : B | extensions.cs:147:14:147:15 | access to local variable b2 | provenance | | -| extensions.cs:146:13:146:14 | access to local variable b2 : B | extensions.cs:147:14:147:15 | access to local variable b2 | provenance | | -| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | -| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | -| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:146:18:146:24 | call to method B1 : B | provenance | | -| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:146:18:146:24 | call to method B1 : B | provenance | | -| extensions.cs:146:18:146:24 | call to method B1 : B | extensions.cs:146:13:146:14 | access to local variable b2 : B | provenance | | -| extensions.cs:146:18:146:24 | call to method B1 : B | extensions.cs:146:13:146:14 | access to local variable b2 : B | provenance | | -| extensions.cs:149:13:149:14 | access to local variable b3 : B | extensions.cs:150:14:150:15 | access to local variable b3 | provenance | | -| extensions.cs:149:13:149:14 | access to local variable b3 : B | extensions.cs:150:14:150:15 | access to local variable b3 | provenance | | -| extensions.cs:149:18:149:36 | call to method B1 : B | extensions.cs:149:13:149:14 | access to local variable b3 : B | provenance | | -| extensions.cs:149:18:149:36 | call to method B1 : B | extensions.cs:149:13:149:14 | access to local variable b3 : B | provenance | | -| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | -| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | -| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:149:18:149:36 | call to method B1 : B | provenance | | -| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:149:18:149:36 | call to method B1 : B | provenance | | -| extensions.cs:155:13:155:14 | access to local variable b1 : B | extensions.cs:156:18:156:19 | access to local variable b1 : B | provenance | | -| extensions.cs:155:13:155:14 | access to local variable b1 : B | extensions.cs:156:18:156:19 | access to local variable b1 : B | provenance | | -| extensions.cs:155:18:155:29 | call to method Source : B | extensions.cs:155:13:155:14 | access to local variable b1 : B | provenance | | -| extensions.cs:155:18:155:29 | call to method Source : B | extensions.cs:155:13:155:14 | access to local variable b1 : B | provenance | | -| extensions.cs:156:18:156:19 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | -| extensions.cs:156:18:156:19 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | -| extensions.cs:158:13:158:14 | access to local variable b3 : B | extensions.cs:159:41:159:42 | access to local variable b3 : B | provenance | | -| extensions.cs:158:13:158:14 | access to local variable b3 : B | extensions.cs:159:41:159:42 | access to local variable b3 : B | provenance | | -| extensions.cs:158:18:158:31 | call to method Source : B | extensions.cs:158:13:158:14 | access to local variable b3 : B | provenance | | -| extensions.cs:158:18:158:31 | call to method Source : B | extensions.cs:158:13:158:14 | access to local variable b3 : B | provenance | | -| extensions.cs:159:41:159:42 | access to local variable b3 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | -| extensions.cs:159:41:159:42 | access to local variable b3 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | -| extensions.cs:164:13:164:14 | access to local variable b1 : B | extensions.cs:165:9:165:10 | access to local variable b1 : B | provenance | | -| extensions.cs:164:13:164:14 | access to local variable b1 : B | extensions.cs:165:9:165:10 | access to local variable b1 : B | provenance | | -| extensions.cs:164:18:164:29 | call to method Source : B | extensions.cs:164:13:164:14 | access to local variable b1 : B | provenance | | -| extensions.cs:164:18:164:29 | call to method Source : B | extensions.cs:164:13:164:14 | access to local variable b1 : B | provenance | | -| extensions.cs:165:9:165:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | -| extensions.cs:165:9:165:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | -| extensions.cs:167:13:167:14 | access to local variable b2 : B | extensions.cs:168:32:168:33 | access to local variable b2 : B | provenance | | -| extensions.cs:167:13:167:14 | access to local variable b2 : B | extensions.cs:168:32:168:33 | access to local variable b2 : B | provenance | | -| extensions.cs:167:18:167:31 | call to method Source : B | extensions.cs:167:13:167:14 | access to local variable b2 : B | provenance | | -| extensions.cs:167:18:167:31 | call to method Source : B | extensions.cs:167:13:167:14 | access to local variable b2 : B | provenance | | -| extensions.cs:168:32:168:33 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | -| extensions.cs:168:32:168:33 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | -| extensions.cs:173:13:173:14 | access to local variable b1 : B | extensions.cs:175:18:175:19 | access to local variable b1 : B | provenance | | -| extensions.cs:173:13:173:14 | access to local variable b1 : B | extensions.cs:175:18:175:19 | access to local variable b1 : B | provenance | | -| extensions.cs:173:18:173:29 | call to method Source : B | extensions.cs:173:13:173:14 | access to local variable b1 : B | provenance | | -| extensions.cs:173:18:173:29 | call to method Source : B | extensions.cs:173:13:173:14 | access to local variable b1 : B | provenance | | -| extensions.cs:175:18:175:19 | access to local variable b1 : B | extensions.cs:59:48:59:48 | a : B | provenance | | -| extensions.cs:175:18:175:19 | access to local variable b1 : B | extensions.cs:59:48:59:48 | a : B | provenance | | -| extensions.cs:177:13:177:14 | access to local variable b4 : B | extensions.cs:178:43:178:44 | access to local variable b4 : B | provenance | | -| extensions.cs:177:13:177:14 | access to local variable b4 : B | extensions.cs:178:43:178:44 | access to local variable b4 : B | provenance | | -| extensions.cs:177:18:177:31 | call to method Source : B | extensions.cs:177:13:177:14 | access to local variable b4 : B | provenance | | -| extensions.cs:177:18:177:31 | call to method Source : B | extensions.cs:177:13:177:14 | access to local variable b4 : B | provenance | | -| extensions.cs:178:43:178:44 | access to local variable b4 : B | extensions.cs:59:48:59:48 | a : B | provenance | | -| extensions.cs:178:43:178:44 | access to local variable b4 : B | extensions.cs:59:48:59:48 | a : B | provenance | | -| extensions.cs:185:13:185:14 | access to local variable b3 : B | extensions.cs:186:14:186:15 | access to local variable b3 | provenance | | -| extensions.cs:185:13:185:14 | access to local variable b3 : B | extensions.cs:186:14:186:15 | access to local variable b3 | provenance | | -| extensions.cs:185:18:185:24 | call to operator - : B | extensions.cs:185:13:185:14 | access to local variable b3 : B | provenance | | -| extensions.cs:185:18:185:24 | call to operator - : B | extensions.cs:185:13:185:14 | access to local variable b3 : B | provenance | | -| extensions.cs:188:13:188:14 | access to local variable b4 : B | extensions.cs:189:14:189:15 | access to local variable b4 | provenance | | -| extensions.cs:188:13:188:14 | access to local variable b4 : B | extensions.cs:189:14:189:15 | access to local variable b4 | provenance | | -| extensions.cs:188:18:188:52 | call to operator - : B | extensions.cs:188:13:188:14 | access to local variable b4 : B | provenance | | -| extensions.cs:188:18:188:52 | call to operator - : B | extensions.cs:188:13:188:14 | access to local variable b4 : B | provenance | | -| extensions.cs:194:13:194:14 | access to local variable b1 : B | extensions.cs:195:14:195:15 | access to local variable b1 | provenance | | -| extensions.cs:194:13:194:14 | access to local variable b1 : B | extensions.cs:195:14:195:15 | access to local variable b1 | provenance | | -| extensions.cs:194:18:194:35 | access to property StaticProp1 : B | extensions.cs:194:13:194:14 | access to local variable b1 : B | provenance | | -| extensions.cs:194:18:194:35 | access to property StaticProp1 : B | extensions.cs:194:13:194:14 | access to local variable b1 : B | provenance | | -| extensions.cs:197:13:197:14 | access to local variable b2 : B | extensions.cs:198:14:198:15 | access to local variable b2 | provenance | | -| extensions.cs:197:13:197:14 | access to local variable b2 : B | extensions.cs:198:14:198:15 | access to local variable b2 | provenance | | -| extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | extensions.cs:197:13:197:14 | access to local variable b2 : B | provenance | | -| extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | extensions.cs:197:13:197:14 | access to local variable b2 : B | provenance | | -| extensions.cs:203:13:203:14 | access to local variable b1 : B | extensions.cs:204:30:204:31 | access to local variable b1 : B | provenance | | -| extensions.cs:203:13:203:14 | access to local variable b1 : B | extensions.cs:204:30:204:31 | access to local variable b1 : B | provenance | | -| extensions.cs:203:18:203:30 | call to method Source : B | extensions.cs:203:13:203:14 | access to local variable b1 : B | provenance | | -| extensions.cs:203:18:203:30 | call to method Source : B | extensions.cs:203:13:203:14 | access to local variable b1 : B | provenance | | -| extensions.cs:204:30:204:31 | access to local variable b1 : B | extensions.cs:38:13:38:15 | value : B | provenance | | -| extensions.cs:204:30:204:31 | access to local variable b1 : B | extensions.cs:38:13:38:15 | value : B | provenance | | -| extensions.cs:206:13:206:14 | access to local variable b2 : B | extensions.cs:207:38:207:39 | access to local variable b2 : B | provenance | | -| extensions.cs:206:13:206:14 | access to local variable b2 : B | extensions.cs:207:38:207:39 | access to local variable b2 : B | provenance | | -| extensions.cs:206:18:206:31 | call to method Source : B | extensions.cs:206:13:206:14 | access to local variable b2 : B | provenance | | -| extensions.cs:206:18:206:31 | call to method Source : B | extensions.cs:206:13:206:14 | access to local variable b2 : B | provenance | | -| extensions.cs:207:38:207:39 | access to local variable b2 : B | extensions.cs:38:13:38:15 | value : B | provenance | | -| extensions.cs:207:38:207:39 | access to local variable b2 : B | extensions.cs:38:13:38:15 | value : B | provenance | | -| extensions.cs:212:13:212:14 | access to local variable b1 : B | extensions.cs:213:9:213:10 | access to local variable b1 : B | provenance | | -| extensions.cs:212:13:212:14 | access to local variable b1 : B | extensions.cs:213:9:213:10 | access to local variable b1 : B | provenance | | -| extensions.cs:212:18:212:30 | call to method Source : B | extensions.cs:212:13:212:14 | access to local variable b1 : B | provenance | | -| extensions.cs:212:18:212:30 | call to method Source : B | extensions.cs:212:13:212:14 | access to local variable b1 : B | provenance | | -| extensions.cs:213:9:213:10 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | -| extensions.cs:213:9:213:10 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | -| extensions.cs:215:13:215:14 | access to local variable b2 : B | extensions.cs:216:25:216:26 | access to local variable b2 : B | provenance | | -| extensions.cs:215:13:215:14 | access to local variable b2 : B | extensions.cs:216:25:216:26 | access to local variable b2 : B | provenance | | -| extensions.cs:215:18:215:31 | call to method Source : B | extensions.cs:215:13:215:14 | access to local variable b2 : B | provenance | | -| extensions.cs:215:18:215:31 | call to method Source : B | extensions.cs:215:13:215:14 | access to local variable b2 : B | provenance | | -| extensions.cs:216:25:216:26 | access to local variable b2 : B | extensions.cs:76:17:76:17 | b : B | provenance | | -| extensions.cs:216:25:216:26 | access to local variable b2 : B | extensions.cs:76:17:76:17 | b : B | provenance | | -| extensions.cs:221:13:221:14 | access to local variable b1 : B | extensions.cs:222:9:222:10 | access to local variable b1 : B | provenance | | -| extensions.cs:221:13:221:14 | access to local variable b1 : B | extensions.cs:222:9:222:10 | access to local variable b1 : B | provenance | | -| extensions.cs:221:18:221:30 | call to method Source : B | extensions.cs:221:13:221:14 | access to local variable b1 : B | provenance | | -| extensions.cs:221:18:221:30 | call to method Source : B | extensions.cs:221:13:221:14 | access to local variable b1 : B | provenance | | -| extensions.cs:222:9:222:10 | access to local variable b1 : B | extensions.cs:89:20:89:20 | t : B | provenance | | -| extensions.cs:222:9:222:10 | access to local variable b1 : B | extensions.cs:89:20:89:20 | t : B | provenance | | -| extensions.cs:224:13:224:14 | access to local variable b2 : B | extensions.cs:225:32:225:33 | access to local variable b2 : B | provenance | | -| extensions.cs:224:13:224:14 | access to local variable b2 : B | extensions.cs:225:32:225:33 | access to local variable b2 : B | provenance | | -| extensions.cs:224:18:224:31 | call to method Source : B | extensions.cs:224:13:224:14 | access to local variable b2 : B | provenance | | -| extensions.cs:224:18:224:31 | call to method Source : B | extensions.cs:224:13:224:14 | access to local variable b2 : B | provenance | | -| extensions.cs:225:32:225:33 | access to local variable b2 : B | extensions.cs:89:20:89:20 | t : B | provenance | | -| extensions.cs:225:32:225:33 | access to local variable b2 : B | extensions.cs:89:20:89:20 | t : B | provenance | | -| extensions.cs:231:13:231:14 | access to local variable b1 : B | extensions.cs:232:32:232:33 | access to local variable b1 : B | provenance | | -| extensions.cs:231:13:231:14 | access to local variable b1 : B | extensions.cs:232:32:232:33 | access to local variable b1 : B | provenance | | -| extensions.cs:231:13:231:14 | access to local variable b1 : B | extensions.cs:235:46:235:47 | access to local variable b1 : B | provenance | | -| extensions.cs:231:13:231:14 | access to local variable b1 : B | extensions.cs:235:46:235:47 | access to local variable b1 : B | provenance | | -| extensions.cs:231:18:231:30 | call to method Source : B | extensions.cs:231:13:231:14 | access to local variable b1 : B | provenance | | -| extensions.cs:231:18:231:30 | call to method Source : B | extensions.cs:231:13:231:14 | access to local variable b1 : B | provenance | | -| extensions.cs:232:13:232:14 | access to local variable b2 : B | extensions.cs:233:14:233:15 | access to local variable b2 | provenance | | -| extensions.cs:232:13:232:14 | access to local variable b2 : B | extensions.cs:233:14:233:15 | access to local variable b2 | provenance | | -| extensions.cs:232:18:232:34 | call to method GenericM2 : B | extensions.cs:232:13:232:14 | access to local variable b2 : B | provenance | | -| extensions.cs:232:18:232:34 | call to method GenericM2 : B | extensions.cs:232:13:232:14 | access to local variable b2 : B | provenance | | -| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | provenance | | -| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | provenance | | -| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:232:18:232:34 | call to method GenericM2 : B | provenance | | -| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:232:18:232:34 | call to method GenericM2 : B | provenance | | -| extensions.cs:235:13:235:14 | access to local variable b3 : B | extensions.cs:236:14:236:15 | access to local variable b3 | provenance | | -| extensions.cs:235:13:235:14 | access to local variable b3 : B | extensions.cs:236:14:236:15 | access to local variable b3 | provenance | | -| extensions.cs:235:18:235:48 | call to method GenericM2 : B | extensions.cs:235:13:235:14 | access to local variable b3 : B | provenance | | -| extensions.cs:235:18:235:48 | call to method GenericM2 : B | extensions.cs:235:13:235:14 | access to local variable b3 : B | provenance | | -| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | provenance | | -| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | provenance | | -| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:235:18:235:48 | call to method GenericM2 : B | provenance | | -| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:235:18:235:48 | call to method GenericM2 : B | provenance | | +| extensions.cs:91:35:91:36 | c1 : C [property Prop] : Object | extensions.cs:93:22:93:23 | access to parameter c1 : C [property Prop] : Object | provenance | | +| extensions.cs:91:35:91:36 | c1 : C [property Prop] : Object | extensions.cs:93:22:93:23 | access to parameter c1 : C [property Prop] : Object | provenance | | +| extensions.cs:93:13:93:13 | [post] access to extension synthetic parameter c : C [property Prop] : Object | extensions.cs:89:17:89:17 | c [Return] : C [property Prop] : Object | provenance | | +| extensions.cs:93:13:93:13 | [post] access to extension synthetic parameter c : C [property Prop] : Object | extensions.cs:89:17:89:17 | c [Return] : C [property Prop] : Object | provenance | | +| extensions.cs:93:22:93:23 | access to parameter c1 : C [property Prop] : Object | extensions.cs:93:22:93:28 | access to property Prop : Object | provenance | | +| extensions.cs:93:22:93:23 | access to parameter c1 : C [property Prop] : Object | extensions.cs:93:22:93:28 | access to property Prop : Object | provenance | | +| extensions.cs:93:22:93:28 | access to property Prop : Object | extensions.cs:93:13:93:13 | [post] access to extension synthetic parameter c : C [property Prop] : Object | provenance | | +| extensions.cs:93:22:93:28 | access to property Prop : Object | extensions.cs:93:13:93:13 | [post] access to extension synthetic parameter c : C [property Prop] : Object | provenance | | +| extensions.cs:97:20:97:20 | t : B | extensions.cs:101:20:101:20 | access to extension synthetic parameter t | provenance | | +| extensions.cs:97:20:97:20 | t : B | extensions.cs:101:20:101:20 | access to extension synthetic parameter t | provenance | | +| extensions.cs:104:33:104:37 | other : B | extensions.cs:106:20:106:24 | access to parameter other : B | provenance | | +| extensions.cs:104:33:104:37 | other : B | extensions.cs:106:20:106:24 | access to parameter other : B | provenance | | +| extensions.cs:116:13:116:14 | access to local variable b1 : B | extensions.cs:117:14:117:15 | access to local variable b1 | provenance | | +| extensions.cs:116:13:116:14 | access to local variable b1 : B | extensions.cs:117:14:117:15 | access to local variable b1 | provenance | | +| extensions.cs:116:18:116:26 | access to property Prop1 : B | extensions.cs:116:13:116:14 | access to local variable b1 : B | provenance | | +| extensions.cs:116:18:116:26 | access to property Prop1 : B | extensions.cs:116:13:116:14 | access to local variable b1 : B | provenance | | +| extensions.cs:119:13:119:14 | access to local variable b2 : B | extensions.cs:120:14:120:15 | access to local variable b2 | provenance | | +| extensions.cs:119:13:119:14 | access to local variable b2 : B | extensions.cs:120:14:120:15 | access to local variable b2 | provenance | | +| extensions.cs:119:18:119:44 | call to extension accessor get_Prop1 : B | extensions.cs:119:13:119:14 | access to local variable b2 : B | provenance | | +| extensions.cs:119:18:119:44 | call to extension accessor get_Prop1 : B | extensions.cs:119:13:119:14 | access to local variable b2 : B | provenance | | +| extensions.cs:126:21:126:32 | call to method Source : B | extensions.cs:13:13:13:15 | value : B | provenance | | +| extensions.cs:126:21:126:32 | call to method Source : B | extensions.cs:13:13:13:15 | value : B | provenance | | +| extensions.cs:128:13:128:13 | access to local variable b : B | extensions.cs:129:37:129:37 | access to local variable b : B | provenance | | +| extensions.cs:128:13:128:13 | access to local variable b : B | extensions.cs:129:37:129:37 | access to local variable b : B | provenance | | +| extensions.cs:128:17:128:30 | call to method Source : B | extensions.cs:128:13:128:13 | access to local variable b : B | provenance | | +| extensions.cs:128:17:128:30 | call to method Source : B | extensions.cs:128:13:128:13 | access to local variable b : B | provenance | | +| extensions.cs:129:37:129:37 | access to local variable b : B | extensions.cs:13:13:13:15 | value : B | provenance | | +| extensions.cs:129:37:129:37 | access to local variable b : B | extensions.cs:13:13:13:15 | value : B | provenance | | +| extensions.cs:135:13:135:14 | access to local variable b1 : B | extensions.cs:136:14:136:15 | access to local variable b1 | provenance | | +| extensions.cs:135:13:135:14 | access to local variable b1 : B | extensions.cs:136:14:136:15 | access to local variable b1 | provenance | | +| extensions.cs:135:18:135:25 | call to method M1 : B | extensions.cs:135:13:135:14 | access to local variable b1 : B | provenance | | +| extensions.cs:135:18:135:25 | call to method M1 : B | extensions.cs:135:13:135:14 | access to local variable b1 : B | provenance | | +| extensions.cs:138:13:138:14 | access to local variable b2 : B | extensions.cs:139:14:139:15 | access to local variable b2 | provenance | | +| extensions.cs:138:13:138:14 | access to local variable b2 : B | extensions.cs:139:14:139:15 | access to local variable b2 | provenance | | +| extensions.cs:138:18:138:37 | call to method M1 : B | extensions.cs:138:13:138:14 | access to local variable b2 : B | provenance | | +| extensions.cs:138:18:138:37 | call to method M1 : B | extensions.cs:138:13:138:14 | access to local variable b2 : B | provenance | | +| extensions.cs:144:13:144:14 | access to local variable b1 : B | extensions.cs:145:9:145:10 | access to local variable b1 : B | provenance | | +| extensions.cs:144:13:144:14 | access to local variable b1 : B | extensions.cs:145:9:145:10 | access to local variable b1 : B | provenance | | +| extensions.cs:144:18:144:29 | call to method Source : B | extensions.cs:144:13:144:14 | access to local variable b1 : B | provenance | | +| extensions.cs:144:18:144:29 | call to method Source : B | extensions.cs:144:13:144:14 | access to local variable b1 : B | provenance | | +| extensions.cs:145:9:145:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:145:9:145:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:147:13:147:14 | access to local variable b2 : B | extensions.cs:148:25:148:26 | access to local variable b2 : B | provenance | | +| extensions.cs:147:13:147:14 | access to local variable b2 : B | extensions.cs:148:25:148:26 | access to local variable b2 : B | provenance | | +| extensions.cs:147:18:147:31 | call to method Source : B | extensions.cs:147:13:147:14 | access to local variable b2 : B | provenance | | +| extensions.cs:147:18:147:31 | call to method Source : B | extensions.cs:147:13:147:14 | access to local variable b2 : B | provenance | | +| extensions.cs:148:25:148:26 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:148:25:148:26 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:153:13:153:14 | access to local variable b1 : B | extensions.cs:154:18:154:19 | access to local variable b1 : B | provenance | | +| extensions.cs:153:13:153:14 | access to local variable b1 : B | extensions.cs:154:18:154:19 | access to local variable b1 : B | provenance | | +| extensions.cs:153:13:153:14 | access to local variable b1 : B | extensions.cs:157:34:157:35 | access to local variable b1 : B | provenance | | +| extensions.cs:153:13:153:14 | access to local variable b1 : B | extensions.cs:157:34:157:35 | access to local variable b1 : B | provenance | | +| extensions.cs:153:18:153:29 | call to method Source : B | extensions.cs:153:13:153:14 | access to local variable b1 : B | provenance | | +| extensions.cs:153:18:153:29 | call to method Source : B | extensions.cs:153:13:153:14 | access to local variable b1 : B | provenance | | +| extensions.cs:154:13:154:14 | access to local variable b2 : B | extensions.cs:155:14:155:15 | access to local variable b2 | provenance | | +| extensions.cs:154:13:154:14 | access to local variable b2 : B | extensions.cs:155:14:155:15 | access to local variable b2 | provenance | | +| extensions.cs:154:18:154:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:154:18:154:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:154:18:154:19 | access to local variable b1 : B | extensions.cs:154:18:154:24 | call to method B1 : B | provenance | | +| extensions.cs:154:18:154:19 | access to local variable b1 : B | extensions.cs:154:18:154:24 | call to method B1 : B | provenance | | +| extensions.cs:154:18:154:24 | call to method B1 : B | extensions.cs:154:13:154:14 | access to local variable b2 : B | provenance | | +| extensions.cs:154:18:154:24 | call to method B1 : B | extensions.cs:154:13:154:14 | access to local variable b2 : B | provenance | | +| extensions.cs:157:13:157:14 | access to local variable b3 : B | extensions.cs:158:14:158:15 | access to local variable b3 | provenance | | +| extensions.cs:157:13:157:14 | access to local variable b3 : B | extensions.cs:158:14:158:15 | access to local variable b3 | provenance | | +| extensions.cs:157:18:157:36 | call to method B1 : B | extensions.cs:157:13:157:14 | access to local variable b3 : B | provenance | | +| extensions.cs:157:18:157:36 | call to method B1 : B | extensions.cs:157:13:157:14 | access to local variable b3 : B | provenance | | +| extensions.cs:157:34:157:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:157:34:157:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:157:34:157:35 | access to local variable b1 : B | extensions.cs:157:18:157:36 | call to method B1 : B | provenance | | +| extensions.cs:157:34:157:35 | access to local variable b1 : B | extensions.cs:157:18:157:36 | call to method B1 : B | provenance | | +| extensions.cs:163:13:163:14 | access to local variable b1 : B | extensions.cs:164:18:164:19 | access to local variable b1 : B | provenance | | +| extensions.cs:163:13:163:14 | access to local variable b1 : B | extensions.cs:164:18:164:19 | access to local variable b1 : B | provenance | | +| extensions.cs:163:18:163:29 | call to method Source : B | extensions.cs:163:13:163:14 | access to local variable b1 : B | provenance | | +| extensions.cs:163:18:163:29 | call to method Source : B | extensions.cs:163:13:163:14 | access to local variable b1 : B | provenance | | +| extensions.cs:164:18:164:19 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:164:18:164:19 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:166:13:166:14 | access to local variable b3 : B | extensions.cs:167:41:167:42 | access to local variable b3 : B | provenance | | +| extensions.cs:166:13:166:14 | access to local variable b3 : B | extensions.cs:167:41:167:42 | access to local variable b3 : B | provenance | | +| extensions.cs:166:18:166:31 | call to method Source : B | extensions.cs:166:13:166:14 | access to local variable b3 : B | provenance | | +| extensions.cs:166:18:166:31 | call to method Source : B | extensions.cs:166:13:166:14 | access to local variable b3 : B | provenance | | +| extensions.cs:167:41:167:42 | access to local variable b3 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:167:41:167:42 | access to local variable b3 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:172:13:172:14 | access to local variable b1 : B | extensions.cs:173:9:173:10 | access to local variable b1 : B | provenance | | +| extensions.cs:172:13:172:14 | access to local variable b1 : B | extensions.cs:173:9:173:10 | access to local variable b1 : B | provenance | | +| extensions.cs:172:18:172:29 | call to method Source : B | extensions.cs:172:13:172:14 | access to local variable b1 : B | provenance | | +| extensions.cs:172:18:172:29 | call to method Source : B | extensions.cs:172:13:172:14 | access to local variable b1 : B | provenance | | +| extensions.cs:173:9:173:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:173:9:173:10 | access to local variable b1 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:175:13:175:14 | access to local variable b2 : B | extensions.cs:176:32:176:33 | access to local variable b2 : B | provenance | | +| extensions.cs:175:13:175:14 | access to local variable b2 : B | extensions.cs:176:32:176:33 | access to local variable b2 : B | provenance | | +| extensions.cs:175:18:175:31 | call to method Source : B | extensions.cs:175:13:175:14 | access to local variable b2 : B | provenance | | +| extensions.cs:175:18:175:31 | call to method Source : B | extensions.cs:175:13:175:14 | access to local variable b2 : B | provenance | | +| extensions.cs:176:32:176:33 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:176:32:176:33 | access to local variable b2 : B | extensions.cs:5:22:5:24 | obj : B | provenance | | +| extensions.cs:181:13:181:14 | access to local variable b1 : B | extensions.cs:183:18:183:19 | access to local variable b1 : B | provenance | | +| extensions.cs:181:13:181:14 | access to local variable b1 : B | extensions.cs:183:18:183:19 | access to local variable b1 : B | provenance | | +| extensions.cs:181:18:181:29 | call to method Source : B | extensions.cs:181:13:181:14 | access to local variable b1 : B | provenance | | +| extensions.cs:181:18:181:29 | call to method Source : B | extensions.cs:181:13:181:14 | access to local variable b1 : B | provenance | | +| extensions.cs:183:18:183:19 | access to local variable b1 : B | extensions.cs:59:48:59:48 | a : B | provenance | | +| extensions.cs:183:18:183:19 | access to local variable b1 : B | extensions.cs:59:48:59:48 | a : B | provenance | | +| extensions.cs:185:13:185:14 | access to local variable b4 : B | extensions.cs:186:43:186:44 | access to local variable b4 : B | provenance | | +| extensions.cs:185:13:185:14 | access to local variable b4 : B | extensions.cs:186:43:186:44 | access to local variable b4 : B | provenance | | +| extensions.cs:185:18:185:31 | call to method Source : B | extensions.cs:185:13:185:14 | access to local variable b4 : B | provenance | | +| extensions.cs:185:18:185:31 | call to method Source : B | extensions.cs:185:13:185:14 | access to local variable b4 : B | provenance | | +| extensions.cs:186:43:186:44 | access to local variable b4 : B | extensions.cs:59:48:59:48 | a : B | provenance | | +| extensions.cs:186:43:186:44 | access to local variable b4 : B | extensions.cs:59:48:59:48 | a : B | provenance | | +| extensions.cs:193:13:193:14 | access to local variable b3 : B | extensions.cs:194:14:194:15 | access to local variable b3 | provenance | | +| extensions.cs:193:13:193:14 | access to local variable b3 : B | extensions.cs:194:14:194:15 | access to local variable b3 | provenance | | +| extensions.cs:193:18:193:24 | call to operator - : B | extensions.cs:193:13:193:14 | access to local variable b3 : B | provenance | | +| extensions.cs:193:18:193:24 | call to operator - : B | extensions.cs:193:13:193:14 | access to local variable b3 : B | provenance | | +| extensions.cs:196:13:196:14 | access to local variable b4 : B | extensions.cs:197:14:197:15 | access to local variable b4 | provenance | | +| extensions.cs:196:13:196:14 | access to local variable b4 : B | extensions.cs:197:14:197:15 | access to local variable b4 | provenance | | +| extensions.cs:196:18:196:52 | call to operator - : B | extensions.cs:196:13:196:14 | access to local variable b4 : B | provenance | | +| extensions.cs:196:18:196:52 | call to operator - : B | extensions.cs:196:13:196:14 | access to local variable b4 : B | provenance | | +| extensions.cs:202:13:202:14 | access to local variable b1 : B | extensions.cs:203:14:203:15 | access to local variable b1 | provenance | | +| extensions.cs:202:13:202:14 | access to local variable b1 : B | extensions.cs:203:14:203:15 | access to local variable b1 | provenance | | +| extensions.cs:202:18:202:35 | access to property StaticProp1 : B | extensions.cs:202:13:202:14 | access to local variable b1 : B | provenance | | +| extensions.cs:202:18:202:35 | access to property StaticProp1 : B | extensions.cs:202:13:202:14 | access to local variable b1 : B | provenance | | +| extensions.cs:205:13:205:14 | access to local variable b2 : B | extensions.cs:206:14:206:15 | access to local variable b2 | provenance | | +| extensions.cs:205:13:205:14 | access to local variable b2 : B | extensions.cs:206:14:206:15 | access to local variable b2 | provenance | | +| extensions.cs:205:18:205:47 | call to extension accessor get_StaticProp1 : B | extensions.cs:205:13:205:14 | access to local variable b2 : B | provenance | | +| extensions.cs:205:18:205:47 | call to extension accessor get_StaticProp1 : B | extensions.cs:205:13:205:14 | access to local variable b2 : B | provenance | | +| extensions.cs:211:13:211:14 | access to local variable b1 : B | extensions.cs:212:30:212:31 | access to local variable b1 : B | provenance | | +| extensions.cs:211:13:211:14 | access to local variable b1 : B | extensions.cs:212:30:212:31 | access to local variable b1 : B | provenance | | +| extensions.cs:211:18:211:30 | call to method Source : B | extensions.cs:211:13:211:14 | access to local variable b1 : B | provenance | | +| extensions.cs:211:18:211:30 | call to method Source : B | extensions.cs:211:13:211:14 | access to local variable b1 : B | provenance | | +| extensions.cs:212:30:212:31 | access to local variable b1 : B | extensions.cs:38:13:38:15 | value : B | provenance | | +| extensions.cs:212:30:212:31 | access to local variable b1 : B | extensions.cs:38:13:38:15 | value : B | provenance | | +| extensions.cs:214:13:214:14 | access to local variable b2 : B | extensions.cs:215:38:215:39 | access to local variable b2 : B | provenance | | +| extensions.cs:214:13:214:14 | access to local variable b2 : B | extensions.cs:215:38:215:39 | access to local variable b2 : B | provenance | | +| extensions.cs:214:18:214:31 | call to method Source : B | extensions.cs:214:13:214:14 | access to local variable b2 : B | provenance | | +| extensions.cs:214:18:214:31 | call to method Source : B | extensions.cs:214:13:214:14 | access to local variable b2 : B | provenance | | +| extensions.cs:215:38:215:39 | access to local variable b2 : B | extensions.cs:38:13:38:15 | value : B | provenance | | +| extensions.cs:215:38:215:39 | access to local variable b2 : B | extensions.cs:38:13:38:15 | value : B | provenance | | +| extensions.cs:220:13:220:14 | access to local variable b1 : B | extensions.cs:221:9:221:10 | access to local variable b1 : B | provenance | | +| extensions.cs:220:13:220:14 | access to local variable b1 : B | extensions.cs:221:9:221:10 | access to local variable b1 : B | provenance | | +| extensions.cs:220:18:220:30 | call to method Source : B | extensions.cs:220:13:220:14 | access to local variable b1 : B | provenance | | +| extensions.cs:220:18:220:30 | call to method Source : B | extensions.cs:220:13:220:14 | access to local variable b1 : B | provenance | | +| extensions.cs:221:9:221:10 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:221:9:221:10 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:223:13:223:14 | access to local variable b2 : B | extensions.cs:224:25:224:26 | access to local variable b2 : B | provenance | | +| extensions.cs:223:13:223:14 | access to local variable b2 : B | extensions.cs:224:25:224:26 | access to local variable b2 : B | provenance | | +| extensions.cs:223:18:223:31 | call to method Source : B | extensions.cs:223:13:223:14 | access to local variable b2 : B | provenance | | +| extensions.cs:223:18:223:31 | call to method Source : B | extensions.cs:223:13:223:14 | access to local variable b2 : B | provenance | | +| extensions.cs:224:25:224:26 | access to local variable b2 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:224:25:224:26 | access to local variable b2 : B | extensions.cs:76:17:76:17 | b : B | provenance | | +| extensions.cs:229:13:229:14 | access to local variable b1 : B | extensions.cs:230:9:230:10 | access to local variable b1 : B | provenance | | +| extensions.cs:229:13:229:14 | access to local variable b1 : B | extensions.cs:230:9:230:10 | access to local variable b1 : B | provenance | | +| extensions.cs:229:18:229:30 | call to method Source : B | extensions.cs:229:13:229:14 | access to local variable b1 : B | provenance | | +| extensions.cs:229:18:229:30 | call to method Source : B | extensions.cs:229:13:229:14 | access to local variable b1 : B | provenance | | +| extensions.cs:230:9:230:10 | access to local variable b1 : B | extensions.cs:97:20:97:20 | t : B | provenance | | +| extensions.cs:230:9:230:10 | access to local variable b1 : B | extensions.cs:97:20:97:20 | t : B | provenance | | +| extensions.cs:232:13:232:14 | access to local variable b2 : B | extensions.cs:233:32:233:33 | access to local variable b2 : B | provenance | | +| extensions.cs:232:13:232:14 | access to local variable b2 : B | extensions.cs:233:32:233:33 | access to local variable b2 : B | provenance | | +| extensions.cs:232:18:232:31 | call to method Source : B | extensions.cs:232:13:232:14 | access to local variable b2 : B | provenance | | +| extensions.cs:232:18:232:31 | call to method Source : B | extensions.cs:232:13:232:14 | access to local variable b2 : B | provenance | | +| extensions.cs:233:32:233:33 | access to local variable b2 : B | extensions.cs:97:20:97:20 | t : B | provenance | | +| extensions.cs:233:32:233:33 | access to local variable b2 : B | extensions.cs:97:20:97:20 | t : B | provenance | | +| extensions.cs:239:13:239:14 | access to local variable b1 : B | extensions.cs:240:32:240:33 | access to local variable b1 : B | provenance | | +| extensions.cs:239:13:239:14 | access to local variable b1 : B | extensions.cs:240:32:240:33 | access to local variable b1 : B | provenance | | +| extensions.cs:239:13:239:14 | access to local variable b1 : B | extensions.cs:243:46:243:47 | access to local variable b1 : B | provenance | | +| extensions.cs:239:13:239:14 | access to local variable b1 : B | extensions.cs:243:46:243:47 | access to local variable b1 : B | provenance | | +| extensions.cs:239:18:239:30 | call to method Source : B | extensions.cs:239:13:239:14 | access to local variable b1 : B | provenance | | +| extensions.cs:239:18:239:30 | call to method Source : B | extensions.cs:239:13:239:14 | access to local variable b1 : B | provenance | | +| extensions.cs:240:13:240:14 | access to local variable b2 : B | extensions.cs:241:14:241:15 | access to local variable b2 | provenance | | +| extensions.cs:240:13:240:14 | access to local variable b2 : B | extensions.cs:241:14:241:15 | access to local variable b2 | provenance | | +| extensions.cs:240:18:240:34 | call to method GenericM2 : B | extensions.cs:240:13:240:14 | access to local variable b2 : B | provenance | | +| extensions.cs:240:18:240:34 | call to method GenericM2 : B | extensions.cs:240:13:240:14 | access to local variable b2 : B | provenance | | +| extensions.cs:240:32:240:33 | access to local variable b1 : B | extensions.cs:104:33:104:37 | other : B | provenance | | +| extensions.cs:240:32:240:33 | access to local variable b1 : B | extensions.cs:104:33:104:37 | other : B | provenance | | +| extensions.cs:240:32:240:33 | access to local variable b1 : B | extensions.cs:240:18:240:34 | call to method GenericM2 : B | provenance | | +| extensions.cs:240:32:240:33 | access to local variable b1 : B | extensions.cs:240:18:240:34 | call to method GenericM2 : B | provenance | | +| extensions.cs:243:13:243:14 | access to local variable b3 : B | extensions.cs:244:14:244:15 | access to local variable b3 | provenance | | +| extensions.cs:243:13:243:14 | access to local variable b3 : B | extensions.cs:244:14:244:15 | access to local variable b3 | provenance | | +| extensions.cs:243:18:243:48 | call to method GenericM2 : B | extensions.cs:243:13:243:14 | access to local variable b3 : B | provenance | | +| extensions.cs:243:18:243:48 | call to method GenericM2 : B | extensions.cs:243:13:243:14 | access to local variable b3 : B | provenance | | +| extensions.cs:243:46:243:47 | access to local variable b1 : B | extensions.cs:104:33:104:37 | other : B | provenance | | +| extensions.cs:243:46:243:47 | access to local variable b1 : B | extensions.cs:104:33:104:37 | other : B | provenance | | +| extensions.cs:243:46:243:47 | access to local variable b1 : B | extensions.cs:243:18:243:48 | call to method GenericM2 : B | provenance | | +| extensions.cs:243:46:243:47 | access to local variable b1 : B | extensions.cs:243:18:243:48 | call to method GenericM2 : B | provenance | | +| extensions.cs:250:9:250:10 | [post] access to local variable c1 : C [property Prop] : Object | extensions.cs:252:15:252:16 | access to local variable c1 : C [property Prop] : Object | provenance | | +| extensions.cs:250:9:250:10 | [post] access to local variable c1 : C [property Prop] : Object | extensions.cs:252:15:252:16 | access to local variable c1 : C [property Prop] : Object | provenance | | +| extensions.cs:250:9:250:10 | [post] access to local variable c1 : C [property Prop] : Object | extensions.cs:256:54:256:55 | access to local variable c1 : C [property Prop] : Object | provenance | | +| extensions.cs:250:9:250:10 | [post] access to local variable c1 : C [property Prop] : Object | extensions.cs:256:54:256:55 | access to local variable c1 : C [property Prop] : Object | provenance | | +| extensions.cs:250:19:250:36 | call to method Source : Object | extensions.cs:250:9:250:10 | [post] access to local variable c1 : C [property Prop] : Object | provenance | | +| extensions.cs:250:19:250:36 | call to method Source : Object | extensions.cs:250:9:250:10 | [post] access to local variable c1 : C [property Prop] : Object | provenance | | +| extensions.cs:252:9:252:10 | [post] access to local variable c2 : C [property Prop] : Object | extensions.cs:253:14:253:15 | access to local variable c2 : C [property Prop] : Object | provenance | | +| extensions.cs:252:9:252:10 | [post] access to local variable c2 : C [property Prop] : Object | extensions.cs:253:14:253:15 | access to local variable c2 : C [property Prop] : Object | provenance | | +| extensions.cs:252:15:252:16 | access to local variable c1 : C [property Prop] : Object | extensions.cs:91:35:91:36 | c1 : C [property Prop] : Object | provenance | | +| extensions.cs:252:15:252:16 | access to local variable c1 : C [property Prop] : Object | extensions.cs:91:35:91:36 | c1 : C [property Prop] : Object | provenance | | +| extensions.cs:252:15:252:16 | access to local variable c1 : C [property Prop] : Object | extensions.cs:252:9:252:10 | [post] access to local variable c2 : C [property Prop] : Object | provenance | | +| extensions.cs:252:15:252:16 | access to local variable c1 : C [property Prop] : Object | extensions.cs:252:9:252:10 | [post] access to local variable c2 : C [property Prop] : Object | provenance | | +| extensions.cs:253:14:253:15 | access to local variable c2 : C [property Prop] : Object | extensions.cs:253:14:253:20 | access to property Prop | provenance | | +| extensions.cs:253:14:253:15 | access to local variable c2 : C [property Prop] : Object | extensions.cs:253:14:253:20 | access to property Prop | provenance | | +| extensions.cs:256:50:256:51 | [post] access to local variable c3 : C [property Prop] : Object | extensions.cs:257:14:257:15 | access to local variable c3 : C [property Prop] : Object | provenance | | +| extensions.cs:256:50:256:51 | [post] access to local variable c3 : C [property Prop] : Object | extensions.cs:257:14:257:15 | access to local variable c3 : C [property Prop] : Object | provenance | | +| extensions.cs:256:54:256:55 | access to local variable c1 : C [property Prop] : Object | extensions.cs:91:35:91:36 | c1 : C [property Prop] : Object | provenance | | +| extensions.cs:256:54:256:55 | access to local variable c1 : C [property Prop] : Object | extensions.cs:91:35:91:36 | c1 : C [property Prop] : Object | provenance | | +| extensions.cs:256:54:256:55 | access to local variable c1 : C [property Prop] : Object | extensions.cs:256:50:256:51 | [post] access to local variable c3 : C [property Prop] : Object | provenance | | +| extensions.cs:256:54:256:55 | access to local variable c1 : C [property Prop] : Object | extensions.cs:256:50:256:51 | [post] access to local variable c3 : C [property Prop] : Object | provenance | | +| extensions.cs:257:14:257:15 | access to local variable c3 : C [property Prop] : Object | extensions.cs:257:14:257:20 | access to property Prop | provenance | | +| extensions.cs:257:14:257:15 | access to local variable c3 : C [property Prop] : Object | extensions.cs:257:14:257:20 | access to property Prop | provenance | | nodes | extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B | | extensions.cs:5:22:5:24 | obj : B | semmle.label | obj : B | @@ -245,258 +275,296 @@ nodes | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | semmle.label | access to extension synthetic parameter b : B | | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | semmle.label | access to extension synthetic parameter b | | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | semmle.label | access to extension synthetic parameter b | -| extensions.cs:89:20:89:20 | t : B | semmle.label | t : B | -| extensions.cs:89:20:89:20 | t : B | semmle.label | t : B | -| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | semmle.label | access to extension synthetic parameter t | -| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | semmle.label | access to extension synthetic parameter t | -| extensions.cs:96:33:96:37 | other : B | semmle.label | other : B | -| extensions.cs:96:33:96:37 | other : B | semmle.label | other : B | -| extensions.cs:98:20:98:24 | access to parameter other : B | semmle.label | access to parameter other : B | -| extensions.cs:98:20:98:24 | access to parameter other : B | semmle.label | access to parameter other : B | -| extensions.cs:108:13:108:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:108:13:108:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:108:18:108:26 | access to property Prop1 : B | semmle.label | access to property Prop1 : B | -| extensions.cs:108:18:108:26 | access to property Prop1 : B | semmle.label | access to property Prop1 : B | -| extensions.cs:109:14:109:15 | access to local variable b1 | semmle.label | access to local variable b1 | -| extensions.cs:109:14:109:15 | access to local variable b1 | semmle.label | access to local variable b1 | -| extensions.cs:111:13:111:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:111:13:111:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | semmle.label | call to extension accessor get_Prop1 : B | -| extensions.cs:111:18:111:44 | call to extension accessor get_Prop1 : B | semmle.label | call to extension accessor get_Prop1 : B | -| extensions.cs:112:14:112:15 | access to local variable b2 | semmle.label | access to local variable b2 | -| extensions.cs:112:14:112:15 | access to local variable b2 | semmle.label | access to local variable b2 | -| extensions.cs:118:21:118:32 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:118:21:118:32 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:120:13:120:13 | access to local variable b : B | semmle.label | access to local variable b : B | -| extensions.cs:120:13:120:13 | access to local variable b : B | semmle.label | access to local variable b : B | -| extensions.cs:120:17:120:30 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:120:17:120:30 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:121:37:121:37 | access to local variable b : B | semmle.label | access to local variable b : B | -| extensions.cs:121:37:121:37 | access to local variable b : B | semmle.label | access to local variable b : B | -| extensions.cs:127:13:127:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:127:13:127:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:127:18:127:25 | call to method M1 : B | semmle.label | call to method M1 : B | -| extensions.cs:127:18:127:25 | call to method M1 : B | semmle.label | call to method M1 : B | -| extensions.cs:128:14:128:15 | access to local variable b1 | semmle.label | access to local variable b1 | -| extensions.cs:128:14:128:15 | access to local variable b1 | semmle.label | access to local variable b1 | -| extensions.cs:130:13:130:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:130:13:130:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:130:18:130:37 | call to method M1 : B | semmle.label | call to method M1 : B | -| extensions.cs:130:18:130:37 | call to method M1 : B | semmle.label | call to method M1 : B | -| extensions.cs:131:14:131:15 | access to local variable b2 | semmle.label | access to local variable b2 | -| extensions.cs:131:14:131:15 | access to local variable b2 | semmle.label | access to local variable b2 | -| extensions.cs:136:13:136:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:136:13:136:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:136:18:136:29 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:136:18:136:29 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:137:9:137:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:137:9:137:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:139:13:139:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:139:13:139:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:139:18:139:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:139:18:139:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:140:25:140:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:140:25:140:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:145:13:145:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:145:13:145:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:145:18:145:29 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:145:18:145:29 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:146:13:146:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:146:13:146:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:146:18:146:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:146:18:146:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:146:18:146:24 | call to method B1 : B | semmle.label | call to method B1 : B | -| extensions.cs:146:18:146:24 | call to method B1 : B | semmle.label | call to method B1 : B | -| extensions.cs:147:14:147:15 | access to local variable b2 | semmle.label | access to local variable b2 | -| extensions.cs:147:14:147:15 | access to local variable b2 | semmle.label | access to local variable b2 | -| extensions.cs:149:13:149:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | -| extensions.cs:149:13:149:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | -| extensions.cs:149:18:149:36 | call to method B1 : B | semmle.label | call to method B1 : B | -| extensions.cs:149:18:149:36 | call to method B1 : B | semmle.label | call to method B1 : B | -| extensions.cs:149:34:149:35 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:149:34:149:35 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:150:14:150:15 | access to local variable b3 | semmle.label | access to local variable b3 | -| extensions.cs:150:14:150:15 | access to local variable b3 | semmle.label | access to local variable b3 | -| extensions.cs:155:13:155:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:155:13:155:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:155:18:155:29 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:155:18:155:29 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:156:18:156:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:156:18:156:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:158:13:158:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | -| extensions.cs:158:13:158:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | -| extensions.cs:158:18:158:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:158:18:158:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:159:41:159:42 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | -| extensions.cs:159:41:159:42 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | -| extensions.cs:164:13:164:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:164:13:164:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:164:18:164:29 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:164:18:164:29 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:165:9:165:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:165:9:165:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:167:13:167:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:167:13:167:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:167:18:167:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:167:18:167:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:168:32:168:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:168:32:168:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:173:13:173:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:173:13:173:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:173:18:173:29 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:173:18:173:29 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:175:18:175:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:175:18:175:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:177:13:177:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | -| extensions.cs:177:13:177:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | -| extensions.cs:177:18:177:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:177:18:177:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:178:43:178:44 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | -| extensions.cs:178:43:178:44 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | -| extensions.cs:185:13:185:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | -| extensions.cs:185:13:185:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | -| extensions.cs:185:18:185:24 | call to operator - : B | semmle.label | call to operator - : B | -| extensions.cs:185:18:185:24 | call to operator - : B | semmle.label | call to operator - : B | -| extensions.cs:186:14:186:15 | access to local variable b3 | semmle.label | access to local variable b3 | -| extensions.cs:186:14:186:15 | access to local variable b3 | semmle.label | access to local variable b3 | -| extensions.cs:188:13:188:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | -| extensions.cs:188:13:188:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | -| extensions.cs:188:18:188:52 | call to operator - : B | semmle.label | call to operator - : B | -| extensions.cs:188:18:188:52 | call to operator - : B | semmle.label | call to operator - : B | -| extensions.cs:189:14:189:15 | access to local variable b4 | semmle.label | access to local variable b4 | -| extensions.cs:189:14:189:15 | access to local variable b4 | semmle.label | access to local variable b4 | -| extensions.cs:194:13:194:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:194:13:194:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:194:18:194:35 | access to property StaticProp1 : B | semmle.label | access to property StaticProp1 : B | -| extensions.cs:194:18:194:35 | access to property StaticProp1 : B | semmle.label | access to property StaticProp1 : B | -| extensions.cs:195:14:195:15 | access to local variable b1 | semmle.label | access to local variable b1 | -| extensions.cs:195:14:195:15 | access to local variable b1 | semmle.label | access to local variable b1 | -| extensions.cs:197:13:197:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:197:13:197:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | semmle.label | call to extension accessor get_StaticProp1 : B | -| extensions.cs:197:18:197:47 | call to extension accessor get_StaticProp1 : B | semmle.label | call to extension accessor get_StaticProp1 : B | -| extensions.cs:198:14:198:15 | access to local variable b2 | semmle.label | access to local variable b2 | -| extensions.cs:198:14:198:15 | access to local variable b2 | semmle.label | access to local variable b2 | -| extensions.cs:203:13:203:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:203:13:203:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:203:18:203:30 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:203:18:203:30 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:204:30:204:31 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:204:30:204:31 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:206:13:206:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:206:13:206:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:206:18:206:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:206:18:206:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:207:38:207:39 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:207:38:207:39 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:212:13:212:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:212:13:212:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:212:18:212:30 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:212:18:212:30 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:213:9:213:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:213:9:213:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:215:13:215:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:215:13:215:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:215:18:215:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:215:18:215:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:216:25:216:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:216:25:216:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:221:13:221:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:221:13:221:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:221:18:221:30 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:221:18:221:30 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:222:9:222:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:222:9:222:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:224:13:224:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:224:13:224:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:224:18:224:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:224:18:224:31 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:225:32:225:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:225:32:225:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:231:13:231:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:231:13:231:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:231:18:231:30 | call to method Source : B | semmle.label | call to method Source : B | -| extensions.cs:231:18:231:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:89:17:89:17 | c [Return] : C [property Prop] : Object | semmle.label | c [Return] : C [property Prop] : Object | +| extensions.cs:89:17:89:17 | c [Return] : C [property Prop] : Object | semmle.label | c [Return] : C [property Prop] : Object | +| extensions.cs:91:35:91:36 | c1 : C [property Prop] : Object | semmle.label | c1 : C [property Prop] : Object | +| extensions.cs:91:35:91:36 | c1 : C [property Prop] : Object | semmle.label | c1 : C [property Prop] : Object | +| extensions.cs:93:13:93:13 | [post] access to extension synthetic parameter c : C [property Prop] : Object | semmle.label | [post] access to extension synthetic parameter c : C [property Prop] : Object | +| extensions.cs:93:13:93:13 | [post] access to extension synthetic parameter c : C [property Prop] : Object | semmle.label | [post] access to extension synthetic parameter c : C [property Prop] : Object | +| extensions.cs:93:22:93:23 | access to parameter c1 : C [property Prop] : Object | semmle.label | access to parameter c1 : C [property Prop] : Object | +| extensions.cs:93:22:93:23 | access to parameter c1 : C [property Prop] : Object | semmle.label | access to parameter c1 : C [property Prop] : Object | +| extensions.cs:93:22:93:28 | access to property Prop : Object | semmle.label | access to property Prop : Object | +| extensions.cs:93:22:93:28 | access to property Prop : Object | semmle.label | access to property Prop : Object | +| extensions.cs:97:20:97:20 | t : B | semmle.label | t : B | +| extensions.cs:97:20:97:20 | t : B | semmle.label | t : B | +| extensions.cs:101:20:101:20 | access to extension synthetic parameter t | semmle.label | access to extension synthetic parameter t | +| extensions.cs:101:20:101:20 | access to extension synthetic parameter t | semmle.label | access to extension synthetic parameter t | +| extensions.cs:104:33:104:37 | other : B | semmle.label | other : B | +| extensions.cs:104:33:104:37 | other : B | semmle.label | other : B | +| extensions.cs:106:20:106:24 | access to parameter other : B | semmle.label | access to parameter other : B | +| extensions.cs:106:20:106:24 | access to parameter other : B | semmle.label | access to parameter other : B | +| extensions.cs:116:13:116:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:116:13:116:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:116:18:116:26 | access to property Prop1 : B | semmle.label | access to property Prop1 : B | +| extensions.cs:116:18:116:26 | access to property Prop1 : B | semmle.label | access to property Prop1 : B | +| extensions.cs:117:14:117:15 | access to local variable b1 | semmle.label | access to local variable b1 | +| extensions.cs:117:14:117:15 | access to local variable b1 | semmle.label | access to local variable b1 | +| extensions.cs:119:13:119:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:119:13:119:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:119:18:119:44 | call to extension accessor get_Prop1 : B | semmle.label | call to extension accessor get_Prop1 : B | +| extensions.cs:119:18:119:44 | call to extension accessor get_Prop1 : B | semmle.label | call to extension accessor get_Prop1 : B | +| extensions.cs:120:14:120:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:120:14:120:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:126:21:126:32 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:126:21:126:32 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:128:13:128:13 | access to local variable b : B | semmle.label | access to local variable b : B | +| extensions.cs:128:13:128:13 | access to local variable b : B | semmle.label | access to local variable b : B | +| extensions.cs:128:17:128:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:128:17:128:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:129:37:129:37 | access to local variable b : B | semmle.label | access to local variable b : B | +| extensions.cs:129:37:129:37 | access to local variable b : B | semmle.label | access to local variable b : B | +| extensions.cs:135:13:135:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:135:13:135:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:135:18:135:25 | call to method M1 : B | semmle.label | call to method M1 : B | +| extensions.cs:135:18:135:25 | call to method M1 : B | semmle.label | call to method M1 : B | +| extensions.cs:136:14:136:15 | access to local variable b1 | semmle.label | access to local variable b1 | +| extensions.cs:136:14:136:15 | access to local variable b1 | semmle.label | access to local variable b1 | +| extensions.cs:138:13:138:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:138:13:138:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:138:18:138:37 | call to method M1 : B | semmle.label | call to method M1 : B | +| extensions.cs:138:18:138:37 | call to method M1 : B | semmle.label | call to method M1 : B | +| extensions.cs:139:14:139:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:139:14:139:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:144:13:144:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:144:13:144:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:144:18:144:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:144:18:144:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:145:9:145:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:145:9:145:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:147:13:147:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:147:13:147:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:147:18:147:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:147:18:147:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:148:25:148:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:148:25:148:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:153:13:153:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:153:13:153:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:153:18:153:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:153:18:153:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:154:13:154:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:154:13:154:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:154:18:154:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:154:18:154:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:154:18:154:24 | call to method B1 : B | semmle.label | call to method B1 : B | +| extensions.cs:154:18:154:24 | call to method B1 : B | semmle.label | call to method B1 : B | +| extensions.cs:155:14:155:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:155:14:155:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:157:13:157:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:157:13:157:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:157:18:157:36 | call to method B1 : B | semmle.label | call to method B1 : B | +| extensions.cs:157:18:157:36 | call to method B1 : B | semmle.label | call to method B1 : B | +| extensions.cs:157:34:157:35 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:157:34:157:35 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:158:14:158:15 | access to local variable b3 | semmle.label | access to local variable b3 | +| extensions.cs:158:14:158:15 | access to local variable b3 | semmle.label | access to local variable b3 | +| extensions.cs:163:13:163:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:163:13:163:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:163:18:163:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:163:18:163:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:164:18:164:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:164:18:164:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:166:13:166:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:166:13:166:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:166:18:166:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:166:18:166:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:167:41:167:42 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:167:41:167:42 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:172:13:172:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:172:13:172:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:172:18:172:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:172:18:172:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:173:9:173:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:173:9:173:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:175:13:175:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:175:13:175:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:175:18:175:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:175:18:175:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:176:32:176:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:176:32:176:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:181:13:181:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:181:13:181:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:181:18:181:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:181:18:181:29 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:183:18:183:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:183:18:183:19 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:185:13:185:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | +| extensions.cs:185:13:185:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | +| extensions.cs:185:18:185:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:185:18:185:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:186:43:186:44 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | +| extensions.cs:186:43:186:44 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | +| extensions.cs:193:13:193:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:193:13:193:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:193:18:193:24 | call to operator - : B | semmle.label | call to operator - : B | +| extensions.cs:193:18:193:24 | call to operator - : B | semmle.label | call to operator - : B | +| extensions.cs:194:14:194:15 | access to local variable b3 | semmle.label | access to local variable b3 | +| extensions.cs:194:14:194:15 | access to local variable b3 | semmle.label | access to local variable b3 | +| extensions.cs:196:13:196:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | +| extensions.cs:196:13:196:14 | access to local variable b4 : B | semmle.label | access to local variable b4 : B | +| extensions.cs:196:18:196:52 | call to operator - : B | semmle.label | call to operator - : B | +| extensions.cs:196:18:196:52 | call to operator - : B | semmle.label | call to operator - : B | +| extensions.cs:197:14:197:15 | access to local variable b4 | semmle.label | access to local variable b4 | +| extensions.cs:197:14:197:15 | access to local variable b4 | semmle.label | access to local variable b4 | +| extensions.cs:202:13:202:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:202:13:202:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:202:18:202:35 | access to property StaticProp1 : B | semmle.label | access to property StaticProp1 : B | +| extensions.cs:202:18:202:35 | access to property StaticProp1 : B | semmle.label | access to property StaticProp1 : B | +| extensions.cs:203:14:203:15 | access to local variable b1 | semmle.label | access to local variable b1 | +| extensions.cs:203:14:203:15 | access to local variable b1 | semmle.label | access to local variable b1 | +| extensions.cs:205:13:205:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:205:13:205:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:205:18:205:47 | call to extension accessor get_StaticProp1 : B | semmle.label | call to extension accessor get_StaticProp1 : B | +| extensions.cs:205:18:205:47 | call to extension accessor get_StaticProp1 : B | semmle.label | call to extension accessor get_StaticProp1 : B | +| extensions.cs:206:14:206:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:206:14:206:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:211:13:211:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:211:13:211:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:211:18:211:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:211:18:211:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:212:30:212:31 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:212:30:212:31 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:214:13:214:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:214:13:214:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:214:18:214:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:214:18:214:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:215:38:215:39 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:215:38:215:39 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:220:13:220:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:220:13:220:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:220:18:220:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:220:18:220:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:221:9:221:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:221:9:221:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:223:13:223:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:223:13:223:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:223:18:223:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:223:18:223:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:224:25:224:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:224:25:224:26 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:229:13:229:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:229:13:229:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:229:18:229:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:229:18:229:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:230:9:230:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:230:9:230:10 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | | extensions.cs:232:13:232:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | | extensions.cs:232:13:232:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | -| extensions.cs:232:18:232:34 | call to method GenericM2 : B | semmle.label | call to method GenericM2 : B | -| extensions.cs:232:18:232:34 | call to method GenericM2 : B | semmle.label | call to method GenericM2 : B | -| extensions.cs:232:32:232:33 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:232:32:232:33 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:233:14:233:15 | access to local variable b2 | semmle.label | access to local variable b2 | -| extensions.cs:233:14:233:15 | access to local variable b2 | semmle.label | access to local variable b2 | -| extensions.cs:235:13:235:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | -| extensions.cs:235:13:235:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | -| extensions.cs:235:18:235:48 | call to method GenericM2 : B | semmle.label | call to method GenericM2 : B | -| extensions.cs:235:18:235:48 | call to method GenericM2 : B | semmle.label | call to method GenericM2 : B | -| extensions.cs:235:46:235:47 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:235:46:235:47 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | -| extensions.cs:236:14:236:15 | access to local variable b3 | semmle.label | access to local variable b3 | -| extensions.cs:236:14:236:15 | access to local variable b3 | semmle.label | access to local variable b3 | +| extensions.cs:232:18:232:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:232:18:232:31 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:233:32:233:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:233:32:233:33 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:239:13:239:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:239:13:239:14 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:239:18:239:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:239:18:239:30 | call to method Source : B | semmle.label | call to method Source : B | +| extensions.cs:240:13:240:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:240:13:240:14 | access to local variable b2 : B | semmle.label | access to local variable b2 : B | +| extensions.cs:240:18:240:34 | call to method GenericM2 : B | semmle.label | call to method GenericM2 : B | +| extensions.cs:240:18:240:34 | call to method GenericM2 : B | semmle.label | call to method GenericM2 : B | +| extensions.cs:240:32:240:33 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:240:32:240:33 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:241:14:241:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:241:14:241:15 | access to local variable b2 | semmle.label | access to local variable b2 | +| extensions.cs:243:13:243:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:243:13:243:14 | access to local variable b3 : B | semmle.label | access to local variable b3 : B | +| extensions.cs:243:18:243:48 | call to method GenericM2 : B | semmle.label | call to method GenericM2 : B | +| extensions.cs:243:18:243:48 | call to method GenericM2 : B | semmle.label | call to method GenericM2 : B | +| extensions.cs:243:46:243:47 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:243:46:243:47 | access to local variable b1 : B | semmle.label | access to local variable b1 : B | +| extensions.cs:244:14:244:15 | access to local variable b3 | semmle.label | access to local variable b3 | +| extensions.cs:244:14:244:15 | access to local variable b3 | semmle.label | access to local variable b3 | +| extensions.cs:250:9:250:10 | [post] access to local variable c1 : C [property Prop] : Object | semmle.label | [post] access to local variable c1 : C [property Prop] : Object | +| extensions.cs:250:9:250:10 | [post] access to local variable c1 : C [property Prop] : Object | semmle.label | [post] access to local variable c1 : C [property Prop] : Object | +| extensions.cs:250:19:250:36 | call to method Source : Object | semmle.label | call to method Source : Object | +| extensions.cs:250:19:250:36 | call to method Source : Object | semmle.label | call to method Source : Object | +| extensions.cs:252:9:252:10 | [post] access to local variable c2 : C [property Prop] : Object | semmle.label | [post] access to local variable c2 : C [property Prop] : Object | +| extensions.cs:252:9:252:10 | [post] access to local variable c2 : C [property Prop] : Object | semmle.label | [post] access to local variable c2 : C [property Prop] : Object | +| extensions.cs:252:15:252:16 | access to local variable c1 : C [property Prop] : Object | semmle.label | access to local variable c1 : C [property Prop] : Object | +| extensions.cs:252:15:252:16 | access to local variable c1 : C [property Prop] : Object | semmle.label | access to local variable c1 : C [property Prop] : Object | +| extensions.cs:253:14:253:15 | access to local variable c2 : C [property Prop] : Object | semmle.label | access to local variable c2 : C [property Prop] : Object | +| extensions.cs:253:14:253:15 | access to local variable c2 : C [property Prop] : Object | semmle.label | access to local variable c2 : C [property Prop] : Object | +| extensions.cs:253:14:253:20 | access to property Prop | semmle.label | access to property Prop | +| extensions.cs:253:14:253:20 | access to property Prop | semmle.label | access to property Prop | +| extensions.cs:256:50:256:51 | [post] access to local variable c3 : C [property Prop] : Object | semmle.label | [post] access to local variable c3 : C [property Prop] : Object | +| extensions.cs:256:50:256:51 | [post] access to local variable c3 : C [property Prop] : Object | semmle.label | [post] access to local variable c3 : C [property Prop] : Object | +| extensions.cs:256:54:256:55 | access to local variable c1 : C [property Prop] : Object | semmle.label | access to local variable c1 : C [property Prop] : Object | +| extensions.cs:256:54:256:55 | access to local variable c1 : C [property Prop] : Object | semmle.label | access to local variable c1 : C [property Prop] : Object | +| extensions.cs:257:14:257:15 | access to local variable c3 : C [property Prop] : Object | semmle.label | access to local variable c3 : C [property Prop] : Object | +| extensions.cs:257:14:257:15 | access to local variable c3 : C [property Prop] : Object | semmle.label | access to local variable c3 : C [property Prop] : Object | +| extensions.cs:257:14:257:20 | access to property Prop | semmle.label | access to property Prop | +| extensions.cs:257:14:257:20 | access to property Prop | semmle.label | access to property Prop | subpaths -| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:146:18:146:24 | call to method B1 : B | -| extensions.cs:146:18:146:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:146:18:146:24 | call to method B1 : B | -| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:149:18:149:36 | call to method B1 : B | -| extensions.cs:149:34:149:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:149:18:149:36 | call to method B1 : B | -| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | extensions.cs:232:18:232:34 | call to method GenericM2 : B | -| extensions.cs:232:32:232:33 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | extensions.cs:232:18:232:34 | call to method GenericM2 : B | -| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | extensions.cs:235:18:235:48 | call to method GenericM2 : B | -| extensions.cs:235:46:235:47 | access to local variable b1 : B | extensions.cs:96:33:96:37 | other : B | extensions.cs:98:20:98:24 | access to parameter other : B | extensions.cs:235:18:235:48 | call to method GenericM2 : B | +| extensions.cs:154:18:154:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:154:18:154:24 | call to method B1 : B | +| extensions.cs:154:18:154:19 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:154:18:154:24 | call to method B1 : B | +| extensions.cs:157:34:157:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:157:18:157:36 | call to method B1 : B | +| extensions.cs:157:34:157:35 | access to local variable b1 : B | extensions.cs:76:17:76:17 | b : B | extensions.cs:80:20:80:20 | access to extension synthetic parameter b : B | extensions.cs:157:18:157:36 | call to method B1 : B | +| extensions.cs:240:32:240:33 | access to local variable b1 : B | extensions.cs:104:33:104:37 | other : B | extensions.cs:106:20:106:24 | access to parameter other : B | extensions.cs:240:18:240:34 | call to method GenericM2 : B | +| extensions.cs:240:32:240:33 | access to local variable b1 : B | extensions.cs:104:33:104:37 | other : B | extensions.cs:106:20:106:24 | access to parameter other : B | extensions.cs:240:18:240:34 | call to method GenericM2 : B | +| extensions.cs:243:46:243:47 | access to local variable b1 : B | extensions.cs:104:33:104:37 | other : B | extensions.cs:106:20:106:24 | access to parameter other : B | extensions.cs:243:18:243:48 | call to method GenericM2 : B | +| extensions.cs:243:46:243:47 | access to local variable b1 : B | extensions.cs:104:33:104:37 | other : B | extensions.cs:106:20:106:24 | access to parameter other : B | extensions.cs:243:18:243:48 | call to method GenericM2 : B | +| extensions.cs:252:15:252:16 | access to local variable c1 : C [property Prop] : Object | extensions.cs:91:35:91:36 | c1 : C [property Prop] : Object | extensions.cs:89:17:89:17 | c [Return] : C [property Prop] : Object | extensions.cs:252:9:252:10 | [post] access to local variable c2 : C [property Prop] : Object | +| extensions.cs:252:15:252:16 | access to local variable c1 : C [property Prop] : Object | extensions.cs:91:35:91:36 | c1 : C [property Prop] : Object | extensions.cs:89:17:89:17 | c [Return] : C [property Prop] : Object | extensions.cs:252:9:252:10 | [post] access to local variable c2 : C [property Prop] : Object | +| extensions.cs:256:54:256:55 | access to local variable c1 : C [property Prop] : Object | extensions.cs:91:35:91:36 | c1 : C [property Prop] : Object | extensions.cs:89:17:89:17 | c [Return] : C [property Prop] : Object | extensions.cs:256:50:256:51 | [post] access to local variable c3 : C [property Prop] : Object | +| extensions.cs:256:54:256:55 | access to local variable c1 : C [property Prop] : Object | extensions.cs:91:35:91:36 | c1 : C [property Prop] : Object | extensions.cs:89:17:89:17 | c [Return] : C [property Prop] : Object | extensions.cs:256:50:256:51 | [post] access to local variable c3 : C [property Prop] : Object | testFailures #select -| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:118:21:118:32 | call to method Source : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:118:21:118:32 | call to method Source : B | call to method Source : B | -| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:118:21:118:32 | call to method Source : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:118:21:118:32 | call to method Source : B | call to method Source : B | -| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:120:17:120:30 | call to method Source : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:120:17:120:30 | call to method Source : B | call to method Source : B | -| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:120:17:120:30 | call to method Source : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:120:17:120:30 | call to method Source : B | call to method Source : B | -| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:155:18:155:29 | call to method Source : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:155:18:155:29 | call to method Source : B | call to method Source : B | -| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:155:18:155:29 | call to method Source : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:155:18:155:29 | call to method Source : B | call to method Source : B | -| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:158:18:158:31 | call to method Source : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:158:18:158:31 | call to method Source : B | call to method Source : B | -| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:158:18:158:31 | call to method Source : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:158:18:158:31 | call to method Source : B | call to method Source : B | -| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:164:18:164:29 | call to method Source : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:164:18:164:29 | call to method Source : B | call to method Source : B | -| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:164:18:164:29 | call to method Source : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:164:18:164:29 | call to method Source : B | call to method Source : B | -| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:167:18:167:31 | call to method Source : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:167:18:167:31 | call to method Source : B | call to method Source : B | -| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:167:18:167:31 | call to method Source : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:167:18:167:31 | call to method Source : B | call to method Source : B | -| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:203:18:203:30 | call to method Source : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:203:18:203:30 | call to method Source : B | call to method Source : B | -| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:203:18:203:30 | call to method Source : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:203:18:203:30 | call to method Source : B | call to method Source : B | -| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:206:18:206:31 | call to method Source : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:206:18:206:31 | call to method Source : B | call to method Source : B | -| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:206:18:206:31 | call to method Source : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:206:18:206:31 | call to method Source : B | call to method Source : B | -| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:136:18:136:29 | call to method Source : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:136:18:136:29 | call to method Source : B | call to method Source : B | -| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:136:18:136:29 | call to method Source : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:136:18:136:29 | call to method Source : B | call to method Source : B | -| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:139:18:139:31 | call to method Source : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:139:18:139:31 | call to method Source : B | call to method Source : B | -| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:139:18:139:31 | call to method Source : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:139:18:139:31 | call to method Source : B | call to method Source : B | -| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:173:18:173:29 | call to method Source : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:173:18:173:29 | call to method Source : B | call to method Source : B | -| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:173:18:173:29 | call to method Source : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:173:18:173:29 | call to method Source : B | call to method Source : B | -| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:177:18:177:31 | call to method Source : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:177:18:177:31 | call to method Source : B | call to method Source : B | -| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:177:18:177:31 | call to method Source : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:177:18:177:31 | call to method Source : B | call to method Source : B | -| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:212:18:212:30 | call to method Source : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:212:18:212:30 | call to method Source : B | call to method Source : B | -| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:212:18:212:30 | call to method Source : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:212:18:212:30 | call to method Source : B | call to method Source : B | -| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:215:18:215:31 | call to method Source : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:215:18:215:31 | call to method Source : B | call to method Source : B | -| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:215:18:215:31 | call to method Source : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:215:18:215:31 | call to method Source : B | call to method Source : B | -| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | extensions.cs:221:18:221:30 | call to method Source : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | $@ | extensions.cs:221:18:221:30 | call to method Source : B | call to method Source : B | -| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | extensions.cs:221:18:221:30 | call to method Source : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | $@ | extensions.cs:221:18:221:30 | call to method Source : B | call to method Source : B | -| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | extensions.cs:224:18:224:31 | call to method Source : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | $@ | extensions.cs:224:18:224:31 | call to method Source : B | call to method Source : B | -| extensions.cs:93:20:93:20 | access to extension synthetic parameter t | extensions.cs:224:18:224:31 | call to method Source : B | extensions.cs:93:20:93:20 | access to extension synthetic parameter t | $@ | extensions.cs:224:18:224:31 | call to method Source : B | call to method Source : B | -| extensions.cs:109:14:109:15 | access to local variable b1 | extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:109:14:109:15 | access to local variable b1 | $@ | extensions.cs:11:24:11:37 | call to method Source : B | call to method Source : B | -| extensions.cs:109:14:109:15 | access to local variable b1 | extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:109:14:109:15 | access to local variable b1 | $@ | extensions.cs:11:24:11:37 | call to method Source : B | call to method Source : B | -| extensions.cs:112:14:112:15 | access to local variable b2 | extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:112:14:112:15 | access to local variable b2 | $@ | extensions.cs:11:24:11:37 | call to method Source : B | call to method Source : B | -| extensions.cs:112:14:112:15 | access to local variable b2 | extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:112:14:112:15 | access to local variable b2 | $@ | extensions.cs:11:24:11:37 | call to method Source : B | call to method Source : B | -| extensions.cs:128:14:128:15 | access to local variable b1 | extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:128:14:128:15 | access to local variable b1 | $@ | extensions.cs:46:20:46:33 | call to method Source : B | call to method Source : B | -| extensions.cs:128:14:128:15 | access to local variable b1 | extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:128:14:128:15 | access to local variable b1 | $@ | extensions.cs:46:20:46:33 | call to method Source : B | call to method Source : B | -| extensions.cs:131:14:131:15 | access to local variable b2 | extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:131:14:131:15 | access to local variable b2 | $@ | extensions.cs:46:20:46:33 | call to method Source : B | call to method Source : B | -| extensions.cs:131:14:131:15 | access to local variable b2 | extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:131:14:131:15 | access to local variable b2 | $@ | extensions.cs:46:20:46:33 | call to method Source : B | call to method Source : B | -| extensions.cs:147:14:147:15 | access to local variable b2 | extensions.cs:145:18:145:29 | call to method Source : B | extensions.cs:147:14:147:15 | access to local variable b2 | $@ | extensions.cs:145:18:145:29 | call to method Source : B | call to method Source : B | -| extensions.cs:147:14:147:15 | access to local variable b2 | extensions.cs:145:18:145:29 | call to method Source : B | extensions.cs:147:14:147:15 | access to local variable b2 | $@ | extensions.cs:145:18:145:29 | call to method Source : B | call to method Source : B | -| extensions.cs:150:14:150:15 | access to local variable b3 | extensions.cs:145:18:145:29 | call to method Source : B | extensions.cs:150:14:150:15 | access to local variable b3 | $@ | extensions.cs:145:18:145:29 | call to method Source : B | call to method Source : B | -| extensions.cs:150:14:150:15 | access to local variable b3 | extensions.cs:145:18:145:29 | call to method Source : B | extensions.cs:150:14:150:15 | access to local variable b3 | $@ | extensions.cs:145:18:145:29 | call to method Source : B | call to method Source : B | -| extensions.cs:186:14:186:15 | access to local variable b3 | extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:186:14:186:15 | access to local variable b3 | $@ | extensions.cs:67:20:67:33 | call to method Source : B | call to method Source : B | -| extensions.cs:186:14:186:15 | access to local variable b3 | extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:186:14:186:15 | access to local variable b3 | $@ | extensions.cs:67:20:67:33 | call to method Source : B | call to method Source : B | -| extensions.cs:189:14:189:15 | access to local variable b4 | extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:189:14:189:15 | access to local variable b4 | $@ | extensions.cs:67:20:67:33 | call to method Source : B | call to method Source : B | -| extensions.cs:189:14:189:15 | access to local variable b4 | extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:189:14:189:15 | access to local variable b4 | $@ | extensions.cs:67:20:67:33 | call to method Source : B | call to method Source : B | -| extensions.cs:195:14:195:15 | access to local variable b1 | extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:195:14:195:15 | access to local variable b1 | $@ | extensions.cs:36:24:36:38 | call to method Source : B | call to method Source : B | -| extensions.cs:195:14:195:15 | access to local variable b1 | extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:195:14:195:15 | access to local variable b1 | $@ | extensions.cs:36:24:36:38 | call to method Source : B | call to method Source : B | -| extensions.cs:198:14:198:15 | access to local variable b2 | extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:198:14:198:15 | access to local variable b2 | $@ | extensions.cs:36:24:36:38 | call to method Source : B | call to method Source : B | -| extensions.cs:198:14:198:15 | access to local variable b2 | extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:198:14:198:15 | access to local variable b2 | $@ | extensions.cs:36:24:36:38 | call to method Source : B | call to method Source : B | -| extensions.cs:233:14:233:15 | access to local variable b2 | extensions.cs:231:18:231:30 | call to method Source : B | extensions.cs:233:14:233:15 | access to local variable b2 | $@ | extensions.cs:231:18:231:30 | call to method Source : B | call to method Source : B | -| extensions.cs:233:14:233:15 | access to local variable b2 | extensions.cs:231:18:231:30 | call to method Source : B | extensions.cs:233:14:233:15 | access to local variable b2 | $@ | extensions.cs:231:18:231:30 | call to method Source : B | call to method Source : B | -| extensions.cs:236:14:236:15 | access to local variable b3 | extensions.cs:231:18:231:30 | call to method Source : B | extensions.cs:236:14:236:15 | access to local variable b3 | $@ | extensions.cs:231:18:231:30 | call to method Source : B | call to method Source : B | -| extensions.cs:236:14:236:15 | access to local variable b3 | extensions.cs:231:18:231:30 | call to method Source : B | extensions.cs:236:14:236:15 | access to local variable b3 | $@ | extensions.cs:231:18:231:30 | call to method Source : B | call to method Source : B | +| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:126:21:126:32 | call to method Source : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:126:21:126:32 | call to method Source : B | call to method Source : B | +| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:126:21:126:32 | call to method Source : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:126:21:126:32 | call to method Source : B | call to method Source : B | +| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:128:17:128:30 | call to method Source : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:128:17:128:30 | call to method Source : B | call to method Source : B | +| extensions.cs:15:24:15:28 | access to parameter value | extensions.cs:128:17:128:30 | call to method Source : B | extensions.cs:15:24:15:28 | access to parameter value | $@ | extensions.cs:128:17:128:30 | call to method Source : B | call to method Source : B | +| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:163:18:163:29 | call to method Source : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:163:18:163:29 | call to method Source : B | call to method Source : B | +| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:163:18:163:29 | call to method Source : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:163:18:163:29 | call to method Source : B | call to method Source : B | +| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:166:18:166:31 | call to method Source : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:166:18:166:31 | call to method Source : B | call to method Source : B | +| extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | extensions.cs:166:18:166:31 | call to method Source : B | extensions.cs:23:24:23:26 | access to extension synthetic parameter obj | $@ | extensions.cs:166:18:166:31 | call to method Source : B | call to method Source : B | +| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:172:18:172:29 | call to method Source : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:172:18:172:29 | call to method Source : B | call to method Source : B | +| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:172:18:172:29 | call to method Source : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:172:18:172:29 | call to method Source : B | call to method Source : B | +| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:175:18:175:31 | call to method Source : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:175:18:175:31 | call to method Source : B | call to method Source : B | +| extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | extensions.cs:175:18:175:31 | call to method Source : B | extensions.cs:28:24:28:26 | access to extension synthetic parameter obj | $@ | extensions.cs:175:18:175:31 | call to method Source : B | call to method Source : B | +| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:211:18:211:30 | call to method Source : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:211:18:211:30 | call to method Source : B | call to method Source : B | +| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:211:18:211:30 | call to method Source : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:211:18:211:30 | call to method Source : B | call to method Source : B | +| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:214:18:214:31 | call to method Source : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:214:18:214:31 | call to method Source : B | call to method Source : B | +| extensions.cs:40:24:40:28 | access to parameter value | extensions.cs:214:18:214:31 | call to method Source : B | extensions.cs:40:24:40:28 | access to parameter value | $@ | extensions.cs:214:18:214:31 | call to method Source : B | call to method Source : B | +| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:144:18:144:29 | call to method Source : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:144:18:144:29 | call to method Source : B | call to method Source : B | +| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:144:18:144:29 | call to method Source : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:144:18:144:29 | call to method Source : B | call to method Source : B | +| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:147:18:147:31 | call to method Source : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:147:18:147:31 | call to method Source : B | call to method Source : B | +| extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | extensions.cs:147:18:147:31 | call to method Source : B | extensions.cs:51:20:51:22 | access to extension synthetic parameter obj | $@ | extensions.cs:147:18:147:31 | call to method Source : B | call to method Source : B | +| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:181:18:181:29 | call to method Source : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:181:18:181:29 | call to method Source : B | call to method Source : B | +| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:181:18:181:29 | call to method Source : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:181:18:181:29 | call to method Source : B | call to method Source : B | +| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:185:18:185:31 | call to method Source : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:185:18:185:31 | call to method Source : B | call to method Source : B | +| extensions.cs:61:20:61:20 | access to parameter a | extensions.cs:185:18:185:31 | call to method Source : B | extensions.cs:61:20:61:20 | access to parameter a | $@ | extensions.cs:185:18:185:31 | call to method Source : B | call to method Source : B | +| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:220:18:220:30 | call to method Source : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:220:18:220:30 | call to method Source : B | call to method Source : B | +| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:220:18:220:30 | call to method Source : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:220:18:220:30 | call to method Source : B | call to method Source : B | +| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:223:18:223:31 | call to method Source : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:223:18:223:31 | call to method Source : B | call to method Source : B | +| extensions.cs:85:20:85:20 | access to extension synthetic parameter b | extensions.cs:223:18:223:31 | call to method Source : B | extensions.cs:85:20:85:20 | access to extension synthetic parameter b | $@ | extensions.cs:223:18:223:31 | call to method Source : B | call to method Source : B | +| extensions.cs:101:20:101:20 | access to extension synthetic parameter t | extensions.cs:229:18:229:30 | call to method Source : B | extensions.cs:101:20:101:20 | access to extension synthetic parameter t | $@ | extensions.cs:229:18:229:30 | call to method Source : B | call to method Source : B | +| extensions.cs:101:20:101:20 | access to extension synthetic parameter t | extensions.cs:229:18:229:30 | call to method Source : B | extensions.cs:101:20:101:20 | access to extension synthetic parameter t | $@ | extensions.cs:229:18:229:30 | call to method Source : B | call to method Source : B | +| extensions.cs:101:20:101:20 | access to extension synthetic parameter t | extensions.cs:232:18:232:31 | call to method Source : B | extensions.cs:101:20:101:20 | access to extension synthetic parameter t | $@ | extensions.cs:232:18:232:31 | call to method Source : B | call to method Source : B | +| extensions.cs:101:20:101:20 | access to extension synthetic parameter t | extensions.cs:232:18:232:31 | call to method Source : B | extensions.cs:101:20:101:20 | access to extension synthetic parameter t | $@ | extensions.cs:232:18:232:31 | call to method Source : B | call to method Source : B | +| extensions.cs:117:14:117:15 | access to local variable b1 | extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:117:14:117:15 | access to local variable b1 | $@ | extensions.cs:11:24:11:37 | call to method Source : B | call to method Source : B | +| extensions.cs:117:14:117:15 | access to local variable b1 | extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:117:14:117:15 | access to local variable b1 | $@ | extensions.cs:11:24:11:37 | call to method Source : B | call to method Source : B | +| extensions.cs:120:14:120:15 | access to local variable b2 | extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:120:14:120:15 | access to local variable b2 | $@ | extensions.cs:11:24:11:37 | call to method Source : B | call to method Source : B | +| extensions.cs:120:14:120:15 | access to local variable b2 | extensions.cs:11:24:11:37 | call to method Source : B | extensions.cs:120:14:120:15 | access to local variable b2 | $@ | extensions.cs:11:24:11:37 | call to method Source : B | call to method Source : B | +| extensions.cs:136:14:136:15 | access to local variable b1 | extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:136:14:136:15 | access to local variable b1 | $@ | extensions.cs:46:20:46:33 | call to method Source : B | call to method Source : B | +| extensions.cs:136:14:136:15 | access to local variable b1 | extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:136:14:136:15 | access to local variable b1 | $@ | extensions.cs:46:20:46:33 | call to method Source : B | call to method Source : B | +| extensions.cs:139:14:139:15 | access to local variable b2 | extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:139:14:139:15 | access to local variable b2 | $@ | extensions.cs:46:20:46:33 | call to method Source : B | call to method Source : B | +| extensions.cs:139:14:139:15 | access to local variable b2 | extensions.cs:46:20:46:33 | call to method Source : B | extensions.cs:139:14:139:15 | access to local variable b2 | $@ | extensions.cs:46:20:46:33 | call to method Source : B | call to method Source : B | +| extensions.cs:155:14:155:15 | access to local variable b2 | extensions.cs:153:18:153:29 | call to method Source : B | extensions.cs:155:14:155:15 | access to local variable b2 | $@ | extensions.cs:153:18:153:29 | call to method Source : B | call to method Source : B | +| extensions.cs:155:14:155:15 | access to local variable b2 | extensions.cs:153:18:153:29 | call to method Source : B | extensions.cs:155:14:155:15 | access to local variable b2 | $@ | extensions.cs:153:18:153:29 | call to method Source : B | call to method Source : B | +| extensions.cs:158:14:158:15 | access to local variable b3 | extensions.cs:153:18:153:29 | call to method Source : B | extensions.cs:158:14:158:15 | access to local variable b3 | $@ | extensions.cs:153:18:153:29 | call to method Source : B | call to method Source : B | +| extensions.cs:158:14:158:15 | access to local variable b3 | extensions.cs:153:18:153:29 | call to method Source : B | extensions.cs:158:14:158:15 | access to local variable b3 | $@ | extensions.cs:153:18:153:29 | call to method Source : B | call to method Source : B | +| extensions.cs:194:14:194:15 | access to local variable b3 | extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:194:14:194:15 | access to local variable b3 | $@ | extensions.cs:67:20:67:33 | call to method Source : B | call to method Source : B | +| extensions.cs:194:14:194:15 | access to local variable b3 | extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:194:14:194:15 | access to local variable b3 | $@ | extensions.cs:67:20:67:33 | call to method Source : B | call to method Source : B | +| extensions.cs:197:14:197:15 | access to local variable b4 | extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:197:14:197:15 | access to local variable b4 | $@ | extensions.cs:67:20:67:33 | call to method Source : B | call to method Source : B | +| extensions.cs:197:14:197:15 | access to local variable b4 | extensions.cs:67:20:67:33 | call to method Source : B | extensions.cs:197:14:197:15 | access to local variable b4 | $@ | extensions.cs:67:20:67:33 | call to method Source : B | call to method Source : B | +| extensions.cs:203:14:203:15 | access to local variable b1 | extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:203:14:203:15 | access to local variable b1 | $@ | extensions.cs:36:24:36:38 | call to method Source : B | call to method Source : B | +| extensions.cs:203:14:203:15 | access to local variable b1 | extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:203:14:203:15 | access to local variable b1 | $@ | extensions.cs:36:24:36:38 | call to method Source : B | call to method Source : B | +| extensions.cs:206:14:206:15 | access to local variable b2 | extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:206:14:206:15 | access to local variable b2 | $@ | extensions.cs:36:24:36:38 | call to method Source : B | call to method Source : B | +| extensions.cs:206:14:206:15 | access to local variable b2 | extensions.cs:36:24:36:38 | call to method Source : B | extensions.cs:206:14:206:15 | access to local variable b2 | $@ | extensions.cs:36:24:36:38 | call to method Source : B | call to method Source : B | +| extensions.cs:241:14:241:15 | access to local variable b2 | extensions.cs:239:18:239:30 | call to method Source : B | extensions.cs:241:14:241:15 | access to local variable b2 | $@ | extensions.cs:239:18:239:30 | call to method Source : B | call to method Source : B | +| extensions.cs:241:14:241:15 | access to local variable b2 | extensions.cs:239:18:239:30 | call to method Source : B | extensions.cs:241:14:241:15 | access to local variable b2 | $@ | extensions.cs:239:18:239:30 | call to method Source : B | call to method Source : B | +| extensions.cs:244:14:244:15 | access to local variable b3 | extensions.cs:239:18:239:30 | call to method Source : B | extensions.cs:244:14:244:15 | access to local variable b3 | $@ | extensions.cs:239:18:239:30 | call to method Source : B | call to method Source : B | +| extensions.cs:244:14:244:15 | access to local variable b3 | extensions.cs:239:18:239:30 | call to method Source : B | extensions.cs:244:14:244:15 | access to local variable b3 | $@ | extensions.cs:239:18:239:30 | call to method Source : B | call to method Source : B | +| extensions.cs:253:14:253:20 | access to property Prop | extensions.cs:250:19:250:36 | call to method Source : Object | extensions.cs:253:14:253:20 | access to property Prop | $@ | extensions.cs:250:19:250:36 | call to method Source : Object | call to method Source : Object | +| extensions.cs:253:14:253:20 | access to property Prop | extensions.cs:250:19:250:36 | call to method Source : Object | extensions.cs:253:14:253:20 | access to property Prop | $@ | extensions.cs:250:19:250:36 | call to method Source : Object | call to method Source : Object | +| extensions.cs:257:14:257:20 | access to property Prop | extensions.cs:250:19:250:36 | call to method Source : Object | extensions.cs:257:14:257:20 | access to property Prop | $@ | extensions.cs:250:19:250:36 | call to method Source : Object | call to method Source : Object | +| extensions.cs:257:14:257:20 | access to property Prop | extensions.cs:250:19:250:36 | call to method Source : Object | extensions.cs:257:14:257:20 | access to property Prop | $@ | extensions.cs:250:19:250:36 | call to method Source : Object | call to method Source : Object | diff --git a/csharp/ql/test/library-tests/dataflow/extensions/extensions.cs b/csharp/ql/test/library-tests/dataflow/extensions/extensions.cs index 0e1c2226683d..cf4f9acb1b5b 100644 --- a/csharp/ql/test/library-tests/dataflow/extensions/extensions.cs +++ b/csharp/ql/test/library-tests/dataflow/extensions/extensions.cs @@ -86,6 +86,14 @@ public void B2() } } + extension(C c) + { + public void operator *=(C c1) + { + c.Prop = c1.Prop; + } + } + extension(T t) where T : class { public void GenericM1() @@ -236,8 +244,26 @@ public void Test14() Sink(b3); // $ hasValueFlow=14 } + public void Test15() + { + var c1 = new C(); + c1.Prop = Source(15); + var c2 = new C(); + c2 *= c1; + Sink(c2.Prop); // $ hasValueFlow=15 + + var c3 = new C(); + MyExtensions.op_MultiplicationAssignment(c3, c1); + Sink(c3.Prop); // $ hasValueFlow=15 + } + public static T Source(object source) => throw null; public static void Sink(object o) { } } public class B { } + +public class C +{ + public object Prop { get; set; } +} diff --git a/csharp/ql/test/library-tests/dataflow/operators/Operator.cs b/csharp/ql/test/library-tests/dataflow/operators/Operator.cs index 946a3b676cf9..5db1a82b9a4b 100644 --- a/csharp/ql/test/library-tests/dataflow/operators/Operator.cs +++ b/csharp/ql/test/library-tests/dataflow/operators/Operator.cs @@ -84,4 +84,39 @@ public void M6() var y = Source(12); M6Aux(x, y); } -} \ No newline at end of file +} + +public class CompoundAssignmentOperators +{ + static void Sink(object o) { } + static T Source(object source) => throw null; + + public class C + { + public object Field { get; private set; } + + public C() + { + Field = new object(); + } + + public C(object o) + { + Field = o; + } + + public void operator +=(C x) + { + Field = x.Field; + } + } + + public void M1() + { + var tainted = Source(1); + var x = new C(); + var y = new C(tainted); + x += y; + Sink(x.Field); // $ hasValueFlow=1 + } +} diff --git a/csharp/ql/test/library-tests/dataflow/operators/operatorFlow.expected b/csharp/ql/test/library-tests/dataflow/operators/operatorFlow.expected index f395930fb8b2..8fd12f1c2a8f 100644 --- a/csharp/ql/test/library-tests/dataflow/operators/operatorFlow.expected +++ b/csharp/ql/test/library-tests/dataflow/operators/operatorFlow.expected @@ -96,6 +96,40 @@ edges | Operator.cs:84:17:84:29 | call to method Source : C | Operator.cs:84:13:84:13 | access to local variable y : C | provenance | | | Operator.cs:85:18:85:18 | access to local variable y : C | Operator.cs:75:33:75:33 | y : C | provenance | | | Operator.cs:85:18:85:18 | access to local variable y : C | Operator.cs:75:33:75:33 | y : C | provenance | | +| Operator.cs:103:25:103:25 | o : Object | Operator.cs:105:21:105:21 | access to parameter o : Object | provenance | | +| Operator.cs:103:25:103:25 | o : Object | Operator.cs:105:21:105:21 | access to parameter o : Object | provenance | | +| Operator.cs:105:13:105:17 | [post] this access : C [property Field] : Object | Operator.cs:103:16:103:16 | this [Return] : C [property Field] : Object | provenance | | +| Operator.cs:105:13:105:17 | [post] this access : C [property Field] : Object | Operator.cs:103:16:103:16 | this [Return] : C [property Field] : Object | provenance | | +| Operator.cs:105:21:105:21 | access to parameter o : Object | Operator.cs:105:13:105:17 | [post] this access : C [property Field] : Object | provenance | | +| Operator.cs:105:21:105:21 | access to parameter o : Object | Operator.cs:105:13:105:17 | [post] this access : C [property Field] : Object | provenance | | +| Operator.cs:108:35:108:35 | x : C [property Field] : Object | Operator.cs:110:21:110:21 | access to parameter x : C [property Field] : Object | provenance | | +| Operator.cs:108:35:108:35 | x : C [property Field] : Object | Operator.cs:110:21:110:21 | access to parameter x : C [property Field] : Object | provenance | | +| Operator.cs:110:13:110:17 | [post] this access : C [property Field] : Object | Operator.cs:108:30:108:31 | this [Return] : C [property Field] : Object | provenance | | +| Operator.cs:110:13:110:17 | [post] this access : C [property Field] : Object | Operator.cs:108:30:108:31 | this [Return] : C [property Field] : Object | provenance | | +| Operator.cs:110:21:110:21 | access to parameter x : C [property Field] : Object | Operator.cs:110:21:110:27 | access to property Field : Object | provenance | | +| Operator.cs:110:21:110:21 | access to parameter x : C [property Field] : Object | Operator.cs:110:21:110:27 | access to property Field : Object | provenance | | +| Operator.cs:110:21:110:27 | access to property Field : Object | Operator.cs:110:13:110:17 | [post] this access : C [property Field] : Object | provenance | | +| Operator.cs:110:21:110:27 | access to property Field : Object | Operator.cs:110:13:110:17 | [post] this access : C [property Field] : Object | provenance | | +| Operator.cs:116:13:116:19 | access to local variable tainted : Object | Operator.cs:118:23:118:29 | access to local variable tainted : Object | provenance | | +| Operator.cs:116:13:116:19 | access to local variable tainted : Object | Operator.cs:118:23:118:29 | access to local variable tainted : Object | provenance | | +| Operator.cs:116:23:116:39 | call to method Source : Object | Operator.cs:116:13:116:19 | access to local variable tainted : Object | provenance | | +| Operator.cs:116:23:116:39 | call to method Source : Object | Operator.cs:116:13:116:19 | access to local variable tainted : Object | provenance | | +| Operator.cs:118:13:118:13 | access to local variable y : C [property Field] : Object | Operator.cs:119:14:119:14 | access to local variable y : C [property Field] : Object | provenance | | +| Operator.cs:118:13:118:13 | access to local variable y : C [property Field] : Object | Operator.cs:119:14:119:14 | access to local variable y : C [property Field] : Object | provenance | | +| Operator.cs:118:17:118:30 | object creation of type C : C [property Field] : Object | Operator.cs:118:13:118:13 | access to local variable y : C [property Field] : Object | provenance | | +| Operator.cs:118:17:118:30 | object creation of type C : C [property Field] : Object | Operator.cs:118:13:118:13 | access to local variable y : C [property Field] : Object | provenance | | +| Operator.cs:118:23:118:29 | access to local variable tainted : Object | Operator.cs:103:25:103:25 | o : Object | provenance | | +| Operator.cs:118:23:118:29 | access to local variable tainted : Object | Operator.cs:103:25:103:25 | o : Object | provenance | | +| Operator.cs:118:23:118:29 | access to local variable tainted : Object | Operator.cs:118:17:118:30 | object creation of type C : C [property Field] : Object | provenance | | +| Operator.cs:118:23:118:29 | access to local variable tainted : Object | Operator.cs:118:17:118:30 | object creation of type C : C [property Field] : Object | provenance | | +| Operator.cs:119:9:119:9 | [post] access to local variable x : C [property Field] : Object | Operator.cs:120:14:120:14 | access to local variable x : C [property Field] : Object | provenance | | +| Operator.cs:119:9:119:9 | [post] access to local variable x : C [property Field] : Object | Operator.cs:120:14:120:14 | access to local variable x : C [property Field] : Object | provenance | | +| Operator.cs:119:14:119:14 | access to local variable y : C [property Field] : Object | Operator.cs:108:35:108:35 | x : C [property Field] : Object | provenance | | +| Operator.cs:119:14:119:14 | access to local variable y : C [property Field] : Object | Operator.cs:108:35:108:35 | x : C [property Field] : Object | provenance | | +| Operator.cs:119:14:119:14 | access to local variable y : C [property Field] : Object | Operator.cs:119:9:119:9 | [post] access to local variable x : C [property Field] : Object | provenance | | +| Operator.cs:119:14:119:14 | access to local variable y : C [property Field] : Object | Operator.cs:119:9:119:9 | [post] access to local variable x : C [property Field] : Object | provenance | | +| Operator.cs:120:14:120:14 | access to local variable x : C [property Field] : Object | Operator.cs:120:14:120:20 | access to property Field | provenance | | +| Operator.cs:120:14:120:14 | access to local variable x : C [property Field] : Object | Operator.cs:120:14:120:20 | access to property Field | provenance | | nodes | Operator.cs:9:39:9:39 | x : C | semmle.label | x : C | | Operator.cs:9:39:9:39 | x : C | semmle.label | x : C | @@ -205,6 +239,42 @@ nodes | Operator.cs:84:17:84:29 | call to method Source : C | semmle.label | call to method Source : C | | Operator.cs:85:18:85:18 | access to local variable y : C | semmle.label | access to local variable y : C | | Operator.cs:85:18:85:18 | access to local variable y : C | semmle.label | access to local variable y : C | +| Operator.cs:103:16:103:16 | this [Return] : C [property Field] : Object | semmle.label | this [Return] : C [property Field] : Object | +| Operator.cs:103:16:103:16 | this [Return] : C [property Field] : Object | semmle.label | this [Return] : C [property Field] : Object | +| Operator.cs:103:25:103:25 | o : Object | semmle.label | o : Object | +| Operator.cs:103:25:103:25 | o : Object | semmle.label | o : Object | +| Operator.cs:105:13:105:17 | [post] this access : C [property Field] : Object | semmle.label | [post] this access : C [property Field] : Object | +| Operator.cs:105:13:105:17 | [post] this access : C [property Field] : Object | semmle.label | [post] this access : C [property Field] : Object | +| Operator.cs:105:21:105:21 | access to parameter o : Object | semmle.label | access to parameter o : Object | +| Operator.cs:105:21:105:21 | access to parameter o : Object | semmle.label | access to parameter o : Object | +| Operator.cs:108:30:108:31 | this [Return] : C [property Field] : Object | semmle.label | this [Return] : C [property Field] : Object | +| Operator.cs:108:30:108:31 | this [Return] : C [property Field] : Object | semmle.label | this [Return] : C [property Field] : Object | +| Operator.cs:108:35:108:35 | x : C [property Field] : Object | semmle.label | x : C [property Field] : Object | +| Operator.cs:108:35:108:35 | x : C [property Field] : Object | semmle.label | x : C [property Field] : Object | +| Operator.cs:110:13:110:17 | [post] this access : C [property Field] : Object | semmle.label | [post] this access : C [property Field] : Object | +| Operator.cs:110:13:110:17 | [post] this access : C [property Field] : Object | semmle.label | [post] this access : C [property Field] : Object | +| Operator.cs:110:21:110:21 | access to parameter x : C [property Field] : Object | semmle.label | access to parameter x : C [property Field] : Object | +| Operator.cs:110:21:110:21 | access to parameter x : C [property Field] : Object | semmle.label | access to parameter x : C [property Field] : Object | +| Operator.cs:110:21:110:27 | access to property Field : Object | semmle.label | access to property Field : Object | +| Operator.cs:110:21:110:27 | access to property Field : Object | semmle.label | access to property Field : Object | +| Operator.cs:116:13:116:19 | access to local variable tainted : Object | semmle.label | access to local variable tainted : Object | +| Operator.cs:116:13:116:19 | access to local variable tainted : Object | semmle.label | access to local variable tainted : Object | +| Operator.cs:116:23:116:39 | call to method Source : Object | semmle.label | call to method Source : Object | +| Operator.cs:116:23:116:39 | call to method Source : Object | semmle.label | call to method Source : Object | +| Operator.cs:118:13:118:13 | access to local variable y : C [property Field] : Object | semmle.label | access to local variable y : C [property Field] : Object | +| Operator.cs:118:13:118:13 | access to local variable y : C [property Field] : Object | semmle.label | access to local variable y : C [property Field] : Object | +| Operator.cs:118:17:118:30 | object creation of type C : C [property Field] : Object | semmle.label | object creation of type C : C [property Field] : Object | +| Operator.cs:118:17:118:30 | object creation of type C : C [property Field] : Object | semmle.label | object creation of type C : C [property Field] : Object | +| Operator.cs:118:23:118:29 | access to local variable tainted : Object | semmle.label | access to local variable tainted : Object | +| Operator.cs:118:23:118:29 | access to local variable tainted : Object | semmle.label | access to local variable tainted : Object | +| Operator.cs:119:9:119:9 | [post] access to local variable x : C [property Field] : Object | semmle.label | [post] access to local variable x : C [property Field] : Object | +| Operator.cs:119:9:119:9 | [post] access to local variable x : C [property Field] : Object | semmle.label | [post] access to local variable x : C [property Field] : Object | +| Operator.cs:119:14:119:14 | access to local variable y : C [property Field] : Object | semmle.label | access to local variable y : C [property Field] : Object | +| Operator.cs:119:14:119:14 | access to local variable y : C [property Field] : Object | semmle.label | access to local variable y : C [property Field] : Object | +| Operator.cs:120:14:120:14 | access to local variable x : C [property Field] : Object | semmle.label | access to local variable x : C [property Field] : Object | +| Operator.cs:120:14:120:14 | access to local variable x : C [property Field] : Object | semmle.label | access to local variable x : C [property Field] : Object | +| Operator.cs:120:14:120:20 | access to property Field | semmle.label | access to property Field | +| Operator.cs:120:14:120:20 | access to property Field | semmle.label | access to property Field | subpaths | Operator.cs:29:17:29:17 | access to local variable x : C | Operator.cs:16:38:16:38 | x : C | Operator.cs:16:49:16:49 | access to parameter x : C | Operator.cs:29:17:29:21 | call to operator + : C | | Operator.cs:29:17:29:17 | access to local variable x : C | Operator.cs:16:38:16:38 | x : C | Operator.cs:16:49:16:49 | access to parameter x : C | Operator.cs:29:17:29:21 | call to operator + : C | @@ -218,6 +288,10 @@ subpaths | Operator.cs:64:21:64:21 | access to parameter y : C | Operator.cs:21:43:21:43 | y : C | Operator.cs:21:49:21:49 | access to parameter y : C | Operator.cs:64:17:64:21 | call to operator / : C | | Operator.cs:77:29:77:29 | access to parameter y : C | Operator.cs:22:51:22:51 | y : C | Operator.cs:22:57:22:57 | access to parameter y : C | Operator.cs:77:25:77:29 | call to operator checked / : C | | Operator.cs:77:29:77:29 | access to parameter y : C | Operator.cs:22:51:22:51 | y : C | Operator.cs:22:57:22:57 | access to parameter y : C | Operator.cs:77:25:77:29 | call to operator checked / : C | +| Operator.cs:118:23:118:29 | access to local variable tainted : Object | Operator.cs:103:25:103:25 | o : Object | Operator.cs:103:16:103:16 | this [Return] : C [property Field] : Object | Operator.cs:118:17:118:30 | object creation of type C : C [property Field] : Object | +| Operator.cs:118:23:118:29 | access to local variable tainted : Object | Operator.cs:103:25:103:25 | o : Object | Operator.cs:103:16:103:16 | this [Return] : C [property Field] : Object | Operator.cs:118:17:118:30 | object creation of type C : C [property Field] : Object | +| Operator.cs:119:14:119:14 | access to local variable y : C [property Field] : Object | Operator.cs:108:35:108:35 | x : C [property Field] : Object | Operator.cs:108:30:108:31 | this [Return] : C [property Field] : Object | Operator.cs:119:9:119:9 | [post] access to local variable x : C [property Field] : Object | +| Operator.cs:119:14:119:14 | access to local variable y : C [property Field] : Object | Operator.cs:108:35:108:35 | x : C [property Field] : Object | Operator.cs:108:30:108:31 | this [Return] : C [property Field] : Object | Operator.cs:119:9:119:9 | [post] access to local variable x : C [property Field] : Object | testFailures #select | Operator.cs:30:14:30:14 | access to local variable z | Operator.cs:27:17:27:28 | call to method Source : C | Operator.cs:30:14:30:14 | access to local variable z | $@ | Operator.cs:27:17:27:28 | call to method Source : C | call to method Source : C | @@ -232,3 +306,5 @@ testFailures | Operator.cs:65:14:65:14 | (...) ... | Operator.cs:71:17:71:29 | call to method Source : C | Operator.cs:65:14:65:14 | (...) ... | $@ | Operator.cs:71:17:71:29 | call to method Source : C | call to method Source : C | | Operator.cs:78:14:78:14 | (...) ... | Operator.cs:84:17:84:29 | call to method Source : C | Operator.cs:78:14:78:14 | (...) ... | $@ | Operator.cs:84:17:84:29 | call to method Source : C | call to method Source : C | | Operator.cs:78:14:78:14 | (...) ... | Operator.cs:84:17:84:29 | call to method Source : C | Operator.cs:78:14:78:14 | (...) ... | $@ | Operator.cs:84:17:84:29 | call to method Source : C | call to method Source : C | +| Operator.cs:120:14:120:20 | access to property Field | Operator.cs:116:23:116:39 | call to method Source : Object | Operator.cs:120:14:120:20 | access to property Field | $@ | Operator.cs:116:23:116:39 | call to method Source : Object | call to method Source : Object | +| Operator.cs:120:14:120:20 | access to property Field | Operator.cs:116:23:116:39 | call to method Source : Object | Operator.cs:120:14:120:20 | access to property Field | $@ | Operator.cs:116:23:116:39 | call to method Source : Object | call to method Source : Object | diff --git a/csharp/ql/test/library-tests/operators/Operators1.expected b/csharp/ql/test/library-tests/operators/Operators1.expected index 9a819a46f503..7ec4fe268b46 100644 --- a/csharp/ql/test/library-tests/operators/Operators1.expected +++ b/csharp/ql/test/library-tests/operators/Operators1.expected @@ -1 +1 @@ -| operators.cs:16:42:16:43 | ++ | operators.cs:7:18:7:26 | IntVector | +| operators.cs:15:42:15:43 | ++ | operators.cs:7:18:7:26 | IntVector | diff --git a/csharp/ql/test/library-tests/operators/Operators2.expected b/csharp/ql/test/library-tests/operators/Operators2.expected index 9a819a46f503..7ec4fe268b46 100644 --- a/csharp/ql/test/library-tests/operators/Operators2.expected +++ b/csharp/ql/test/library-tests/operators/Operators2.expected @@ -1 +1 @@ -| operators.cs:16:42:16:43 | ++ | operators.cs:7:18:7:26 | IntVector | +| operators.cs:15:42:15:43 | ++ | operators.cs:7:18:7:26 | IntVector | diff --git a/csharp/ql/test/library-tests/operators/Operators3.expected b/csharp/ql/test/library-tests/operators/Operators3.expected index cc0d4b646fca..e81aec79ba19 100644 --- a/csharp/ql/test/library-tests/operators/Operators3.expected +++ b/csharp/ql/test/library-tests/operators/Operators3.expected @@ -1 +1 @@ -| operators.cs:51:32:51:39 | implicit conversion | +| operators.cs:96:32:96:39 | implicit conversion | diff --git a/csharp/ql/test/library-tests/operators/Operators4.expected b/csharp/ql/test/library-tests/operators/Operators4.expected index 3cc82aeb9280..49db993c093d 100644 --- a/csharp/ql/test/library-tests/operators/Operators4.expected +++ b/csharp/ql/test/library-tests/operators/Operators4.expected @@ -1 +1 @@ -| operators.cs:56:32:56:39 | explicit conversion | +| operators.cs:101:32:101:39 | explicit conversion | diff --git a/csharp/ql/test/library-tests/operators/Operators5.expected b/csharp/ql/test/library-tests/operators/Operators5.expected new file mode 100644 index 000000000000..8e506e5119df --- /dev/null +++ b/csharp/ql/test/library-tests/operators/Operators5.expected @@ -0,0 +1,15 @@ +| operators.cs:23:30:23:31 | += | operators.cs:61:13:61:22 | ... += ... | +| operators.cs:31:38:31:39 | checked += | operators.cs:77:17:77:26 | ... += ... | +| operators.cs:33:38:33:39 | checked -= | operators.cs:78:17:78:26 | ... -= ... | +| operators.cs:34:30:34:31 | -= | operators.cs:64:13:64:22 | ... -= ... | +| operators.cs:36:38:36:39 | checked *= | operators.cs:79:17:79:26 | ... *= ... | +| operators.cs:37:30:37:31 | *= | operators.cs:65:13:65:22 | ... *= ... | +| operators.cs:39:38:39:39 | checked /= | operators.cs:80:17:80:26 | ... /= ... | +| operators.cs:40:30:40:31 | /= | operators.cs:66:13:66:22 | ... /= ... | +| operators.cs:42:30:42:31 | %= | operators.cs:67:13:67:22 | ... %= ... | +| operators.cs:43:30:43:31 | &= | operators.cs:68:13:68:22 | ... &= ... | +| operators.cs:44:30:44:31 | \|= | operators.cs:69:13:69:22 | ... \|= ... | +| operators.cs:45:30:45:31 | ^= | operators.cs:70:13:70:22 | ... ^= ... | +| operators.cs:46:30:46:32 | <<= | operators.cs:71:13:71:23 | ... <<= ... | +| operators.cs:47:30:47:32 | >>= | operators.cs:72:13:72:23 | ... >>= ... | +| operators.cs:48:30:48:33 | >>>= | operators.cs:73:13:73:24 | ... >>>= ... | diff --git a/csharp/ql/test/library-tests/operators/Operators5.ql b/csharp/ql/test/library-tests/operators/Operators5.ql new file mode 100644 index 000000000000..b22a342dd1f3 --- /dev/null +++ b/csharp/ql/test/library-tests/operators/Operators5.ql @@ -0,0 +1,9 @@ +/** + * @name Test for operators + */ + +import csharp + +from CompoundAssignmentOperator cao, CompoundAssignmentOperatorCall call +where call.getTarget() = cao +select cao, call diff --git a/csharp/ql/test/library-tests/operators/PrintAst.expected b/csharp/ql/test/library-tests/operators/PrintAst.expected index d3b41fe05fb7..8ea38d79b148 100644 --- a/csharp/ql/test/library-tests/operators/PrintAst.expected +++ b/csharp/ql/test/library-tests/operators/PrintAst.expected @@ -1,154 +1,339 @@ operators.cs: # 5| [NamespaceDeclaration] namespace ... { ... } # 7| 1: [Class] IntVector -# 10| 5: [InstanceConstructor] IntVector -#-----| 2: (Parameters) -# 10| 0: [Parameter] length -# 10| -1: [TypeMention] int -# 10| 4: [BlockStmt] {...} -# 12| 6: [Property] Length -# 12| -1: [TypeMention] int -# 12| 3: [Getter] get_Length -# 12| 4: [BlockStmt] {...} -# 12| 0: [ReturnStmt] return ...; -# 12| 0: [IntLiteral] 4 -# 14| 7: [Indexer] Item -# 14| -1: [TypeMention] int +# 9| 5: [InstanceConstructor] IntVector +#-----| 2: (Parameters) +# 9| 0: [Parameter] length +# 9| -1: [TypeMention] int +# 9| 4: [BlockStmt] {...} +# 11| 6: [Property] Length +# 11| -1: [TypeMention] int +# 11| 3: [Getter] get_Length +# 11| 4: [BlockStmt] {...} +# 11| 0: [ReturnStmt] return ...; +# 11| 0: [IntLiteral] 4 +# 13| 7: [Indexer] Item +# 13| -1: [TypeMention] int #-----| 1: (Parameters) -# 14| 0: [Parameter] index -# 14| -1: [TypeMention] int -# 14| 3: [Getter] get_Item +# 13| 0: [Parameter] index +# 13| -1: [TypeMention] int +# 13| 3: [Getter] get_Item #-----| 2: (Parameters) -# 14| 0: [Parameter] index -# 14| 4: [BlockStmt] {...} -# 14| 0: [ReturnStmt] return ...; -# 14| 0: [IntLiteral] 0 -# 14| 4: [Setter] set_Item +# 13| 0: [Parameter] index +# 13| 4: [BlockStmt] {...} +# 13| 0: [ReturnStmt] return ...; +# 13| 0: [IntLiteral] 0 +# 13| 4: [Setter] set_Item #-----| 2: (Parameters) -# 14| 0: [Parameter] index -# 14| 1: [Parameter] value -# 14| 4: [BlockStmt] {...} -# 16| 8: [IncrementOperator] ++ -# 16| -1: [TypeMention] IntVector -#-----| 2: (Parameters) -# 16| 0: [Parameter] iv -# 16| -1: [TypeMention] IntVector -# 17| 4: [BlockStmt] {...} -# 18| 0: [LocalVariableDeclStmt] ... ...; -# 18| 0: [LocalVariableDeclAndInitExpr] IntVector temp = ... -# 18| -1: [TypeMention] IntVector -# 18| 0: [LocalVariableAccess] access to local variable temp -# 18| 1: [ObjectCreation] object creation of type IntVector -# 18| -1: [TypeMention] IntVector -# 18| 0: [PropertyCall] access to property Length -# 18| -1: [ParameterAccess] access to parameter iv -# 19| 1: [ForStmt] for (...;...;...) ... -# 19| -1: [LocalVariableDeclAndInitExpr] Int32 i = ... -# 19| -1: [TypeMention] int -# 19| 0: [LocalVariableAccess] access to local variable i -# 19| 1: [IntLiteral] 0 -# 19| 0: [LTExpr] ... < ... -# 19| 0: [LocalVariableAccess] access to local variable i -# 19| 1: [PropertyCall] access to property Length -# 19| -1: [ParameterAccess] access to parameter iv -# 19| 1: [PostIncrExpr] ...++ -# 19| 0: [LocalVariableAccess] access to local variable i -# 20| 2: [ExprStmt] ...; -# 20| 0: [AssignExpr] ... = ... -# 20| 0: [IndexerCall] access to indexer -# 20| -1: [LocalVariableAccess] access to local variable temp -# 20| 0: [LocalVariableAccess] access to local variable i -# 20| 1: [AddExpr] ... + ... -# 20| 0: [IndexerCall] access to indexer -# 20| -1: [ParameterAccess] access to parameter iv -# 20| 0: [LocalVariableAccess] access to local variable i -# 20| 1: [IntLiteral] 1 -# 21| 2: [ReturnStmt] return ...; -# 21| 0: [LocalVariableAccess] access to local variable temp -# 26| 2: [Class] TestUnaryOperator -# 29| 6: [Method] Main -# 29| -1: [TypeMention] Void -# 30| 4: [BlockStmt] {...} -# 31| 0: [LocalVariableDeclStmt] ... ...; -# 31| 0: [LocalVariableDeclAndInitExpr] IntVector iv1 = ... -# 31| -1: [TypeMention] IntVector -# 31| 0: [LocalVariableAccess] access to local variable iv1 -# 31| 1: [ObjectCreation] object creation of type IntVector -# 31| -1: [TypeMention] IntVector -# 31| 0: [IntLiteral] 4 -# 32| 1: [LocalVariableDeclStmt] ... ...; -# 32| 0: [LocalVariableDeclExpr] IntVector iv2 -# 32| 0: [TypeMention] IntVector -# 33| 2: [ExprStmt] ...; -# 33| 0: [AssignExpr] ... = ... -# 33| 0: [LocalVariableAccess] access to local variable iv2 -# 33| 1: [OperatorCall] call to operator ++ -# 33| 0: [LocalVariableAccess] access to local variable iv1 -# 34| 3: [ExprStmt] ...; -# 34| 0: [AssignExpr] ... = ... -# 34| 0: [LocalVariableAccess] access to local variable iv2 -# 34| 1: [OperatorCall] call to operator ++ -# 34| 0: [LocalVariableAccess] access to local variable iv1 -# 39| 3: [Struct] Digit -# 42| 6: [Field] value -# 42| -1: [TypeMention] byte -# 44| 7: [InstanceConstructor] Digit -#-----| 2: (Parameters) -# 44| 0: [Parameter] value -# 44| -1: [TypeMention] byte +# 13| 0: [Parameter] index +# 13| 1: [Parameter] value +# 13| 4: [BlockStmt] {...} +# 15| 8: [IncrementOperator] ++ +# 15| -1: [TypeMention] IntVector +#-----| 2: (Parameters) +# 15| 0: [Parameter] iv +# 15| -1: [TypeMention] IntVector +# 16| 4: [BlockStmt] {...} +# 17| 0: [LocalVariableDeclStmt] ... ...; +# 17| 0: [LocalVariableDeclAndInitExpr] IntVector temp = ... +# 17| -1: [TypeMention] IntVector +# 17| 0: [LocalVariableAccess] access to local variable temp +# 17| 1: [ObjectCreation] object creation of type IntVector +# 17| -1: [TypeMention] IntVector +# 17| 0: [PropertyCall] access to property Length +# 17| -1: [ParameterAccess] access to parameter iv +# 18| 1: [ForStmt] for (...;...;...) ... +# 18| -1: [LocalVariableDeclAndInitExpr] Int32 i = ... +# 18| -1: [TypeMention] int +# 18| 0: [LocalVariableAccess] access to local variable i +# 18| 1: [IntLiteral] 0 +# 18| 0: [LTExpr] ... < ... +# 18| 0: [LocalVariableAccess] access to local variable i +# 18| 1: [PropertyCall] access to property Length +# 18| -1: [ParameterAccess] access to parameter iv +# 18| 1: [PostIncrExpr] ...++ +# 18| 0: [LocalVariableAccess] access to local variable i +# 19| 2: [ExprStmt] ...; +# 19| 0: [AssignExpr] ... = ... +# 19| 0: [IndexerCall] access to indexer +# 19| -1: [LocalVariableAccess] access to local variable temp +# 19| 0: [LocalVariableAccess] access to local variable i +# 19| 1: [AddExpr] ... + ... +# 19| 0: [IndexerCall] access to indexer +# 19| -1: [ParameterAccess] access to parameter iv +# 19| 0: [LocalVariableAccess] access to local variable i +# 19| 1: [IntLiteral] 1 +# 20| 2: [ReturnStmt] return ...; +# 20| 0: [LocalVariableAccess] access to local variable temp +# 23| 9: [AddCompoundAssignmentOperator] += +# 23| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 23| 0: [Parameter] n +# 23| -1: [TypeMention] IntVector +# 24| 4: [BlockStmt] {...} +# 25| 0: [IfStmt] if (...) ... +# 25| 0: [NEExpr] ... != ... +# 25| 0: [PropertyCall] access to property Length +# 25| -1: [ParameterAccess] access to parameter n +# 25| 1: [PropertyCall] access to property Length +# 26| 1: [ThrowStmt] throw ...; +# 26| 0: [ObjectCreation] object creation of type ArgumentException +# 26| 0: [TypeMention] ArgumentException +# 27| 1: [ForStmt] for (...;...;...) ... +# 27| -1: [LocalVariableDeclAndInitExpr] Int32 i = ... +# 27| -1: [TypeMention] int +# 27| 0: [LocalVariableAccess] access to local variable i +# 27| 1: [IntLiteral] 0 +# 27| 0: [LTExpr] ... < ... +# 27| 0: [LocalVariableAccess] access to local variable i +# 27| 1: [PropertyCall] access to property Length +# 27| 1: [PostIncrExpr] ...++ +# 27| 0: [LocalVariableAccess] access to local variable i +# 28| 2: [ExprStmt] ...; +# 28| 0: [AssignAddExpr] ... += ... +# 28| 0: [IndexerCall] access to indexer +# 28| -1: [ThisAccess] this access +# 28| 0: [LocalVariableAccess] access to local variable i +# 28| 1: [IndexerCall] access to indexer +# 28| -1: [ParameterAccess] access to parameter n +# 28| 0: [LocalVariableAccess] access to local variable i +# 31| 10: [CheckedAddCompoundAssignmentOperator] checked += +# 31| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 31| 0: [Parameter] n +# 31| -1: [TypeMention] IntVector +# 31| 4: [BlockStmt] {...} +# 33| 11: [CheckedSubCompoundAssignmentOperator] checked -= +# 33| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 33| 0: [Parameter] n +# 33| -1: [TypeMention] IntVector +# 33| 4: [BlockStmt] {...} +# 34| 12: [SubCompoundAssignmentOperator] -= +# 34| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 34| 0: [Parameter] n +# 34| -1: [TypeMention] IntVector +# 34| 4: [BlockStmt] {...} +# 36| 13: [CheckedMulCompoundAssignmentOperator] checked *= +# 36| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 36| 0: [Parameter] n +# 36| -1: [TypeMention] IntVector +# 36| 4: [BlockStmt] {...} +# 37| 14: [MulCompoundAssignmentOperator] *= +# 37| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 37| 0: [Parameter] n +# 37| -1: [TypeMention] IntVector +# 37| 4: [BlockStmt] {...} +# 39| 15: [CheckedDivCompoundAssignmentOperator] checked /= +# 39| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 39| 0: [Parameter] n +# 39| -1: [TypeMention] IntVector +# 39| 4: [BlockStmt] {...} +# 40| 16: [DivCompoundAssignmentOperator] /= +# 40| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 40| 0: [Parameter] n +# 40| -1: [TypeMention] IntVector +# 40| 4: [BlockStmt] {...} +# 42| 17: [RemCompoundAssignmentOperator] %= +# 42| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 42| 0: [Parameter] n +# 42| -1: [TypeMention] IntVector +# 42| 4: [BlockStmt] {...} +# 43| 18: [AndCompoundAssignmentOperator] &= +# 43| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 43| 0: [Parameter] n +# 43| -1: [TypeMention] IntVector +# 43| 4: [BlockStmt] {...} +# 44| 19: [OrCompoundAssignmentOperator] |= +# 44| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 44| 0: [Parameter] n +# 44| -1: [TypeMention] IntVector +# 44| 4: [BlockStmt] {...} +# 45| 20: [XorCompoundAssignmentOperator] ^= +# 45| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 45| 0: [Parameter] n +# 45| -1: [TypeMention] IntVector # 45| 4: [BlockStmt] {...} -# 46| 0: [IfStmt] if (...) ... -# 46| 0: [LogicalOrExpr] ... || ... -# 46| 0: [LTExpr] ... < ... -# 46| 0: [CastExpr] (...) ... -# 46| 1: [ParameterAccess] access to parameter value -# 46| 1: [IntLiteral] 0 -# 46| 1: [GTExpr] ... > ... -# 46| 0: [CastExpr] (...) ... -# 46| 1: [ParameterAccess] access to parameter value -# 46| 1: [IntLiteral] 9 -# 47| 1: [ThrowStmt] throw ...; -# 47| 0: [ObjectCreation] object creation of type ArgumentException -# 47| 0: [TypeMention] ArgumentException -# 48| 1: [ExprStmt] ...; -# 48| 0: [AssignExpr] ... = ... -# 48| 0: [FieldAccess] access to field value -# 48| -1: [ThisAccess] this access -# 48| 1: [ParameterAccess] access to parameter value -# 51| 8: [ImplicitConversionOperator] implicit conversion -# 51| -1: [TypeMention] byte -#-----| 2: (Parameters) -# 51| 0: [Parameter] d -# 51| -1: [TypeMention] Digit -# 52| 4: [BlockStmt] {...} -# 53| 0: [ReturnStmt] return ...; -# 53| 0: [FieldAccess] access to field value -# 53| -1: [ParameterAccess] access to parameter d -# 56| 9: [ExplicitConversionOperator] explicit conversion -# 56| -1: [TypeMention] Digit -#-----| 2: (Parameters) -# 56| 0: [Parameter] b -# 56| -1: [TypeMention] byte -# 57| 4: [BlockStmt] {...} -# 58| 0: [ReturnStmt] return ...; -# 58| 0: [ObjectCreation] object creation of type Digit -# 58| -1: [TypeMention] Digit -# 58| 0: [ParameterAccess] access to parameter b -# 63| 4: [Class] TestConversionOperator -# 66| 6: [Method] Main -# 66| -1: [TypeMention] Void -# 67| 4: [BlockStmt] {...} -# 68| 0: [LocalVariableDeclStmt] ... ...; -# 68| 0: [LocalVariableDeclAndInitExpr] Digit d = ... -# 68| -1: [TypeMention] Digit -# 68| 0: [LocalVariableAccess] access to local variable d -# 68| 1: [OperatorCall] call to operator explicit conversion -# 68| -1: [TypeMention] Digit -# 68| 0: [CastExpr] (...) ... -# 68| 1: [IntLiteral] 8 -# 69| 1: [LocalVariableDeclStmt] ... ...; -# 69| 0: [LocalVariableDeclAndInitExpr] Byte b = ... -# 69| -1: [TypeMention] byte -# 69| 0: [LocalVariableAccess] access to local variable b -# 69| 1: [OperatorCall] call to operator implicit conversion -# 69| 0: [LocalVariableAccess] access to local variable d +# 46| 21: [LeftShiftCompoundAssignmentOperator] <<= +# 46| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 46| 0: [Parameter] n +# 46| -1: [TypeMention] IntVector +# 46| 4: [BlockStmt] {...} +# 47| 22: [RightShiftCompoundAssignmentOperator] >>= +# 47| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 47| 0: [Parameter] n +# 47| -1: [TypeMention] IntVector +# 47| 4: [BlockStmt] {...} +# 48| 23: [UnsignedRightShiftCompoundAssignmentOperator] >>>= +# 48| -1: [TypeMention] Void +#-----| 2: (Parameters) +# 48| 0: [Parameter] n +# 48| -1: [TypeMention] IntVector +# 48| 4: [BlockStmt] {...} +# 51| 2: [Class] TestOperator +# 53| 6: [Method] Main +# 53| -1: [TypeMention] Void +# 54| 4: [BlockStmt] {...} +# 55| 0: [LocalVariableDeclStmt] ... ...; +# 55| 0: [LocalVariableDeclAndInitExpr] IntVector iv1 = ... +# 55| -1: [TypeMention] IntVector +# 55| 0: [LocalVariableAccess] access to local variable iv1 +# 55| 1: [ObjectCreation] object creation of type IntVector +# 55| -1: [TypeMention] IntVector +# 55| 0: [IntLiteral] 4 +# 56| 1: [LocalVariableDeclStmt] ... ...; +# 56| 0: [LocalVariableDeclExpr] IntVector iv2 +# 56| 0: [TypeMention] IntVector +# 57| 2: [ExprStmt] ...; +# 57| 0: [AssignExpr] ... = ... +# 57| 0: [LocalVariableAccess] access to local variable iv2 +# 57| 1: [OperatorCall] call to operator ++ +# 57| 0: [LocalVariableAccess] access to local variable iv1 +# 58| 3: [ExprStmt] ...; +# 58| 0: [AssignExpr] ... = ... +# 58| 0: [LocalVariableAccess] access to local variable iv2 +# 58| 1: [OperatorCall] call to operator ++ +# 58| 0: [LocalVariableAccess] access to local variable iv1 +# 60| 4: [LocalVariableDeclStmt] ... ...; +# 60| 0: [LocalVariableDeclAndInitExpr] IntVector iv3 = ... +# 60| -1: [TypeMention] IntVector +# 60| 0: [LocalVariableAccess] access to local variable iv3 +# 60| 1: [ObjectCreation] object creation of type IntVector +# 60| -1: [TypeMention] IntVector +# 60| 0: [IntLiteral] 4 +# 61| 5: [ExprStmt] ...; +# 61| 0: [AssignAddExpr] ... += ... +# 61| 0: [LocalVariableAccess] access to local variable iv3 +# 61| 1: [LocalVariableAccess] access to local variable iv2 +# 64| 6: [ExprStmt] ...; +# 64| 0: [AssignSubExpr] ... -= ... +# 64| 0: [LocalVariableAccess] access to local variable iv3 +# 64| 1: [LocalVariableAccess] access to local variable iv2 +# 65| 7: [ExprStmt] ...; +# 65| 0: [AssignMulExpr] ... *= ... +# 65| 0: [LocalVariableAccess] access to local variable iv3 +# 65| 1: [LocalVariableAccess] access to local variable iv2 +# 66| 8: [ExprStmt] ...; +# 66| 0: [AssignDivExpr] ... /= ... +# 66| 0: [LocalVariableAccess] access to local variable iv3 +# 66| 1: [LocalVariableAccess] access to local variable iv2 +# 67| 9: [ExprStmt] ...; +# 67| 0: [AssignRemExpr] ... %= ... +# 67| 0: [LocalVariableAccess] access to local variable iv3 +# 67| 1: [LocalVariableAccess] access to local variable iv2 +# 68| 10: [ExprStmt] ...; +# 68| 0: [AssignAndExpr] ... &= ... +# 68| 0: [LocalVariableAccess] access to local variable iv3 +# 68| 1: [LocalVariableAccess] access to local variable iv2 +# 69| 11: [ExprStmt] ...; +# 69| 0: [AssignOrExpr] ... |= ... +# 69| 0: [LocalVariableAccess] access to local variable iv3 +# 69| 1: [LocalVariableAccess] access to local variable iv2 +# 70| 12: [ExprStmt] ...; +# 70| 0: [AssignXorExpr] ... ^= ... +# 70| 0: [LocalVariableAccess] access to local variable iv3 +# 70| 1: [LocalVariableAccess] access to local variable iv2 +# 71| 13: [ExprStmt] ...; +# 71| 0: [AssignLeftShiftExpr] ... <<= ... +# 71| 0: [LocalVariableAccess] access to local variable iv3 +# 71| 1: [LocalVariableAccess] access to local variable iv2 +# 72| 14: [ExprStmt] ...; +# 72| 0: [AssignRightShiftExpr] ... >>= ... +# 72| 0: [LocalVariableAccess] access to local variable iv3 +# 72| 1: [LocalVariableAccess] access to local variable iv2 +# 73| 15: [ExprStmt] ...; +# 73| 0: [AssignUnsignedRightShiftExpr] ... >>>= ... +# 73| 0: [LocalVariableAccess] access to local variable iv3 +# 73| 1: [LocalVariableAccess] access to local variable iv2 +# 75| 16: [CheckedStmt] checked {...} +# 76| 0: [BlockStmt] {...} +# 77| 0: [ExprStmt] ...; +# 77| 0: [AssignAddExpr] ... += ... +# 77| 0: [LocalVariableAccess] access to local variable iv3 +# 77| 1: [LocalVariableAccess] access to local variable iv2 +# 78| 1: [ExprStmt] ...; +# 78| 0: [AssignSubExpr] ... -= ... +# 78| 0: [LocalVariableAccess] access to local variable iv3 +# 78| 1: [LocalVariableAccess] access to local variable iv2 +# 79| 2: [ExprStmt] ...; +# 79| 0: [AssignMulExpr] ... *= ... +# 79| 0: [LocalVariableAccess] access to local variable iv3 +# 79| 1: [LocalVariableAccess] access to local variable iv2 +# 80| 3: [ExprStmt] ...; +# 80| 0: [AssignDivExpr] ... /= ... +# 80| 0: [LocalVariableAccess] access to local variable iv3 +# 80| 1: [LocalVariableAccess] access to local variable iv2 +# 85| 3: [Struct] Digit +# 87| 6: [Field] value +# 87| -1: [TypeMention] byte +# 89| 7: [InstanceConstructor] Digit +#-----| 2: (Parameters) +# 89| 0: [Parameter] value +# 89| -1: [TypeMention] byte +# 90| 4: [BlockStmt] {...} +# 91| 0: [IfStmt] if (...) ... +# 91| 0: [LogicalOrExpr] ... || ... +# 91| 0: [LTExpr] ... < ... +# 91| 0: [CastExpr] (...) ... +# 91| 1: [ParameterAccess] access to parameter value +# 91| 1: [IntLiteral] 0 +# 91| 1: [GTExpr] ... > ... +# 91| 0: [CastExpr] (...) ... +# 91| 1: [ParameterAccess] access to parameter value +# 91| 1: [IntLiteral] 9 +# 92| 1: [ThrowStmt] throw ...; +# 92| 0: [ObjectCreation] object creation of type ArgumentException +# 92| 0: [TypeMention] ArgumentException +# 93| 1: [ExprStmt] ...; +# 93| 0: [AssignExpr] ... = ... +# 93| 0: [FieldAccess] access to field value +# 93| -1: [ThisAccess] this access +# 93| 1: [ParameterAccess] access to parameter value +# 96| 8: [ImplicitConversionOperator] implicit conversion +# 96| -1: [TypeMention] byte +#-----| 2: (Parameters) +# 96| 0: [Parameter] d +# 96| -1: [TypeMention] Digit +# 97| 4: [BlockStmt] {...} +# 98| 0: [ReturnStmt] return ...; +# 98| 0: [FieldAccess] access to field value +# 98| -1: [ParameterAccess] access to parameter d +# 101| 9: [ExplicitConversionOperator] explicit conversion +# 101| -1: [TypeMention] Digit +#-----| 2: (Parameters) +# 101| 0: [Parameter] b +# 101| -1: [TypeMention] byte +# 102| 4: [BlockStmt] {...} +# 103| 0: [ReturnStmt] return ...; +# 103| 0: [ObjectCreation] object creation of type Digit +# 103| -1: [TypeMention] Digit +# 103| 0: [ParameterAccess] access to parameter b +# 108| 4: [Class] TestConversionOperator +# 111| 6: [Method] Main +# 111| -1: [TypeMention] Void +# 112| 4: [BlockStmt] {...} +# 113| 0: [LocalVariableDeclStmt] ... ...; +# 113| 0: [LocalVariableDeclAndInitExpr] Digit d = ... +# 113| -1: [TypeMention] Digit +# 113| 0: [LocalVariableAccess] access to local variable d +# 113| 1: [OperatorCall] call to operator explicit conversion +# 113| -1: [TypeMention] Digit +# 113| 0: [CastExpr] (...) ... +# 113| 1: [IntLiteral] 8 +# 114| 1: [LocalVariableDeclStmt] ... ...; +# 114| 0: [LocalVariableDeclAndInitExpr] Byte b = ... +# 114| -1: [TypeMention] byte +# 114| 0: [LocalVariableAccess] access to local variable b +# 114| 1: [OperatorCall] call to operator implicit conversion +# 114| 0: [LocalVariableAccess] access to local variable d diff --git a/csharp/ql/test/library-tests/operators/operators.cs b/csharp/ql/test/library-tests/operators/operators.cs index b58334b24a0b..3ff2fe1a26bf 100644 --- a/csharp/ql/test/library-tests/operators/operators.cs +++ b/csharp/ql/test/library-tests/operators/operators.cs @@ -6,7 +6,6 @@ namespace Operators { public class IntVector { - public IntVector(int length) { } public int Length { get { return 4; } } @@ -21,24 +20,70 @@ public IntVector(int length) { } return temp; } + public void operator +=(IntVector n) + { + if (n.Length != Length) + throw new ArgumentException(); + for (int i = 0; i < Length; i++) + this[i] += n[i]; + } + + public void operator checked +=(IntVector n) { } + + public void operator checked -=(IntVector n) { } + public void operator -=(IntVector n) { } + + public void operator checked *=(IntVector n) { } + public void operator *=(IntVector n) { } + + public void operator checked /=(IntVector n) { } + public void operator /=(IntVector n) { } + + public void operator %=(IntVector n) { } + public void operator &=(IntVector n) { } + public void operator |=(IntVector n) { } + public void operator ^=(IntVector n) { } + public void operator <<=(IntVector n) { } + public void operator >>=(IntVector n) { } + public void operator >>>=(IntVector n) { } } - class TestUnaryOperator + class TestOperator { - void Main() { IntVector iv1 = new IntVector(4); // vector of 4 x 0 IntVector iv2; iv2 = iv1++; // iv2 contains 4 x 0, iv1 contains 4 x 1 iv2 = ++iv1; // iv2 contains 4 x 2, iv1 contains 4 x 2 - } + IntVector iv3 = new IntVector(4); // vector of 4 x 0 + iv3 += iv2; // iv3 contains 4 x 2 + + // The following operations don't do anything. + iv3 -= iv2; + iv3 *= iv2; + iv3 /= iv2; + iv3 %= iv2; + iv3 &= iv2; + iv3 |= iv2; + iv3 ^= iv2; + iv3 <<= iv2; + iv3 >>= iv2; + iv3 >>>= iv2; + + checked + { + iv3 += iv2; + iv3 -= iv2; + iv3 *= iv2; + iv3 /= iv2; + } + } } public struct Digit { - byte value; public Digit(byte value) diff --git a/csharp/ql/test/query-tests/Nullness/C.cs b/csharp/ql/test/query-tests/Nullness/C.cs index 8c6a0226f36f..4ca1e2adf539 100644 --- a/csharp/ql/test/query-tests/Nullness/C.cs +++ b/csharp/ql/test/query-tests/Nullness/C.cs @@ -264,6 +264,13 @@ public void Access() temp = sa.Length; // BAD (always), but not first } + public void CompoundAssignment() + { + C c1 = null; + C c2 = new C(true); + c1 += c2; // $ Alert[cs/dereferenced-value-is-always-null] + } + bool m; C(bool m) { @@ -271,4 +278,6 @@ public void Access() } bool Maybe() => this.m; + + public void operator +=(C other) { } } diff --git a/csharp/ql/test/query-tests/Nullness/NullAlways.expected b/csharp/ql/test/query-tests/Nullness/NullAlways.expected index a633c4a15064..f95639c9b329 100644 --- a/csharp/ql/test/query-tests/Nullness/NullAlways.expected +++ b/csharp/ql/test/query-tests/Nullness/NullAlways.expected @@ -24,6 +24,7 @@ | C.cs:249:9:249:9 | access to local variable a | Variable $@ is always null at this dereference. | C.cs:248:15:248:15 | a | a | | C.cs:260:9:260:10 | access to local variable ia | Variable $@ is always null at this dereference. | C.cs:257:15:257:16 | ia | ia | | C.cs:261:20:261:21 | access to local variable sa | Variable $@ is always null at this dereference. | C.cs:258:18:258:19 | sa | sa | +| C.cs:271:9:271:10 | access to local variable c1 | Variable $@ is always null at this dereference. | C.cs:269:11:269:12 | c1 | c1 | | D.cs:120:13:120:13 | access to local variable x | Variable $@ is always null at this dereference. | D.cs:117:13:117:13 | x | x | | D.cs:197:13:197:13 | access to local variable o | Variable $@ is always null at this dereference. | D.cs:195:13:195:13 | o | o | | D.cs:207:17:207:17 | access to local variable e | Variable $@ is always null at this dereference. | D.cs:204:26:204:26 | e | e |