Skip to content

Commit dca10f8

Browse files
committed
C#: Add extended_type to the DB scheme.
1 parent 8e39ed0 commit dca10f8

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

csharp/extractor/Semmle.Extraction.CSharp/Kinds/TypeKind.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ public enum TypeKind
3838
TUPLE = 32,
3939
FUNCTION_POINTER = 33,
4040
INLINE_ARRAY = 34,
41+
EXTENSION = 35
4142
}
4243
}

csharp/ql/lib/semmlecode.csharp.dbscheme

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ overlayChangedFiles(
222222
| @using_directive | @type_parameter_constraints | @externalDataElement
223223
| @xmllocatable | @asp_element | @namespace | @preprocessor_directive;
224224

225-
@declaration = @callable | @generic | @assignable | @namespace;
225+
@declaration = @callable | @generic | @assignable | @namespace | @extension_type;
226226

227227
@named_element = @namespace | @declaration;
228228

@@ -492,6 +492,7 @@ case @type.kind of
492492
| 32 = @tuple_type
493493
| 33 = @function_pointer_type
494494
| 34 = @inline_array_type
495+
| 35 = @extension_type
495496
;
496497

497498
@simple_type = @bool_type | @char_type | @integral_type | @floating_point_type | @decimal_type;
@@ -502,7 +503,7 @@ case @type.kind of
502503
@value_type = @simple_type | @enum_type | @struct_type | @nullable_type | @int_ptr_type
503504
| @uint_ptr_type | @tuple_type | @void_type | @inline_array_type;
504505
@ref_type = @class_type | @interface_type | @array_type | @delegate_type | @null_type
505-
| @dynamic_type;
506+
| @dynamic_type | @extension_type;
506507
@value_or_ref_type = @value_type | @ref_type;
507508

508509
typerefs(
@@ -541,6 +542,10 @@ function_pointer_return_type(
541542
unique int function_pointer_id: @function_pointer_type ref,
542543
int return_type_id: @type_or_ref ref);
543544

545+
extension_receiver_type(
546+
unique int extension: @extension_type ref,
547+
int receiver_type_id: @type_or_ref ref);
548+
544549
extend(
545550
int sub: @type ref,
546551
int super: @type_or_ref ref);
@@ -903,7 +908,7 @@ localvar_location(
903908
unique int id: @local_variable ref,
904909
int loc: @location ref);
905910

906-
@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type;
911+
@parameterizable = @callable | @delegate_type | @indexer | @function_pointer_type | @extension_type;
907912

908913
#keyset[name, parent_id]
909914
#keyset[index, parent_id]

0 commit comments

Comments
 (0)