mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
C#: Extract function pointer types from CIL
This commit is contained in:
@@ -1695,6 +1695,7 @@ case @cil_type.kind of
|
||||
| 1 = @cil_typeparameter
|
||||
| 2 = @cil_array_type
|
||||
| 3 = @cil_pointer_type
|
||||
| 4 = @cil_function_pointer_type
|
||||
;
|
||||
|
||||
cil_type(
|
||||
@@ -1713,6 +1714,10 @@ cil_array_type(
|
||||
int element_type: @cil_type ref,
|
||||
int rank: int ref);
|
||||
|
||||
cil_function_pointer_return_type(
|
||||
unique int id: @cil_function_pointer_type ref,
|
||||
int return_type: @cil_type ref);
|
||||
|
||||
cil_method(
|
||||
unique int id: @cil_method,
|
||||
string name: string ref,
|
||||
@@ -1746,12 +1751,13 @@ cil_field(
|
||||
@cil_variable = @cil_field | @cil_stack_variable;
|
||||
@cil_stack_variable = @cil_local_variable | @cil_parameter;
|
||||
@cil_member = @cil_method | @cil_type | @cil_field | @cil_property | @cil_event;
|
||||
@cil_custom_modifier_receiver = @cil_method | @cil_property | @cil_parameter | @cil_field; // todo: add function pointer type
|
||||
@cil_custom_modifier_receiver = @cil_method | @cil_property | @cil_parameter | @cil_field | @cil_function_pointer_type;
|
||||
@cil_parameterizable = @cil_method | @cil_function_pointer_type;
|
||||
|
||||
#keyset[method, index]
|
||||
#keyset[parameterizable, index]
|
||||
cil_parameter(
|
||||
unique int id: @cil_parameter,
|
||||
int method: @cil_method ref,
|
||||
int parameterizable: @cil_parameterizable ref,
|
||||
int index: int ref,
|
||||
int param_type: @cil_type ref);
|
||||
|
||||
@@ -1796,6 +1802,10 @@ cil_local_variable(
|
||||
int index: int ref,
|
||||
int var_type: @cil_type ref);
|
||||
|
||||
cil_function_pointer_calling_conventions(
|
||||
int id: @cil_function_pointer_type ref,
|
||||
int kind: int ref);
|
||||
|
||||
// CIL handlers (exception handlers etc).
|
||||
|
||||
case @cil_handler.kind of
|
||||
|
||||
Reference in New Issue
Block a user